aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-25 19:08:04 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-25 19:08:04 +0000
commit57f8b5c42ee18e07b20417e9884d57b1fd90363f (patch)
treef65079d74d768a91a4f2a9b415a145f5f7bde119 /views
parent4e5d14ee2638dd6c9b22baf67d880787fa6085e4 (diff)
downloadelgg-57f8b5c42ee18e07b20417e9884d57b1fd90363f.tar.gz
elgg-57f8b5c42ee18e07b20417e9884d57b1fd90363f.tar.bz2
Cleaned up some js in the installer
git-svn-id: http://code.elgg.org/elgg/trunk@8468 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views')
-rw-r--r--views/installation/forms/install/template.php17
-rw-r--r--views/installation/install/pages/admin.php1
-rw-r--r--views/installation/install/pages/database.php1
-rw-r--r--views/installation/install/pages/settings.php1
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);