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

(-)a/admin/library_groups.pl (+4 lines)
Lines 47-52 if ( $action eq 'add' ) { Link Here
47
    my $description = $cgi->param('description') || undef;
47
    my $description = $cgi->param('description') || undef;
48
    my $branchcode  = $cgi->param('branchcode')  || undef;
48
    my $branchcode  = $cgi->param('branchcode')  || undef;
49
    my $ft_hide_patron_info    = $cgi->param('ft_hide_patron_info')    || 0;
49
    my $ft_hide_patron_info    = $cgi->param('ft_hide_patron_info')    || 0;
50
    my $ft_limit_item_editing  = $cgi->param('ft_limit_item_editing')  || 0;
50
    my $ft_search_groups_opac  = $cgi->param('ft_search_groups_opac')  || 0;
51
    my $ft_search_groups_opac  = $cgi->param('ft_search_groups_opac')  || 0;
51
    my $ft_search_groups_staff = $cgi->param('ft_search_groups_staff') || 0;
52
    my $ft_search_groups_staff = $cgi->param('ft_search_groups_staff') || 0;
52
    my $ft_local_hold_group = $cgi->param('ft_local_hold_group') || 0;
53
    my $ft_local_hold_group = $cgi->param('ft_local_hold_group') || 0;
Lines 65-70 if ( $action eq 'add' ) { Link Here
65
                    ft_search_groups_opac  => $ft_search_groups_opac,
66
                    ft_search_groups_opac  => $ft_search_groups_opac,
66
                    ft_search_groups_staff => $ft_search_groups_staff,
67
                    ft_search_groups_staff => $ft_search_groups_staff,
67
                    ft_local_hold_group    => $ft_local_hold_group,
68
                    ft_local_hold_group    => $ft_local_hold_group,
69
                    ft_limit_item_editing  => $ft_limit_item_editing,
68
                    branchcode             => $branchcode,
70
                    branchcode             => $branchcode,
69
                }
71
                }
70
            )->store();
72
            )->store();
