[Common] RadioBox: change caption

This commit is contained in:
Julia Radzhabova 2019-09-06 14:34:35 +03:00
parent dfc21b5e2e
commit f8da0fb273

View file

@ -71,7 +71,7 @@ define([
disabled : false,
rendered : false,
template : _.template('<label class="radiobox"><input type="button" name="<%= name %>" class="img-commonctrl"><%= labelText %></label>'),
template : _.template('<label class="radiobox"><input type="button" name="<%= name %>" class="img-commonctrl"><span><%= labelText %></span></label>'),
initialize : function(options) {
Common.UI.BaseView.prototype.initialize.call(this, options);
@ -101,6 +101,7 @@ define([
}));
this.$radio = el.find('input[type=button]');
this.$label = el.find('label');
this.rendered = true;
return this;
@ -145,6 +146,10 @@ define([
getValue: function() {
return this.$radio.hasClass('checked');
},
setCaption: function(text) {
this.$label.find('span').text(text);
}
});
});