Settings: disable reset button (#14026)

* Settings: hiding  reset button for readonly fields

* allow disabling the reset button
pull/13996/head
Alan Sikora 7 years ago committed by Gabriel Engel
parent fede7cffc8
commit d7d5b66e7c
  1. 1
      app/federation/server/federation-settings.js
  2. 2
      app/ui-admin/client/admin.js

@ -33,6 +33,7 @@ Meteor.startup(function() {
i18nLabel: 'FEDERATION_Domain',
i18nDescription: 'FEDERATION_Domain_Description',
alert: 'FEDERATION_Domain_Alert',
disableReset: true,
});
this.add('FEDERATION_Public_Key', federationPublicKey, {

@ -346,7 +346,7 @@ Template.admin.helpers({
},
showResetButton() {
const setting = TempSettings.findOne({ _id: this._id }, { fields: { value: 1, packageValue: 1 } });
return !this.readonly && this.type !== 'asset' && setting.value !== setting.packageValue && !this.blocked;
return !this.disableReset && !this.readonly && this.type !== 'asset' && setting.value !== setting.packageValue && !this.blocked;
},
});

Loading…
Cancel
Save