mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-12 16:13:58 -07:00
Fixed: Validation errors showing multiple times
This commit is contained in:
parent
9e9cb98b3a
commit
10fc875715
2 changed files with 16 additions and 8 deletions
|
@ -8,6 +8,7 @@ define(
|
|||
|
||||
return function () {
|
||||
|
||||
var originalInitialize = this.prototype.initialize;
|
||||
var originalOnRender = this.prototype.onRender;
|
||||
var originalBeforeClose = this.prototype.onBeforeClose;
|
||||
|
||||
|
@ -47,7 +48,7 @@ define(
|
|||
}
|
||||
};
|
||||
|
||||
this.prototype.onRender = function () {
|
||||
this.prototype.initialize = function (options) {
|
||||
|
||||
if (this.model) {
|
||||
this.listenTo(this.model, 'validation:sync', function () {
|
||||
|
@ -65,6 +66,13 @@ define(
|
|||
this.listenTo(this, 'validation:failed', validationFailed);
|
||||
}
|
||||
|
||||
if (originalInitialize) {
|
||||
originalInitialize.call(this, options);
|
||||
}
|
||||
};
|
||||
|
||||
this.prototype.onRender = function () {
|
||||
|
||||
Validation.bind(this);
|
||||
this.bindToModelValidation = bindToModel.bind(this);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue