mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-25 13:10:35 +00:00
Error reporting in new form.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<template>
|
||||
<div class="form-group">
|
||||
<div class="form-group"
|
||||
v-bind:class="{ 'has-error': hasError()}"
|
||||
>
|
||||
<div class="col-sm-12 text-sm">
|
||||
{{ title }}
|
||||
</div>
|
||||
@@ -9,6 +11,9 @@
|
||||
:placeholder="title"
|
||||
:title="title"
|
||||
:name="name" type="file" class="form-control">
|
||||
<ul class="list-unstyled" v-for="error in this.error">
|
||||
<li class="text-danger">{{ error }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -18,8 +23,14 @@
|
||||
name: "CustomAttachments",
|
||||
props: {
|
||||
title: String,
|
||||
name: String
|
||||
name: String,
|
||||
error: Array
|
||||
},
|
||||
methods: {
|
||||
hasError: function () {
|
||||
return this.error.length > 0;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user