77afc0d9fa
This refactors references to values in templates from `{{foo}}` to either `{{this.foo}}` if it's a property of backing JavaScript class or `{{@foo}}` if it's passed in on invocation. You could find more details on this change in Ember docs: - [required `this` in templates](https://guides.emberjs.com/release/upgrading/current-edition/templates/#toc_required-this-in-templates) - [named arguments](https://guides.emberjs.com/release/upgrading/current-edition/templates/#toc_named-arguments) While doing this I noticed that `<PollEvaluationSummaryOption>` component could be easily refactored to a template-only component. Done it as part of this pull request even so it's technically not related.
63 lines
2.1 KiB
Handlebars
63 lines
2.1 KiB
Handlebars
{{title (t "create.title")}}
|
|
|
|
<BsButtonGroup @justified={{true}} class="cr-steps-top-nav form-steps">
|
|
{{#each this.formSteps as |formStep|}}
|
|
{{#unless formStep.hidden}}
|
|
<BsButton
|
|
@onClick={{transition-to formStep.route}}
|
|
@type={{if (eq this.router.currentRouteName formStep.route) "primary is-active" "default"}}
|
|
disabled={{formStep.disabled}}
|
|
class="cr-steps-top-nav__button"
|
|
>
|
|
{{t formStep.label}}
|
|
</BsButton>
|
|
{{/unless}}
|
|
{{/each}}
|
|
<BsButton
|
|
@onClick={{transition-to "create.index"}}
|
|
@type={{if (eq this.router.currentRouteName "create.index") "primary is-active" "default"}}
|
|
class="cr-steps-top-nav__button"
|
|
>
|
|
{{t "create.formStep.type"}}
|
|
</BsButton>
|
|
<BsButton
|
|
@onClick={{transition-to "create.meta"}}
|
|
@type={{if (eq this.router.currentRouteName "create.meta") "primary is-active" "default"}}
|
|
disabled={{not this.canEnterMetaStep}}
|
|
class="cr-steps-top-nav__button"
|
|
>
|
|
{{t "create.formStep.meta"}}
|
|
</BsButton>
|
|
<BsButton
|
|
@onClick={{transition-to "create.options"}}
|
|
@type={{if (eq this.router.currentRouteName "create.options") "primary is-active" "default"}}
|
|
disabled={{not this.canEnterOptionsStep}}
|
|
class="cr-steps-top-nav__button"
|
|
>
|
|
{{#if this.isFindADate}}
|
|
{{t "create.formStep.options.days"}}
|
|
{{else}}
|
|
{{t "create.formStep.options.text"}}
|
|
{{/if}}
|
|
</BsButton>
|
|
{{#if this.isFindADate}}
|
|
<BsButton
|
|
@onClick={{transition-to "create.options-datetime"}}
|
|
@type={{if (eq this.router.currentRouteName "create.options-datetime") "primary is-active" "default"}}
|
|
disabled={{not this.canEnterOptionsDatetimeStep}}
|
|
class="cr-steps-top-nav__button"
|
|
>
|
|
{{t "create.formStep.options-datetime"}}
|
|
</BsButton>
|
|
{{/if}}
|
|
<BsButton
|
|
@onClick={{transition-to "create.settings"}}
|
|
@type={{if (eq this.router.currentRouteName "create.settings") "primary is-active" "default"}}
|
|
disabled={{not this.canEnterSettingsStep}}
|
|
class="cr-steps-top-nav__button"
|
|
>
|
|
{{t "create.formStep.settings"}}
|
|
</BsButton>
|
|
</BsButtonGroup>
|
|
|
|
{{outlet}}
|