decide.nolog.cz/app/templates/create.hbs
Jeldrik Hanschke b421d19601
refactor step management and do not allow going forward with invalid state (#263)
Also removes an observer that causes a "You modified 'disabled' twice in a single render" and executes the logic in the next run loop to prevent that error. That's not ideal but it's not time for a major refactoring of that part.
2019-10-29 08:42:00 +01:00

18 lines
523 B
Handlebars

{{title (t "create.title")}}
<BsButtonGroup @justified={{true}} class="cr-steps-top-nav form-steps">
{{#each formSteps as |formStep|}}
{{#unless formStep.hidden}}
<BsButton
@onClick={{transition-to formStep.route}}
@type={{if (eq router.currentRouteName formStep.route) "primary is-active" "default"}}
disabled={{formStep.disabled}}
class="cr-steps-top-nav__button"
>
{{t formStep.label}}
</BsButton>
{{/unless}}
{{/each}}
</BsButtonGroup>
{{outlet}}