aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-05-14 21:14:17 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-05-14 21:14:17 +0000
commit48af91afaadd1617b70c43369c2d680079806da7 (patch)
tree69f62ab026d3adc35b23e04d2dc00e5167d81331
parentff1edc8a348780dcde12e656304309a2bd89755c (diff)
downloadelgg-48af91afaadd1617b70c43369c2d680079806da7.tar.gz
elgg-48af91afaadd1617b70c43369c2d680079806da7.tar.bz2
fixed the double form submission code for the installer
git-svn-id: http://code.elgg.org/elgg/trunk@9083 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--install/js/install.js11
-rw-r--r--views/installation/forms/install/template.php16
-rw-r--r--views/installation/page/default.php2
3 files changed, 13 insertions, 16 deletions
diff --git a/install/js/install.js b/install/js/install.js
new file mode 100644
index 000000000..8d36c8a65
--- /dev/null
+++ b/install/js/install.js
@@ -0,0 +1,11 @@
+
+// prevent double-submission of forms
+$(function() {
+ $('form').submit(function() {
+ if (this.data('submitted')) {
+ return false;
+ }
+ this.data('submitted', true);
+ return true;
+ });
+});
diff --git a/views/installation/forms/install/template.php b/views/installation/forms/install/template.php
index 7e7a668d3..ea9a08a3d 100644
--- a/views/installation/forms/install/template.php
+++ b/views/installation/forms/install/template.php
@@ -28,19 +28,3 @@ $submit_params = array(
$form_body .= elgg_view('input/submit', $submit_params);
echo $form_body;
-
-?>
-
-<script type="text/javascript">
- //prevent double-submission
- $(function() {
- $('form').submit(function() {
- if (this.data('submitted')) {
- return false;
- }
-
- this.data('submitted', true);
- return true;
- }
- });
-</script>
diff --git a/views/installation/page/default.php b/views/installation/page/default.php
index 7618e7255..a41a5b688 100644
--- a/views/installation/page/default.php
+++ b/views/installation/page/default.php
@@ -29,6 +29,8 @@ header('Expires: Fri, 05 Feb 1982 00:00:00 -0500', TRUE);
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="SHORTCUT ICON" href="<?php echo elgg_get_site_url(); ?>_graphics/favicon.ico" />
<link rel="stylesheet" href="<?php echo elgg_get_site_url(); ?>install/css/install.css" type="text/css" />
+ <script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>vendors/jquery/jquery-1.5.min.js"></script>
+ <script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>install/js/install.js"></script>
</head>
<body>
<div class="elgg-page">