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
54
Lines 61-66 if ( $action eq 'add' ) { Link Here
61
                title       => $title,
62
                title       => $title,
62
                description => $description,
63
                description => $description,
63
                ft_hide_patron_info    => $ft_hide_patron_info,
64
                ft_hide_patron_info    => $ft_hide_patron_info,
65
                ft_limit_item_editing  => $ft_limit_item_editing,
64
                ft_search_groups_opac  => $ft_search_groups_opac,
66
                ft_search_groups_opac  => $ft_search_groups_opac,
65
                ft_search_groups_staff => $ft_search_groups_staff,
67
                ft_search_groups_staff => $ft_search_groups_staff,
66
                branchcode  => $branchcode,
68
                branchcode  => $branchcode,
Lines 75-80 elsif ( $action eq 'edit' ) { Link Here
75
    my $title       = $cgi->param('title')       || undef;
77
    my $title       = $cgi->param('title')       || undef;
76
    my $description = $cgi->param('description') || undef;
78
    my $description = $cgi->param('description') || undef;
77
    my $ft_hide_patron_info    = $cgi->param('ft_hide_patron_info')    || 0;
79
    my $ft_hide_patron_info    = $cgi->param('ft_hide_patron_info')    || 0;
80
    my $ft_limit_item_editing  = $cgi->param('ft_limit_item_editing')  || 0;
78
    my $ft_search_groups_opac  = $cgi->param('ft_search_groups_opac')  || 0;
81
    my $ft_search_groups_opac  = $cgi->param('ft_search_groups_opac')  || 0;
79
    my $ft_search_groups_staff = $cgi->param('ft_search_groups_staff') || 0;
82
    my $ft_search_groups_staff = $cgi->param('ft_search_groups_staff') || 0;
80
83
Lines 86-91 elsif ( $action eq 'edit' ) { Link Here
86
                title       => $title,
89
                title       => $title,
87
                description => $description,
90
                description => $description,
88
                ft_hide_patron_info      => $ft_hide_patron_info,
91
                ft_hide_patron_info      => $ft_hide_patron_info,
92
                ft_limit_item_editing    => $ft_limit_item_editing,
89
                ft_search_groups_opac    => $ft_search_groups_opac,
93
                ft_search_groups_opac    => $ft_search_groups_opac,
90
                ft_search_groups_staff   => $ft_search_groups_staff,
94
                ft_search_groups_staff   => $ft_search_groups_staff,
91
            }
95
            }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt (-4 / +22 lines)
Lines 109-114 Link Here
109
                                        Limit patron data access by group
109
                                        Limit patron data access by group
110
                                    </label>
110
                                    </label>
111
                                </p>
111
                                </p>
112
                                <p>
113
                                    <label>
114
                                        <input type="checkbox" name="ft_limit_item_editing" id="add-group-modal-ft_limit_item_editing" value="1" />
115
                                        Limit item editing by group
116
                                    </label>
117
                                </p>
112
                                <p>
118
                                <p>
113
                                    <label>
119
                                    <label>
114
                                        <input type="checkbox" name="ft_search_groups_opac" id="add-group-modal-ft_search_groups_opac" value="1" />
120
                                        <input type="checkbox" name="ft_search_groups_opac" id="add-group-modal-ft_search_groups_opac" value="1" />
Lines 166-171 Link Here
166
                                        Limit patron data access by group
172
                                        Limit patron data access by group
167
                                    </label>
173
                                    </label>
168
                                </p>
174
                                </p>
175
                                <p>
176
                                    <label>
177
                                        <input type="checkbox" id="edit-group-modal-ft_limit_item_editing" name="ft_limit_item_editing" value="1" />
178
                                        Limit item editing by group
179
                                    </label>
180
                                </p>
169
                                <p>
181
                                <p>
170
                                    <label>
182
                                    <label>
171
                                        <input type="checkbox" id="edit-group-modal-ft_search_groups_opac" name="ft_search_groups_opac" value="1" />
183
                                        <input type="checkbox" id="edit-group-modal-ft_search_groups_opac" name="ft_search_groups_opac" value="1" />
Lines 255-263 Link Here
255
                var title = $(this).data('groupTitle');
267
                var title = $(this).data('groupTitle');
256
                var description = $(this).data('groupDescription');
268
                var description = $(this).data('groupDescription');
257
                var ft_hide_patron_info = $(this).data('groupFt_hide_patron_info');
269
                var ft_hide_patron_info = $(this).data('groupFt_hide_patron_info');
270
                var ft_limit_item_editing = $(this).data('groupFt_limit_item_editing');
258
                var ft_search_groups_opac = $(this).data('groupFt_search_groups_opac');
271
                var ft_search_groups_opac = $(this).data('groupFt_search_groups_opac');
259
                var ft_search_groups_staff = $(this).data('groupFt_search_groups_staff');
272
                var ft_search_groups_staff = $(this).data('groupFt_search_groups_staff');
260
                edit_group( id, parent_id, title, description, ft_hide_patron_info, ft_search_groups_opac, ft_search_groups_staff );
273
                edit_group( id, parent_id, title, description, ft_hide_patron_info, ft_limit_item_editing, ft_search_groups_opac, ft_search_groups_staff );
261
            });
