2021-09-01 04:19:00 +02:00
|
|
|
<div class="setting-label">
|
|
|
|
<label>{{i18n "admin.wizard.field.validations.header"}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="setting-value full">
|
|
|
|
<ul>
|
2024-11-22 16:45:50 +01:00
|
|
|
{{#each-in this.field.validations as |type props|}}
|
2021-09-01 04:19:00 +02:00
|
|
|
<li>
|
|
|
|
<span class="setting-title">
|
|
|
|
<h4>{{i18n (concat "admin.wizard.field.validations." type)}}</h4>
|
2023-10-18 14:14:15 +02:00
|
|
|
<Input @type="checkbox" @checked={{props.status}} />
|
2021-09-01 04:19:00 +02:00
|
|
|
{{i18n "admin.wizard.field.validations.enabled"}}
|
|
|
|
</span>
|
|
|
|
<div class="validation-container">
|
|
|
|
<div class="validation-section">
|
|
|
|
<div class="setting-label">
|
2023-07-10 08:55:54 +02:00
|
|
|
<label>{{i18n
|
|
|
|
"admin.wizard.field.validations.categories"
|
|
|
|
}}</label>
|
2021-09-01 04:19:00 +02:00
|
|
|
</div>
|
|
|
|
<div class="setting-value">
|
2024-05-02 14:57:56 +02:00
|
|
|
<CategorySelector
|
|
|
|
@categories={{get
|
|
|
|
this
|
|
|
|
(concat "validationBuffer." type ".categories")
|
|
|
|
}}
|
|
|
|
@onChange={{action "updateValidationCategories" type props}}
|
2023-07-10 08:55:54 +02:00
|
|
|
class="wizard"
|
2024-05-02 14:57:56 +02:00
|
|
|
/>
|
2021-09-01 04:19:00 +02:00
|
|
|
</div>
|
2021-02-13 02:51:37 +01:00
|
|
|
</div>
|
2021-09-01 04:19:00 +02:00
|
|
|
<div class="validation-section">
|
|
|
|
<div class="setting-label">
|
2023-07-10 08:55:54 +02:00
|
|
|
<label>{{i18n
|
|
|
|
"admin.wizard.field.validations.max_topic_age"
|
|
|
|
}}</label>
|
2021-09-01 04:19:00 +02:00
|
|
|
</div>
|
|
|
|
<div class="setting-value">
|
2023-04-03 04:28:06 +02:00
|
|
|
<Input
|
|
|
|
@type="number"
|
2023-10-18 14:14:15 +02:00
|
|
|
@value={{props.time_n_value}}
|
2023-04-03 04:28:06 +02:00
|
|
|
class="time-n-value"
|
|
|
|
/>
|
2021-09-01 04:19:00 +02:00
|
|
|
{{combo-box
|
2023-07-10 08:55:54 +02:00
|
|
|
value=(readonly props.time_unit)
|
2024-11-22 16:45:50 +01:00
|
|
|
content=this.timeUnits
|
2023-07-10 08:55:54 +02:00
|
|
|
class="time-unit-selector"
|
|
|
|
onChange=(action (mut props.time_unit))
|
|
|
|
}}
|
2021-09-01 04:19:00 +02:00
|
|
|
</div>
|
2021-02-13 02:51:37 +01:00
|
|
|
</div>
|
2021-09-01 04:19:00 +02:00
|
|
|
<div class="validation-section">
|
|
|
|
<div class="setting-label">
|
|
|
|
<label>{{i18n "admin.wizard.field.validations.position"}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="setting-value">
|
2023-07-10 08:55:54 +02:00
|
|
|
{{radio-button
|
2024-11-22 16:45:50 +01:00
|
|
|
name=(concat type this.field.id)
|
2023-07-10 08:55:54 +02:00
|
|
|
value="above"
|
|
|
|
selection=props.position
|
|
|
|
}}
|
2021-09-01 04:19:00 +02:00
|
|
|
<span>{{i18n "admin.wizard.field.validations.above"}}</span>
|
2023-07-10 08:55:54 +02:00
|
|
|
{{radio-button
|
2024-11-22 16:45:50 +01:00
|
|
|
name=(concat type this.field.id)
|
2023-07-10 08:55:54 +02:00
|
|
|
value="below"
|
|
|
|
selection=props.position
|
|
|
|
}}
|
2021-09-01 04:19:00 +02:00
|
|
|
<span>{{i18n "admin.wizard.field.validations.below"}}</span>
|
|
|
|
</div>
|
2021-02-13 02:51:37 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-09-01 04:19:00 +02:00
|
|
|
</li>
|
|
|
|
{{/each-in}}
|
|
|
|
</ul>
|
2023-07-10 08:55:54 +02:00
|
|
|
</div>
|