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

(-)a/installer/data/mysql/atomicupdate/bug_34188.pl (+17 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "34188",
5
    description => "Force staff to select a library when logging into the staff interface.",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        $dbh->do(q{
10
                INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` )
11
                VALUES ('ForcedLibrarySelection', '0', NULL,'Force staff to select a library when logging into the staff interface.', 'YesNo')});
12
13
        # sysprefs
14
        say $out "Added new system preference 'ForcedLibrarySelection'";
15
16
    },
17
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 255-260 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
255
('FinesIncludeGracePeriod','1',NULL,'If enabled, fines calculations will include the grace period.','YesNo'),
255
('FinesIncludeGracePeriod','1',NULL,'If enabled, fines calculations will include the grace period.','YesNo'),
256
('FinesLog','1',NULL,'If ON, log fines','YesNo'),
256
('FinesLog','1',NULL,'If ON, log fines','YesNo'),
257
('finesMode','off','off|production','Choose the fines mode, \'off\' (no charges), \'production\' (accrue overdue fines).  Requires accruefines cronjob.','Choice'),
257
('finesMode','off','off|production','Choose the fines mode, \'off\' (no charges), \'production\' (accrue overdue fines).  Requires accruefines cronjob.','Choice'),
258
('ForcedLibrarySelection','0',NULL,'Force staff to select a library when logging into the staff interface.','YesNo'),
258
('FRBRizeEditions','0','','If ON, Koha will query one or more ISBN web services for associated ISBNs and display an Editions tab on the details pages','YesNo'),
259
('FRBRizeEditions','0','','If ON, Koha will query one or more ISBN web services for associated ISBNs and display an Editions tab on the details pages','YesNo'),
259
('GenerateAuthorityField667', 'Machine generated authority record', NULL, 'When BiblioAddsAuthorities and AutoCreateAuthorities are enabled, use this as a default value for the 667$a field of MARC21 records', 'free'),
260
('GenerateAuthorityField667', 'Machine generated authority record', NULL, 'When BiblioAddsAuthorities and AutoCreateAuthorities are enabled, use this as a default value for the 667$a field of MARC21 records', 'free'),
260
('GenerateAuthorityField670', 'Work cat.', NULL, 'When BiblioAddsAuthorities and AutoCreateAuthorities are enabled, use this as a default value for the 670$a field of MARC21 records', 'free'),
261
('GenerateAuthorityField670', 'Work cat.', NULL, 'When BiblioAddsAuthorities and AutoCreateAuthorities are enabled, use this as a default value for the 670$a field of MARC21 records', 'free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref (+7 lines)
Lines 138-143 Administration: Link Here
138
              choices:
138
              choices:
139
                  1: "Yes"
139
                  1: "Yes"
140
                  0: "No"
140
                  0: "No"
141
        -
142
            - pref: ForcedLibrarySelection
143
              choices:
144
                  1: "Force"
145
                  0: "Don't force"
146
            - "library selection when logging into the staff interface."
147
141
    CAS authentication:
148
    CAS authentication:
142
        -
149
        -
143
            - "Use CAS for login authentication: "
150
            - "Use CAS for login authentication: "
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt (-4 / +12 lines)
Lines 116-128 Link Here
116
116
117
    [% UNLESS IndependentBranches %]
117
    [% UNLESS IndependentBranches %]
118
        <p>
118
        <p>
119
            <label for="branch">Library:</label>
119
            [% IF Koha.Preference('ForcedLibrarySelection') %]
120
            <select name="branch" id="branch" class="input" tabindex="3">
120
                <label for="branch" class="required">Library:</label>
121
                <option value="">My library</option>
121
                <select name="branch" id="branch" class="input" tabindex="3" required="required">
122
                <option value=""></option>
123
            [% ELSE %]
124
                <label for="branch">Library:</label>
125
                <select name="branch" id="branch" class="input" tabindex="3">
126
                <option value="">My Library</option>
127
            [% END %]
122
                [% FOREACH l IN Branches.all( unfiltered => 1 ) %]
128
                [% FOREACH l IN Branches.all( unfiltered => 1 ) %]
123
                    <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
129
                    <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
124
                 [% END %]
130
                 [% END %]
125
            </select>
131
            </select>
132
            [% IF Koha.Preference('ForcedLibrarySelection') %]
133
                <span class="required">Required</span>
134
            [% END %]
126
        </p>
135
        </p>
127
136
128
        [% IF Koha.Preference('UseCirculationDesks') && Desks.all %]
137
        [% IF Koha.Preference('UseCirculationDesks') && Desks.all %]
129
- 

Return to bug 34188