1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/discourse/templates/components/wizard-custom-step.hbs
Angus McLeod 0d94c1d8c6 various
2020-04-02 19:21:03 +11:00

113 Zeilen
Kein EOL
2,9 KiB
Handlebars

<div class="setting">
<div class="setting-label">
<label>{{i18n 'admin.wizard.step.title'}}</label>
</div>
<div class="setting-value">
{{input
name="title"
value=step.title}}
</div>
</div>
<div class="setting">
<div class="setting-label">
<label>{{i18n 'admin.wizard.translation'}}</label>
</div>
<div class="setting-value">
{{input
name="key"
value=step.key
placeholderKey="admin.wizard.translation_placeholder"}}
</div>
</div>
<div class="setting full">
<div class="setting-label">
<label>{{i18n 'admin.wizard.step.banner'}}</label>
</div>
<div class="setting-value">
{{image-uploader
imageUrl=step.banner
onUploadDone=(action "bannerUploadDone")
onUploadDeleted=(action "bannerUploadDeleted")
type="wizard-banner"
class="no-repeat contain-image"}}
</div>
</div>
<div class="setting full">
<div class="setting-label">
<label>{{i18n 'admin.wizard.step.description'}}</label>
</div>
<div class="setting-value">
{{wizard-text-editor
value=step.raw_description
fieldsEnabled=false}}
</div>
</div>
{{wizard-advanced-toggle showAdvanced=step.showAdvanced}}
{{#if step.showAdvanced}}
<div class="advanced-settings">
<div class="setting full field-mapper-setting">
<div class="setting-label">
<label>{{i18n 'admin.wizard.step.required_data.label'}}</label>
</div>
<div class="setting-value">
{{wizard-mapper
inputs=step.required_data
keyPlaceholder="admin.wizard.submission_key"
options=(hash
wizardSelection='value'
userFieldSelection='value'
)}}
{{#if step.required_data}}
<div class="required-data-message">
<div class="label">
{{i18n 'admin.wizard.step.required_data.not_permitted_message'}}
</div>
{{input value=step.required_data_message}}
</div>
{{/if}}
</div>
</div>
<div class="setting full field-mapper-setting">
<div class="setting-label">
<label>{{i18n 'admin.wizard.step.permitted_params.label'}}</label>
</div>
<div class="setting-value">
{{wizard-mapper
inputs=step.permitted_params
keyPlaceholder='admin.wizard.param_key'
valuePlaceholder='admin.wizard.submission_key'
options=(hash
pairConnector='set'
)}}
</div>
</div>
</div>
{{/if}}
{{wizard-links type="field" current=currentField items=step.fields}}
{{#if currentField}}
{{wizard-custom-field
field=currentField
types=wizard.fieldTypes
removeField="removeField"
wizardFields=wizardFields}}
{{/if}}
{{wizard-links type="action" current=currentAction items=step.actions}}
{{#if currentAction}}
{{wizard-custom-action
action=currentAction
wizard=wizard
removeAction="removeAction"
wizardFields=wizardFields}}
{{/if}}