mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
2 lines
995 B
JavaScript
2 lines
995 B
JavaScript
define ("core_message/preferences_processor_form",["jquery","core/ajax","core/notification"],function(a,b,c){var d=function(b){this.root=a(b);this.userId=this.root.attr("data-user-id");this.name=this.root.attr("data-processor-name");this.root.find("form").on("submit",function(c){c.preventDefault();this.save().done(function(){a(b).trigger("mpp:formsubmitted")})}.bind(this))};d.prototype.startLoading=function(){this.root.addClass("loading")};d.prototype.stopLoading=function(){this.root.removeClass("loading")};d.prototype.isLoading=function(){return this.root.hasClass("loading")};d.prototype.save=function(){if(this.isLoading()){return a.Deferred()}this.startLoading();var d=this.root.find("form").serializeArray(),e={methodname:"core_message_message_processor_config_form",args:{userid:this.userId,name:this.name,formvalues:d}};return b.call([e])[0].fail(c.exception).always(function(){this.stopLoading()}.bind(this))};return d});
|
|
//# sourceMappingURL=preferences_processor_form.min.js.map
|