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/custom-wizard-step.hbs

84 Zeilen
1,9 KiB
Handlebars

2021-04-12 16:19:53 +02:00
<div class="wizard-step-contents">
{{#if step.title}}
2021-04-12 16:19:53 +02:00
<h1 class="wizard-step-title">{{cookedTitle}}</h1>
{{/if}}
2021-04-12 16:19:53 +02:00
{{#if bannerImage}}
<div class="wizard-step-banner">
2023-07-10 08:55:54 +02:00
<img src={{bannerImage}} />
</div>
{{/if}}
2020-03-30 01:53:28 +02:00
{{#if step.description}}
2021-04-12 16:19:53 +02:00
<div class="wizard-step-description">{{cookedDescription}}</div>
2020-03-30 01:53:28 +02:00
{{/if}}
2022-07-28 21:12:36 +02:00
{{#custom-wizard-step-form step=step}}
2021-04-12 16:19:53 +02:00
{{#each step.fields as |field|}}
{{custom-wizard-field field=field step=step wizard=wizard}}
{{/each}}
2022-07-28 21:12:36 +02:00
{{/custom-wizard-step-form}}
</div>
2021-04-12 16:19:53 +02:00
<div class="wizard-step-footer">
2021-04-12 16:19:53 +02:00
<div class="wizard-progress">
<div class="white"></div>
<div class="black" style={{barStyle}}></div>
<div class="screen"></div>
2023-07-10 08:55:54 +02:00
<span>{{i18n
"wizard.step"
current=step.displayIndex
total=wizard.totalSteps
}}</span>
</div>
2021-04-12 16:19:53 +02:00
<div class="wizard-buttons">
{{#if saving}}
2021-04-12 16:19:53 +02:00
{{loading-spinner size="small"}}
{{else}}
{{#if showQuitButton}}
2023-07-10 08:55:54 +02:00
<a
href
{{action "quit"}}
class="action-link quit"
tabindex={{secondaryButtonIndex}}
>{{i18n "wizard.quit"}}</a>
{{/if}}
{{#if showBackButton}}
2023-07-10 08:55:54 +02:00
<a
href
{{action "backStep"}}
class="action-link back"
tabindex={{secondaryButtonIndex}}
>{{i18n "wizard.back"}}</a>
{{/if}}
{{/if}}
{{#if showNextButton}}
2023-07-10 08:55:54 +02:00
<button
type="button"
class="wizard-btn next primary"
{{action "nextStep"}}
disabled={{saving}}
tabindex={{primaryButtonIndex}}
>
{{i18n "wizard.next"}}
{{d-icon "chevron-right"}}
</button>
{{/if}}
{{#if showDoneButton}}
2023-07-10 08:55:54 +02:00
<button
type="button"
class="wizard-btn done"
{{action "done"}}
disabled={{saving}}
tabindex={{primaryButtonIndex}}
>
{{i18n "wizard.done_custom"}}
</button>
{{/if}}
</div>
2023-07-10 08:55:54 +02:00
</div>