We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cbd604 commit 98933faCopy full SHA for 98933fa
public/js/master.js
@@ -25,7 +25,7 @@
25
})(jQuery);
26
27
(function($){
28
- $.fn.AjaxSubmit = function(path, successMessage){
+ $.fn.AjaxSubmit = function(path, successMessage, responseDataCallBack){
29
$(this).submit(function(event) {
30
event.preventDefault();
31
@@ -46,6 +46,10 @@
46
$('#' + formId + ' #message').append('<span class="text-error">'+ value +'</span><br />');
47
});
48
}
49
+
50
+ if (response.data.length > 0) {
51
+ responseDataCallBack(response.data);
52
+ }
53
})
54
.fail(function (){
55
$('#' + formId + ' #message').html('<span class="text-error">An error occurred, please try again.</span>');
0 commit comments