Skip to content

Commit

Permalink
Merge pull request #801 from sammyskills/feat-improve-ux
Browse files Browse the repository at this point in the history
feat: improve user experience in forms
  • Loading branch information
kenjis authored Aug 29, 2023
2 parents 05e033d + aabaaef commit b6d327d
Show file tree
Hide file tree
Showing 22 changed files with 42 additions and 16 deletions.
1 change: 1 addition & 0 deletions src/Language/ar/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'password' => 'كلمة المرور',
'passwordConfirm' => 'كلمة المرور (مرة اخرى)',
'haveAccount' => 'هل لديك حساب بالفعل؟',
'token' => '(To be translated) Token',

// Buttons
'confirm' => 'تاكيد',
Expand Down
1 change: 1 addition & 0 deletions src/Language/bg/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'password' => 'Парола',
'passwordConfirm' => 'Парола (отново)',
'haveAccount' => 'Вече имате акаунт?',
'token' => '(To be translated) Token',

// Бутони
'confirm' => 'Потвърди',
Expand Down
1 change: 1 addition & 0 deletions src/Language/de/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'password' => 'Passwort',
'passwordConfirm' => 'Passwort (erneut)',
'haveAccount' => 'Haben Sie bereits ein Konto?',
'token' => '(To be translated) Token',

// Buttons
'confirm' => 'Bestätigen',
Expand Down
1 change: 1 addition & 0 deletions src/Language/en/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'password' => 'Password',
'passwordConfirm' => 'Password (again)',
'haveAccount' => 'Already have an account?',
'token' => 'Token',

// Buttons
'confirm' => 'Confirm',
Expand Down
1 change: 1 addition & 0 deletions src/Language/es/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'password' => 'Contraseña',
'passwordConfirm' => 'Contraseña (otra vez)',
'haveAccount' => '¿Ya tienes una cuenta?',
'token' => '(To be translated) Token',

// Botones
'confirm' => 'Confirmar',
Expand Down
1 change: 1 addition & 0 deletions src/Language/fa/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'password' => 'رمز عبور',
'passwordConfirm' => 'رمز عبور (تکرار)',
'haveAccount' => 'از قبل حساب کاربری دارید؟',
'token' => 'توکن',

// Buttons
'confirm' => 'تایید',
Expand Down
1 change: 1 addition & 0 deletions src/Language/fr/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'password' => 'Mot de passe',
'passwordConfirm' => 'Mot de passe (répéter)',
'haveAccount' => 'Vous avez déjà un compte ?',
'token' => '(To be translated) Token',

// Buttons
'confirm' => 'Confirmer',
Expand Down
1 change: 1 addition & 0 deletions src/Language/id/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'password' => 'Kata Sandi',
'passwordConfirm' => 'Kata Sandi (lagi)',
'haveAccount' => 'Sudah punya akun?',
'token' => '(To be translated) Token',

// Buttons
'confirm' => 'Konfirmasi',
Expand Down
1 change: 1 addition & 0 deletions src/Language/it/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'password' => 'Password',
'passwordConfirm' => 'Password (ancora)',
'haveAccount' => 'Hai già un account?',
'token' => '(To be translated) Token',

// Buttons
'confirm' => 'Conferma',
Expand Down
1 change: 1 addition & 0 deletions src/Language/ja/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'password' => 'パスワード', // 'Password'
'passwordConfirm' => 'パスワード(再)', // 'Password (again)'
'haveAccount' => 'すでにアカウントをお持ちの方', // 'Already have an account?'
'token' => 'トークン', // 'Token'

// Buttons
'confirm' => '確認する', // 'Confirm'
Expand Down
1 change: 1 addition & 0 deletions src/Language/lt/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'password' => 'Slaptažodis',
'passwordConfirm' => 'Slaptažodis (pakartoti)',
'haveAccount' => 'Jau turite paskyrą?',
'token' => '(To be translated) Token',

// Buttons
'confirm' => 'Patvirtinti',
Expand Down
1 change: 1 addition & 0 deletions src/Language/pt-BR/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'password' => 'Senha',
'passwordConfirm' => 'Senha (novamente)',
'haveAccount' => 'Já tem uma conta?',
'token' => '(To be translated) Token',

// Botões
'confirm' => 'Confirmar',
Expand Down
1 change: 1 addition & 0 deletions src/Language/pt/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'password' => 'Senha',
'passwordConfirm' => 'Senha (novamente)',
'haveAccount' => 'Já tem uma conta?',
'token' => '(To be translated) Token',

// Botões
'confirm' => 'Confirmar',
Expand Down
1 change: 1 addition & 0 deletions src/Language/sk/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'password' => 'Heslo',
'passwordConfirm' => 'Heslo (znova)',
'haveAccount' => 'Máte už účet?',
'token' => '(To be translated) Token',

// Buttons
'confirm' => 'Potvrdiť',
Expand Down
1 change: 1 addition & 0 deletions src/Language/sr/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'password' => 'Lozinka',
'passwordConfirm' => 'Lozinka (ponovo)',
'haveAccount' => 'Već imate nalog?',
'token' => '(To be translated) Token',

// Buttons
'confirm' => 'Potvrdi',
Expand Down
1 change: 1 addition & 0 deletions src/Language/sv-SE/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'password' => 'Lösenord',
'passwordConfirm' => 'Lösenord (igen)',
'haveAccount' => 'Har du redan ett konto?',
'token' => '(To be translated) Token',

