discourse/app/assets/javascripts/admin/addon/components/site-settings/integer.hbs
Alan Guo Xiang Tan e7f539df10
UX: Display setting description for objects typed theme setting (#26152)
Why this change?

Prior to this change, there is no description being displayed for
objects typed theme setting because we were rendering a button instead
of the components for the various setting types which will render the
setting's description.

What does this change do?

1. Introduce `SiteSettings::Description` compoment to centralise the HTML
being rendered across all settings component.

2. Renders the `SiteSettings::Description` component after the edit
   button in `site_setting.hbs`.
2024-03-13 12:38:21 +08:00

11 lines
380 B
Handlebars

<input
{{on "input" (with-event-value (fn (mut this.value)))}}
type="number"
value={{this.value}}
min={{if this.setting.min this.setting.min null}}
max={{if this.setting.max this.setting.max null}}
class="input-setting-integer"
/>
<SettingValidationMessage @message={{this.validationMessage}} />
<SiteSettings::Description @description={{this.setting.description}} />