From 5e77c4f29cd77782f2c32882dbdf2beef359c49d Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Sat, 6 Apr 2019 15:34:01 -0400 Subject: [PATCH] Refactor SaveButton --- templates/components/save_button.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/templates/components/save_button.html b/templates/components/save_button.html index fbd6f56f..4adb6e37 100644 --- a/templates/components/save_button.html +++ b/templates/components/save_button.html @@ -1,8 +1,10 @@ -{% macro SaveButton(text, element="button", additional_classes="", other_attrs="") -%} +{% macro SaveButton(text, element="button", additional_classes="", form=None) -%} {% set class = "usa-button usa-button-primary" + additional_classes %} - <{{ element }} type="submit" class="{{ class }}" tabindex="0" v-bind:disabled="!changed" value="{{ text }}" {{ other_attrs }}> - {% if element == 'button'%} + {% if element == "button" %} + + {% elif element == 'input' %} + + {% endif %} {%- endmacro %}