Skip to content

Commit b6d327d

Browse files
authored
Merge pull request #801 from sammyskills/feat-improve-ux
feat: improve user experience in forms
2 parents 05e033d + aabaaef commit b6d327d

22 files changed

+42
-16
lines changed

src/Language/ar/Auth.php

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'password' => 'كلمة المرور',
3131
'passwordConfirm' => 'كلمة المرور (مرة اخرى)',
3232
'haveAccount' => 'هل لديك حساب بالفعل؟',
33+
'token' => '(To be translated) Token',
3334

3435
// Buttons
3536
'confirm' => 'تاكيد',

src/Language/bg/Auth.php

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'password' => 'Парола',
3131
'passwordConfirm' => 'Парола (отново)',
3232
'haveAccount' => 'Вече имате акаунт?',
33+
'token' => '(To be translated) Token',
3334

3435
// Бутони
3536
'confirm' => 'Потвърди',

src/Language/de/Auth.php

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'password' => 'Passwort',
3131
'passwordConfirm' => 'Passwort (erneut)',
3232
'haveAccount' => 'Haben Sie bereits ein Konto?',
33+
'token' => '(To be translated) Token',
3334

3435
// Buttons
3536
'confirm' => 'Bestätigen',

src/Language/en/Auth.php

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'password' => 'Password',
3131
'passwordConfirm' => 'Password (again)',
3232
'haveAccount' => 'Already have an account?',
33+
'token' => 'Token',
3334

3435
// Buttons
3536
'confirm' => 'Confirm',

src/Language/es/Auth.php

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'password' => 'Contraseña',
3131
'passwordConfirm' => 'Contraseña (otra vez)',
3232
'haveAccount' => '¿Ya tienes una cuenta?',
33+
'token' => '(To be translated) Token',
3334

3435
// Botones
3536
'confirm' => 'Confirmar',

src/Language/fa/Auth.php

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'password' => 'رمز عبور',
3131
'passwordConfirm' => 'رمز عبور (تکرار)',
3232
'haveAccount' => 'از قبل حساب کاربری دارید؟',
33+
'token' => 'توکن',
3334

3435
// Buttons
3536
'confirm' => 'تایید',

src/Language/fr/Auth.php

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'password' => 'Mot de passe',
3131
'passwordConfirm' => 'Mot de passe (répéter)',
3232
'haveAccount' => 'Vous avez déjà un compte ?',
33+
'token' => '(To be translated) Token',
3334

3435
// Buttons
3536
'confirm' => 'Confirmer',

src/Language/id/Auth.php

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'password' => 'Kata Sandi',
3131
'passwordConfirm' => 'Kata Sandi (lagi)',
3232
'haveAccount' => 'Sudah punya akun?',
33+
'token' => '(To be translated) Token',
3334

3435
// Buttons
3536
'confirm' => 'Konfirmasi',

src/Language/it/Auth.php

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'password' => 'Password',
3131
'passwordConfirm' => 'Password (ancora)',
3232
'haveAccount' => 'Hai già un account?',
33+
'token' => '(To be translated) Token',
3334

3435
// Buttons
3536
'confirm' => 'Conferma',

src/Language/ja/Auth.php

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'password' => 'パスワード', // 'Password'
3131
'passwordConfirm' => 'パスワード(再)', // 'Password (again)'
3232
'haveAccount' => 'すでにアカウントをお持ちの方', // 'Already have an account?'
33+
'token' => 'トークン', // 'Token'
3334

3435
// Buttons
3536
'confirm' => '確認する', // 'Confirm'

src/Language/lt/Auth.php

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'password' => 'Slaptažodis',
3131
'passwordConfirm' => 'Slaptažodis (pakartoti)',
3232
'haveAccount' => 'Jau turite paskyrą?',
33+
'token' => '(To be translated) Token',
3334

3435
// Buttons
3536
'confirm' => 'Patvirtinti',

src/Language/pt-BR/Auth.php

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'password' => 'Senha',
3131
'passwordConfirm' => 'Senha (novamente)',
3232
'haveAccount' => 'Já tem uma conta?',
33+
'token' => '(To be translated) Token',
3334

3435
// Botões
3536
'confirm' => 'Confirmar',

src/Language/pt/Auth.php

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'password' => 'Senha',
3131
'passwordConfirm' => 'Senha (novamente)',
3232
'haveAccount' => 'Já tem uma conta?',
33+
'token' => '(To be translated) Token',
3334

3435
// Botões
3536
'confirm' => 'Confirmar',

src/Language/sk/Auth.php

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'password' => 'Heslo',
3131
'passwordConfirm' => 'Heslo (znova)',
3232
'haveAccount' => 'Máte už účet?',
33+
'token' => '(To be translated) Token',
3334

3435
// Buttons
3536
'confirm' => 'Potvrdiť',

src/Language/sr/Auth.php

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'password' => 'Lozinka',
3131
'passwordConfirm' => 'Lozinka (ponovo)',
3232
'haveAccount' => 'Već imate nalog?',
33+
'token' => '(To be translated) Token',
3334

3435
// Buttons
3536
'confirm' => 'Potvrdi',

src/Language/sv-SE/Auth.php

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'password' => 'Lösenord',
3131
'passwordConfirm' => 'Lösenord (igen)',
3232
'haveAccount' => 'Har du redan ett konto?',
33+
'token' => '(To be translated) Token',
3334

3435
// Buttons
3536
'confirm' => 'Bekräfta',

src/Language/tr/Auth.php

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'password' => 'Şifre',
3131
'passwordConfirm' => 'Şifre (tekrar)',
3232
'haveAccount' => 'Zaten hesabınız var mı?',
33+
'token' => '(To be translated) Token',
3334

3435
// Buttons
3536
'confirm' => 'Onayla',

src/Language/uk/Auth.php

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'password' => 'Пароль',
3131
'passwordConfirm' => 'Пароль (ще раз)',
3232
'haveAccount' => 'Вже є обліковий запис?',
33+
'token' => '(To be translated) Token',
3334

3435
// Buttons
3536
'confirm' => 'Підтвердити',

src/Views/email_activate_show.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@
1919
<?= csrf_field() ?>
2020

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

2728
<div class="d-grid col-8 mx-auto m-3">

src/Views/login.php

+6-4
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@
3232
<?= csrf_field() ?>
3333

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

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

4446
<!-- Remember me -->

src/Views/magic_link_form.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@
2828
<?= csrf_field() ?>
2929

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

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

src/Views/register.php

+12-8
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,27 @@
2828
<?= csrf_field() ?>
2929

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

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

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

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

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

0 commit comments

Comments
 (0)