Skip to content

Commit

Permalink
Pass data to successCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Jan 21, 2018
1 parent ff4b7ee commit 5414211
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions assets/js/widget-formGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
mainAlertElement : $('#alerts-page'),
redirectAfterSuccess : true,
autofocusModalElement : true,
successCallback : function() {}
successCallback : function(data) {}
};

// Constructor
Expand Down Expand Up @@ -137,7 +137,7 @@
$(button).trigger("formSuccess." + this._name, data);

// Use the callback
this.settings.successCallback();
this.settings.successCallback(data);

// Refresh page or close modal
if (this.settings.redirectAfterSuccess) {
Expand Down Expand Up @@ -232,7 +232,7 @@
$(button).trigger("confirmSuccess." + this._name, data);

// Use the callback
this.settings.successCallback();
this.settings.successCallback(data);

// Refresh page or close modal
if (this.settings.redirectAfterSuccess) {
Expand Down

0 comments on commit 5414211

Please sign in to comment.