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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-4 / +4 lines)
Lines 346-358 OPAC: Link Here
346
                  no: "Don't allow"
346
                  no: "Don't allow"
347
            - patrons to change their own password on the OPAC. Note that this must be off to use LDAP authentication.
347
            - patrons to change their own password on the OPAC. Note that this must be off to use LDAP authentication.
348
        -
348
        -
349
            - "The user "
349
            - "Library users are "
350
            - pref: OpacResetPassword
350
            - pref: OpacResetPassword
351
              default: 1
351
              default: 1
352
              choices:
352
              choices:
353
                  yes: "can reset"
353
                  yes: "allowed"
354
                  no: "can not reset"
354
                  no: "not allowed"
355
            - " their password on OPAC."
355
            - " to recover their password via e-mail in the OPAC"
356
        -
356
        -
357
            - pref: OPACPatronDetails
357
            - pref: OPACPatronDetails
358
              choices:
358
              choices:
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc (-2 / +1 lines)
Lines 318-325 Link Here
318
                        <label for="mpassword">Password:</label><input type="password" id="mpassword" name="password" />
318
                        <label for="mpassword">Password:</label><input type="password" id="mpassword" name="password" />
319
                    [% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %]
319
                    [% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %]
320
                        <div id="forgotpassword-modal">
320
                        <div id="forgotpassword-modal">
321
                            <h5>Forgot your password?</h5>
321
                            <a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a>
322
                            <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>
323
                        </div>
322
                        </div>
324
                    [% END %]
323
                    [% END %]
325
                    [% IF Koha.Preference( 'NoLoginInstructions' ) %]
324
                    [% IF Koha.Preference( 'NoLoginInstructions' ) %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt (-2 / +1 lines)
Lines 152-159 Link Here
152
                                <input type="submit" value="Log in" class="btn" />
152
                                <input type="submit" value="Log in" class="btn" />
153
                                [% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %]
153
                                [% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %]
154
                                    <div id="forgotpassword">
154
                                    <div id="forgotpassword">
155
                                        <h5>Forgot your password?</h5>
155
				        <a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a>
156
                                        <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>
157
                                    </div>
156
                                    </div>
158
                                [% END %]
157
                                [% END %]
159
                                <div id="nologininstructions">
158
                                <div id="nologininstructions">
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt (-2 / +1 lines)
Lines 87-94 Link Here
87
                                    </fieldset>
87
                                    </fieldset>
88
                                [% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %]
88
                                [% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %]
89
                                    <div id="forgotpassword">
89
                                    <div id="forgotpassword">
90
                                        <h5>Forgot your password?</h5>
90
                                        <a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a>
91
                                        <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>
92
                                    </div>
91
                                    </div>
93
                                [% END %]
92
                                [% END %]
94
                                [% IF Koha.Preference( 'NoLoginInstructions' ) %]
93
                                [% IF Koha.Preference( 'NoLoginInstructions' ) %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt (-4 / +7 lines)
Lines 1-6 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% IF (LibraryNameTitle) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo;
3
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog</title>
4
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% BLOCK cssinclude %][% END %]
5
[% BLOCK cssinclude %][% END %]
6
[% BLOCK jsinclude %]
6
[% BLOCK jsinclude %]
Lines 36-53 Link Here
36
    <div class="container-fluid">
36
    <div class="container-fluid">
37
        <div class="row-fluid">
37
        <div class="row-fluid">
38
            <div class="span2">
38
            <div class="span2">
39
                [% IF ( OpacPublic ) %]
40
39
                <div id="navigation">
41
                <div id="navigation">
40
                    [% INCLUDE 'navigation.inc' IsPatronPage=0 %]
42
                    [% INCLUDE 'navigation.inc' IsPatronPage=0 %]
41
                </div>
43
                </div>
44
                [% END %]
42
            </div>
45
            </div>
43
            <div class="span10">
46
            <div class="span10">
44
                    <h3>Password recovery</h3>
47
                    <h3>Password recovery</h3>
45
            [% IF (hasError) %]
48
            [% IF (hasError) %]
46
                <div class="alert alert-warning">
49
                <div class="alert alert-warning">
47
                    <h3>An error occured</h3>
50
                    <h3>An error occurred</h3>
48
                    <p>
51
                    <p>
49
                    [% IF (sendmailError) %]
52
                    [% IF (sendmailError) %]
50
                        An error has occured while sending you the password recovery link.
53
                        An error has occurred while sending you the password recovery link.
51
                        <br/>Please try again later.
54
                        <br/>Please try again later.
52
                    [% ELSIF (errNoBorrowerFound) %]
55
                    [% ELSIF (errNoBorrowerFound) %]
53
                        No account was found with the provided information.
56
                        No account was found with the provided information.
Lines 131-134 Link Here
131
        </div><!-- / .row-fluid -->
134
        </div><!-- / .row-fluid -->
132
    </div><!-- / .container-fluid -->
135
    </div><!-- / .container-fluid -->
133
</div><!-- / .main -->
136
</div><!-- / .main -->
134
[% INCLUDE 'opac-bottom.inc' %]
137
[% INCLUDE 'opac-bottom.inc' %]
(-)a/opac/opac-password-recovery.pl (-5 / +6 lines)
Lines 54-60 if ( $query->param('sendEmail') || $query->param('resendEmail') ) { Link Here
54
    $email ||= ''; # avoid undef
54
    $email ||= ''; # avoid undef
55
    my $borrower;
55
    my $borrower;
56
    my $search_results;
56
    my $search_results;
57
58
    # Find the borrower by his userid or email
57
    # Find the borrower by his userid or email
59
    if( $username ){
58
    if( $username ){
60
        $search_results = Search({ userid => $username });
59
        $search_results = Search({ userid => $username });
Lines 62-69 if ( $query->param('sendEmail') || $query->param('resendEmail') ) { Link Here
62
    elsif ( $email ){
61
    elsif ( $email ){
63
        $search_results = Search({ '' => $email }, undef, undef, undef, ['emailpro', 'email', 'B_email']);
62
        $search_results = Search({ '' => $email }, undef, undef, undef, ['emailpro', 'email', 'B_email']);
64
    }
63
    }
65
64
    if ( not $search_results ){
66
    if(scalar @$search_results > 1){ # Many matching borrowers
65
       $hasError            = 1;
66
       $errNoBorrowerFound  = 1;
67
    }
68
    elsif(scalar @$search_results > 1){ # Many matching borrowers
67
       $hasError             = 1;
69
       $hasError             = 1;
68
       $errTooManyEmailFound = 1;
70
       $errTooManyEmailFound = 1;
69
    }
71
    }
Lines 112-118 if ( $query->param('sendEmail') || $query->param('resendEmail') ) { Link Here
112
            email     => $email
114
            email     => $email
113
        );
115
        );
114
    }
116
    }
115
    else {# if it doesnt work....
117
    else {# if it doesn't work....
116
        $template->param(
118
        $template->param(
117
            password_recovery => 1,
119
            password_recovery => 1,
118
            sendmailError     => 1
120
            sendmailError     => 1
119
- 

Return to bug 8753