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

(-)a/admin/categories.pl (+2 lines)
Lines 92-97 elsif ( $op eq 'add_validate' ) { Link Here
92
    my $BlockExpiredPatronOpacActions = $input->param('BlockExpiredPatronOpacActions');
92
    my $BlockExpiredPatronOpacActions = $input->param('BlockExpiredPatronOpacActions');
93
    my $checkPrevCheckout = $input->param('checkprevcheckout');
93
    my $checkPrevCheckout = $input->param('checkprevcheckout');
94
    my $default_privacy = $input->param('default_privacy');
94
    my $default_privacy = $input->param('default_privacy');
95
    my $quick_add_display = $input->param('quick_add_display');
95
    my @branches = grep { $_ ne q{} } $input->multi_param('branches');
96
    my @branches = grep { $_ ne q{} } $input->multi_param('branches');
96
97
97
    my $is_a_modif = $input->param("is_a_modif");
98
    my $is_a_modif = $input->param("is_a_modif");
Lines 121-126 elsif ( $op eq 'add_validate' ) { Link Here
121
        $category->category_type($category_type);
122
        $category->category_type($category_type);
122
        $category->BlockExpiredPatronOpacActions($BlockExpiredPatronOpacActions);
123
        $category->BlockExpiredPatronOpacActions($BlockExpiredPatronOpacActions);
123
        $category->checkprevcheckout($checkPrevCheckout);
124
        $category->checkprevcheckout($checkPrevCheckout);
125
        $category->quick_add_display($quick_add_display);
124
        $category->default_privacy($default_privacy);
126
        $category->default_privacy($default_privacy);
125
        eval {
127
        eval {
126
            $category->store;
128
            $category->store;
(-)a/installer/data/mysql/atomicupdate/bug_18818_quick_add_patron_category_list.sql (+1 lines)
Line 0 Link Here
1
ALTER TABLE categories ADD quick_add_display integer DEFAULT 1;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc (-1 / +1 lines)
Lines 14-20 Link Here
14
    <div class="btn-group">
14
    <div class="btn-group">
15
        <button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> Quick add new patron <span class="caret"></span></button>
15
        <button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> Quick add new patron <span class="caret"></span></button>
16
            <ul class="dropdown-menu">
16
            <ul class="dropdown-menu">
17
                [% FOREACH category IN categories %]<li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;categorycode=[% category.categorycode %]&amp;quickadd=true">[% category.description %]</a></li>[% END %]
17
                [% FOREACH category IN categories %][% IF category.quick_add_display %]<li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;categorycode=[% category.categorycode %]&amp;quickadd=true">[% category.description %]</a></li>[% END %][% END %]
18
            </ul>
18
            </ul>
19
    </div>
19
    </div>
20
    [% END %]
20
    [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt (-1 / +14 lines)
Lines 212-217 Link Here
212
                  </li>
212
                  </li>
213
                [% END %]
213
                [% END %]
214
                <li>
214
                <li>
215
                    <label for="quick_add_display">Display in quick add patron list:</label>
216
                    <select id=quick_add_display name=quick_add_display>
217
                        <option value=1 [% UNLESS category.quick_add_display %]selected=selected [% END %]>Display</option>
218
                        <option value=0 [% UNLESS category.quick_add_display %]selected=selected [% END %]>Don't Display</option>
219
                    </select>
220
                </li>
221
                <li>
215
                    <label for="default_privacy">Default privacy: </label>
222
                    <label for="default_privacy">Default privacy: </label>
216
                    <select id="default_privacy" name="default_privacy">
223
                    <select id="default_privacy" name="default_privacy">
217
                        [% SET default_privacy = 'default' %]
224
                        [% SET default_privacy = 'default' %]
Lines 283-288 Link Here
283
                <tr><th scope="row">Receives overdue notices: </th><td>[% IF category. overduenoticerequired %]Yes[% ELSE %]No[% END %]</td></tr>
290
                <tr><th scope="row">Receives overdue notices: </th><td>[% IF category. overduenoticerequired %]Yes[% ELSE %]No[% END %]</td></tr>
284
                <tr><th scope="row">Lost items in staff client</th><td>[% IF category.hidelostitems %]Hidden by default[% ELSE %]Shown[% END %]</td></tr>
291
                <tr><th scope="row">Lost items in staff client</th><td>[% IF category.hidelostitems %]Hidden by default[% ELSE %]Shown[% END %]</td></tr>
285
                <tr><th scope="row">Hold fee: </th><td>[% category.reservefee | $Price %]</td></tr>
292
                <tr><th scope="row">Hold fee: </th><td>[% category.reservefee | $Price %]</td></tr>
293
                <tr><th scope="row">Display in Quick Add Patron</th>></tr>
286
294
287
                [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
295
                [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
288
                  <tr>
296
                  <tr>
Lines 355-360 Link Here
355
                    <th scope="col">Messaging</th>
363
                    <th scope="col">Messaging</th>
356
                    [% END %]
364
                    [% END %]
357
                    <th scope="col">Branches limitations</th>
365
                    <th scope="col">Branches limitations</th>
366
                    <th scope="col">Display in Quick Add Patron</th>
358
                    [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
367
                    [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
359
                    <th scope="col">Check previous checkout?</th>
368
                    <th scope="col">Check previous checkout?</th>
360
                    [% END %]
369
                    [% END %]
Lines 463-468 Link Here
463
                          </td>
472
                          </td>
464
                        [% END %]
473
                        [% END %]
465
                        <td>
474
                        <td>
475
                            [% IF category.quick_add_display %] Display
476
                            [% ELSE %] Don't Display
477
                            [% END %]
478
                        </td>
479
                        <td>
466
                            [% SWITCH category.default_privacy %]
480
                            [% SWITCH category.default_privacy %]
467
                            [% CASE 'default' %]
481
                            [% CASE 'default' %]
468
                                Default
482
                                Default
469
- 

Return to bug 18818