0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-14 05:52:52 +01:00
discourse-custom-wizard/assets/javascripts/discourse/templates/components/wizard-custom-step.hbs

110 Zeilen
3,1 KiB
Handlebars

2017-10-07 04:27:38 +02:00
<div class="setting">
<div class="setting-label">
2020-03-30 01:53:28 +02:00
<label>{{i18n 'admin.wizard.step.title'}}</label>
2017-10-07 04:27:38 +02:00
</div>
<div class="setting-value">
2020-03-29 09:49:33 +02:00
{{input
2020-03-30 01:53:28 +02:00
name="title"
value=step.title}}
2017-10-13 15:02:34 +02:00
</div>
</div>
2020-03-30 01:53:28 +02:00
<div class="setting full">
2017-10-06 04:59:02 +02:00
<div class="setting-label">
2020-03-30 01:53:28 +02:00
<label>{{i18n 'admin.wizard.step.banner'}}</label>
2017-10-06 04:59:02 +02:00
</div>
<div class="setting-value">
2020-03-30 01:53:28 +02:00
{{image-uploader
imageUrl=step.banner
onUploadDone=(action "bannerUploadDone")
onUploadDeleted=(action "bannerUploadDeleted")
type="wizard-banner"
class="no-repeat contain-image"}}
2017-10-06 04:59:02 +02:00
</div>
2017-09-23 04:34:07 +02:00
</div>
2017-11-02 03:22:13 +01:00
<div class="setting full">
2017-10-06 04:59:02 +02:00
<div class="setting-label">
2020-03-30 01:53:28 +02:00
<label>{{i18n 'admin.wizard.step.description'}}</label>
2017-10-06 04:59:02 +02:00
</div>
<div class="setting-value">
2020-03-30 01:53:28 +02:00
{{wizard-text-editor
value=step.raw_description
2020-04-14 07:46:06 +02:00
wizardFields=descriptionWizardFields}}
2017-10-06 04:59:02 +02:00
</div>
2017-09-23 04:34:07 +02:00
</div>
2020-04-06 03:54:16 +02:00
{{#if siteSettings.wizard_step_advanced}}
{{wizard-advanced-toggle showAdvanced=step.showAdvanced}}
2020-04-02 07:21:57 +02:00
2020-04-06 03:54:16 +02:00
{{#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
options=(hash
2020-04-06 10:36:38 +02:00
inputTypes='validation'
2020-04-10 09:57:49 +02:00
inputConnector='and'
2020-04-06 03:54:16 +02:00
wizardFieldSelection='value'
userFieldSelection='value'
keyPlaceholder="admin.wizard.submission_key"
context='step'
)}}
{{#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}}
2020-04-02 07:21:57 +02:00
</div>
2020-04-06 03:54:16 +02:00
{{/if}}
</div>
2020-04-02 07:21:57 +02:00
</div>
2020-04-06 03:54:16 +02:00
<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
options=(hash
pairConnector='set'
2020-04-07 09:54:30 +02:00
inputTypes='association'
2020-04-06 03:54:16 +02:00
keyPlaceholder='admin.wizard.param_key'
valuePlaceholder='admin.wizard.submission_key'
context='step'
)}}
</div>
2020-04-02 07:21:57 +02:00
</div>
2020-04-06 03:54:16 +02:00
<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>
2020-04-02 11:29:22 +02:00
</div>
2020-04-06 03:54:16 +02:00
2020-04-02 11:29:22 +02:00
</div>
2020-04-06 03:54:16 +02:00
{{/if}}
2020-04-02 07:21:57 +02:00
{{/if}}
2020-04-10 09:57:49 +02:00
{{wizard-links itemType="field" current=currentField items=step.fields}}
2020-03-21 18:30:11 +01:00
2017-10-06 04:59:02 +02:00
{{#if currentField}}
2020-03-21 18:30:11 +01:00
{{wizard-custom-field
field=currentField
2020-04-13 14:17:22 +02:00
fieldTypes=fieldTypes
2020-03-21 18:30:11 +01:00
removeField="removeField"
wizardFields=wizardFields}}
2020-03-29 09:49:33 +02:00
{{/if}}