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

(-)a/admin/library_groups.pl (+4 lines)
Lines 50-55 if ( $action eq 'add' ) { Link Here
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_search_groups_opac  = $cgi->param('ft_search_groups_opac')  || 0;
51
    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;
52
    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;
53
54
54
    if ( !$branchcode && Koha::Library::Groups->search( { title => $title } )->count() ) {
55
    if ( !$branchcode && Koha::Library::Groups->search( { title => $title } )->count() ) {
55
        $template->param( error_duplicate_title => $title );
56
        $template->param( error_duplicate_title => $title );
Lines 63-68 if ( $action eq 'add' ) { Link Here
63
                ft_hide_patron_info    => $ft_hide_patron_info,
64
                ft_hide_patron_info    => $ft_hide_patron_info,
64
                ft_search_groups_opac  => $ft_search_groups_opac,
65
                ft_search_groups_opac  => $ft_search_groups_opac,
65
                ft_search_groups_staff => $ft_search_groups_staff,
66
                ft_search_groups_staff => $ft_search_groups_staff,
67
                ft_local_hold_group => $ft_local_hold_group,
66
                branchcode  => $branchcode,
68
                branchcode  => $branchcode,
67
            }
69
            }
68
        )->store();
70
        )->store();
Lines 77-82 elsif ( $action eq 'edit' ) { Link Here
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;
78
    my $ft_search_groups_opac  = $cgi->param('ft_search_groups_opac')  || 0;
80
    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;
81
    my $ft_search_groups_staff = $cgi->param('ft_search_groups_staff') || 0;
82
    my $ft_local_hold_group = $cgi->param('ft_local_hold_group') || 0;
80
83
81
    if ($id) {
84
    if ($id) {
82
        my $group = Koha::Library::Groups->find($id);
85
        my $group = Koha::Library::Groups->find($id);
Lines 88-93 elsif ( $action eq 'edit' ) { Link Here
88
                ft_hide_patron_info      => $ft_hide_patron_info,
91
                ft_hide_patron_info      => $ft_hide_patron_info,
89
                ft_search_groups_opac    => $ft_search_groups_opac,
92
                ft_search_groups_opac    => $ft_search_groups_opac,
90
                ft_search_groups_staff   => $ft_search_groups_staff,
93
                ft_search_groups_staff   => $ft_search_groups_staff,
94
                ft_local_hold_group   => $ft_local_hold_group,
91
            }
95
            }
92
        )->store();
96
        )->store();
93
97
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt (-4 / +22 lines)
Lines 121-126 Link Here
121
                                        Use for staff search groups
121
                                        Use for staff search groups
122
                                    </label>
122
                                    </label>
123
                                </p>
123
                                </p>
124
                                <p>
125
                                    <label>
126
                                        <input type="checkbox" name="ft_local_hold_group" id="add-group-modal-ft_local_hold_group" value="1" />
127
                                        Is local hold group
128
                                    </label>
129
                                </p>
124
                            </div>
130
                            </div>
125
                        </div>
131
                        </div>
126
                    </div>
132
                    </div>
Lines 178-183 Link Here
178
                                        Use for staff search groups
184
                                        Use for staff search groups
179
                                    </label>
185
                                    </label>
180
                                </p>
186
                                </p>
187
                                <p>
188
                                    <label>
189
                                        <input type="checkbox" id="edit-group-modal-ft_local_hold_group" name="ft_local_hold_group" value="1" />
190
                                        Is local hold group
191
                                    </label>
192
                                </p>
181
                            </div>
193
                            </div>
182
                        </div>
194
                        </div>
183
                    </div>
195
                    </div>
Lines 257-263 Link Here
257
                var ft_hide_patron_info = $(this).data('groupFt_hide_patron_info');
269
                var ft_hide_patron_info = $(this).data('groupFt_hide_patron_info');
258
                var ft_search_groups_opac = $(this).data('groupFt_search_groups_opac');
270
                var ft_search_groups_opac = $(this).data('groupFt_search_groups_opac');
259
                var ft_search_groups_staff = $(this).data('groupFt_search_groups_staff');
271
                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 );
272
                var ft_local_hold_group = $(this).data('groupFt_local_hold_group');
273
                edit_group( id, parent_id, title, description, ft_hide_patron_info, ft_search_groups_opac, ft_search_groups_staff, ft_local_hold_group );
261
            });
274
            });
262
275
263
            $('.delete-group').on('click', function(e) {
276
            $('.delete-group').on('click', function(e) {
Lines 292-297 Link Here
292
            $('#add-group-modal-ft_hide_patron_info').prop('checked', false);
305
            $('#add-group-modal-ft_hide_patron_info').prop('checked', false);
293
            $('#add-group-modal-ft_search_groups_opac').prop('checked', false);
306
            $('#add-group-modal-ft_search_groups_opac').prop('checked', false);
294
            $('#add-group-modal-ft_search_groups_staff').prop('checked', false);
307
            $('#add-group-modal-ft_search_groups_staff').prop('checked', false);
308
            $('#add-group-modal-ft_local_hold_group').prop('checked', false);
295
            if ( parent_id ) {
309
            if ( parent_id ) {
296
                $('#root-group-features-add').hide();
310
                $('#root-group-features-add').hide();
297
            } else {
311
            } else {
Lines 301-307 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_search_groups_opac, ft_search_groups_staff, ft_local_hold_group ) {
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 );
Lines 310-320 Link Here
310
                $('#edit-group-modal-ft_hide_patron_info').prop('checked', false);
324
                $('#edit-group-modal-ft_hide_patron_info').prop('checked', false);
311
                $('#edit-group-modal-ft_search_groups_opac').prop('checked', false);
325
                $('#edit-group-modal-ft_search_groups_opac').prop('checked', false);
312
                $('#edit-group-modal-ft_search_groups_staff').prop('checked', false);
326
                $('#edit-group-modal-ft_search_groups_staff').prop('checked', false);
327
                $('#edit-group-modal-ft_local_hold_group').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 );
316
                $('#edit-group-modal-ft_search_groups_opac').prop('checked', ft_search_groups_opac ? true : false );
331
                $('#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 );
332
                $('#edit-group-modal-ft_search_groups_staff').prop('checked', ft_search_groups_staff ? true : false );
333
                $('#edit-group-modal-ft_local_hold_group').prop('checked', ft_local_hold_group ? true : false );
318
                $('#root-group-features-edit').show();
334
                $('#root-group-features-edit').show();
319
            }
335
            }
320
336
Lines 367-372 Link Here
367
                [% IF group.ft_search_groups_staff %]
383
                [% IF group.ft_search_groups_staff %]
368
                    <li>Use for staff search groups</li>
384
                    <li>Use for staff search groups</li>
369
                [% END %]
385
                [% END %]
386
                [% IF group.ft_local_hold_group %]
387
                    <li>Is local hold group</li>
388
                [% END %]
370
              </ul>
389
              </ul>
371
            [% END %]
390
            [% END %]
372
        </td>
391
        </td>
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_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 %]" >
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 22284