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 %}
|
{% set class = "usa-button usa-button-primary" + additional_classes %}
|
||||||
<button type="submit" class="{{ class }}" tabindex="0" v-bind:disabled="!changed">
|
<{{ element }} type="submit" class="{{ class }}" tabindex="0" v-bind:disabled="!changed" value="{{ text }}" {{ other_attrs }}>
|
||||||
{{ text }}
|
{% if element == 'button'%}
|
||||||
</button>
|
{{ text }}
|
||||||
|
{% endif %}
|
||||||
|
</{{ element }}>
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
{{ Icon("x") }}
|
{{ Icon("x") }}
|
||||||
<span>Cancel</span>
|
<span>Cancel</span>
|
||||||
</a>
|
</a>
|
||||||
{{ SaveButton(text='Save Changes') }}
|
{{ SaveButton(text='Save Changes', element="input") }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -103,7 +103,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<div class='action-group'>
|
<div class='action-group'>
|
||||||
{{ SaveButton(text="Continue") }}
|
{{ SaveButton(text="Continue", element="input") }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
{{ MultiCheckboxInput(form.required_distribution) }}
|
{{ MultiCheckboxInput(form.required_distribution) }}
|
||||||
|
|
||||||
<div class="action-group">
|
<div class="action-group">
|
||||||
{{ SaveButton(text='Continue') }}
|
{{ SaveButton(text='Continue', additional_classes="usa-button-big") }}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="action-group">
|
<div class="action-group">
|
||||||
{{ SaveButton(text=('common.sign' | translate)) }}
|
{{ SaveButton(text=('common.sign' | translate), additional_classes="usa-button-big") }}
|
||||||
<a
|
<a
|
||||||
href="{{ url_for("portfolios.ko_review", portfolio_id=portfolio_id, task_order_id=task_order_id) }}"
|
href="{{ url_for("portfolios.ko_review", portfolio_id=portfolio_id, task_order_id=task_order_id) }}"
|
||||||
class="action-group__action icon-link">
|
class="action-group__action icon-link">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user