diff options
Diffstat (limited to 'templates/web/base/auth')
-rw-r--r-- | templates/web/base/auth/change_password.html | 20 | ||||
-rw-r--r-- | templates/web/base/auth/change_phone.html | 2 | ||||
-rw-r--r-- | templates/web/base/auth/general.html | 12 |
3 files changed, 28 insertions, 6 deletions
diff --git a/templates/web/base/auth/change_password.html b/templates/web/base/auth/change_password.html index a32dbaf9c..7a38e0134 100644 --- a/templates/web/base/auth/change_password.html +++ b/templates/web/base/auth/change_password.html @@ -1,7 +1,9 @@ [% SET bclass = 'authpage'; SET bclass = 'fullwidthpage' IF password_changed; -INCLUDE 'header.html', title = loc('Change password'), bodyclass = bclass +SET title = loc('Set password'); +SET title = loc('Change password') IF c.user.password; +INCLUDE 'header.html', title = title bodyclass = bclass %] [% IF password_changed %] @@ -13,13 +15,15 @@ INCLUDE 'header.html', title = loc('Change password'), bodyclass = bclass [% ELSE %] -<h1>[% loc('Change password') %]</h1> +<h1>[% title %]</h1> <form action="[% c.uri_for_action('/auth/profile/change_password') %]" method="post" name="change_password" class="fieldset"> <input type="hidden" name="token" value="[% csrf_token %]"> <fieldset> - [% IF password_error; + [% IF password_error == 'failed' %] + <div class="form-error">[% field_errors.password_register %]</div> + [% ELSIF password_error; errors = { missing => loc('Please enter a password'), @@ -31,6 +35,14 @@ INCLUDE 'header.html', title = loc('Change password'), bodyclass = bclass <div class="form-error">[% loc_password_error %]</div> [% END %] +[% IF c.user.password %] + <div class="form-field"> + <label for="current_password">[% loc('Current password:') %]</label> + <input class="form-control" type="password" name="current_password" value="[% current_password | html %]"> + </div> + <hr> +[% END %] + <div class="form-field"> <label for="new_password">[% loc('New password:') %]</label> <input class="form-control" type="password" name="new_password" value="[% new_password | html %]"> @@ -40,7 +52,7 @@ INCLUDE 'header.html', title = loc('Change password'), bodyclass = bclass <input class="form-control" type="password" name="confirm" value="[% confirm | html %]"> </div> <div class="final-submit"> - <input type="submit" class="btn" value="[% loc('Change password') %]"> + <input type="submit" class="btn" value="[% title %]"> </div> </fieldset> diff --git a/templates/web/base/auth/change_phone.html b/templates/web/base/auth/change_phone.html index 27a2f63dd..62e9fa6d6 100644 --- a/templates/web/base/auth/change_phone.html +++ b/templates/web/base/auth/change_phone.html @@ -18,7 +18,7 @@ END [% IF c.user.phone_verified OR (c.user.phone AND NOT verifying) %] [% loc('Your phone number') %]: [% c.user.phone_display %] [% ELSIF c.user.phone %] -[% DEFAULT username = c.user.phone %] +[% DEFAULT username = c.user.phone_display %] [% END %] <form method="post" name="change_phone"> diff --git a/templates/web/base/auth/general.html b/templates/web/base/auth/general.html index 8fc5578c1..1e44bb68e 100644 --- a/templates/web/base/auth/general.html +++ b/templates/web/base/auth/general.html @@ -60,7 +60,9 @@ [% INCLUDE form_sign_in_yes %] <input type="hidden" name="oauth_need_email" value="1"> [% ELSE %] + [% IF NOT field_errors.password_register %] [% INCLUDE form_sign_in_yes %] + [% END %] [% INCLUDE form_sign_in_no %] [% END %] </div> @@ -114,14 +116,22 @@ <input class="form-control" type="text" name="name" value="" placeholder="[% loc('Your name') %]"> <label for="password_register">[% loc('Password (optional)') %]</label> + [% IF field_errors.password_register %] + <p class='form-error'>[% field_errors.password_register %]</p> + [% END %] <div class="general-notes"> <p>[% loc('Providing a name and password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</p> </div> <div class="form-txt-submit-box"> - <input class="form-control" type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]"> + <input class="form-control js-password-validate" type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]"> <input class="green-btn" type="submit" name="sign_in_by_code" value="[% loc('Sign in') %]"> </div> + + <div class="general-notes"> + <p>[% tprintf(loc('Your password should include %d or more characters.'), c.cobrand.password_minimum_length) %]</p> + </div> + </div> [% END %] |