aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/auth/change_email.html
blob: b3bec6b3e216eb0d420c064e3134beee04cef63e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
[%
IF c.user.email_verified OR (c.user.email AND NOT verifying);
    SET title = loc('Change email address');
ELSIF c.user.email;
    SET title = loc('Verify email address');
ELSE;
    SET title = loc('Add email address');
END
-%]
[% INCLUDE 'header.html' bodyclass = 'authpage' %]

<h1>[% title %]</h1>

[% IF c.user.email_verified OR (c.user.email AND NOT verifying) %]
[% loc('Your email address') %]: [% c.user.email %]
[% ELSIF c.user.email %]
[% DEFAULT username = c.user.email %]
[% END %]

<form method="post" name="change_email">
    <input type="hidden" name="token" value="[% csrf_token %]">

    <fieldset>
    [% IF username_error;
        errors = {
            missing_email = loc('Please enter your email'),
            other_email = loc('Please check your email address is correct')
        };
        loc_username_error = errors.$username_error || errors.other_email;
    %]
    <div class="form-error">[% loc_username_error %]</div>
    [% END %]

    <div class="form-field">
        <label for="email">
          [% IF NOT c.user.email_verified AND c.user.email AND verifying %]
            [% loc('Email address') %]:
          [% ELSE %]
            [% loc('New email address:') %]
          [% END %]
        </label>
        <input class="form-control" type="email" name="email" id="email" value="[% username | html %]">
    </div>
    <div class="final-submit">
        <input type="submit" class="btn" value="[% title %]">
    </div>

    </fieldset>
</form>


[% INCLUDE 'footer.html' %]