2014-12-27 18:34:01 +09:00
|
|
|
AutoForm.hooks({
|
|
|
|
updateSettingsForm: {
|
|
|
|
|
|
|
|
before: {
|
2015-03-11 08:34:44 +09:00
|
|
|
update: function(modifier) {
|
|
|
|
this.template.$('button[type=submit]').addClass('loading');
|
2014-12-27 18:34:01 +09:00
|
|
|
return modifier;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2015-03-11 08:34:44 +09:00
|
|
|
onSuccess: function(operation, result) {
|
|
|
|
this.template.$('button[type=submit]').removeClass('loading');
|
2014-12-27 18:34:01 +09:00
|
|
|
},
|
|
|
|
|
|
|
|
onError: function(operation, result, template) {
|
2015-03-11 08:34:44 +09:00
|
|
|
this.template.$('button[type=submit]').removeClass('loading');
|
2014-12-27 18:34:01 +09:00
|
|
|
}
|
|
|
|
|
2015-01-07 08:22:46 +01:00
|
|
|
},
|
2014-12-27 18:34:01 +09:00
|
|
|
insertSettingsForm: {
|
|
|
|
|
|
|
|
before: {
|
2015-03-11 08:34:44 +09:00
|
|
|
insert: function(doc) {
|
|
|
|
this.template.$('button[type=submit]').addClass('loading');
|
2014-12-27 18:34:01 +09:00
|
|
|
return doc;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2015-03-11 08:34:44 +09:00
|
|
|
onSuccess: function(operation, result) {
|
|
|
|
this.template.$('button[type=submit]').removeClass('loading');
|
2014-12-27 18:34:01 +09:00
|
|
|
},
|
|
|
|
|
2015-03-11 08:34:44 +09:00
|
|
|
onError: function(operation, result) {
|
|
|
|
this.template.$('button[type=submit]').removeClass('loading');
|
2014-12-27 18:34:01 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|