mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-23 04:46:44 +00:00
Update transaction form
This commit is contained in:
@@ -26,11 +26,20 @@
|
||||
{{ title }}
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" :name="name"
|
||||
:title="title" autocomplete="off"
|
||||
ref="str"
|
||||
:value="value" @input="handleInput"
|
||||
:placeholder="title">
|
||||
<span class="input-group-btn">
|
||||
<button
|
||||
tabIndex="-1"
|
||||
v-on:click="clearField"
|
||||
class="btn btn-default"
|
||||
type="button"><i class="fa fa-trash-o"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
<ul class="list-unstyled" v-for="error in this.error">
|
||||
<li class="text-danger">{{ error }}</li>
|
||||
</ul>
|
||||
@@ -51,6 +60,12 @@
|
||||
handleInput(e) {
|
||||
this.$emit('input', this.$refs.str.value);
|
||||
},
|
||||
clearField: function () {
|
||||
//props.value = '';
|
||||
this.name = '';
|
||||
this.$refs.str.value = '';
|
||||
this.$emit('input', this.$refs.str.value);
|
||||
},
|
||||
hasError: function () {
|
||||
return this.error.length > 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user