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

(-)a/installer/data/mysql/atomicupdate/bug_39135.pl (+21 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_success say_info);
3
4
return {
5
    bug_number  => "39135",
6
    description => "Add system preference to determine label of password input on login form",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        # Do you stuffs here
12
        $dbh->do(
13
            q{INSERT IGNORE INTO systempreferences (variable,value) VALUES ('OPACPasswordLabelTextContent','password')  }
14
        );
15
16
        # Print useful stuff here
17
18
        # sysprefs
19
        say $out "Added new system preference 'OPACPasswordLabelTextContent'";
20
    },
21
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 530-535 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
530
('OPACOpenURLItemTypes', '', NULL, 'Show the OpenURL link only for these item types', 'Free'),
530
('OPACOpenURLItemTypes', '', NULL, 'Show the OpenURL link only for these item types', 'Free'),
531
('OPACOverDrive','0',NULL,'Enable OverDrive integration in the OPAC','YesNo'),
531
('OPACOverDrive','0',NULL,'Enable OverDrive integration in the OPAC','YesNo'),
532
('OpacPasswordChange','1',NULL,'If ON, enables patron-initiated password change in OPAC (disable it when using LDAP auth)','YesNo'),
532
('OpacPasswordChange','1',NULL,'If ON, enables patron-initiated password change in OPAC (disable it when using LDAP auth)','YesNo'),
533
('OPACPasswordLabelTextContent','password',NULL,NULL,NULL),
533
('OPACPatronDetails','1','','If OFF the patron details tab in the OPAC is disabled.','YesNo'),
534
('OPACPatronDetails','1','','If OFF the patron details tab in the OPAC is disabled.','YesNo'),
534
('OPACpatronimages','0',NULL,'Enable patron images in the OPAC','YesNo'),
535
('OPACpatronimages','0',NULL,'Enable patron images in the OPAC','YesNo'),
535
('OPACPlayMusicalInscripts','0','','If displayed musical inscripts, play midi conversion on the OPAC record details page.','YesNo'),
536
('OPACPlayMusicalInscripts','0','','If displayed musical inscripts, play midi conversion on the OPAC record details page.','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+9 lines)
Lines 191-196 OPAC: Link Here
191
                  username: username
191
                  username: username
192
                  cardnumberorusername: card number or username
192
                  cardnumberorusername: card number or username
193
            - "as the label of the userid input field on the OPAC login form."
193
            - "as the label of the userid input field on the OPAC login form."
194
        -
195
            - Use
196
            - pref: OPACPasswordLabelTextContent
197
              default: Password
198
              choices:
199
                  password: Password
200
                  pin: PIN
201
                  passwordorpin: Password/PIN
202
            - "as the label of the password input field on the OPAC login form."
194
        -
203
        -
195
            - pref: OPACShowMusicalInscripts
204
            - pref: OPACShowMusicalInscripts
196
              default: 0
205
              default: 0
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc (+11 lines)
Lines 184-186 Link Here
184
    [%- END %]
184
    [%- END %]
185
    <label for="[% for | html %]">[% label | html %]:</label>
185
    <label for="[% for | html %]">[% label | html %]:</label>
186
[% END %]
186
[% END %]
187
188
[% BLOCK password_label %]
189
    [%- SET preference_value = Koha.Preference('OPACPasswordLabelTextContent') %]
190
    [%- SET label = t("Password") %]
191
    [%- IF preference_value == "pin" %]
192
        [%- SET label = t("PIN") %]
193
    [%- ELSIF preference_value == "passwordorpin" %]
194
        [%- SET label = t("Password/PIN") %]
195
    [%- END %]
196
    <label for="[% for | html %]">[% label | html %]:</label>
197
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc (-2 / +6 lines)
Lines 495-502 Link Here
495
                            <input type="hidden" name="koha_login_context" value="opac" />
495
                            <input type="hidden" name="koha_login_context" value="opac" />
496
                            <fieldset class="brief">
496
                            <fieldset class="brief">
497
                                <div class="local-login">
497
                                <div class="local-login">
498
                                    [% PROCESS login_label for="muserid" %]<input type="text" id="muserid" name="login_userid" autocomplete="off" /> <label for="mpassword">Password:</label
498
                                    [% PROCESS login_label for="muserid" %]<input type="text" id="muserid" name="login_userid" autocomplete="off" /> [% PROCESS password_label for="mpassword" %]<input
499
                                    ><input type="password" id="mpassword" name="login_password" autocomplete="off" />
499
                                        type="password"
500
                                        id="mpassword"
501
                                        name="login_password"
502
                                        autocomplete="off"
503
                                    />
500
                                    <fieldset class="action">
504
                                    <fieldset class="action">
501
                                        <input type="hidden" name="op" value="cud-login" />
505
                                        <input type="hidden" name="op" value="cud-login" />
502
                                        <input type="submit" class="btn btn-primary" value="Log in" />
506
                                        <input type="submit" class="btn btn-primary" value="Log in" />
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt (-1 / +1 lines)
Lines 251-257 Link Here
251
                                                <input class="form-control" type="text" size="25" id="userid" name="login_userid" autocomplete="off" />
251
                                                <input class="form-control" type="text" size="25" id="userid" name="login_userid" autocomplete="off" />
252
                                            </div>
252
                                            </div>
253
                                            <div class="form-group">
253
                                            <div class="form-group">
254
                                                <label for="password">Password:</label>
254
                                                [% PROCESS password_label for="password" %]
255
                                                <input class="form-control" type="password" size="25" id="password" name="login_password" autocomplete="off" />
255
                                                <input class="form-control" type="password" size="25" id="password" name="login_password" autocomplete="off" />
256
                                            </div>
256
                                            </div>
257
                                            <fieldset class="action">
257
                                            <fieldset class="action">
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt (-1 / +1 lines)
Lines 193-199 Link Here
193
                                            <div class="local-login">
193
                                            <div class="local-login">
194
                                                [% PROCESS login_label for='userid' %]
194
                                                [% PROCESS login_label for='userid' %]
195
                                                <input class="form-control" type="text" id="userid" name="login_userid" autocomplete="off" />
195
                                                <input class="form-control" type="text" id="userid" name="login_userid" autocomplete="off" />
196
                                                <label for="password">Password:</label>
196
                                                [% PROCESS password_label for="password" %]
197
                                                <input class="form-control" type="password" id="password" name="login_password" autocomplete="off" />
197
                                                <input class="form-control" type="password" id="password" name="login_password" autocomplete="off" />
198
                                                <fieldset class="action">
198
                                                <fieldset class="action">
199
                                                    <input type="hidden" name="op" value="cud-login" />
199
                                                    <input type="hidden" name="op" value="cud-login" />
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt (-1 / +1 lines)
Lines 114-120 Link Here
114
                                    [% ELSE %]
114
                                    [% ELSE %]
115
                                        <input class="form-control" type="text" id="userid" size="10" name="login_userid" value="" autocomplete="off" />
115
                                        <input class="form-control" type="text" id="userid" size="10" name="login_userid" value="" autocomplete="off" />
116
                                    [% END %]
116
                                    [% END %]
117
                                    <label for="password">Password:</label>
117
                                    [% PROCESS password_label for="password" %]
118
                                    [% IF Koha.Preference('PatronSelfRegistrationPrefillForm') %]
118
                                    [% IF Koha.Preference('PatronSelfRegistrationPrefillForm') %]
119
                                        <input class="form-control" type="password" id="password" size="10" name="login_password" value="[% password_cleartext | html %]" autocomplete="off" />
119
                                        <input class="form-control" type="password" id="password" size="10" name="login_password" value="[% password_cleartext | html %]" autocomplete="off" />
120
                                    [% ELSE %]
120
                                    [% ELSE %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt (-4 / +1 lines)
Lines 315-323 Link Here
315
                                                    <div class="col-md-12">
315
                                                    <div class="col-md-12">
316
                                                        <input type="text" id="patronlogin" class="form-control focus noEnterSubmit" size="20" name="patronlogin" autocomplete="off" />
316
                                                        <input type="text" id="patronlogin" class="form-control focus noEnterSubmit" size="20" name="patronlogin" autocomplete="off" />
317
                                                    </div>
317
                                                    </div>
318
                                                    <div class="col-md-12">
318
                                                    <div class="col-md-12"> [% PROCESS password_label for="patronpw" %] </div>
319
                                                        <label for="patronpw">Password:</label>
320
                                                    </div>
321
                                                    <div class="col-md-12">
319
                                                    <div class="col-md-12">
322
                                                        <input type="password" id="patronpw" class="form-control" size="20" name="patronpw" autocomplete="off" />
320
                                                        <input type="password" id="patronpw" class="form-control" size="20" name="patronpw" autocomplete="off" />
323
                                                    </div>
321
                                                    </div>
324
- 

Return to bug 39135