mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-29 18:59:21 +02:00
Add password confirm, and change text type to password
This commit is contained in:
parent
6aa28a3002
commit
9fa65ce7a4
@ -70,7 +70,7 @@ if($step == 'database') {
|
||||
|
||||
$key = str_replace('var_', '', $key);
|
||||
|
||||
if(in_array($key, array('account', 'password', 'email', 'player_name'))) {
|
||||
if(in_array($key, array('account', 'password', 'password_confirm', 'email', 'player_name'))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -122,6 +122,7 @@ else if($step == 'admin') {
|
||||
else if($step == 'finish') {
|
||||
$email = $_SESSION['var_email'];
|
||||
$password = $_SESSION['var_password'];
|
||||
$password_confirm = $_SESSION['var_password_confirm'];
|
||||
$player_name = $_SESSION['var_player_name'];
|
||||
|
||||
// email check
|
||||
@ -163,6 +164,9 @@ else if($step == 'finish') {
|
||||
else if(!Validator::password($password)) {
|
||||
$errors[] = $locale['step_admin_password_error_format'];
|
||||
}
|
||||
else if($password != $password_confirm) {
|
||||
$errors[] = $locale['step_admin_password_confirm_error_not_same'];
|
||||
}
|
||||
|
||||
// player name check
|
||||
if(empty($player_name)) {
|
||||
|
@ -99,7 +99,10 @@ $locale['step_admin_account_id_error_same'] = 'Das Passwort darf nicht mit der K
|
||||
$locale['step_admin_password'] = 'Administrator Konto Passwort';
|
||||
$locale['step_admin_password_desc'] = 'Passwort für Ihr Administratorkonto.';
|
||||
$locale['step_admin_password_error_empty'] = 'Bitte geben Sie das Passwort für Ihr neues Konto ein.';
|
||||
$locale['step_admin_password_error_format'] = 'Ungültiges Passwortformat. Verwenden Sie nur a-Z und Ziffern 0-9. Mindestens 8, maximal 30 Zeichen.';
|
||||
$locale['step_admin_password_error_format'] = 'Ungültiges Passwortformat. Mindestens eine Buchstabe und eine Ziffer. Mindestens 8, maximal 30 Zeichen.';
|
||||
$locale['step_admin_password_confirm'] = 'Password wiederholen';
|
||||
$locale['step_admin_password_confirm_desc'] = 'Passwort für dein Konto wiederholen.';
|
||||
$locale['step_admin_password_confirm_error_not_same'] = 'Passwörter sind nicht gleich.';
|
||||
|
||||
// finish
|
||||
$locale['step_finish_admin_panel'] = 'Admin Bereich';
|
||||
|
@ -114,7 +114,10 @@ $locale['step_admin_account_id_error_same'] = 'Password may not be the same as a
|
||||
$locale['step_admin_password'] = 'Admin account password';
|
||||
$locale['step_admin_password_desc'] = 'Password to your admin account.';
|
||||
$locale['step_admin_password_error_empty'] = 'Please enter the password for your new account.';
|
||||
$locale['step_admin_password_error_format'] = 'Invalid password format. Use only a-Z and numbers 0-9. Minimum 8, maximum 30 characters.';
|
||||
$locale['step_admin_password_error_format'] = 'Invalid password format. Minimum one letter and one number. Minimum 8, maximum 30 characters.';
|
||||
$locale['step_admin_password_confirm'] = 'Password confirm';
|
||||
$locale['step_admin_password_confirm_desc'] = 'Repeat password to your account.';
|
||||
$locale['step_admin_password_confirm_error_not_same'] = 'Passwords are not same.';
|
||||
$locale['step_admin_player_name'] = 'Admin player name';
|
||||
$locale['step_admin_player_name_desc'] = 'Name of your admin character.';
|
||||
$locale['step_admin_player_name_error_empty'] = 'Please enter the name of your character.';
|
||||
|
@ -113,7 +113,10 @@ $locale['step_admin_account_id_error_same'] = 'Hasło nie może być takie same
|
||||
$locale['step_admin_password'] = 'Hasło Konta Admina';
|
||||
$locale['step_admin_password_desc'] = 'Hasło do Twojego Konta Admina.';
|
||||
$locale['step_admin_password_error_empty'] = 'Proszę podać hasło do Twojego nowego konta.';
|
||||
$locale['step_admin_password_error_format'] = 'Nieprawidłowy format hasła. Używaj tylko znaków a-Z oraz liczb 0-9. Minimum 8, maksimum 30 znaków.';
|
||||
$locale['step_admin_password_error_format'] = 'Nieprawidłowy format hasła. Minimum jeden znak i jedna liczba. Minimum 8, maksimum 30 znaków.';
|
||||
$locale['step_admin_password_confirm'] = 'Potwierdź Hasło';
|
||||
$locale['step_admin_password_confirm_desc'] = 'Potwierdzenie hasła do Twojego Konta Admina.';
|
||||
$locale['step_admin_password_confirm_error_not_same'] = 'Hasła nie są takie same.';
|
||||
$locale['step_admin_player_name'] = 'Nazwa postaci';
|
||||
$locale['step_admin_player_name_desc'] = 'Nazwa postaci Konta Admina.';
|
||||
$locale['step_admin_player_name_error_empty'] = 'Proszę podać nazwę postaci.';
|
||||
|
@ -9,11 +9,11 @@
|
||||
<form action="{{ constant('BASE_URL') }}install/" method="post" autocomplete="off">
|
||||
<input type="hidden" name="step" id="step" value="finish" />
|
||||
|
||||
{% for value in ['email', account, 'password', 'player_name'] %}
|
||||
{% for value in ['email', 'account', 'password', 'password_confirm', 'player_name'] %}
|
||||
|
||||
<div class="form-group mb-2">
|
||||
<label for="vars_{{ value }}">{{ locale['step_admin_' ~ value] }}</label>
|
||||
<input class="form-control" type="text" name="vars[{{ value }}]" id="vars_{{ value }}"{% if session['var_' ~ value] is not null %} value="{{ session['var_' ~ value] }}"{% endif %}/>
|
||||
<input class="form-control" type="{% if value in ['password', 'password_confirm'] %}password{% else %}text{% endif %}" name="vars[{{ value }}]" id="vars_{{ value }}"{% if session['var_' ~ value] is not null %} value="{{ session['var_' ~ value] }}"{% endif %}/>
|
||||
<small class="form-text text-muted">{{ locale['step_admin_' ~ value ~ '_desc']|raw }}</small>
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user