diff options
-rw-r--r-- | install/js/install.js | 11 | ||||
-rw-r--r-- | views/installation/forms/install/template.php | 16 | ||||
-rw-r--r-- | views/installation/page/default.php | 2 |
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"> |