|
4 | 4 |
|
5 | 5 | {% block main %} |
6 | 6 | {% if error %} |
7 | | - <div class="alert alert-danger"> |
| 7 | + <div class="alert alert-danger" role="alert"> |
8 | 8 | {{ error.messageKey|trans(error.messageData, 'security') }} |
9 | 9 | </div> |
10 | 10 | {% endif %} |
11 | 11 |
|
12 | 12 | {# |
13 | | - This references the Stimulus controller defined in |
14 | | - "assets/controllers/login-controller.js". |
| 13 | + This references the Stimulus controller defined in "assets/controllers/login-controller.js". |
15 | 14 | See https://symfony.com/bundles/StimulusBundle/current/index.html |
16 | | - More info on Symfony UX https://ux.symfony.com |
| 15 | + For more info on Symfony UX see https://ux.symfony.com |
17 | 16 | #} |
18 | | - <div class="row" {{ stimulus_controller('login') }}{# @see assets/controllers/login-controller.js #}> |
| 17 | + <div class="row" {{ stimulus_controller('login') }}> |
19 | 18 | <div class="col-sm-5"> |
20 | 19 | <div class="well"> |
21 | 20 | <form action="{{ path('security_login') }}" method="post"> |
22 | 21 | <fieldset> |
23 | 22 | <legend><twig:ux:icon name="tabler:lock"/> {{ 'title.login'|trans }}</legend> |
24 | | - <div class="form-group"> |
25 | | - <label for="username">{{ 'label.username'|trans }}</label> |
26 | | - <input type="text" id="username" name="_username" value="{{ last_username }}" class="form-control" {{ stimulus_target('login', 'username') }} /> |
| 23 | + <div class="mb-3"> |
| 24 | + <label class="form-label" for="username">{{ 'label.username'|trans }}</label> |
| 25 | + <input class="form-control" {{ stimulus_target('login', 'username') }} id="username" name="_username" required="required" type="text" value="{{ last_username }}"> |
27 | 26 | </div> |
28 | 27 |
|
29 | | - <div class="form-group form-group-password"> |
30 | | - <label for="password">{{ 'label.password'|trans }}</label> |
31 | | - <input type="password" id="password" name="_password" class="form-control" {{ stimulus_target('login', 'password') }} /> |
32 | | - <button class="btn btn-primary pull-right" type="button" {{ stimulus_action('login', 'togglePasswordInputType') }}><twig:ux:icon name="tabler:eye" aria-hidden="false" aria-label="Toggle password visibility"/></button> |
| 28 | + <div class="mb-3"> |
| 29 | + <label class="form-label" for="password">{{ 'label.password'|trans }}</label> |
| 30 | + <div class="input-group"> |
| 31 | + <input class="form-control" {{ stimulus_target('login', 'password') }} id="password" name="_password" required="required" type="password"> |
| 32 | + <button class="btn btn-primary" type="button" {{ stimulus_action('login', 'togglePasswordInputType') }}><twig:ux:icon name="tabler:eye" aria-hidden="false" aria-label="Toggle password visibility"/></button> |
| 33 | + </div> |
33 | 34 | </div> |
34 | 35 |
|
35 | | - <div class="form-group"> |
36 | | - <label> |
37 | | - <input type="checkbox" name="_remember_me" checked/> |
38 | | - {{ 'label.remember_me'|trans }} |
39 | | - </label> |
| 36 | + <div class="mb-3 form-check"> |
| 37 | + <input class="form-check-input" id="remember_me" name="_remember_me" type="checkbox" checked> |
| 38 | + <label class="form-check-label" for="remember_me">{{ 'label.remember_me'|trans }}</label> |
40 | 39 | </div> |
41 | | - <input type="hidden" name="_target_path" value="{{ app.request.get('redirect_to') }}"/> |
42 | | - <input type="hidden" name="_csrf_token" data-controller="csrf-protection" value="{{ csrf_token('authenticate') }}"/> |
| 40 | + |
| 41 | + <input type="hidden" name="_target_path" value="{{ app.request.get('redirect_to') }}"> |
| 42 | + <input type="hidden" name="_csrf_token" data-controller="csrf-protection" value="{{ csrf_token('authenticate') }}"> |
43 | 43 | <button type="submit" class="btn btn-primary"> |
44 | 44 | <twig:ux:icon name="tabler:login"/> {{ 'action.sign_in'|trans }} |
45 | 45 | </button> |
|
89 | 89 |
|
90 | 90 | <div id="login-users-help" class="card"> |
91 | 91 | <div class="card-body"> |
92 | | - <p> |
93 | | - <span class="badge badge-success">{{ 'note'|trans }}</span> |
94 | | - {{ 'help.reload_fixtures'|trans }}<br/> |
95 | | - |
96 | | - <code class="console">$ php bin/console doctrine:fixtures:load</code> |
| 92 | + <p class="card-text"> |
| 93 | + <span class="badge text-bg-info">{{ 'note'|trans }}</span> |
| 94 | + {{ 'help.reload_fixtures'|trans }}<br> |
| 95 | + <code class="d-block my-2 p-2">$ php bin/console doctrine:fixtures:load</code> |
97 | 96 | </p> |
98 | 97 |
|
99 | | - <p> |
100 | | - <span class="badge badge-success">{{ 'tip'|trans }}</span> |
101 | | - {{ 'help.add_user'|trans }}<br/> |
102 | | - |
103 | | - <code class="console">$ php bin/console app:add-user</code> |
| 98 | + <p class="card-text"> |
| 99 | + <span class="badge text-bg-info">{{ 'tip'|trans }}</span> |
| 100 | + {{ 'help.add_user'|trans }}<br> |
| 101 | + <code class="d-block my-2 p-2">$ php bin/console app:add-user</code> |
104 | 102 | </p> |
105 | 103 | </div> |
106 | 104 | </div> |
|
0 commit comments