diff --git a/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs b/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs index 26d2cfa7..0502d3bc 100644 --- a/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs @@ -219,10 +219,9 @@ + {{#if validations}} + {{wizard-realtime-validation-settings field=field validations=validations}} + {{/if}} {{/if}} - - {{#if validations}} - {{wizard-realtime-validation-settings field=field validations=validations}} - {{/if}} {{/if}} diff --git a/assets/javascripts/discourse/templates/components/wizard-realtime-validation-settings.hbs b/assets/javascripts/discourse/templates/components/wizard-realtime-validation-settings.hbs index c8d35aa4..a012cdee 100644 --- a/assets/javascripts/discourse/templates/components/wizard-realtime-validation-settings.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-realtime-validation-settings.hbs @@ -6,27 +6,31 @@ {{input type="checkbox" checked=props.status }} {{i18n (concat 'admin.wizard.field.validations.' name) }} -
+
+
{{i18n 'admin.wizard.field.validations.categories'}}
{{category-selector categories=(get this (concat 'validationBuffer.' name '.categories')) - onChange=(action 'updateValidationCategories' name props) }} + onChange=(action 'updateValidationCategories' name props) + class="wizard" }}
-
-
- {{i18n 'admin.wizard.field.validations.date_after'}} -
- {{date-picker-past - value=(readonly props.date_after) - containerId="date-container" - onSelect=(action (mut props.date_after))}} -
-
- {{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'}} +
+ {{i18n 'admin.wizard.field.validations.date_after'}} +
+ {{date-picker-past + value=(readonly props.date_after) + containerId="date-container" + onSelect=(action (mut props.date_after))}} +
+
+
+ {{i18n 'admin.wizard.field.validations.position'}} +
+ {{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'}} +
+
{{/each-in}} diff --git a/assets/stylesheets/common/wizard-admin.scss b/assets/stylesheets/common/wizard-admin.scss index 8816039b..8daf904d 100644 --- a/assets/stylesheets/common/wizard-admin.scss +++ b/assets/stylesheets/common/wizard-admin.scss @@ -642,4 +642,15 @@ } } } -} \ No newline at end of file +} + +.validation-container { + display: flex; + .validation-section { + width: 250px; + } +} + +.wizard.category-selector { + width: 200px !important; +} diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 555f8a94..899d0481 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -179,6 +179,7 @@ en: validations: header: "Realtime Validation Settings" similar_topics: "Similar Topics" + position: "Position" above: "Above" below: "Below" categories: "Categories"