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 134-139 Link Here
134
                                        Limit patron data access by group
134
                                        Limit patron data access by group
135
                                    </label>
135
                                    </label>
136
                                </p>
136
                                </p>
137
                                <p>
138
                                    <label>
139
                                        <input type="checkbox" name="ft_limit_item_editing" id="add-group-modal-ft_limit_item_editing" value="1" />
140
                                        Limit item editing by group
141
                                    </label>
142
                                </p>
137
                                <p>
143
                                <p>
138
                                    <label>
144
                                    <label>
139
                                        <input type="checkbox" name="ft_search_groups_opac" id="add-group-modal-ft_search_groups_opac" value="1" />
145
                                        <input type="checkbox" name="ft_search_groups_opac" id="add-group-modal-ft_search_groups_opac" value="1" />
Lines 198-203 Link Here
198
                                        Limit patron data access by group
204
                                        Limit patron data access by group
199
                                    </label>
205
                                    </label>
200
                                </p>
206
                                </p>
207
                                <p>
208
                                    <label>
209
                                        <input type="checkbox" id="edit-group-modal-ft_limit_item_editing" name="ft_limit_item_editing" value="1" />
210
                                        Limit item editing by group
211
                                    </label>
212
                                </p>
201
                                <p>
213
                                <p>
202
                                    <label>
214
                                    <label>
203
                                        <input type="checkbox" id="edit-group-modal-ft_search_groups_opac" name="ft_search_groups_opac" value="1" />
215
                                        <input type="checkbox" id="edit-group-modal-ft_search_groups_opac" name="ft_search_groups_opac" value="1" />
Lines 293-302 Link Here
293
                var title = $(this).data('groupTitle');
305
                var title = $(this).data('groupTitle');
294
                var description = $(this).data('groupDescription');
306
                var description = $(this).data('groupDescription');
295
                var ft_hide_patron_info = $(this).data('groupFt_hide_patron_info');
307
                var ft_hide_patron_info = $(this).data('groupFt_hide_patron_info');
308
                var ft_limit_item_editing = $(this).data('groupFt_limit_item_editing');
296
                var ft_search_groups_opac = $(this).data('groupFt_search_groups_opac');
309
                var ft_search_groups_opac = $(this).data('groupFt_search_groups_opac');
297
                var ft_search_groups_staff = $(this).data('groupFt_search_groups_staff');
310
                var ft_search_groups_staff = $(this).data('groupFt_search_groups_staff');
298
                var ft_local_hold_group = $(this).data('groupFt_local_hold_group');
311
                var ft_local_hold_group = $(this).data('groupFt_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 );
312
                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 );
300
            });
313
            });
301
314
302
            $('.delete-group').on('click', function(e) {
315
            $('.delete-group').on('click', function(e) {
Lines 329-334 Link Here
329
342
330
343
331
            $('#add-group-modal-ft_hide_patron_info').prop('checked', false);
344
            $('#add-group-modal-ft_hide_patron_info').prop('checked', false);
345
            $('#add-group-modal-ft_limit_item_editing').prop('checked', false);
332
            $('#add-group-modal-ft_search_groups_opac').prop('checked', false);
346
            $('#add-group-modal-ft_search_groups_opac').prop('checked', false);
333
            $('#add-group-modal-ft_search_groups_staff').prop('checked', false);
347
            $('#add-group-modal-ft_search_groups_staff').prop('checked', false);
334
            $('#add-group-modal-ft_local_hold_group').prop('checked', false);
348
            $('#add-group-modal-ft_local_hold_group').prop('checked', false);
Lines 341-359 Link Here
341
355
342
        }
356
        }
343
357
344
        function edit_group( id, parent_id, title, description, ft_hide_patron_info, ft_search_groups_opac, ft_search_groups_staff, ft_local_hold_group ) {
358
        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 ) {
345
            $('#edit-group-modal-id').val( id );
359
            $('#edit-group-modal-id').val( id );
346
            $('#edit-group-modal-title').val( title );
360
            $('#edit-group-modal-title').val( title );
347
            $('#edit-group-modal-description').val( description );
361
            $('#edit-group-modal-description').val( description );
348
362
349
            if ( parent_id ) {
363
            if ( parent_id ) {
350
                $('#edit-group-modal-ft_hide_patron_info').prop('checked', false);
364
                $('#edit-group-modal-ft_hide_patron_info').prop('checked', false);
365
                $('#edit-group-modal-ft_limit_item_editing').prop('checked', false);
351
                $('#edit-group-modal-ft_search_groups_opac').prop('checked', false);
366
                $('#edit-group-modal-ft_search_groups_opac').prop('checked', false);
352
                $('#edit-group-modal-ft_search_groups_staff').prop('checked', false);
367
                $('#edit-group-modal-ft_search_groups_staff').prop('checked', false);
353
                $('#edit-group-modal-ft_local_hold_group').prop('checked', false);
368
                $('#edit-group-modal-ft_local_hold_group').prop('checked', false);
354
                $('#root-group-features-edit').hide();
369
                $('#root-group-features-edit').hide();
355
            } else {
370
            } else {
356
                $('#edit-group-modal-ft_hide_patron_info').prop('checked', ft_hide_patron_info ? true : false );
371
                $('#edit-group-modal-ft_hide_patron_info').prop('checked', ft_hide_patron_info ? true : false );
372
                $('#edit-group-modal-ft_limit_item_editing').prop('checked', ft_limit_item_editing ? true : false );
357
                $('#edit-group-modal-ft_search_groups_opac').prop('checked', ft_search_groups_opac ? true : false );
373
                $('#edit-group-modal-ft_search_groups_opac').prop('checked', ft_search_groups_opac ? true : false );
358
                $('#edit-group-modal-ft_search_groups_staff').prop('checked', ft_search_groups_staff ? true : false );
374
                $('#edit-group-modal-ft_search_groups_staff').prop('checked', ft_search_groups_staff ? true : false );
359
                $('#edit-group-modal-ft_local_hold_group').prop('checked', ft_local_hold_group ? true : false );
375
                $('#edit-group-modal-ft_local_hold_group').prop('checked', ft_local_hold_group ? true : false );
Lines 403-408 Link Here
403
                [% IF group.ft_hide_patron_info %]
419
                [% IF group.ft_hide_patron_info %]
404
                    <li>Hide patron's info for librarians outside of this group.</li>
420
                    <li>Hide patron's info for librarians outside of this group.</li>
405
                [% END %]
421
                [% END %]
422
                [% IF group.ft_limit_item_editing %]
423
                    <li>Limit item editing for librarians outside of this group.</li>
424
                [% END %]
406
                [% IF group.ft_search_groups_opac %]
425
                [% IF group.ft_search_groups_opac %]
407
                    <li>Use for OPAC search groups</li>
426
                    <li>Use for OPAC search groups</li>
408
                [% END %]
427
                [% END %]
Lines 429-435 Link Here
429
                       </li>
448
                       </li>
430
449
431
                        <li>
450
                        <li>
432
                            <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 %]" >
451
                            <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 %]" >
433
                                <i class="fa fa-pencil"></i> Edit
452
                                <i class="fa fa-pencil"></i> Edit
434
                            </a>
453
                            </a>
435
                       </li>
454
                       </li>
436
- 

Return to bug 20256