fix button helper

This commit is contained in:
yuri
2018-08-17 12:42:35 +03:00
parent e24fc19314
commit 7b982acc3e
2 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -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>');
});
+8 -5
View File
@@ -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';
}