Fixes to date validation logic in item submission form.
This commit is contained in:
parent
448168f206
commit
977177e8cb
|
@ -72,11 +72,8 @@
|
|||
|
||||
if (dateISO == false) {
|
||||
|
||||
if ( !this.isOnItemSubmissionForm )
|
||||
this.dateValue = $event.target.value; // Keep wrong version in the input so user can fix it
|
||||
else
|
||||
this.$emit('update:value', this.dateValue) // On item submission we send the errored version here to allow the server to return the correct format.
|
||||
|
||||
this.dateValue = $event.target.value; // Keep wrong version in the input so user can fix it
|
||||
|
||||
this.isInvalidDate = true;
|
||||
|
||||
return;
|
||||
|
|
|
@ -407,8 +407,8 @@ export const finishItemSubmission = ({ commit }, { itemSubmission, fakeItemId })
|
|||
resolve( res.data );
|
||||
}).catch( error => {
|
||||
reject({
|
||||
errors: error.response.data.errors,
|
||||
error_message: error.response.data.error_message
|
||||
errors: error.error.response.data.errors,
|
||||
error_message: error.error.response.data.error_message
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1053,7 +1053,7 @@ export default {
|
|||
}
|
||||
}
|
||||
this.formErrorMessage = errors.error_message;
|
||||
|
||||
|
||||
this.isSubmitting = false;
|
||||
this.hasSentForm = false;
|
||||
this.isUploading = false;
|
||||
|
|
Loading…
Reference in New Issue