Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-25 18:50:27 +01:00
Style updates (WIP)
See further comments on thepavilion.io
Dieser Commit ist enthalten in:
Ursprung
b8671cef74
Commit
4ca82b9f4d
3 geänderte Dateien mit 56 neuen und 35 gelöschten Zeilen
|
@ -4,6 +4,8 @@ import { cloneJSON } from "discourse-common/lib/object";
|
|||
import Category from "discourse/models/category";
|
||||
|
||||
export default Component.extend({
|
||||
classNames: ['realtime-validations'],
|
||||
|
||||
init(){
|
||||
this._super(...arguments);
|
||||
if (!this.validations) return;
|
||||
|
|
|
@ -1,23 +1,29 @@
|
|||
<div>
|
||||
<label>{{i18n 'admin.wizard.field.validations.header'}}</label>
|
||||
</div>
|
||||
{{#each-in field.validations as |name props|}}
|
||||
<h3>{{i18n 'admin.wizard.field.validations.header'}}</h3>
|
||||
|
||||
<ul>
|
||||
{{#each-in field.validations as |name props|}}
|
||||
<li>
|
||||
<span class="setting-title">
|
||||
{{input type="checkbox" checked=props.status }}
|
||||
{{i18n 'admin.wizard.field.validations.enable' validation_type=(i18n (concat 'admin.wizard.field.validations.' name))}}
|
||||
{{i18n 'admin.wizard.field.validations.enable'
|
||||
validation_type=(i18n (concat 'admin.wizard.field.validations.' name))}}
|
||||
</span>
|
||||
<div class="validation-container">
|
||||
<div class="validation-section">
|
||||
<span class="setting-label">{{i18n 'admin.wizard.field.validations.categories'}}</span>
|
||||
<div class="setting-label">
|
||||
<label>{{i18n 'admin.wizard.field.validations.categories'}}</label>
|
||||
</div>
|
||||
<div class="setting-value">
|
||||
{{category-selector
|
||||
categories=(get this (concat 'validationBuffer.' name '.categories'))
|
||||
onChange=(action 'updateValidationCategories' name props)
|
||||
class="wizard" }}
|
||||
class="wizard"}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="validation-section">
|
||||
<span class="setting-label">{{i18n 'admin.wizard.field.validations.date_after'}}</span>
|
||||
<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)
|
||||
|
@ -26,11 +32,17 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="validation-section">
|
||||
<span class="setting-label">{{i18n 'admin.wizard.field.validations.position'}}</span>
|
||||
<div class="setting-label">
|
||||
<label>{{i18n 'admin.wizard.field.validations.position'}}</label>
|
||||
</div>
|
||||
<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'}}
|
||||
{{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>
|
||||
{{/each-in}}
|
||||
</li>
|
||||
{{/each-in}}
|
||||
</ul>
|
||||
|
|
|
@ -644,8 +644,15 @@
|
|||
}
|
||||
}
|
||||
|
||||
.realtime-validations ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.validation-container {
|
||||
display: flex;
|
||||
padding: 1em 0;
|
||||
|
||||
.validation-section {
|
||||
width: 250px;
|
||||
}
|
||||
|
|
Laden …
In neuem Issue referenzieren