Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-10 04:12:53 +01:00
improved admin side settings UI
Dieser Commit ist enthalten in:
Ursprung
800795047a
Commit
176cd7489a
4 geänderte Dateien mit 36 neuen und 21 gelöschten Zeilen
|
@ -219,10 +219,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{#if validations}}
|
||||||
|
{{wizard-realtime-validation-settings field=field validations=validations}}
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if validations}}
|
|
||||||
{{wizard-realtime-validation-settings field=field validations=validations}}
|
|
||||||
{{/if}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -6,27 +6,31 @@
|
||||||
{{input type="checkbox" checked=props.status }}
|
{{input type="checkbox" checked=props.status }}
|
||||||
{{i18n (concat 'admin.wizard.field.validations.' name) }}
|
{{i18n (concat 'admin.wizard.field.validations.' name) }}
|
||||||
</span>
|
</span>
|
||||||
<div class="setting full">
|
<div class="validation-container">
|
||||||
|
<div class="validation-section">
|
||||||
<span class="setting-label">{{i18n 'admin.wizard.field.validations.categories'}}</span>
|
<span class="setting-label">{{i18n 'admin.wizard.field.validations.categories'}}</span>
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{category-selector
|
{{category-selector
|
||||||
categories=(get this (concat 'validationBuffer.' name '.categories'))
|
categories=(get this (concat 'validationBuffer.' name '.categories'))
|
||||||
onChange=(action 'updateValidationCategories' name props) }}
|
onChange=(action 'updateValidationCategories' name props)
|
||||||
|
class="wizard" }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="setting full">
|
|
||||||
<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>
|
||||||
<div>
|
<div class="validation-section">
|
||||||
{{radio-button name=(concat name field.id) value="above" selection=props.position}} {{i18n 'admin.wizard.field.validations.above'}}
|
<span class="setting-label">{{i18n 'admin.wizard.field.validations.date_after'}}</span>
|
||||||
</div>
|
<div class="setting-value">
|
||||||
<div>
|
{{date-picker-past
|
||||||
{{radio-button name=(concat name field.id) value="below" selection=props.position}} {{i18n 'admin.wizard.field.validations.below'}}
|
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>
|
||||||
</div>
|
</div>
|
||||||
{{/each-in}}
|
{{/each-in}}
|
||||||
|
|
|
@ -643,3 +643,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.validation-container {
|
||||||
|
display: flex;
|
||||||
|
.validation-section {
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wizard.category-selector {
|
||||||
|
width: 200px !important;
|
||||||
|
}
|
||||||
|
|
|
@ -179,6 +179,7 @@ en:
|
||||||
validations:
|
validations:
|
||||||
header: "Realtime Validation Settings"
|
header: "Realtime Validation Settings"
|
||||||
similar_topics: "Similar Topics"
|
similar_topics: "Similar Topics"
|
||||||
|
position: "Position"
|
||||||
above: "Above"
|
above: "Above"
|
||||||
below: "Below"
|
below: "Below"
|
||||||
categories: "Categories"
|
categories: "Categories"
|
||||||
|
|
Laden …
In neuem Issue referenzieren