Bug 31064: Wrap local login with stylable element
Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OPACUserCSS
2. Set syspref to the following:
.local-login {
display: none;
}
3. Go to http://localhost:8080/cgi-bin/koha/opac-main.pl
3b. Note that the local login boxes are hidden
("Log in to your account:" remains so that other login options can
be supplied by OpacUserJS)
4. Click on "Log in to your account" on the top toolbar
4b. Note that the local login boxes are hidden
("Log in to your account:" remains so that other login options can
be supplied by OpacUserJS)
5. Go to http://localhost:8080/cgi-bin/koha/opac-user.pl
5b. Note that the local login boxes are hidden
("Log in to your account" remains so that other login options can be
supplied by OpacUserJS)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 89c910449d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
e79648a25c
commit
e9b4dd2bd5
|
|
@ -385,11 +385,13 @@
|
|||
[% UNLESS Koha.Preference('opacShibOnly') %]
|
||||
<input type="hidden" name="koha_login_context" value="opac" />
|
||||
<fieldset class="brief">
|
||||
<label for="muserid">Login:</label><input type="text" id="muserid" name="userid" autocomplete="off" />
|
||||
<label for="mpassword">Password:</label><input type="password" id="mpassword" name="password" autocomplete="off" />
|
||||
<fieldset class="action">
|
||||
<input type="submit" class="btn btn-primary" value="Log in" />
|
||||
</fieldset>
|
||||
<div class="local-login">
|
||||
<label for="muserid">Login:</label><input type="text" id="muserid" name="userid" autocomplete="off" />
|
||||
<label for="mpassword">Password:</label><input type="password" id="mpassword" name="password" autocomplete="off" />
|
||||
<fieldset class="action">
|
||||
<input type="submit" class="btn btn-primary" value="Log in" />
|
||||
</fieldset>
|
||||
</div>
|
||||
[% IF OpacLoginInstructions %]
|
||||
<div id="nologininstructions-modal" class="nologininstructions">
|
||||
[% PROCESS koha_news_block news => OpacLoginInstructions %]
|
||||
|
|
|
|||
|
|
@ -190,23 +190,25 @@
|
|||
[% END %]
|
||||
<input type="hidden" name="koha_login_context" value="opac" />
|
||||
|
||||
<fieldset class="brief">
|
||||
[% FOREACH INPUT IN INPUTS %]
|
||||
[% NEXT IF INPUT.name == 'logout.x' %]
|
||||
<input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]" />
|
||||
[% END %]
|
||||
<div class="form-group">
|
||||
<label for="userid">Login:</label>
|
||||
<input class="form-control" type="text" size="25" id="userid" name="userid" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Password:</label>
|
||||
<input class="form-control" type="password" size="25" id="password" name="password" />
|
||||
</div>
|
||||
<fieldset class="action">
|
||||
<input type="submit" value="Log in" class="btn btn-primary" />
|
||||
<div class="local-login">
|
||||
<fieldset class="brief">
|
||||
[% FOREACH INPUT IN INPUTS %]
|
||||
[% NEXT IF INPUT.name == 'logout.x' %]
|
||||
<input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]" />
|
||||
[% END %]
|
||||
<div class="form-group">
|
||||
<label for="userid">Login:</label>
|
||||
<input class="form-control" type="text" size="25" id="userid" name="userid" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Password:</label>
|
||||
<input class="form-control" type="password" size="25" id="password" name="password" />
|
||||
</div>
|
||||
<fieldset class="action">
|
||||
<input type="submit" value="Log in" class="btn btn-primary" />
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="nologininstructions">
|
||||
[% IF OpacLoginInstructions %]
|
||||
|
|
|
|||
|
|
@ -189,13 +189,15 @@
|
|||
<a href="/cgi-bin/koha/svc/auth/googleopenidconnect" class="btn btn-light" id="openid_connect"><i class="fa fa-google" aria-hidden="true"></i> Log in with Google</a>
|
||||
<p>If you do not have a Google account, but do have a local account, you can still log in: </p>
|
||||
[% END # /IF GoogleOpenIDConnect %]
|
||||
<label for="userid">Login:</label>
|
||||
<input class="form-control" type="text" id="userid" name="userid" autocomplete="off" />
|
||||
<label for="password">Password:</label>
|
||||
<input class="form-control" type="password" id="password" name="password" autocomplete="off" />
|
||||
<fieldset class="action">
|
||||
<input type="submit" value="Log in" class="btn btn-primary" />
|
||||
</fieldset>
|
||||
<div class="local-login">
|
||||
<label for="userid">Login:</label>
|
||||
<input class="form-control" type="text" id="userid" name="userid" autocomplete="off" />
|
||||
<label for="password">Password:</label>
|
||||
<input class="form-control" type="password" id="password" name="password" autocomplete="off" />
|
||||
<fieldset class="action">
|
||||
<input type="submit" value="Log in" class="btn btn-primary" />
|
||||
</fieldset>
|
||||
</div>
|
||||
[% IF ( OpacLoginInstructions ) %]
|
||||
<div id="nologininstructions-main" class="nologininstructions">
|
||||
[% PROCESS koha_news_block news => OpacLoginInstructions %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue