mirror of
https://github.com/discourse/discourse.git
synced 2024-12-11 16:23:44 +08:00
68a912952c
When we started using NumberField for integer site settings
in e113eff663
, we did not end up
passing down a min/max value for the integer to the field, which
meant that for some fields where negative numbers were allowed
we were not accepting that as valid input.
This commit passes down the min/max options from the server for
integer settings then in turn passes them down to NumberField.
c.f. https://meta.discourse.org/t/delete-user-self-max-post-count-not-accepting-1-to-disable/285162
9 lines
316 B
Handlebars
9 lines
316 B
Handlebars
<NumberField
|
|
@value={{this.value}}
|
|
@classNames="input-setting-integer"
|
|
@min={{(if this.setting.min this.setting.min null)}}
|
|
@max={{(if this.setting.max this.setting.max null)}}
|
|
/>
|
|
|
|
<SettingValidationMessage @message={{this.validationMessage}} />
|
|
<div class="desc">{{html-safe this.setting.description}}</div> |