Bug 8753 - Followup - change value text on syspref
authorLiz Rea <liz@catalyst.net.nz>
Wed, 13 May 2015 22:31:01 +0000 (10:31 +1200)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Wed, 27 Jan 2016 06:40:53 +0000 (06:40 +0000)
Followup changes text from "The user can reset | can not reset their password on OPAC" to "Library users are allowed | not allowed to recover their password via e-mail in the OPAC"

This change more clearly differentiates the purpose of this new preference from OpacPasswordChange.

Bug 8753 - followup - update text for link to match common UI paradigms, fixes OpacPublic disabled view

Also corrects OpacNav being included on the reset page on private catalogues.

Updated the link for forgotten passwords to more closely match common UI paradigms, i.e. Facebook and Twitter

To test:
apply all patches, link should now be the less verbose "Forgot your password?"
disable OpacPublic, anything in opacnav should not appear (you may need to add something to opacnav to test properly)

Bug 8753 - [followup] fix the title on opac-password-recovery.tt

The title stanza was missing a <title></title> around it, causing the extra text to appear.

To test, apply all patches and make sure it looks ok and there is no extra text at the top or bottom of the page.

Bug 8753 - [followup} Correcting spelling mistakes

Make sure it all still works

Bug 8753 - [followup] fix error when no information is provided

To test:

All normal checks plus make sure that a nice error is displayed when no data is provided.

fixing the deprecated thing

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt
opac/opac-password-recovery.pl

index bb9e1eb..b4ea23c 100644 (file)
@@ -346,13 +346,13 @@ OPAC:
                   no: "Don't allow"
             - patrons to change their own password on the OPAC. Note that this must be off to use LDAP authentication.
         -
-            - "The user "
+            - "Library users are "
             - pref: OpacResetPassword
               default: 1
               choices:
-                  yes: "can reset"
-                  no: "can not reset"
-            - " their password on OPAC."
+                  yes: "allowed"
+                  no: "not allowed"
+            - " to recover their password via e-mail in the OPAC"
         -
             - pref: OPACPatronDetails
               choices:
index 636c5cb..21504c2 100644 (file)
                         <label for="mpassword">Password:</label><input type="password" id="mpassword" name="password" />
                     [% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %]
                         <div id="forgotpassword-modal">
-                            <h5>Forgot your password?</h5>
-                            <p>If you do not remember your password, click <a href="/cgi-bin/koha/opac-password-recovery.pl">here</a> to create a new one.</p>
+                            <a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a>
                         </div>
                     [% END %]
                     [% IF Koha.Preference( 'NoLoginInstructions' ) %]
index 1174f59..c5cd351 100644 (file)
                                 <input type="submit" value="Log in" class="btn" />
                                 [% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %]
                                     <div id="forgotpassword">
-                                        <h5>Forgot your password?</h5>
-                                        <p>If you do not remember your password, click <a href="/cgi-bin/koha/opac-password-recovery.pl">here</a> to create a new one.</p>
+                        <a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a>
                                     </div>
                                 [% END %]
                                 <div id="nologininstructions">
index 87051fb..798c90e 100644 (file)
@@ -87,8 +87,7 @@
                                     </fieldset>
                                 [% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %]
                                     <div id="forgotpassword">
-                                        <h5>Forgot your password?</h5>
-                                        <p>If you do not remember your password, click <a href="/cgi-bin/koha/opac-password-recovery.pl">here</a> to create a new one.</p>
+                                        <a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a>
                                     </div>
                                 [% END %]
                                 [% IF Koha.Preference( 'NoLoginInstructions' ) %]
index 8eedb7d..8ffb3e3 100644 (file)
@@ -1,6 +1,6 @@
 [% USE Koha %]
 [% INCLUDE 'doc-head-open.inc' %]
-[% IF (LibraryNameTitle) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo;
+<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% BLOCK cssinclude %][% END %]
 [% BLOCK jsinclude %]
     <div class="container-fluid">
         <div class="row-fluid">
             <div class="span2">
+                [% IF ( OpacPublic ) %]
+
                 <div id="navigation">
                     [% INCLUDE 'navigation.inc' IsPatronPage=0 %]
                 </div>
+                [% END %]
             </div>
             <div class="span10">
                     <h3>Password recovery</h3>
             [% IF (hasError) %]
                 <div class="alert alert-warning">
-                    <h3>An error occured</h3>
+                    <h3>An error occurred</h3>
                     <p>
                     [% IF (sendmailError) %]
-                        An error has occured while sending you the password recovery link.
+                        An error has occurred while sending you the password recovery link.
                         <br/>Please try again later.
                     [% ELSIF (errNoBorrowerFound) %]
                         No account was found with the provided information.
         </div><!-- / .row-fluid -->
     </div><!-- / .container-fluid -->
 </div><!-- / .main -->
-[% INCLUDE 'opac-bottom.inc' %]
\ No newline at end of file
+[% INCLUDE 'opac-bottom.inc' %]
index 0013870..e2cd74e 100755 (executable)
@@ -54,7 +54,6 @@ if ( $query->param('sendEmail') || $query->param('resendEmail') ) {
     $email ||= ''; # avoid undef
     my $borrower;
     my $search_results;
-
     # Find the borrower by his userid or email
     if( $username ){
         $search_results = Search({ userid => $username });
@@ -62,8 +61,11 @@ if ( $query->param('sendEmail') || $query->param('resendEmail') ) {
     elsif ( $email ){
         $search_results = Search({ '' => $email }, undef, undef, undef, ['emailpro', 'email', 'B_email']);
     }
-
-    if(scalar @$search_results > 1){ # Many matching borrowers
+    if ( not $search_results ){
+       $hasError            = 1;
+       $errNoBorrowerFound  = 1;
+    }
+    elsif(scalar @$search_results > 1){ # Many matching borrowers
        $hasError             = 1;
        $errTooManyEmailFound = 1;
     }
@@ -112,7 +114,7 @@ if ( $query->param('sendEmail') || $query->param('resendEmail') ) {
             email     => $email
         );
     }
-    else {# if it doesnt work....
+    else {# if it doesn't work....
         $template->param(
             password_recovery => 1,
             sendmailError     => 1