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

(-)a/admin/library_groups.pl (+4 lines)
Lines 48-53 if ( $action eq 'add' ) { Link Here
48
    my $description = $cgi->param('description') || undef;
48
    my $description = $cgi->param('description') || undef;
49
    my $branchcode  = $cgi->param('branchcode')  || undef;
49
    my $branchcode  = $cgi->param('branchcode')  || undef;
50
    my $ft_hide_patron_info    = $cgi->param('ft_hide_patron_info')    || 0;
50
    my $ft_hide_patron_info    = $cgi->param('ft_hide_patron_info')    || 0;
51
    my $ft_limit_item_editing  = $cgi->param('ft_limit_item_editing')  || 0;
51
    my $ft_search_groups_opac  = $cgi->param('ft_search_groups_opac')  || 0;
52
    my $ft_search_groups_opac  = $cgi->param('ft_search_groups_opac')  || 0;
52
    my $ft_search_groups_staff = $cgi->param('ft_search_groups_staff') || 0;
53
    my $ft_search_groups_staff = $cgi->param('ft_search_groups_staff') || 0;
53
    my $ft_local_hold_group = $cgi->param('ft_local_hold_group') || 0;
54
    my $ft_local_hold_group = $cgi->param('ft_local_hold_group') || 0;
Lines 66-71 if ( $action eq 'add' ) { Link Here
66
                    ft_search_groups_opac  => $ft_search_groups_opac,
67
                    ft_search_groups_opac  => $ft_search_groups_opac,
67
                    ft_search_groups_staff => $ft_search_groups_staff,
68
                    ft_search_groups_staff => $ft_search_groups_staff,
68
                    ft_local_hold_group    => $ft_local_hold_group,
69
                    ft_local_hold_group    => $ft_local_hold_group,
70
                    ft_limit_item_editing  => $ft_limit_item_editing,
69
                    branchcode             => $branchcode,
71
                    branchcode             => $branchcode,
70
                }
72
                }
71
            )->store();
73
            )->store();
Lines 83-88 elsif ( $action eq 'edit' ) { Link Here
83
    my $title       = $cgi->param('title')       || undef;
85
    my $title       = $cgi->param('title')       || undef;
84
    my $description = $cgi->param('description') || undef;
86
    my $description = $cgi->param('description') || undef;
85
    my $ft_hide_patron_info    = $cgi->param('ft_hide_patron_info')    || 0;
87
    my $ft_hide_patron_info    = $cgi->param('ft_hide_patron_info')    || 0;
88
    my $ft_limit_item_editing  = $cgi->param('ft_limit_item_editing')  || 0;
86
    my $ft_search_groups_opac  = $cgi->param('ft_search_groups_opac')  || 0;
89
    my $ft_search_groups_opac  = $cgi->param('ft_search_groups_opac')  || 0;
87
    my $ft_search_groups_staff = $cgi->param('ft_search_groups_staff') || 0;
90
    my $ft_search_groups_staff = $cgi->param('ft_search_groups_staff') || 0;
88
    my $ft_local_hold_group = $cgi->param('ft_local_hold_group') || 0;
91
    my $ft_local_hold_group = $cgi->param('ft_local_hold_group') || 0;
Lines 95-100 elsif ( $action eq 'edit' ) { Link Here
95
                title       => $title,
98
                title       => $title,
96
                description => $description,
99
                description => $description,
97
                ft_hide_patron_info      => $ft_hide_patron_info,
100
                ft_hide_patron_info      => $ft_hide_patron_info,
101
                ft_limit_item_editing    => $ft_limit_item_editing,
98
                ft_search_groups_opac    => $ft_search_groups_opac,
102
                ft_search_groups_opac    => $ft_search_groups_opac,
99
                ft_search_groups_staff   => $ft_search_groups_staff,
103
                ft_search_groups_staff   => $ft_search_groups_staff,
100
                ft_local_hold_group   => $ft_local_hold_group,
104
                ft_local_hold_group   => $ft_local_hold_group,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt (-4 / +22 lines)
Lines 121-126 Link Here
121
                                        Limit patron data access by group
121
                                        Limit patron data access by group
122
                                    </label>
122
                                    </label>
123
                                </p>
123
                                </p>
124
                                <p>
125
                                    <label>
126
                                        <input type="checkbox" name="ft_limit_item_editing" id="add-group-modal-ft_limit_item_editing" value="1" />
127
                                        Limit item editing by group
128
                                    </label>
129
                                </p>
124
                                <p>
130
                                <p>
125
                                    <label>
131
                                    <label>
126
                                        <input type="checkbox" name="ft_search_groups_opac" id="add-group-modal-ft_search_groups_opac" value="1" />
132
                                        <input type="checkbox" name="ft_search_groups_opac" id="add-group-modal-ft_search_groups_opac" value="1" />
Lines 185-190 Link Here
185
                                        Limit patron data access by group
191
                                        Limit patron data access by group
186
                                    </label>
192
                                    </label>
187
                                </p>
193
                                </p>
194
                                <p>
195
                                    <label>
196
                                        <input type="checkbox" id="edit-group-modal-ft_limit_item_editing" name="ft_limit_item_editing" value="1" />
197
                                        Limit item editing by group
198
                                    </label>
199
                                </p>
188
                                <p>
200
                                <p>
189
                                    <label>
201
                                    <label>
190
                                        <input type="checkbox" id="edit-group-modal-ft_search_groups_opac" name="ft_search_groups_opac" value="1" />
202
                                        <input type="checkbox" id="edit-group-modal-ft_search_groups_opac" name="ft_search_groups_opac" value="1" />
Lines 280-289 Link Here
280
                var title = $(this).data('groupTitle');
292
                var title = $(this).data('groupTitle');
281
                var description = $(this).data('groupDescription');
293
                var description = $(this).data('groupDescription');
282
                var ft_hide_patron_info = $(this).data('groupFt_hide_patron_info');
294
                var ft_hide_patron_info = $(this).data('groupFt_hide_patron_info');
295
                var ft_limit_item_editing = $(this).data('groupFt_limit_item_editing');
283
                var ft_search_groups_opac = $(this).data('groupFt_search_groups_opac');
296
                var ft_search_groups_opac = $(this).data('groupFt_search_groups_opac');
284
                var ft_search_groups_staff = $(this).data('groupFt_search_groups_staff');
297
                var ft_search_groups_staff = $(this).data('groupFt_search_groups_staff');
285
                var ft_local_hold_group = $(this).data('groupFt_local_hold_group');
298
                var ft_local_hold_group = $(this).data('groupFt_local_hold_group');
286
                edit_group( id, parent_id, title, description, ft_hide_patron_info, ft_search_groups_opac, ft_search_groups_staff, ft_local_hold_group );
299
                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 );
287
            });