274
            });
262
275
263
            $('.delete-group').on('click', function(e) {
276
            $('.delete-group').on('click', function(e) {
Lines 290-295 Link Here
290
303
291
304
292
            $('#add-group-modal-ft_hide_patron_info').prop('checked', false);
305
            $('#add-group-modal-ft_hide_patron_info').prop('checked', false);
306
            $('#add-group-modal-ft_limit_item_editing').prop('checked', false);
293
            $('#add-group-modal-ft_search_groups_opac').prop('checked', false);
307
            $('#add-group-modal-ft_search_groups_opac').prop('checked', false);
294
            $('#add-group-modal-ft_search_groups_staff').prop('checked', false);
308
            $('#add-group-modal-ft_search_groups_staff').prop('checked', false);
295
            if ( parent_id ) {
309
            if ( parent_id ) {
Lines 301-318 Link Here
301
315
302
        }
316
        }
303
317
304
        function edit_group( id, parent_id, title, description, ft_hide_patron_info, ft_search_groups_opac, ft_search_groups_staff ) {
318
        function edit_group( id, parent_id, title, description, ft_hide_patron_info, ft_limit_item_editing, ft_search_groups_opac, ft_search_groups_staff ) {
305
            $('#edit-group-modal-id').val( id );
319
            $('#edit-group-modal-id').val( id );
306
            $('#edit-group-modal-title').val( title );
320
            $('#edit-group-modal-title').val( title );
307
            $('#edit-group-modal-description').val( description );
321
            $('#edit-group-modal-description').val( description );
308
322
309
            if ( parent_id ) {
323
            if ( parent_id ) {
310
                $('#edit-group-modal-ft_hide_patron_info').prop('checked', false);
324
                $('#edit-group-modal-ft_hide_patron_info').prop('checked', false);
325
                $('#edit-group-modal-ft_limit_item_editing').prop('checked', false);
311
                $('#edit-group-modal-ft_search_groups_opac').prop('checked', false);
326
                $('#edit-group-modal-ft_search_groups_opac').prop('checked', false);
312
                $('#edit-group-modal-ft_search_groups_staff').prop('checked', false);
327
                $('#edit-group-modal-ft_search_groups_staff').prop('checked', false);
313
                $('#root-group-features-edit').hide();
328
                $('#root-group-features-edit').hide();
314
            } else {
329
            } else {
315
                $('#edit-group-modal-ft_hide_patron_info').prop('checked', ft_hide_patron_info ? true : false );
330
                $('#edit-group-modal-ft_hide_patron_info').prop('checked', ft_hide_patron_info ? true : false );
331
                $('#edit-group-modal-ft_limit_item_editing').prop('checked', ft_limit_item_editing ? true : false );
316
                $('#edit-group-modal-ft_search_groups_opac').prop('checked', ft_search_groups_opac ? true : false );
332
                $('#edit-group-modal-ft_search_groups_opac').prop('checked', ft_search_groups_opac ? true : false );
317
                $('#edit-group-modal-ft_search_groups_staff').prop('checked', ft_search_groups_staff ? true : false );
333
                $('#edit-group-modal-ft_search_groups_staff').prop('checked', ft_search_groups_staff ? true : false );
318
                $('#root-group-features-edit').show();
334
                $('#root-group-features-edit').show();
Lines 361-366 Link Here
361
                [% IF group.ft_hide_patron_info %]
377
                [% IF group.ft_hide_patron_info %]
362
                    <li>Hide patron's info for librarians outside of this group.</li>
378
                    <li>Hide patron's info for librarians outside of this group.</li>
363
                [% END %]
379
                [% END %]
380
                [% IF group.ft_limit_item_editing %]
381
                    <li>Limit item editing for librarians outside of this group.</li>
382
                [% END %]
364
                [% IF group.ft_search_groups_opac %]
383
                [% IF group.ft_search_groups_opac %]
365
                    <li>Use for OPAC search groups</li>
384
                    <li>Use for OPAC search groups</li>
366
                [% END %]
385
                [% END %]
Lines 384-390 Link Here
384
                       </li>
403
                       </li>
385
404
386
                        <li>
405
                        <li>
387
                            <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 %]" >
406
                            <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_limit_item_editing="[% group.ft_limit_item_editing | 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 %]" >
388
                                <i class="fa fa-pencil"></i> Edit
407
                                <i class="fa fa-pencil"></i> Edit
389
                            </a>
408
                            </a>
390
                       </li>
409
                       </li>
391
- 

Return to bug 20256