Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-10 12:22:54 +01:00
186 Zeilen
4,6 KiB
Handlebars
186 Zeilen
4,6 KiB
Handlebars
<div class="setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n 'admin.wizard.field.label'}}</label>
|
|
</div>
|
|
<div class="setting-value">
|
|
{{input name="label" value=field.label}}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n 'admin.wizard.translation'}}</label>
|
|
</div>
|
|
<div class="setting-value">
|
|
{{input name="key" value=field.key placeholderKey="admin.wizard.translation_placeholder"}}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n 'admin.wizard.field.image'}}</label>
|
|
</div>
|
|
<div class="setting-value">
|
|
{{image-uploader
|
|
imageUrl=field.image
|
|
onUploadDone=(action "imageUploadDone")
|
|
onUploadDeleted=(action "imageUploadDeleted")
|
|
type="wizard-step"
|
|
class="no-repeat contain-image"}}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n 'admin.wizard.field.description'}}</label>
|
|
</div>
|
|
<div class="setting-value">
|
|
{{textarea name="description" value=field.description}}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n 'admin.wizard.type'}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
{{combo-box
|
|
value=field.type
|
|
content=types
|
|
onChange=(action (mut field.type))
|
|
options=(hash
|
|
none="admin.wizard.field.type"
|
|
)}}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n 'admin.wizard.field.required'}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
<span>{{i18n 'admin.wizard.field.required_label'}}</span>
|
|
{{input type='checkbox' checked=field.required}}
|
|
</div>
|
|
</div>
|
|
|
|
{{#if isInput}}
|
|
<div class="setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n 'admin.wizard.field.min_length'}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
{{input type="number" name="min_length" value=field.min_length}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if isDropdown}}
|
|
<div class="wizard-dropdown-choices">
|
|
<div class="wizard-header small underline">
|
|
{{i18n 'admin.wizard.field.choices_label'}}
|
|
</div>
|
|
|
|
{{combo-box
|
|
value=field.choices_type
|
|
content=choicesTypes
|
|
onChange=(action (mut field.choices_type))
|
|
options=(hash
|
|
none="admin.wizard.field.choices_type"
|
|
)}}
|
|
|
|
{{#if choicesTranslation}}
|
|
<div class="wizard-header small">
|
|
{{i18n 'admin.wizard.field.choices_translation'}}
|
|
</div>
|
|
{{input name="key" value=field.choices_key placeholderKey="admin.wizard.translation_placeholder"}}
|
|
{{/if}}
|
|
|
|
{{#if choicesCustom}}
|
|
<div class="wizard-header small">
|
|
{{i18n 'admin.wizard.field.choices_custom'}}
|
|
</div>
|
|
{{wizard-field-mapper
|
|
inputs=field.choices
|
|
wizardFields=wizardFields}}
|
|
{{/if}}
|
|
|
|
<div class="wizard-header small">
|
|
{{i18n 'admin.wizard.field.dropdown_none'}}
|
|
</div>
|
|
{{input name="dropdown_none" value=field.dropdown_none placeholder=(i18n 'admin.wizard.field.dropdown_none_placeholder')}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if isUpload}}
|
|
<div class="setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n 'admin.wizard.field.file_types'}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
{{input value=field.file_types}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if isCategory}}
|
|
<div class="setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n 'admin.wizard.field.property'}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
{{combo-box
|
|
value=field.property
|
|
content=categoryPropertyTypes
|
|
onChange=(action (mut field.property))
|
|
options=(hash
|
|
none='admin.wizard.select_property'
|
|
)}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if isCategoryOrTag}}
|
|
<div class="setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n 'admin.wizard.field.limit'}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
{{input type="number" value=field.limit}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div class="setting full field-mapper-setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n 'admin.wizard.field.prefill'}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
{{wizard-field-mapper
|
|
inputs=field.prefill
|
|
wizardFields=wizardFields
|
|
options=prefillOptions}}
|
|
</div>
|
|
</div>
|
|
|
|
{{#if canFilter}}
|
|
<div class="setting full field-mapper-setting">
|
|
<div class="setting-label">
|
|
<label>{{i18n 'admin.wizard.field.filter'}}</label>
|
|
</div>
|
|
|
|
<div class="setting-value">
|
|
{{wizard-field-mapper
|
|
inputs=field.filters
|
|
wizardFields=wizardFields
|
|
options=filterOptions}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|