This commit is contained in:
James Cole 2019-08-27 07:10:51 +02:00
parent 467a04ad78
commit 49fc6fbd38
2 changed files with 8 additions and 1 deletions

2
public/v1/js/app.js vendored

File diff suppressed because one or more lines are too long

View File

@ -397,6 +397,7 @@
// if count is 0, send user onwards.
if (this.createAnother) {
console.log('Will create another.');
// do message:
this.success_message = '<a href="transactions/show/' + groupId + '">The transaction</a> has been stored.';
this.error_message = '';
@ -405,6 +406,10 @@
this.resetTransactions();
this.addTransactionToArray();
}
// clear errors:
this.setDefaultErrors();
if (button) {
button.prop("disabled", false);
}
@ -517,6 +522,8 @@
setDefaultErrors: function () {
for (const key in this.transactions) {
if (this.transactions.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) {
console.log('Set default errors for key ' + key);
//this.transactions[key].description
this.transactions[key].errors = {
source_account: [],
destination_account: [],