mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-09 11:18:10 +00:00
Fix #2492
This commit is contained in:
2
public/v1/js/app.js
vendored
2
public/v1/js/app.js
vendored
File diff suppressed because one or more lines are too long
@@ -397,6 +397,7 @@
|
|||||||
// if count is 0, send user onwards.
|
// if count is 0, send user onwards.
|
||||||
if (this.createAnother) {
|
if (this.createAnother) {
|
||||||
console.log('Will create another.');
|
console.log('Will create another.');
|
||||||
|
|
||||||
// do message:
|
// do message:
|
||||||
this.success_message = '<a href="transactions/show/' + groupId + '">The transaction</a> has been stored.';
|
this.success_message = '<a href="transactions/show/' + groupId + '">The transaction</a> has been stored.';
|
||||||
this.error_message = '';
|
this.error_message = '';
|
||||||
@@ -405,6 +406,10 @@
|
|||||||
this.resetTransactions();
|
this.resetTransactions();
|
||||||
this.addTransactionToArray();
|
this.addTransactionToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// clear errors:
|
||||||
|
this.setDefaultErrors();
|
||||||
|
|
||||||
if (button) {
|
if (button) {
|
||||||
button.prop("disabled", false);
|
button.prop("disabled", false);
|
||||||
}
|
}
|
||||||
@@ -517,6 +522,8 @@
|
|||||||
setDefaultErrors: function () {
|
setDefaultErrors: function () {
|
||||||
for (const key in this.transactions) {
|
for (const key in this.transactions) {
|
||||||
if (this.transactions.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) {
|
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 = {
|
this.transactions[key].errors = {
|
||||||
source_account: [],
|
source_account: [],
|
||||||
destination_account: [],
|
destination_account: [],
|
||||||
|
|||||||
Reference in New Issue
Block a user