Bug 38201: Fix setWarning call in titles+packages
'this' is scoped inside forEarch, an error was thrown when submiting the form with errors Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
4cd93c87cf
commit
e05e0f1f1d
|
|
@ -311,9 +311,7 @@ export default {
|
|||
errors.push(this.$__("An agreement is used several times"));
|
||||
}
|
||||
|
||||
errors.forEach(function (e) {
|
||||
this.setWarning(e);
|
||||
});
|
||||
this.setWarning(errors.join("<br>"));
|
||||
return !errors.length;
|
||||
},
|
||||
onSubmit(e, packageToSave) {
|
||||
|
|
|
|||
|
|
@ -439,9 +439,7 @@ export default {
|
|||
errors.push(this.$__("A package is used several times"));
|
||||
}
|
||||
|
||||
errors.forEach(function (e) {
|
||||
this.setWarning(e);
|
||||
});
|
||||
this.setWarning(errors.join("<br>"));
|
||||
return !errors.length;
|
||||
},
|
||||
onSubmit(e, titleToSave) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue