aboutsummaryrefslogtreecommitdiffstats
path: root/core/js/setup.js
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2011-09-23 19:39:30 +0200
committerBart Visscher <bartv@thisnet.nl>2011-09-23 19:40:06 +0200
commitb73f72f62ccedeed1fa301856454d78566c650f1 (patch)
treee408dad8a09747964e288ac2af74cbee780fb5f4 /core/js/setup.js
parente9950defb240dfe19a22cf1cce34e0fd25e58ee9 (diff)
downloadnextcloud-server-b73f72f62ccedeed1fa301856454d78566c650f1.tar.gz
nextcloud-server-b73f72f62ccedeed1fa301856454d78566c650f1.zip
After clicking Finish button:
- change value to "Please wait...." - disable all the inputs & buttons - submit new form, because disabled inputs are not submitted to the server
Diffstat (limited to 'core/js/setup.js')
-rw-r--r--core/js/setup.js27
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;
+ });
});