300
            });
288
301
289
            $('.delete-group').on('click', function(e) {
302
            $('.delete-group').on('click', function(e) {
Lines 316-321 Link Here
316
329
317
330
318
            $('#add-group-modal-ft_hide_patron_info').prop('checked', false);
331
            $('#add-group-modal-ft_hide_patron_info').prop('checked', false);
332
            $('#add-group-modal-ft_limit_item_editing').prop('checked', false);
319
            $('#add-group-modal-ft_search_groups_opac').prop('checked', false);
333
            $('#add-group-modal-ft_search_groups_opac').prop('checked', false);
320
            $('#add-group-modal-ft_search_groups_staff').prop('checked', false);
334
            $('#add-group-modal-ft_search_groups_staff').prop('checked', false);
321
            $('#add-group-modal-ft_local_hold_group').prop('checked', false);
335
            $('#add-group-modal-ft_local_hold_group').prop('checked', false);
Lines 328-346 Link Here
328
342
329
        }
343
        }
330
344
331
        function edit_group( id, parent_id, title, description, ft_hide_patron_info, ft_search_groups_opac, ft_search_groups_staff, ft_local_hold_group ) {
345
        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 ) {
332
            $('#edit-group-modal-id').val( id );
346
            $('#edit-group-modal-id').val( id );
333
            $('#edit-group-modal-title').val( title );
347
            $('#edit-group-modal-title').val( title );
334
            $('#edit-group-modal-description').val( description );
348
            $('#edit-group-modal-description').val( description );
335
349
336
            if ( parent_id ) {
350
            if ( parent_id ) {
337
                $('#edit-group-modal-ft_hide_patron_info').prop('checked', false);
351
                $('#edit-group-modal-ft_hide_patron_info').prop('checked', false);
352
                $('#edit-group-modal-ft_limit_item_editing').prop('checked', false);
338
                $('#edit-group-modal-ft_search_groups_opac').prop('checked', false);
353
                $('#edit-group-modal-ft_search_groups_opac').prop('checked', false);
339
                $('#edit-group-modal-ft_search_groups_staff').prop('checked', false);
354
                $('#edit-group-modal-ft_search_groups_staff').prop('checked', false);
340
                $('#edit-group-modal-ft_local_hold_group').prop('checked', false);
355
                $('#edit-group-modal-ft_local_hold_group').prop('checked', false);
341
                $('#root-group-features-edit').hide();
356
                $('#root-group-features-edit').hide();
342
            } else {
357
            } else {
343
                $('#edit-group-modal-ft_hide_patron_info').prop('checked', ft_hide_patron_info ? true : false );
358
                $('#edit-group-modal-ft_hide_patron_info').prop('checked', ft_hide_patron_info ? true : false );
359
                $('#edit-group-modal-ft_limit_item_editing').prop('checked', ft_limit_item_editing ? true : false );
344
                $('#edit-group-modal-ft_search_groups_opac').prop('checked', ft_search_groups_opac ? true : false );
360
                $('#edit-group-modal-ft_search_groups_opac').prop('checked', ft_search_groups_opac ? true : false );
345
                $('#edit-group-modal-ft_search_groups_staff').prop('checked', ft_search_groups_staff ? true : false );
361
                $('#edit-group-modal-ft_search_groups_staff').prop('checked', ft_search_groups_staff ? true : false );
346
                $('#edit-group-modal-ft_local_hold_group').prop('checked', ft_local_hold_group ? true : false );
362
                $('#edit-group-modal-ft_local_hold_group').prop('checked', ft_local_hold_group ? true : false );
Lines 390-395 Link Here
390
                [% IF group.ft_hide_patron_info %]
406
                [% IF group.ft_hide_patron_info %]
391
                    <li>Hide patron's info for librarians outside of this group.</li>
407
                    <li>Hide patron's info for librarians outside of this group.</li>
392
                [% END %]
408
                [% END %]
409
                [% IF group.ft_limit_item_editing %]
410
                    <li>Limit item editing for librarians outside of this group.</li>
411
                [% END %]
393
                [% IF group.ft_search_groups_opac %]
412
                [% IF group.ft_search_groups_opac %]
394
                    <li>Use for OPAC search groups</li>
413
                    <li>Use for OPAC search groups</li>
395
                [% END %]
414
                [% END %]
Lines 416-422 Link Here
416
                       </li>
435
                       </li>
417
436
418
                        <li>
437
                        <li>
419
                            <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 %]" >
438
                            <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 %]" >
420
                                <i class="fa fa-pencil"></i> Edit
439
                                <i class="fa fa-pencil"></i> Edit
421
                            </a>
440
                            </a>
422
                       </li>
441
                       </li>
423
- 

Return to bug 20256