2021-01-27 06:08:26 +01:00
|
|
|
<div>
|
|
|
|
<label>{{i18n 'admin.wizard.field.validations.header'}}</label>
|
|
|
|
</div>
|
2021-01-30 18:46:04 +01:00
|
|
|
{{#each-in field.validations as |name props|}}
|
|
|
|
<span class="setting-title">
|
|
|
|
{{input type="checkbox" checked=props.status }}
|
2021-02-11 15:25:23 +01:00
|
|
|
{{i18n 'admin.wizard.field.validations.enable' validation_type=(i18n (concat 'admin.wizard.field.validations.' name))}}
|
2021-01-30 18:46:04 +01:00
|
|
|
</span>
|
2021-02-11 14:52:09 +01:00
|
|
|
<div class="validation-container">
|
|
|
|
<div class="validation-section">
|
2021-02-05 13:59:30 +01:00
|
|
|
<span class="setting-label">{{i18n 'admin.wizard.field.validations.categories'}}</span>
|
|
|
|
<div class="setting-value">
|
|
|
|
{{category-selector
|
|
|
|
categories=(get this (concat 'validationBuffer.' name '.categories'))
|
2021-02-11 14:52:09 +01:00
|
|
|
onChange=(action 'updateValidationCategories' name props)
|
|
|
|
class="wizard" }}
|
2021-02-05 13:59:30 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-02-11 14:52:09 +01:00
|
|
|
<div class="validation-section">
|
|
|
|
<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 class="validation-section">
|
|
|
|
<span class="setting-label">{{i18n 'admin.wizard.field.validations.position'}}</span>
|
|
|
|
<div class="setting-value">
|
|
|
|
{{radio-button name=(concat name field.id) value="above" selection=props.position}} {{i18n 'admin.wizard.field.validations.above'}}
|
|
|
|
{{radio-button name=(concat name field.id) value="below" selection=props.position}} {{i18n 'admin.wizard.field.validations.below'}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-01-30 18:46:04 +01:00
|
|
|
</div>
|
|
|
|
{{/each-in}}
|