0
0
Fork 1
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:
angusmcleod 2021-02-13 12:51:37 +11:00
Ursprung b8671cef74
Commit 4ca82b9f4d
3 geänderte Dateien mit 56 neuen und 35 gelöschten Zeilen

Datei anzeigen

@ -4,6 +4,8 @@ import { cloneJSON } from "discourse-common/lib/object";
import Category from "discourse/models/category"; import Category from "discourse/models/category";
export default Component.extend({ export default Component.extend({
classNames: ['realtime-validations'],
init(){ init(){
this._super(...arguments); this._super(...arguments);
if (!this.validations) return; if (!this.validations) return;

Datei anzeigen

@ -1,36 +1,48 @@
<div> <h3>{{i18n 'admin.wizard.field.validations.header'}}</h3>
<label>{{i18n 'admin.wizard.field.validations.header'}}</label>
</div> <ul>
{{#each-in field.validations as |name props|}} {{#each-in field.validations as |name props|}}
<span class="setting-title"> <li>
{{input type="checkbox" checked=props.status }} <span class="setting-title">
{{i18n 'admin.wizard.field.validations.enable' validation_type=(i18n (concat 'admin.wizard.field.validations.' name))}} {{input type="checkbox" checked=props.status }}
</span> {{i18n 'admin.wizard.field.validations.enable'
<div class="validation-container"> validation_type=(i18n (concat 'admin.wizard.field.validations.' name))}}
<div class="validation-section"> </span>
<span class="setting-label">{{i18n 'admin.wizard.field.validations.categories'}}</span> <div class="validation-container">
<div class="setting-value"> <div class="validation-section">
{{category-selector <div class="setting-label">
categories=(get this (concat 'validationBuffer.' name '.categories')) <label>{{i18n 'admin.wizard.field.validations.categories'}}</label>
onChange=(action 'updateValidationCategories' name props) </div>
class="wizard" }} <div class="setting-value">
</div> {{category-selector
</div> categories=(get this (concat 'validationBuffer.' name '.categories'))
<div class="validation-section"> onChange=(action 'updateValidationCategories' name props)
<span class="setting-label">{{i18n 'admin.wizard.field.validations.date_after'}}</span> class="wizard"}}
<div class="setting-value"> </div>
{{date-picker-past </div>
value=(readonly props.date_after) <div class="validation-section">
containerId="date-container" <div class="setting-label">
onSelect=(action (mut props.date_after))}} <label>{{i18n 'admin.wizard.field.validations.date_after'}}</label>
</div>
<div class="setting-value">
{{date-picker-past
value=(readonly props.date_after)
containerId="date-container"
onSelect=(action (mut props.date_after))}}
</div>
</div>
<div class="validation-section">
<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'}}
</div>
</div>
</div> </div>
</div> </li>
<div class="validation-section"> {{/each-in}}
<span class="setting-label">{{i18n 'admin.wizard.field.validations.position'}}</span> </ul>
<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>
{{/each-in}}

Datei anzeigen

@ -644,8 +644,15 @@
} }
} }
.realtime-validations ul {
list-style: none;
margin: 0;
}
.validation-container { .validation-container {
display: flex; display: flex;
padding: 1em 0;
.validation-section { .validation-section {
width: 250px; width: 250px;
} }