Lines 82-87 elsif ( $action eq 'edit' ) { Link Here
82
    my $title       = $cgi->param('title')       || undef;
84
    my $title       = $cgi->param('title')       || undef;
83
    my $description = $cgi->param('description') || undef;
85
    my $description = $cgi->param('description') || undef;
84
    my $ft_hide_patron_info    = $cgi->param('ft_hide_patron_info')    || 0;
86
    my $ft_hide_patron_info    = $cgi->param('ft_hide_patron_info')    || 0;
87
    my $ft_limit_item_editing  = $cgi->param('ft_limit_item_editing')  || 0;
85
    my $ft_search_groups_opac  = $cgi->param('ft_search_groups_opac')  || 0;
88
    my $ft_search_groups_opac  = $cgi->param('ft_search_groups_opac')  || 0;
86
    my $ft_search_groups_staff = $cgi->param('ft_search_groups_staff') || 0;
89
    my $ft_search_groups_staff = $cgi->param('ft_search_groups_staff') || 0;
87
    my $ft_local_hold_group = $cgi->param('ft_local_hold_group') || 0;
90
    my $ft_local_hold_group = $cgi->param('ft_local_hold_group') || 0;
Lines 94-99 elsif ( $action eq 'edit' ) { Link Here
94
                title       => $title,
97
                title       => $title,
95
                description => $description,
98
                description => $description,
96
                ft_hide_patron_info      => $ft_hide_patron_info,
99
                ft_hide_patron_info      => $ft_hide_patron_info,
100
                ft_limit_item_editing    => $ft_limit_item_editing,
97
                ft_search_groups_opac    => $ft_search_groups_opac,
101
                ft_search_groups_opac    => $ft_search_groups_opac,
98
                ft_search_groups_staff   => $ft_search_groups_staff,
102
                ft_search_groups_staff   => $ft_search_groups_staff,
99
                ft_local_hold_group   => $ft_local_hold_group,
103
                ft_local_hold_group   => $ft_local_hold_group,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt (-4 / +22 lines)
Lines 129-134 Link Here
129
                                        Limit patron data access by group
129
                                        Limit patron data access by group
130
                                    </label>
130
                                    </label>
131
                                </p>
131
                                </p>
132
                                <p>
133
                                    <label>
134
                                        <input type="checkbox" name="ft_limit_item_editing" id="add-group-modal-ft_limit_item_editing" value="1" />
135
                                        Limit item editing by group
136
                                    </label>
137
                                </p>
132
                                <p>
138
                                <p>
133
                                    <label>
139
                                    <label>
134
                                        <input type="checkbox" name="ft_search_groups_opac" id="add-group-modal-ft_search_groups_opac" value="1" />
140
                                        <input type="checkbox" name="ft_search_groups_opac" id="add-group-modal-ft_search_groups_opac" value="1" />
Lines 193-198 Link Here
193
                                        Limit patron data access by group
199
                                        Limit patron data access by group
194
                                    </label>
200
                                    </label>
195
                                </p>
201
                                </p>
202
                                <p>
203
                                    <label>
204
                                        <input type="checkbox" id="edit-group-modal-ft_limit_item_editing" name="ft_limit_item_editing" value="1" />
205
                                        Limit item editing by group
206
                                    </label>
207
                                </p>
196
                                <p>
208
                                <p>
197
                                    <label>
209
                                    <label>
198
                                        <input type="checkbox" id="edit-group-modal-ft_search_groups_opac" name="ft_search_groups_opac" value="1" />
210
                                        <input type="checkbox" id="edit-group-modal-ft_search_groups_opac" name="ft_search_groups_opac" value="1" />
Lines 288-297 Link Here
288
                var title = $(this).data('groupTitle');
300
                var title = $(this).data('groupTitle');
289
                var description = $(this).data('groupDescription');
301
                var description = $(this).data('groupDescription');
290
                var ft_hide_patron_info = $(this).data('groupFt_hide_patron_info');
302
                var ft_hide_patron_info = $(this).data('groupFt_hide_patron_info');
303
                var ft_limit_item_editing = $(this).data('groupFt_limit_item_editing');
291
                var ft_search_groups_opac = $(this).data('groupFt_search_groups_opac');
304
                var ft_search_groups_opac = $(this).data('groupFt_search_groups_opac');
292
                var ft_search_groups_staff = $(this).data('groupFt_search_groups_staff');
305
                var ft_search_groups_staff = $(this).data('groupFt_search_groups_staff');
293
                var ft_local_hold_group = $(this).data('groupFt_local_hold_group');
306
                var ft_local_hold_group = $(this).data('groupFt_local_hold_group');
294
                edit_group( id, parent_id, title, description, ft_hide_patron_info, ft_search_groups_opac, ft_search_groups_staff, ft_local_hold_group );
307
                edit_group( id, parent_id, title, description, ft_hide_patron_info, ft_search_groups_opac, ft_search_groups_staff, ft_local_hold_group, ft_limit_item_editing );
295
            });
308
            });
