clear errors on item edition page
This commit is contained in:
parent
d3c706d103
commit
f6ff171c90
|
@ -529,6 +529,8 @@ export default {
|
||||||
created(){
|
created(){
|
||||||
// Obtains collection ID
|
// Obtains collection ID
|
||||||
this.cleanFields();
|
this.cleanFields();
|
||||||
|
eventBus.clearAllErrors();
|
||||||
|
this.formErrorMessage = '';
|
||||||
this.collectionId = this.$route.params.collectionId;
|
this.collectionId = this.$route.params.collectionId;
|
||||||
this.form.collectionId = this.collectionId;
|
this.form.collectionId = this.collectionId;
|
||||||
|
|
||||||
|
@ -682,5 +684,3 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,9 @@ export const eventBus = new Vue({
|
||||||
let error = this.errors.find( errorItem => errorItem.field_id == field_id );
|
let error = this.errors.find( errorItem => errorItem.field_id == field_id );
|
||||||
return ( error ) ? error.errors : false
|
return ( error ) ? error.errors : false
|
||||||
},
|
},
|
||||||
|
clearAllErrors(){
|
||||||
|
this.errors = [];
|
||||||
|
},
|
||||||
setValues(){
|
setValues(){
|
||||||
const field = this.$store.getters['item/getMetadata'];
|
const field = this.$store.getters['item/getMetadata'];
|
||||||
if( field ){
|
if( field ){
|
||||||
|
|
Loading…
Reference in New Issue