fix button helper
This commit is contained in:
@@ -186,7 +186,7 @@ Espo.define('view-helper', [], function () {
|
||||
var scope = options.hash.scope || null;
|
||||
var label = options.hash.label || name;
|
||||
|
||||
var html = options.hash.label.html || self.language.translate(label, 'labels', scope);
|
||||
var html = options.hash.html || options.hash.text || self.language.translate(label, 'labels', scope);
|
||||
return new Handlebars.SafeString('<button class="btn btn-'+style+' action'+ (options.hash.hidden ? ' hidden' : '')+'" data-action="'+name+'" type="button">'+html+'</button>');
|
||||
});
|
||||
|
||||
|
||||
@@ -41,11 +41,6 @@ Espo.define('views/preferences/record/edit', 'views/record/edit', function (Dep)
|
||||
{
|
||||
name: 'cancel',
|
||||
label: 'Cancel',
|
||||
},
|
||||
{
|
||||
name: 'reset',
|
||||
label: 'Reset',
|
||||
style: 'danger'
|
||||
}
|
||||
],
|
||||
|
||||
@@ -87,6 +82,14 @@ Espo.define('views/preferences/record/edit', 'views/record/edit', function (Dep)
|
||||
setup: function () {
|
||||
Dep.prototype.setup.call(this);
|
||||
|
||||
this.buttonList.push(
|
||||
{
|
||||
name: 'reset',
|
||||
html: this.getLanguage().translate('Reset to Default', 'labels', 'Admin'),
|
||||
style: 'danger'
|
||||
}
|
||||
);
|
||||
|
||||
if (this.model.get('isPortalUser')) {
|
||||
this.layoutName = 'detailPortal';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user