password minimal length hint

This commit is contained in:
Xu 2023-12-06 13:24:46 +01:00 committed by Igor Scheller
parent 545d2a7ccf
commit 269541293c
7 changed files with 18 additions and 6 deletions

View File

@ -153,14 +153,17 @@ function admin_user()
$html .= '<hr>'; $html .= '<hr>';
$html .= form_info('', __('Please visit the angeltypes page or the users profile to manage the users angeltypes.')); $html .= __('Here you can reset the password of this angel:');
$html .= ' ' . __('Here you can reset the password of this angel:') . '<form action="' $html .= '<form action="'
. url('/admin-user', ['action' => 'change_pw', 'id' => $user_id]) . url('/admin-user', ['action' => 'change_pw', 'id' => $user_id])
. '" method="post">' . "\n"; . '" method="post">' . "\n";
$html .= form_csrf(); $html .= form_csrf();
$html .= '<table>' . "\n"; $html .= '<table>' . "\n";
$html .= ' <tr><td>' . __('settings.password') . '</td><td>' $html .= ' <tr><td>' . __('settings.password')
. ' <span class="bi bi-info-circle-fill text-info" data-bs-toggle="tooltip" title="'
. __('password.minimal_length', [config('min_password_length')]) . '"></span>'
. '</td><td>'
. '<input type="password" size="40" name="new_pw" value="" class="form-control" autocomplete="new-password">' . '<input type="password" size="40" name="new_pw" value="" class="form-control" autocomplete="new-password">'
. '</td></tr>' . "\n"; . '</td></tr>' . "\n";
$html .= ' <tr><td>' . __('password.reset.confirm') . '</td><td>' $html .= ' <tr><td>' . __('password.reset.confirm') . '</td><td>'

View File

@ -156,6 +156,9 @@ msgstr ""
"zurücksetzen kannst. Bitte benutze die E-Mail-Adresse, die du bei der Anmeldung " "zurücksetzen kannst. Bitte benutze die E-Mail-Adresse, die du bei der Anmeldung "
"verwendet hast." "verwendet hast."
msgid "password.minimal_length"
msgstr "Mindestlänge %d Zeichen"
msgid "form.recover" msgid "form.recover"
msgstr "Wiederherstellen" msgstr "Wiederherstellen"
@ -1317,9 +1320,6 @@ msgstr ""
"Ist der Engel Aktiv, hat er damit Anspruch auf ein T-Shirt. Wenn T-Shirt ein 'Ja' enthält, bedeutet dies, " "Ist der Engel Aktiv, hat er damit Anspruch auf ein T-Shirt. Wenn T-Shirt ein 'Ja' enthält, bedeutet dies, "
"dass der Engel bereits sein T-Shirt erhalten hat." "dass der Engel bereits sein T-Shirt erhalten hat."
msgid "Please visit the angeltypes page or the users profile to manage the users angeltypes."
msgstr "Bitte besuche die Seite Engeltypen oder das Benutzerprofil, um die Engeltypen des Benutzers zu verwalten."
msgid "Here you can reset the password of this angel:" msgid "Here you can reset the password of this angel:"
msgstr "Hier kannst du das Passwort für diesen Engel zurücksetzen:" msgstr "Hier kannst du das Passwort für diesen Engel zurücksetzen:"

View File

@ -746,6 +746,9 @@ msgstr ""
msgid "password.email.message" msgid "password.email.message"
msgstr "Please visit %s to recover your password." msgstr "Please visit %s to recover your password."
msgid "password.minimal_length"
msgstr "Minimal length %d characters"
msgid "footer.eventinfo.name_start_end" msgid "footer.eventinfo.name_start_end"
msgstr "%1$s, from %2$s to %3$s" msgstr "%1$s, from %2$s to %3$s"

View File

@ -11,6 +11,7 @@
'type': 'password', 'type': 'password',
'min_length': min_length, 'min_length': min_length,
'required': true, 'required': true,
'info': __('password.minimal_length', [config('min_password_length')]),
}) }} }) }}
{{ f.input('password_confirmation', __('password.reset.confirm'), { {{ f.input('password_confirmation', __('password.reset.confirm'), {
'type': 'password', 'type': 'password',

View File

@ -68,6 +68,8 @@
'autocomplete': 'new-password', 'autocomplete': 'new-password',
'required': true, 'required': true,
'required_icon': true, 'required_icon': true,
'min_length': minPasswordLength,
'info': __('password.minimal_length', [minPasswordLength]),
} }
) }} ) }}
</div> </div>
@ -80,6 +82,7 @@
'autocomplete': 'new-password', 'autocomplete': 'new-password',
'required': true, 'required': true,
'required_icon': true, 'required_icon': true,
'min_length': minPasswordLength,
} }
) }} ) }}
</div> </div>

View File

@ -24,6 +24,7 @@
'min_length': min_length, 'min_length': min_length,
'required': true, 'required': true,
'autocomplete': 'new-password', 'autocomplete': 'new-password',
'info': __('password.minimal_length', [min_length]),
}) }} }) }}
{{ f.input('new_password2', __('settings.password.new_password2'), { {{ f.input('new_password2', __('settings.password.new_password2'), {
'type': 'password', 'type': 'password',

View File

@ -89,6 +89,7 @@ class RegistrationController extends BaseController
return $this->response->withView( return $this->response->withView(
'pages/registration', 'pages/registration',
[ [
'minPasswordLength' => $this->config->get('min_password_length'),
'tShirtSizes' => $this->config->get('tshirt_sizes'), 'tShirtSizes' => $this->config->get('tshirt_sizes'),
'angelTypes' => AngelType::whereHideRegister(false)->get(), 'angelTypes' => AngelType::whereHideRegister(false)->get(),
'preselectedAngelTypes' => $preselectedAngelTypes, 'preselectedAngelTypes' => $preselectedAngelTypes,