File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed
template/en/default/account/auth Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -1151,6 +1151,17 @@ sub create {
11511151 return \@optional ;
11521152 },
11531153 ' default_authorizer' => sub { return Bugzilla::Auth-> new() },
1154+
1155+ ' login_not_email' => sub {
1156+ my $params = Bugzilla-> params;
1157+ my $cache = Bugzilla-> request_cache;
1158+
1159+ return $cache -> {login_not_email } //=
1160+ ($params -> {emailsuffix }
1161+ || ($params -> {user_verify_class } =~ / LDAP/ && $params -> {LDAPmailattribute })
1162+ || ($params -> {user_verify_class } =~ / RADIUS/ && $params -> {RADIUS_email_suffix }))
1163+ ? 1 : 0;
1164+ },
11541165 },
11551166 };
11561167 # Use a per-process provider to cache compiled templates in memory across
Original file line number Diff line number Diff line change 3434 id="mini_login[% qs_suffix FILTER html %]">
3535 <input id="Bugzilla_login[% qs_suffix FILTER html %]" required
3636 name="Bugzilla_login" class="bz_login"
37- [% IF Param('emailsuffix') %]
37+ [% IF login_not_email %]
3838 placeholder="Login"
3939 [% ELSE %]
4040 type="email" placeholder="Email Address"
6464 class="mini_forgot bz_default_hidden">
6565 <label for="login[% qs_suffix FILTER html %]">Login:</label>
6666 <input name="loginname" size="20" id="login[% qs_suffix FILTER html %]" required
67- [% IF Param('emailsuffix') %]
67+ [% IF login_not_email %]
6868 placeholder="Your Login"
6969 [% ELSE %]
7070 type="email" placeholder="Your Email Address"
Original file line number Diff line number Diff line change 3030 <tr>
3131 <th>
3232 <label for="Bugzilla_login">
33- [% IF Param('emailsuffix') %]
33+ [% IF login_not_email %]
3434 Login:
3535 [% ELSE %]
3636 Email Address:
3939 </th>
4040 <td>
4141 <input id="Bugzilla_login" name="Bugzilla_login"
42- [%- ' type="email"' UNLESS Param('emailsuffix') %] autofocus required>
42+ [%- ' type="email"' UNLESS login_not_email %] autofocus required>
4343 [% Param('emailsuffix') FILTER html %]
4444 </td>
4545 </tr>
You can’t perform that action at this time.
0 commit comments