Change variable names to be clearer
This commit is contained in:
parent
3f2beb44b2
commit
850153a517
@ -9,7 +9,7 @@ export default {
|
|||||||
if (typeof this[name] !== undefined) {
|
if (typeof this[name] !== undefined) {
|
||||||
this[name] = value
|
this[name] = value
|
||||||
if (event['parent_uid'] === this._uid) {
|
if (event['parent_uid'] === this._uid) {
|
||||||
this.disabled = false
|
this.changed = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -17,14 +17,14 @@ export default {
|
|||||||
|
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
disabled: this.disableSave,
|
changed: this.hasChanges,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
disableSave: {
|
hasChanges: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{% macro SaveButton(text, additional_classes="") -%}
|
{% macro SaveButton(text, additional_classes="") -%}
|
||||||
{% 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="disabled">
|
<button type="submit" class="{{ class }}" tabindex="0" v-bind:disabled="!changed">
|
||||||
{{ text }}
|
{{ text }}
|
||||||
</button>
|
</button>
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user