discourse/app/assets/javascripts/admin/addon/templates/components/site-setting.hbs
Jarek Radosz c3fd91670e
DEV: Update linting setup and fix issues (#17345)
Re-lands #16119 and #17298

* Update eslint-config-discourse
* Update linting workflow
* Prettier-ignore stuff
* Update template-lint config
* Auto-fix template issues
* Fix various template issues
  Mostly incorrect attributes and unused templates
* Prettier js files
* Fix template auto-fix regressions
* Small css tweak

Co-authored-by: Peter Wagenet <peter.wagenet@gmail.com>
2022-07-06 10:37:54 +02:00

32 lines
1.2 KiB
Handlebars

<div class="setting-label">
<h3>
{{#if this.staffLogFilter}}
{{this.settingName}}
<LinkTo @route="adminLogs.staffActionLogs" @query={{hash filters=this.staffLogFilter force_refresh=true}} title={{i18n "admin.settings.history"}}>
<span class="history-icon">
{{d-icon "history"}}
</span>
</LinkTo>
{{else}}
{{this.settingName}}
{{/if}}
</h3>
{{#if this.defaultIsAvailable}}
<a href onClick={{action "setDefaultValues"}}>{{this.setting.setDefaultValuesLabel}}</a>
{{/if}}
</div>
<div class="setting-value">
{{component this.componentName setting=this.setting value=this.buffered.value validationMessage=this.validationMessage preview=this.preview isSecret=this.isSecret allowAny=this.allowAny}}
</div>
{{#if this.dirty}}
<div class="setting-controls">
<DButton @class="ok" @action={{action "update"}} @icon="check" />
<DButton @class="cancel" @action={{action "cancel"}} @icon="times" />
</div>
{{else if this.setting.overridden}}
{{#if this.setting.secret}}
<DButton @action={{action "toggleSecret"}} @icon="far-eye-slash" />
{{/if}}
<DButton @class="btn-default undo" @action={{action "resetDefault"}} @icon="undo" @label="admin.settings.reset" />
{{/if}}