0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-12 21:22:54 +01:00
discourse-custom-wizard/assets/javascripts/discourse/templates/components/realtime-validation-settings.hbs
2021-02-05 18:29:30 +05:30

32 Zeilen
1,3 KiB
Handlebars

<div>
<label>{{i18n 'admin.wizard.field.validations.header'}}</label>
</div>
{{#each-in field.validations as |name props|}}
<span class="setting-title">
{{input type="checkbox" checked=props.status }}
{{i18n (concat 'admin.wizard.field.validations.' name) }}
</span>
<div class="setting full">
<span class="setting-label">{{i18n 'admin.wizard.field.validations.categories'}}</span>
<div class="setting-value">
{{category-selector
categories=(get this (concat 'validationBuffer.' name '.categories'))
onChange=(action 'updateValidationCategories' name props) }}
</div>
</div>
<div class="setting full">
<span class="setting-label">{{i18n 'admin.wizard.field.validations.date_after'}}</span>
<div class="setting-value">
{{date-picker-past
value=(readonly props.date_after)
containerId="date-container"
onSelect=(action (mut props.date_after))}}
</div>
</div>
<div>
{{radio-button name=(concat name field.id) value="above" selection=props.position}} {{i18n 'admin.wizard.field.validations.above'}}
</div>
<div>
{{radio-button name=(concat name field.id) value="below" selection=props.position}} {{i18n 'admin.wizard.field.validations.below'}}
</div>
{{/each-in}}