@@ -, +, @@ login page --- C4/Auth.pm | 9 ++- .../opac-tmpl/bootstrap/en/includes/alt-auth.inc | 79 ++++++++++++++++++++ .../bootstrap/en/includes/doc-head-close.inc | 4 +- .../bootstrap/en/includes/opac-bottom.inc | 4 +- .../opac-tmpl/bootstrap/en/modules/opac-auth.tt | 81 +-------------------- .../opac-tmpl/bootstrap/en/modules/sco-auth.tt | 85 ++++++++++++++++++++++ opac/sco/sco-main.pl | 2 +- 7 files changed, 180 insertions(+), 84 deletions(-) create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/alt-auth.inc create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/modules/sco-auth.tt --- a/C4/Auth.pm +++ a/C4/Auth.pm @@ -1197,7 +1197,14 @@ sub checkauth { $LibraryNameTitle =~ s/<(?:\/?)(?:br|p)\s*(?:\/?)>/ /sgi; $LibraryNameTitle =~ s/<(?:[^<>'"]|'(?:[^']*)'|"(?:[^"]*)")*>//sg; - my $template_name = ( $type eq 'opac' ) ? 'opac-auth.tt' : 'auth.tt'; + my $template_name; + if( $type eq 'opac' ) { + $template_name = 'opac-auth.tt' + } + elsif( $type eq 'sco' ){ + $template_name = 'sco-auth.tt' + } + else { $template_name = 'auth.tt' } my $template = C4::Templates::gettemplate( $template_name, $type, $query ); $template->param( branchloop => GetBranchesLoop(), --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/alt-auth.inc +++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/alt-auth.inc @@ -0,0 +1,79 @@ +[% IF ( shibbolethAuthentication ) %] + + [% IF ( invalidShibLogin ) %] + +
+

+ Sorry, your Shibboleth identity does not match a valid library identity. + [% IF ( casAuthentication ) %] + [% IF ( invalidCasLogin ) %] + +

Sorry, the CAS login also failed, if you have a local login you may use that below.

+ [% ELSE %] + If you have a CAS account, you may use that below. + [% END %] + [% ELSE %] + If you have a local account, you may use that below. + [% END %] +

+
+ [% ELSE %] +

Shibboleth Login

+

If you have a Shibboleth account, + please click here to login + [% END %] + + [% IF ( casAuthentication ) %] +

CAS login

+

If you do not have a Shibboleth account, but you do have a CAS account, + [% ELSE %] +

Local login

+

If you do not have a Shibboleth account, but you do have a local login, then you may login below:

+ [% END %] + +[% END %] + +[% IF ( casAuthentication ) %] + [% IF ( shibbolethAuthentication ) %] + [% IF ( casServerUrl ) %] + please click here to login.

+ [% END %] + [% IF ( casServersLoop ) %] + please choose against which one you would like to authenticate:

+ + [% END %] + [% ELSE %] +

CAS login

+ + [% IF ( invalidCasLogin ) %] + +

Sorry, the CAS login failed.

+ [% END %] + +

If you have a CAS account, + [% IF ( casServerUrl ) %] + please click here to login.

+ [% END %] + + [% IF ( casServersLoop ) %] + please choose against which one you would like to authenticate:

+ + [% END %] + [% END %] + + [% IF ( shibbolethAuthentication ) %] +

Nothing

+ [% ELSE %] +

Local login

+

If you do not have a CAS account, but do have a local account, you can still log in:

+ [% END %] + +[% END # / IF casAuthentication %] --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc +++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc @@ -37,7 +37,9 @@ [% IF ( bidi ) %] [% END %] -[% IF ( OPACUserCSS ) %][% END %] +[% UNLESS template.name.match('sco-auth.tt') %] + [% IF ( OPACUserCSS ) %][% END %] +[% END %] [% PROCESS cssinclude %] --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -267,12 +267,14 @@ $(document).ready(function() { [% PROCESS jsinclude %] -[% IF ( OPACUserJS ) %] +[% UNLESS template.name.match('sco-auth.tt') %] + [% IF ( OPACUserJS ) %] + [% END %] [% END %] --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt @@ -57,86 +57,7 @@ [% END %] - [% IF ( shibbolethAuthentication ) %] - - [% IF ( invalidShibLogin ) %] - -
-

- Sorry, your Shibboleth identity does not match a valid library identity. - [% IF ( casAuthentication ) %] - [% IF ( invalidCasLogin ) %] - -

Sorry, the CAS login also failed, if you have a local login you may use that below.

- [% ELSE %] - If you have a CAS account, you may use that below. - [% END %] - [% ELSE %] - If you have a local account, you may use that below. - [% END %] -

-
- [% ELSE %] -

Shibboleth Login

- -

If you have a Shibboleth account, - please click here to login.

- [% END %] - [% IF ( casAuthentication ) %] -

CAS login

-

If you do not have a Shibboleth account, but you do have a CAS account, - [% ELSE %] -

Local login

-

If you do not have a Shibboleth account, but you do have a local login, then you may login below:

- [% END %] - - [% END %] - - [% IF ( casAuthentication ) %] - [% IF ( shibbolethAuthentication ) %] - [% IF ( casServerUrl ) %] - please click here to login.

- [% END %] - - [% IF ( casServersLoop ) %] - please choose against which one you would like to authenticate:

- - [% END %] - [% ELSE %] -

CAS login

- - [% IF ( invalidCasLogin ) %] - -

Sorry, the CAS login failed.

- [% END %] - -

If you have a CAS account, - [% IF ( casServerUrl ) %] - please click here to login.

- [% END %] - - [% IF ( casServersLoop ) %] - please choose against which one you would like to authenticate:

- - [% END %] - [% END %] - - [% IF ( shibbolethAuthentication ) %] -

Nothing

- [% ELSE %] -

Local login

-

If you do not have a CAS account, but do have a local account, you can still log in:

- [% END %] - - [% END # / IF casAuthentication %] + [% INCLUDE 'alt-auth.inc' %]
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco-auth.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco-auth.tt @@ -0,0 +1,85 @@ +[% USE Koha %] +[% INCLUDE 'doc-head-open.inc' %] +[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] self-checkout station › + Self-checkout login + +[% INCLUDE 'doc-head-close.inc' %] +[% BLOCK cssinclude %][% END %] +[% IF ( Koha.Preference('SCOUserCSS') ) %][% END %] + +[% INCLUDE 'bodytag.inc' bodyid='sco-login-page' bodyclass='scrollto' %] +[% INCLUDE 'masthead.inc' %] + +
+ + +
+
+
+
+ [% IF Koha.Preference( 'opacuserlogin' ) == 1 %] + [% IF ( nopermission ) %] + +
+

Access denied

+

Sorry, the system doesn't think you have permission to access this page.

+
+ [% END %] + [% END %] + + [% IF ( loginprompt ) %] + +

Log in to your account

+ + [% IF ( timed_out ) %] + +
+

Sorry, your session has timed out. Please log in again.

+
+ [% END %] + + [% IF ( different_ip ) %] + +
+

You are logging from a different IP address. Please log in again.

+
+ [% END %] + + [% IF ( invalid_username_or_password ) %] + +
+

You entered an incorrect username or password. Please try again! And remember, passwords are case sensitive.

+
+ [% END %] + + [% INCLUDE 'alt-auth.inc' %] + + + +
+ [% FOREACH INPUT IN INPUTS %] + + [% END %] + + + +
+ + +
+ + [% END # / IF loginprompt %] +
+
+
+
+ + +[% INCLUDE 'opac-bottom.inc' %] +[% BLOCK jsinclude %] +[% IF ( Koha.Preference('SCOUserJS') ) %][% END %] + +[% END %] --- a/opac/sco/sco-main.pl +++ a/opac/sco/sco-main.pl @@ -67,7 +67,7 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user({ authnotrequired => 0, flagsrequired => { circulate => "self_checkout" }, query => $query, - type => "opac", + type => "sco", debug => 1, }); --