0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-24 10:20:28 +01:00
discourse-custom-wizard/assets/javascripts/discourse/components/wizard-custom-step.hbs

123 Zeilen
3,3 KiB
Handlebars

2023-07-10 08:55:54 +02:00
<div class="setting">
<div class="setting-label">
<label>{{i18n "admin.wizard.step.title"}}</label>
</div>
<div class="setting-value">
<Input name="title" @value={{this.step.title}} />
</div>
</div>
<div class="setting full">
<div class="setting-label">
<label>{{i18n "admin.wizard.step.banner"}}</label>
</div>
<div class="setting-value">
{{uppy-image-uploader
2024-11-22 16:45:50 +01:00
imageUrl=this.step.banner
2023-07-10 08:55:54 +02:00
onUploadDone=(action "bannerUploadDone")
onUploadDeleted=(action "bannerUploadDeleted")
type="wizard-step-banner"
class="no-repeat contain-image"
2024-11-22 16:45:50 +01:00
id=(concat "wizard-step-" this.step.id "-banner-upload")
2023-07-10 08:55:54 +02:00
}}
</div>
</div>
<div class="setting full">
<div class="setting-label">
<label>{{i18n "admin.wizard.step.description"}}</label>
</div>
<div class="setting-value">
2024-11-22 16:45:50 +01:00
{{wizard-text-editor value=this.step.raw_description}}
2023-07-10 08:55:54 +02:00
</div>
</div>
{{#wizard-subscription-container}}
<div class="setting full field-mapper-setting">
<div class="setting-label">
<label>{{i18n "admin.wizard.condition"}}</label>
</div>
<div class="setting-value">
2024-11-22 16:51:24 +01:00
{{wizard-mapper
inputs=this.step.condition
options=this.stepConditionOptions
}}
2023-07-10 08:55:54 +02:00
</div>
</div>
<div class="setting full">
<div class="setting-label"></div>
<div class="setting-value force-final">
<h4>{{i18n "admin.wizard.step.force_final.label"}}</h4>
<Input @type="checkbox" @checked={{this.step.force_final}} />
<span>{{i18n "admin.wizard.step.force_final.description"}}</span>
</div>
</div>
<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
2024-11-22 16:45:50 +01:00
inputs=this.step.required_data
2023-07-10 08:55:54 +02:00
options=(hash
inputTypes="validation"
inputConnector="and"
wizardFieldSelection="value"
userFieldSelection="value"
keyPlaceholder="admin.wizard.submission_key"
context="step"
)
}}
2024-11-22 16:45:50 +01:00
{{#if this.step.required_data}}
2023-07-10 08:55:54 +02:00
<div class="required-data-message">
<div class="label">
{{i18n "admin.wizard.step.required_data.not_permitted_message"}}
</div>
<Input @value={{this.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
2024-11-22 16:45:50 +01:00
inputs=this.step.permitted_params
2023-07-10 08:55:54 +02:00
options=(hash
pairConnector="set"
inputTypes="association"
keyPlaceholder="admin.wizard.param_key"
valuePlaceholder="admin.wizard.submission_key"
context="step"
)
}}
</div>
</div>
{{/wizard-subscription-container}}
{{wizard-links
itemType="field"
2024-11-22 16:45:50 +01:00
current=this.currentField
items=this.step.fields
parentId=this.step.id
2023-07-10 08:55:54 +02:00
}}
2024-11-22 16:45:50 +01:00
{{#each this.step.fields as |field|}}
2023-07-10 08:55:54 +02:00
{{wizard-custom-field
field=field
2024-11-22 16:45:50 +01:00
step=this.step
wizard=this.wizard
currentFieldId=this.currentField.id
fieldTypes=this.fieldTypes
2023-07-10 08:55:54 +02:00
removeField="removeField"
2024-11-22 16:45:50 +01:00
wizardFields=this.wizardFields
subscribed=this.subscribed
2023-07-10 08:55:54 +02:00
}}
{{/each}}