diff options
author | Marc Alexander <admin@m-a-styles.de> | 2019-08-30 09:44:10 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2019-08-30 09:44:10 +0200 |
commit | 8048d817ca0198b214457066a549db6f92b85bc0 (patch) | |
tree | 2910f4a029aed70ab81abc0f8e0aa673459bbe41 | |
parent | 454ea081f17c0dfb9eb75287698a301e5c5d275b (diff) | |
download | forums-8048d817ca0198b214457066a549db6f92b85bc0.tar forums-8048d817ca0198b214457066a549db6f92b85bc0.tar.gz forums-8048d817ca0198b214457066a549db6f92b85bc0.tar.bz2 forums-8048d817ca0198b214457066a549db6f92b85bc0.tar.xz forums-8048d817ca0198b214457066a549db6f92b85bc0.zip |
[ticket/11327] Move html output to reset password html file
PHPBB3-11327
-rw-r--r-- | phpBB/phpbb/ucp/controller/reset_password.php | 8 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/ucp_reset_password.html | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/phpBB/phpbb/ucp/controller/reset_password.php b/phpBB/phpbb/ucp/controller/reset_password.php index 9d736b26b8..fb66ea1b99 100644 --- a/phpBB/phpbb/ucp/controller/reset_password.php +++ b/phpBB/phpbb/ucp/controller/reset_password.php @@ -206,7 +206,7 @@ class reset_password { $message = $this->language->lang('PASSWORD_RESET_LINK_SENT') . '<br /><br />' . $this->language->lang('RETURN_INDEX', '<a href="' . append_sid("{$this->root_path}index.{$this->php_ext}") . '">', '</a>'); - if ($rowset === false) + if (empty($rowset)) { return $this->helper->message($message); } @@ -420,9 +420,13 @@ class reset_password } } + if (!empty($errors)) + { + $this->template->assign_block_vars_array('PASSWORD_RESET_ERRORS', array_map([$this->language, 'lang'], $errors)); + } + $this->template->assign_vars([ 'S_IS_PASSWORD_RESET' => true, - 'ERROR' => !empty($errors) ? implode('<br />', array_map([$this->language, 'lang'], $errors)) : '', 'U_RESET_PASSWORD_ACTION' => $this->helper->route('phpbb_ucp_reset_password_controller'), 'S_HIDDEN_FIELDS' => build_hidden_fields([ 'u' => $user_id, diff --git a/phpBB/styles/prosilver/template/ucp_reset_password.html b/phpBB/styles/prosilver/template/ucp_reset_password.html index fffaa1b59e..0a05f69aed 100644 --- a/phpBB/styles/prosilver/template/ucp_reset_password.html +++ b/phpBB/styles/prosilver/template/ucp_reset_password.html @@ -10,7 +10,7 @@ <fieldset> {% if S_IS_PASSWORD_RESET %} - {% if ERROR %}<p class="error">{{ ERROR }}</p>{% endif %} + {% if PASSWORD_RESET_ERRORS %}<p class="error">{{ PASSWORD_RESET_ERRORS | join('<br>') }}</p>{% endif %} <dl> <dt><label for="new_password">{{ lang('NEW_PASSWORD') ~ lang('COLON') }}</label></dt> <dd><input type="password" name="new_password" id="new_password" size="25" maxlength="255" title="{{ lang('CHANGE_PASSWORD') }}" autocomplete="off" /></dd> |