2021-02-13 02:51:37 +01:00
|
|
|
<h3>{{i18n 'admin.wizard.field.validations.header'}}</h3>
|
|
|
|
|
|
|
|
<ul>
|
2021-02-16 01:43:00 +01:00
|
|
|
{{#each-in field.validations as |type props|}}
|
2021-02-13 02:51:37 +01:00
|
|
|
<li>
|
|
|
|
<span class="setting-title">
|
2021-02-16 01:43:00 +01:00
|
|
|
<h4>{{i18n (concat 'admin.wizard.field.validations.' type)}}</h4>
|
2021-02-15 12:51:59 +01:00
|
|
|
{{input type="checkbox" checked=props.status}}
|
|
|
|
{{i18n 'admin.wizard.field.validations.enabled'}}
|
2021-02-13 02:51:37 +01:00
|
|
|
</span>
|
|
|
|
<div class="validation-container">
|
|
|
|
<div class="validation-section">
|
|
|
|
<div class="setting-label">
|
|
|
|
<label>{{i18n 'admin.wizard.field.validations.categories'}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
|
|
{{category-selector
|
2021-02-16 01:43:00 +01:00
|
|
|
categories=(get this (concat 'validationBuffer.' type '.categories'))
|
|
|
|
onChange=(action 'updateValidationCategories' type props)
|
2021-02-13 02:51:37 +01:00
|
|
|
class="wizard"}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="validation-section">
|
|
|
|
<div class="setting-label">
|
|
|
|
<label>{{i18n 'admin.wizard.field.validations.date_after'}}</label>
|
|
|
|
</div>
|
|
|
|
<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">
|
|
|
|
<div class="setting-label">
|
|
|
|
<label>{{i18n 'admin.wizard.field.validations.position'}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="setting-value">
|
2021-02-16 01:43:00 +01:00
|
|
|
{{radio-button name=(concat type field.id) value="above" selection=props.position}}
|
2021-02-13 02:51:37 +01:00
|
|
|
{{i18n 'admin.wizard.field.validations.above'}}
|
2021-02-16 01:43:00 +01:00
|
|
|
{{radio-button name=(concat type field.id) value="below" selection=props.position}}
|
2021-02-13 02:51:37 +01:00
|
|
|
{{i18n 'admin.wizard.field.validations.below'}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-02-11 14:52:09 +01:00
|
|
|
</div>
|
2021-02-13 02:51:37 +01:00
|
|
|
</li>
|
|
|
|
{{/each-in}}
|
|
|
|
</ul>
|