0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-25 18:50:27 +01:00
discourse-custom-wizard/assets/javascripts/discourse/components/custom-wizard-step.hbs

84 Zeilen
2,1 KiB
Handlebars

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