296
309
297
            $('.delete-group').on('click', function(e) {
310
            $('.delete-group').on('click', function(e) {
Lines 324-329 Link Here
324
337
325
338
326
            $('#add-group-modal-ft_hide_patron_info').prop('checked', false);
339
            $('#add-group-modal-ft_hide_patron_info').prop('checked', false);
340
            $('#add-group-modal-ft_limit_item_editing').prop('checked', false);
327
            $('#add-group-modal-ft_search_groups_opac').prop('checked', false);
341
            $('#add-group-modal-ft_search_groups_opac').prop('checked', false);
328
            $('#add-group-modal-ft_search_groups_staff').prop('checked', false);
342
            $('#add-group-modal-ft_search_groups_staff').prop('checked', false);
329
            $('#add-group-modal-ft_local_hold_group').prop('checked', false);
343
            $('#add-group-modal-ft_local_hold_group').prop('checked', false);
Lines 336-354 Link Here
336
350
337
        }
351
        }
338
352
339
        function edit_group( id, parent_id, title, description, ft_hide_patron_info, ft_search_groups_opac, ft_search_groups_staff, ft_local_hold_group ) {
353
        function edit_group( id, parent_id, title, description, ft_hide_patron_info, ft_search_groups_opac, ft_search_groups_staff, ft_local_hold_group, ft_limit_item_editing ) {
340
            $('#edit-group-modal-id').val( id );
354
            $('#edit-group-modal-id').val( id );
341
            $('#edit-group-modal-title').val( title );
355
            $('#edit-group-modal-title').val( title );
342
            $('#edit-group-modal-description').val( description );
356
            $('#edit-group-modal-description').val( description );
343
357
344
            if ( parent_id ) {
358
            if ( parent_id ) {
345
                $('#edit-group-modal-ft_hide_patron_info').prop('checked', false);
359
                $('#edit-group-modal-ft_hide_patron_info').prop('checked', false);
360
                $('#edit-group-modal-ft_limit_item_editing').prop('checked', false);
346
                $('#edit-group-modal-ft_search_groups_opac').prop('checked', false);
361
                $('#edit-group-modal-ft_search_groups_opac').prop('checked', false);
347
                $('#edit-group-modal-ft_search_groups_staff').prop('checked', false);
362
                $('#edit-group-modal-ft_search_groups_staff').prop('checked', false);
348
                $('#edit-group-modal-ft_local_hold_group').prop('checked', false);
363
                $('#edit-group-modal-ft_local_hold_group').prop('checked', false);
349
                $('#root-group-features-edit').hide();
364
                $('#root-group-features-edit').hide();
350
            } else {
365
            } else {
351
                $('#edit-group-modal-ft_hide_patron_info').prop('checked', ft_hide_patron_info ? true : false );
366
                $('#edit-group-modal-ft_hide_patron_info').prop('checked', ft_hide_patron_info ? true : false );
367
                $('#edit-group-modal-ft_limit_item_editing').prop('checked', ft_limit_item_editing ? true : false );
352
                $('#edit-group-modal-ft_search_groups_opac').prop('checked', ft_search_groups_opac ? true : false );
368
                $('#edit-group-modal-ft_search_groups_opac').prop('checked', ft_search_groups_opac ? true : false );
353
                $('#edit-group-modal-ft_search_groups_staff').prop('checked', ft_search_groups_staff ? true : false );
369
                $('#edit-group-modal-ft_search_groups_staff').prop('checked', ft_search_groups_staff ? true : false );
354
                $('#edit-group-modal-ft_local_hold_group').prop('checked', ft_local_hold_group ? true : false );
370
                $('#edit-group-modal-ft_local_hold_group').prop('checked', ft_local_hold_group ? true : false );
Lines 398-403 Link Here
398
                [% IF group.ft_hide_patron_info %]
414
                [% IF group.ft_hide_patron_info %]
399
                    <li>Hide patron's info for librarians outside of this group.</li>
415
                    <li>Hide patron's info for librarians outside of this group.</li>
400
                [% END %]
416
                [% END %]
417
                [% IF group.ft_limit_item_editing %]
418
                    <li>Limit item editing for librarians outside of this group.</li>
419
                [% END %]
401
                [% IF group.ft_search_groups_opac %]
420
                [% IF group.ft_search_groups_opac %]
402
                    <li>Use for OPAC search groups</li>
421
                    <li>Use for OPAC search groups</li>
403
                [% END %]
422
                [% END %]
Lines 424-430 Link Here
424
                       </li>
443
                       </li>
425
444
426
                        <li>
445
                        <li>
427
                            <a class="edit-group" id="edit-group-[% group.id | html %]" href="#" data-group-id="[% group.id | html %]" data-group-parent-id="[% group.parent_id | html %]" data-group-title="[% group.title | html %]" data-group-description="[% group.description | html %]" data-group-ft_hide_patron_info="[% group.ft_hide_patron_info | html %]" data-group-ft_search_groups_opac="[% group.ft_search_groups_opac | html %]" data-group-ft_search_groups_staff="[% group.ft_search_groups_staff | html %]" data-group-ft_local_hold_group="[% group.ft_local_hold_group | html %]" >
446
                            <a class="edit-group" id="edit-group-[% group.id | html %]" href="#" data-group-id="[% group.id | html %]" data-group-parent-id="[% group.parent_id | html %]" data-group-title="[% group.title | html %]" data-group-description="[% group.description | html %]" data-group-ft_hide_patron_info="[% group.ft_hide_patron_info | html %]" data-group-ft_search_groups_opac="[% group.ft_search_groups_opac | html %]" data-group-ft_search_groups_staff="[% group.ft_search_groups_staff | html %]" data-group-ft_local_hold_group="[% group.ft_local_hold_group | html %]" data-group-ft_limit_item_editing="[% group.ft_limit_item_editing | html %]" >
428
                                <i class="fa fa-pencil"></i> Edit
447
                                <i class="fa fa-pencil"></i> Edit
429
                            </a>
448
                            </a>
430
                       </li>
449
                       </li>
431
- 

Return to bug 20256