1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-17 21:26:22 -04:00

Validate that we can parse the chosen scheme before saving

This commit is contained in:
Mark McDowall
2013-11-15 00:53:12 -08:00
parent 48ece3d367
commit 9d5c1aa0a4
8 changed files with 189 additions and 22 deletions

View File

@@ -23,7 +23,6 @@ define(
}
};
var validatedSync = function (method, model,options) {
this.$el.removeAllErrors();
arguments[2].isValidatedCall = true;
@@ -52,7 +51,6 @@ define(
}
};
this.prototype.onBeforeClose = function () {
if (this.model) {

View File

@@ -5,8 +5,9 @@ define(
'vent',
'marionette',
'Settings/MediaManagement/Naming/NamingSampleModel',
'Mixins/AsModelBoundView'
], function ($, vent, Marionette, NamingSampleModel, AsModelBoundView) {
'Mixins/AsModelBoundView',
'Mixins/AsValidatedView'
], function ($, vent, Marionette, NamingSampleModel, AsModelBoundView, AsValidatedView) {
var view = Marionette.ItemView.extend({
template: 'Settings/MediaManagement/Naming/NamingViewTemplate',
@@ -86,5 +87,8 @@ define(
}
});
return AsModelBoundView.call(view);
AsModelBoundView.call(view);
AsValidatedView.call(view);
return view;
});