From e66a3ad1f5734fa77b5d628b53dfbc8d8fa36925 Mon Sep 17 00:00:00 2001 From: emanuele Date: Sun, 26 Jul 2015 23:52:53 +0200 Subject: [PATCH] Fix editing of agreement in different languages - fixes #2155 thanks winstar for reporting Signed-off-by: emanuele --- .../admin/ManageRegistration.controller.php | 2 +- themes/default/Register.template.php | 26 +++++++++---------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/sources/admin/ManageRegistration.controller.php b/sources/admin/ManageRegistration.controller.php index 94476a23a5..a8e36f1a40 100644 --- a/sources/admin/ManageRegistration.controller.php +++ b/sources/admin/ManageRegistration.controller.php @@ -235,7 +235,7 @@ public function action_agreement() } } - if (isset($_POST['agreement'])) + if (isset($_POST['save']) && isset($_POST['agreement'])) { checkSession(); validateToken('admin-rega'); diff --git a/themes/default/Register.template.php b/themes/default/Register.template.php index 2fb3e83539..5a767e0fd9 100644 --- a/themes/default/Register.template.php +++ b/themes/default/Register.template.php @@ -683,7 +683,8 @@ function template_edit_agreement() echo '
-
'; +
+ '; // Is there more than one language to choose from? if (count($context['editable_agreements']) > 1) @@ -691,22 +692,20 @@ function template_edit_agreement() echo '

', $txt['language_configuration'], '

-
- ', $txt['admin_agreement_select_language'], ':  - '; foreach ($context['editable_agreements'] as $file => $name) echo ' - '; + '; echo ' - -
- - - -
-
+ +
+ + + +
'; } @@ -721,8 +720,7 @@ function template_edit_agreement()

- - +