]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
fixed the double form submission code for the installer
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 14 May 2011 21:14:17 +0000 (21:14 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 14 May 2011 21:14:17 +0000 (21:14 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@9083 36083f99-b078-4883-b0ff-0f9b5a30f544

install/js/install.js [new file with mode: 0644]
views/installation/forms/install/template.php
views/installation/page/default.php

diff --git a/install/js/install.js b/install/js/install.js
new file mode 100644 (file)
index 0000000..8d36c8a
--- /dev/null
@@ -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;
+       });
+});
index 7e7a668d3804b8fcb27a1690c96ed9df9d334508..ea9a08a3d9831ebe9f9a6ac0482bcd02442560ae 100644 (file)
@@ -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>
index 7618e7255c4d9e979399e5b14aa40dfe256ca00d..a41a5b6880fb187890273be98711f2616c9a2fa0 100644 (file)
@@ -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">