diff options
-rw-r--r-- | core/js/setup.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/core/js/setup.js b/core/js/setup.js index 7c44362f051..6e842cca3e6 100644 --- a/core/js/setup.js +++ b/core/js/setup.js @@ -32,4 +32,31 @@ $(document).ready(function() { $('#databaseField').slideToggle(250); } }); + $("form").submit(function(){ + // Save form parameters + var post = $(this).serializeArray(); + + // Disable inputs + $(':submit', this).attr('disabled','disabled').val('Please wait....'); + $('input', this).addClass('ui-state-disabled').attr('disabled','disabled'); + $('#selectDbType').button('disable'); + $('label.ui-button', this).addClass('ui-state-disabled').attr('aria-disabled', 'true').button('disable'); + + // Create the form + var form = $('<form>'); + form.attr('action', $(this).attr('action')); + form.attr('method', 'POST'); + if(true){ form.attr('target', '_blank'); } + + for(var i=0; i<post.length; i++){ + var input = $('<input type="hidden">'); + input.attr(post[i]); + form.append(input); + } + + // Submit the form + form.appendTo(document.body); + form.submit(); + return false; + }); }); |