0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-25 10:40:28 +01:00
discourse-custom-wizard/assets/javascripts/discourse/templates/components/wizard-realtime-validations.hbs

51 Zeilen
2 KiB
Handlebars

2021-04-12 16:19:53 +02:00
<h3>{{i18n "admin.wizard.field.validations.header"}}</h3>
<ul>
{{#each-in field.validations as |type props|}}
<li>
<span class="setting-title">
2021-04-12 16:19:53 +02:00
<h4>{{i18n (concat "admin.wizard.field.validations." type)}}</h4>
2021-02-15 12:51:59 +01:00
{{input type="checkbox" checked=props.status}}
2021-04-12 16:19:53 +02:00
{{i18n "admin.wizard.field.validations.enabled"}}
</span>
<div class="validation-container">
<div class="validation-section">
<div class="setting-label">
2021-04-12 16:19:53 +02:00
<label>{{i18n "admin.wizard.field.validations.categories"}}</label>
</div>
<div class="setting-value">
{{category-selector
2021-04-12 16:19:53 +02:00
categories=(get this (concat "validationBuffer." type ".categories"))
onChange=(action "updateValidationCategories" type props)
class="wizard"}}
</div>
</div>
<div class="validation-section">
<div class="setting-label">
2021-04-12 16:19:53 +02:00
<label>{{i18n "admin.wizard.field.validations.max_topic_age"}}</label>
</div>
<div class="setting-value">
2021-02-25 11:29:42 +01:00
{{input type="number" class="time-n-value" value=props.time_n_value}}
{{combo-box
value=(readonly props.time_unit)
content=timeUnits
class="time-unit-selector"
onChange=(action (mut props.time_unit))}}
</div>
</div>
<div class="validation-section">
<div class="setting-label">
2021-04-12 16:19:53 +02:00
<label>{{i18n "admin.wizard.field.validations.position"}}</label>
</div>
<div class="setting-value">
{{radio-button name=(concat type field.id) value="above" selection=props.position}}
2021-04-12 16:19:53 +02:00
{{i18n "admin.wizard.field.validations.above"}}
{{radio-button name=(concat type field.id) value="below" selection=props.position}}
2021-04-12 16:19:53 +02:00
{{i18n "admin.wizard.field.validations.below"}}
</div>
</div>
2021-02-11 14:52:09 +01:00
</div>
</li>
{{/each-in}}
</ul>