Update SaveButton to be either an input or a button element, and restore inputs that were previously switched to buttons
This commit is contained in:
parent
850153a517
commit
f3ea704c1b
@ -1,6 +1,8 @@
|
||||
{% macro SaveButton(text, additional_classes="") -%}
|
||||
{% macro SaveButton(text, element="button", additional_classes="", other_attrs="") -%}
|
||||
{% set class = "usa-button usa-button-primary" + additional_classes %}
|
||||
<button type="submit" class="{{ class }}" tabindex="0" v-bind:disabled="!changed">
|
||||
{{ text }}
|
||||
</button>
|
||||
<{{ element }} type="submit" class="{{ class }}" tabindex="0" v-bind:disabled="!changed" value="{{ text }}" {{ other_attrs }}>
|
||||
{% if element == 'button'%}
|
||||
{{ text }}
|
||||
{% endif %}
|
||||
</{{ element }}>
|
||||
{%- endmacro %}
|
||||
|
@ -60,7 +60,7 @@
|
||||
{{ Icon("x") }}
|
||||
<span>Cancel</span>
|
||||
</a>
|
||||
{{ SaveButton(text='Save Changes') }}
|
||||
{{ SaveButton(text='Save Changes', element="input") }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -103,7 +103,7 @@
|
||||
{% endblock %}
|
||||
|
||||
<div class='action-group'>
|
||||
{{ SaveButton(text="Continue") }}
|
||||
{{ SaveButton(text="Continue", element="input") }}
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
@ -32,7 +32,7 @@
|
||||
{{ MultiCheckboxInput(form.required_distribution) }}
|
||||
|
||||
<div class="action-group">
|
||||
{{ SaveButton(text='Continue') }}
|
||||
{{ SaveButton(text='Continue', additional_classes="usa-button-big") }}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -39,7 +39,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="action-group">
|
||||
{{ SaveButton(text=('common.sign' | translate)) }}
|
||||
{{ SaveButton(text=('common.sign' | translate), additional_classes="usa-button-big") }}
|
||||
<a
|
||||
href="{{ url_for("portfolios.ko_review", portfolio_id=portfolio_id, task_order_id=task_order_id) }}"
|
||||
class="action-group__action icon-link">
|
||||
|
Loading…
x
Reference in New Issue
Block a user