discourse/app/assets/javascripts/admin/templates/components/site-setting.hbs

21 lines
826 B
Handlebars

<div class="setting-label">
<h3>{{settingName}}</h3>
{{#if defaultIsAvailable}}
<a href onClick={{action "setDefaultValues"}}>{{setting.setDefaultValuesLabel}}</a>
{{/if}}
</div>
<div class="setting-value">
{{component componentName setting=setting value=buffered.value validationMessage=validationMessage preview=preview isSecret=isSecret allowAny=allowAny}}
</div>
{{#if dirty}}
<div class="setting-controls">
{{d-button class="ok" action=(action "update") icon="check"}}
{{d-button class="cancel" action=(action "cancel") icon="times"}}
</div>
{{else if setting.overridden}}
{{#if setting.secret}}
{{d-button action=(action "toggleSecret") icon="far-eye-slash"}}
{{/if}}
{{d-button class="btn-default undo" action=(action "resetDefault") icon="undo" label="admin.settings.reset"}}
{{/if}}