Reimplement SaveButton disabled until input change

This commit is contained in:
leigh-mil
2019-06-13 14:34:55 -04:00
parent ab761d9d88
commit 5be4efb9d9
9 changed files with 323 additions and 267 deletions

View File

@@ -5,7 +5,8 @@
label=field.label | striptags,
description=field.description,
mindate=None,
maxdate=None) -%}
maxdate=None,
watch=False) -%}
<date-selector
{% if maxdate %}maxdate="{{ maxdate.strftime("%Y-%m-%d") }}"{% endif %}
@@ -13,6 +14,7 @@
initialmonth="{{ field.data.month }}"
initialday="{{ field.data.day }}"
initialyear="{{ field.data.year }}"
v-bind:watch='{{ watch | string | lower }}'
inline-template>
<fieldset class="usa-input date-picker" v-bind:class="{ 'usa-input--success': isDateValid }">

View File

@@ -15,7 +15,8 @@
classes='',
noMaxWidth=False,
optional=False,
showLabel=True) -%}
showLabel=True,
watch=False) -%}
<textinput
v-cloak
@@ -27,6 +28,7 @@
{% if field.errors %}v-bind:initial-errors='{{ field.errors | list }}'{% endif %}
v-bind:optional={{ optional|lower }}
key='{{ field.name }}'
:watch='{{ watch | string | lower }}'
inline-template>
<div

View File

@@ -1,6 +1,6 @@
{% from "components/icon.html" import Icon %}
{% macro UploadInput(field, show_label=False) -%}
{% macro UploadInput(field, show_label=False, watch=False) -%}
<uploadinput
inline-template
{% if not field.errors %}
@@ -8,6 +8,7 @@
{% else %}
v-bind:initial-errors='true'
{% endif %}
v-bind:watch='{{ watch | string | lower }}'
>
<div>
<div v-show="hasAttachment" class="uploaded-file">