View | Details | Raw Unified | Return to bug 30724
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/two_factor_auth.tt (-5 / +38 lines)
Lines 6-12 Link Here
6
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
7
<title
7
<title
8
    >[% FILTER collapse %]
8
    >[% FILTER collapse %]
9
        [% t("Two-factor authentication") | html %]
9
        [% IF another_user %]
10
            [% t("Two-factor authentication for") | html %]
11
            [% patron.firstname | html %]
12
            [% patron.surname | html %]
13
        [% ELSE %]
14
            [% t("Two-factor authentication") | html %]
15
        [% END %]
10
        &rsaquo; [% t("Patrons") | html %] &rsaquo; [% t("Koha") | html %]
16
        &rsaquo; [% t("Patrons") | html %] &rsaquo; [% t("Koha") | html %]
11
    [% END %]</title
17
    [% END %]</title
12
>
18
>
Lines 47-53 Link Here
47
53
48
        <div id="registration-status">
54
        <div id="registration-status">
49
            <div id="registration-status-enabled" [% IF !patron.has_2fa_enabled %]style="display: none;"[% END %]>
55
            <div id="registration-status-enabled" [% IF !patron.has_2fa_enabled %]style="display: none;"[% END %]>
50
                <div class="alert alert-info two-factor-status">Status: Enabled</div>
56
                [% IF another_user %]
57
                    <div class="alert alert-success two-factor-status">
58
                        <strong>Two-factor authentication: Enabled</strong>
59
                        <p>[% patron.firstname | html %] [% patron.surname | html %] has two-factor authentication enabled for enhanced account security.</p>
60
                    </div>
61
                [% ELSE %]
62
                    <div class="alert alert-success two-factor-status">
63
                        <strong>Two-factor authentication: Enabled</strong>
64
                        <p>Your account is protected with two-factor authentication.</p>
65
                    </div>
66
                [% END %]
51
67
52
                <form id="two-factor-auth" action="/cgi-bin/koha/members/two_factor_auth.pl" method="post">
68
                <form id="two-factor-auth" action="/cgi-bin/koha/members/two_factor_auth.pl" method="post">
53
                    [% INCLUDE 'csrf-token.inc' %]
69
                    [% INCLUDE 'csrf-token.inc' %]
Lines 57-65 Link Here
57
            </div>
73
            </div>
58
74
59
            <div id="registration-status-disabled" [% IF patron.has_2fa_enabled %]style="display: none;"[% END %]>
75
            <div id="registration-status-disabled" [% IF patron.has_2fa_enabled %]style="display: none;"[% END %]>
60
                <div class="alert alert-info two-factor-status">Status: Disabled</div>
61
                [% IF another_user %]
76
                [% IF another_user %]
62
                    <div>You cannot enable two-factor authentication for a user. They need to do it themselves.</div>
77
                    <div class="alert alert-info two-factor-status">
78
                        <strong>Two-factor authentication: Disabled</strong>
79
                        <p>[% patron.firstname | html %] [% patron.surname | html %] does not have two-factor authentication enabled.</p>
80
                    </div>
81
                [% ELSE %]
82
                    <div class="alert alert-info two-factor-status">
83
                        <strong>Two-factor authentication: Disabled</strong>
84
                        <p>Your account is not protected with two-factor authentication.</p>
85
                    </div>
86
                [% END %]
87
                [% IF another_user %]
88
                    <div class="alert alert-warning">
89
                        <strong>Two-factor authentication setup restricted</strong>
90
                        <p>Two-factor authentication can only be enabled by <strong>[% patron.firstname | html %] [% patron.surname | html %]</strong> themselves, as it requires their personal authenticator device.</p>
91
                        <p>As a superlibrarian, you can:</p>
92
                        <ul>
93
                            <li>Disable their 2FA if they lose access to their device</li>
94
                            <li>Instruct them to visit <em>Your account → Two-factor authentication</em> to set it up</li>
95
                        </ul>
96
                    </div>
63
                [% ELSE %]
97
                [% ELSE %]
64
                    [% IF Koha.Preference('TwoFactorAuthentication') == 'enforced' %]
98
                    [% IF Koha.Preference('TwoFactorAuthentication') == 'enforced' %]
65
                        <div>Two-factor authentication is mandatory to login. If you do not enable now it will be asked at your next login.</div>
99
                        <div>Two-factor authentication is mandatory to login. If you do not enable now it will be asked at your next login.</div>
66
- 

Return to bug 30724