diff options
-rw-r--r-- | views/installation/forms/install/template.php | 17 | ||||
-rw-r--r-- | views/installation/install/pages/admin.php | 1 | ||||
-rw-r--r-- | views/installation/install/pages/database.php | 1 | ||||
-rw-r--r-- | views/installation/install/pages/settings.php | 1 |
4 files changed, 10 insertions, 10 deletions
diff --git a/views/installation/forms/install/template.php b/views/installation/forms/install/template.php index 5e44d928e..7e7a668d3 100644 --- a/views/installation/forms/install/template.php +++ b/views/installation/forms/install/template.php @@ -30,14 +30,17 @@ $form_body .= elgg_view('input/submit', $submit_params); echo $form_body; ?> -<?php //@todo JS 1.8: no ?> + <script type="text/javascript"> - var was_submitted = false; - function elggCheckFormSubmission() { - if (was_submitted == false) { - was_submitted = true; + //prevent double-submission + $(function() { + $('form').submit(function() { + if (this.data('submitted')) { + return false; + } + + this.data('submitted', true); return true; } - return false; - } + }); </script> diff --git a/views/installation/install/pages/admin.php b/views/installation/install/pages/admin.php index c9d244416..9456e682f 100644 --- a/views/installation/install/pages/admin.php +++ b/views/installation/install/pages/admin.php @@ -12,7 +12,6 @@ $url = current_page_url(); $form_vars = array( 'action' => $url, 'disable_security' => TRUE, - 'onsubmit' => 'return elggCheckFormSubmission()', ); echo elgg_view_form('install/template', $form_vars, $vars); diff --git a/views/installation/install/pages/database.php b/views/installation/install/pages/database.php index 003571232..d3011c9e3 100644 --- a/views/installation/install/pages/database.php +++ b/views/installation/install/pages/database.php @@ -20,7 +20,6 @@ if (isset($vars['failure']) && $vars['failure']) { $form_vars = array( 'action' => $url, 'disable_security' => TRUE, - 'onsubmit' => 'return elggCheckFormSubmission()', ); echo elgg_view_form('install/template', $form_vars, $vars); diff --git a/views/installation/install/pages/settings.php b/views/installation/install/pages/settings.php index d1fd0a9ff..30a1deb5a 100644 --- a/views/installation/install/pages/settings.php +++ b/views/installation/install/pages/settings.php @@ -9,7 +9,6 @@ $url = current_page_url(); $form_vars = array( 'action' => $url, 'disable_security' => TRUE, - 'onsubmit' => 'return elggCheckFormSubmission()', ); echo elgg_view_form('install/template', $form_vars, $vars); |