1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-13 04:13:29 +02:00

[ticket/16308] Fix UCP reset password

remove HTML from PHP and code beautify

PHPBB3-16308
This commit is contained in:
3D-I 2020-01-10 23:22:24 +01:00
parent a2fa918da2
commit f26e20e1e9
2 changed files with 2 additions and 3 deletions

View File

@ -425,8 +425,7 @@ class reset_password
}
$this->template->assign_vars([
'S_PASSWORD_RESET_ERRORS' => (bool) !empty($errors),
'PASSWORD_RESET_ERRORS' => implode('<br>', array_map([$this->language, 'lang'], $errors)),
'PASSWORD_RESET_ERRORS' => !empty($errors) ? array_map([$this->language, 'lang'], $errors) : '',
'S_IS_PASSWORD_RESET' => true,
'U_RESET_PASSWORD_ACTION' => $this->helper->route('phpbb_ucp_reset_password_controller'),
'S_HIDDEN_FIELDS' => build_hidden_fields([

View File

@ -10,7 +10,7 @@
<fieldset>
{% if S_IS_PASSWORD_RESET %}
{% if S_PASSWORD_RESET_ERRORS %}<p class="error">{{ PASSWORD_RESET_ERRORS }}</p>{% endif %}
{% if PASSWORD_RESET_ERRORS %}<p class="error">{{ PASSWORD_RESET_ERRORS | join('<br>') | raw }}</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>