// Buttons
'confirm' => 'Bekräfta',
Expand Down
1 change: 1 addition & 0 deletions src/Language/tr/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'password' => 'Şifre',
'passwordConfirm' => 'Şifre (tekrar)',
'haveAccount' => 'Zaten hesabınız var mı?',
'token' => '(To be translated) Token',

// Buttons
'confirm' => 'Onayla',
Expand Down
1 change: 1 addition & 0 deletions src/Language/uk/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'password' => 'Пароль',
'passwordConfirm' => 'Пароль (ще раз)',
'haveAccount' => 'Вже є обліковий запис?',
'token' => '(To be translated) Token',

// Buttons
'confirm' => 'Підтвердити',
Expand Down
5 changes: 3 additions & 2 deletions src/Views/email_activate_show.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
<?= csrf_field() ?>

<!-- Code -->
<div class="mb-2">
<input type="text" class="form-control" name="token" placeholder="000000" inputmode="numeric"
<div class="form-floating mb-2">
<input type="text" class="form-control" id="floatingTokenInput" name="token" placeholder="000000" inputmode="numeric"
pattern="[0-9]*" autocomplete="one-time-code" value="<?= old('token') ?>" required />
<label for="floatingTokenInput"><?= lang('Auth.token') ?></label>
</div>

<div class="d-grid col-8 mx-auto m-3">
Expand Down
10 changes: 6 additions & 4 deletions src/Views/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@
<?= csrf_field() ?>

<!-- Email -->
<div class="mb-2">
<input type="email" class="form-control" name="email" inputmode="email" autocomplete="email" placeholder="<?= lang('Auth.email') ?>" value="<?= old('email') ?>" required />
<div class="form-floating mb-3">
<input type="email" class="form-control" id="floatingEmailInput" name="email" inputmode="email" autocomplete="email" placeholder="<?= lang('Auth.email') ?>" value="<?= old('email') ?>" required />
<label for="floatingEmailInput"><?= lang('Auth.email') ?></label>
</div>

<!-- Password -->
<div class="mb-2">
<input type="password" class="form-control" name="password" inputmode="text" autocomplete="current-password" placeholder="<?= lang('Auth.password') ?>" required />
<div class="form-floating mb-3">
<input type="password" class="form-control" id="floatingPasswordInput" name="password" inputmode="text" autocomplete="current-password" placeholder="<?= lang('Auth.password') ?>" required />
<label for="floatingPasswordInput"><?= lang('Auth.password') ?></label>
</div>

<!-- Remember me -->
Expand Down
5 changes: 3 additions & 2 deletions src/Views/magic_link_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@
<?= csrf_field() ?>

<!-- Email -->
<div class="mb-2">
<input type="email" class="form-control" name="email" autocomplete="email" placeholder="<?= lang('Auth.email') ?>"
<div class="form-floating mb-2">
<input type="email" class="form-control" id="floatingEmailInput" name="email" autocomplete="email" placeholder="<?= lang('Auth.email') ?>"
value="<?= old('email', auth()->user()->email ?? null) ?>" required />
<label for="floatingEmailInput"><?= lang('Auth.email') ?></label>
</div>

<div class="d-grid col-12 col-md-8 mx-auto m-3">
Expand Down
20 changes: 12 additions & 8 deletions src/Views/register.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,27 @@
<?= csrf_field() ?>

<!-- Email -->
<div class="mb-2">
<input type="email" class="form-control" name="email" inputmode="email" autocomplete="email" placeholder="<?= lang('Auth.email') ?>" value="<?= old('email') ?>" required />
<div class="form-floating mb-2">
<input type="email" class="form-control" id="floatingEmailInput" name="email" inputmode="email" autocomplete="email" placeholder="<?= lang('Auth.email') ?>" value="<?= old('email') ?>" required />
<label for="floatingEmailInput"><?= lang('Auth.email') ?></label>
</div>

<!-- Username -->
<div class="mb-4">
<input type="text" class="form-control" name="username" inputmode="text" autocomplete="username" placeholder="<?= lang('Auth.username') ?>" value="<?= old('username') ?>" required />
<div class="form-floating mb-4">
<input type="text" class="form-control" id="floatingUsernameInput" name="username" inputmode="text" autocomplete="username" placeholder="<?= lang('Auth.username') ?>" value="<?= old('username') ?>" required />
<label for="floatingUsernameInput"><?= lang('Auth.username') ?></label>
</div>

<!-- Password -->
<div class="mb-2">
<input type="password" class="form-control" name="password" inputmode="text" autocomplete="new-password" placeholder="<?= lang('Auth.password') ?>" required />
<div class="form-floating mb-2">
<input type="password" class="form-control" id="floatingPasswordInput" name="password" inputmode="text" autocomplete="new-password" placeholder="<?= lang('Auth.password') ?>" required />
<label for="floatingPasswordInput"><?= lang('Auth.password') ?></label>
</div>

<!-- Password (Again) -->
<div class="mb-5">
<input type="password" class="form-control" name="password_confirm" inputmode="text" autocomplete="new-password" placeholder="<?= lang('Auth.passwordConfirm') ?>" required />
<div class="form-floating mb-5">
<input type="password" class="form-control" id="floatingPasswordConfirmInput" name="password_confirm" inputmode="text" autocomplete="new-password" placeholder="<?= lang('Auth.passwordConfirm') ?>" required />
<label for="floatingPasswordConfirmInput"><?= lang('Auth.passwordConfirm') ?></label>
</div>

<div class="d-grid col-12 col-md-8 mx-auto m-3">
Expand Down

0 comments on commit b6d327d

Please sign in to comment.