From 1a6bc7aaf9b255eb8dabcc102d4f516e050cd4c0 Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 12 Oct 2010 12:02:00 +0000 Subject: Fixes #2522 - disabling form submission after first submission git-svn-id: http://code.elgg.org/elgg/trunk@7065 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/installation/install/forms/admin.php | 1 + views/installation/install/forms/database.php | 1 + views/installation/install/forms/settings.php | 1 + views/installation/install/forms/template.php | 17 ++++++++++++++++- views/installation/install/nav.php | 2 +- 5 files changed, 20 insertions(+), 2 deletions(-) (limited to 'views/installation/install') diff --git a/views/installation/install/forms/admin.php b/views/installation/install/forms/admin.php index ae83cadea..cfeab190a 100644 --- a/views/installation/install/forms/admin.php +++ b/views/installation/install/forms/admin.php @@ -17,5 +17,6 @@ $params = array( 'body' => $form_body, 'action' => $url, 'disable_security' => TRUE, + 'js' => 'onsubmit="return elggCheckFormSubmission()"', ); echo elgg_view('input/form', $params); diff --git a/views/installation/install/forms/database.php b/views/installation/install/forms/database.php index a3fa8dd65..2d1d41bc9 100644 --- a/views/installation/install/forms/database.php +++ b/views/installation/install/forms/database.php @@ -16,5 +16,6 @@ $params = array( 'body' => $form_body, 'action' => $url, 'disable_security' => TRUE, + 'js' => 'onsubmit="return elggCheckFormSubmission()"', ); echo elgg_view('input/form', $params); diff --git a/views/installation/install/forms/settings.php b/views/installation/install/forms/settings.php index 67cba10f6..7f493ebff 100644 --- a/views/installation/install/forms/settings.php +++ b/views/installation/install/forms/settings.php @@ -16,5 +16,6 @@ $params = array( 'body' => $form_body, 'action' => $url, 'disable_security' => TRUE, + 'js' => 'onsubmit="return elggCheckFormSubmission()"', ); echo elgg_view('input/form', $params); diff --git a/views/installation/install/forms/template.php b/views/installation/install/forms/template.php index 98cdcadab..c3f70d768 100644 --- a/views/installation/install/forms/template.php +++ b/views/installation/install/forms/template.php @@ -22,6 +22,21 @@ foreach ($variables as $field => $params) { $form_body .= '

'; } -$form_body .= elgg_view('input/submit', array('value' => elgg_echo('next'))); +$submit_params = array( + 'value' => elgg_echo('next'), +); +$form_body .= elgg_view('input/submit', $submit_params); echo $form_body; + +?> + diff --git a/views/installation/install/nav.php b/views/installation/install/nav.php index d6a20ea2b..ca4b8a87b 100644 --- a/views/installation/install/nav.php +++ b/views/installation/install/nav.php @@ -19,7 +19,7 @@ if (isset($vars['refresh']) && $vars['refresh']) { // create next button and selectively disable $next_text = elgg_echo('next'); $next_link = "{$vars['url']}install.php?step={$vars['next_step']}"; -$next = "$next_text"; +$next = "$next_text"; if (isset($vars['advance']) && !$vars['advance']) { // disable the next button $next = "$next_text"; -- cgit v1.2.3