66 lines
1.6 KiB
HTML
66 lines
1.6 KiB
HTML
<!-- Layout macro -->
|
|
{% macro MemberForm(title=None, next_button=None, previous=True, modal=modal) %}
|
|
<div class="member-form">
|
|
<hr class="full-width">
|
|
{% if title %} <h2>{{ title }}</h2> {% endif %}
|
|
|
|
{{ caller() }}
|
|
</div>
|
|
<div class='action-group'>
|
|
{{ next_button }}
|
|
{% if previous %}
|
|
<input
|
|
type='button'
|
|
v-on:click="previous()"
|
|
class='action-group__action usa-button usa-button-secondary'
|
|
value='{{ "common.previous" | translate }}'>
|
|
{% endif %}
|
|
<a class='action-group__action' v-on:click="closeModal('{{ modal }}')">{{ "common.cancel" | translate }}</a>
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
|
|
<!-- Step macros to use with MultiStepModalForm -->
|
|
{% macro BasicStep(
|
|
title=None,
|
|
form=form,
|
|
next_button_text=next_button_text,
|
|
previous=True,
|
|
modal=modal
|
|
) %}
|
|
{% set next_button %}
|
|
<input
|
|
type='button'
|
|
v-on:click="next()"
|
|
v-bind:disabled="!canSave"
|
|
class='action-group__action usa-button'
|
|
value='{{ next_button_text }}'>
|
|
{% endset %}
|
|
|
|
{% call MemberForm(title=title, next_button=next_button, previous=previous, modal=modal) %}
|
|
{{ form }}
|
|
{% endcall %}
|
|
{% endmacro %}
|
|
|
|
{% macro SubmitStep(
|
|
name=name,
|
|
title=None,
|
|
form=form,
|
|
submit_text=submit_text,
|
|
previous=True,
|
|
modal=modal
|
|
) %}
|
|
{% set next_button %}
|
|
<input
|
|
type="submit"
|
|
class='action-group__action usa-button'
|
|
form="{{ name }}"
|
|
v-bind:disabled="!canSave"
|
|
value='{{ submit_text }}'>
|
|
{% endset %}
|
|
|
|
{% call MemberForm(title=title, next_button=next_button, previous=previous, modal=modal) %}
|
|
{{ form }}
|
|
{% endcall %}
|
|
{% endmacro %}
|