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

(-)a/circ/circulation.pl (-1 lines)
Lines 608-614 if ( $patron ) { Link Here
608
        patron            => $patron,
608
        patron            => $patron,
609
        categoryname      => $patron->category->description,
609
        categoryname      => $patron->category->description,
610
        expiry            => $patron->dateexpiry,
610
        expiry            => $patron->dateexpiry,
611
        is_child          => ( $patron->category->category_type eq 'C' ),
612
    );
611
    );
613
}
612
}
614
613
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc (-3 / +3 lines)
Lines 34-40 $(document).ready(function(){ Link Here
34
            $(".btn-group").removeClass("open");
34
            $(".btn-group").removeClass("open");
35
            return false;
35
            return false;
36
        });
36
        });
37
        [% IF ( is_child ) %]$("#updatechild").click(function(){
37
        [% IF ( patron.is_child ) %]$("#updatechild").click(function(){
38
            update_child();
38
            update_child();
39
            $(".btn-group").removeClass("open");
39
            $(".btn-group").removeClass("open");
40
        });[% END %]
40
        });[% END %]
Lines 92-98 function confirm_both_deletion() { Link Here
92
    }
92
    }
93
}
93
}
94
94
95
[% IF ( is_child ) %]function confirm_updatechild() {
95
[% IF ( patron.is_child ) %]function confirm_updatechild() {
96
    var is_confirmed = window.confirm(_("Are you sure you want to update this child to an Adult category?  This cannot be undone."));
96
    var is_confirmed = window.confirm(_("Are you sure you want to update this child to an Adult category?  This cannot be undone."));
97
    if (is_confirmed) {
97
    if (is_confirmed) {
98
        window.location='/cgi-bin/koha/members/update-child.pl?op=update&borrowernumber=[% patron.borrowernumber %]&catcode=[% catcode %]&catcode_multi=[% CATCODE_MULTI %]';
98
        window.location='/cgi-bin/koha/members/update-child.pl?op=update&borrowernumber=[% patron.borrowernumber %]&catcode=[% catcode %]&catcode_multi=[% CATCODE_MULTI %]';
Lines 197-203 function searchToHold(){ Link Here
197
                [% ELSE %]
197
                [% ELSE %]
198
                    <li class="disabled"><a data-toggle="tooltip" data-placement="left" title="You are not authorized to delete patrons" id="deletepatron" href="#">Delete</a></li>
198
                    <li class="disabled"><a data-toggle="tooltip" data-placement="left" title="You are not authorized to delete patrons" id="deletepatron" href="#">Delete</a></li>
199
                [% END %]
199
                [% END %]
200
                [% IF ( is_child ) %]
200
                [% IF ( patron.is_child ) %]
201
                    <li><a id="updatechild" href="#">Update child to adult patron</a></li>
201
                    <li><a id="updatechild" href="#">Update child to adult patron</a></li>
202
                [% ELSE %]
202
                [% ELSE %]
203
                    <li class="disabled"><a data-toggle="tooltip" data-placement="left" title="Patron is an adult" id="updatechild" href="#">Update child to adult patron</a></li>
203
                    <li class="disabled"><a data-toggle="tooltip" data-placement="left" title="Patron is an adult" id="updatechild" href="#">Update child to adult patron</a></li>
(-)a/members/boraccount.pl (-1 lines)
Lines 112-118 $template->param( Link Here
112
    finesview           => 1,
112
    finesview           => 1,
113
    total               => sprintf("%.2f",$total),
113
    total               => sprintf("%.2f",$total),
114
    totalcredit         => $totalcredit,
114
    totalcredit         => $totalcredit,
115
    is_child            => ($patron->category->category_type eq 'C'),
116
    reverse_col         => $reverse_col,
115
    reverse_col         => $reverse_col,
117
    accounts            => $accts,
116
    accounts            => $accts,
118
);
117
);
(-)a/members/mancredit.pl (-1 lines)
Lines 100-106 if ($add){ Link Here
100
100
101
    $template->param(
101
    $template->param(
102
        finesview      => 1,
102
        finesview      => 1,
103
        is_child       => ($patron->category->category_type eq 'C'), # FIXME is_child should be a Koha::Patron method
104
        );
103
        );
105
    output_html_with_http_headers $input, $cookie, $template->output;
104
    output_html_with_http_headers $input, $cookie, $template->output;
106
}
105
}
(-)a/members/maninvoice.pl (-1 lines)
Lines 127-133 if ($add){ Link Here
127
    $template->param(
127
    $template->param(
128
        patron         => $patron,
128
        patron         => $patron,
129
        finesview      => 1,
129
        finesview      => 1,
130
        is_child       => ($patron->category->category_type eq 'C'),
131
    );
130
    );
132
    output_html_with_http_headers $input, $cookie, $template->output;
131
    output_html_with_http_headers $input, $cookie, $template->output;
133
}
132
}
(-)a/members/member-flags.pl (-1 lines)
Lines 201-207 if (C4::Context->preference('ExtendedPatronAttributes')) { Link Here
201
$template->param(
201
$template->param(
202
    patron         => $patron,
202
    patron         => $patron,
203
    loop           => \@loop,
203
    loop           => \@loop,
204
    is_child       => ( $category_type eq 'C' ),
205
    csrf_token =>
204
    csrf_token =>
206
        Koha::Token->new->generate_csrf( { session_id => scalar $input->cookie('CGISESSID'), } ),
205
        Koha::Token->new->generate_csrf( { session_id => scalar $input->cookie('CGISESSID'), } ),
207
);
206
);
(-)a/members/member-password.pl (-1 lines)
Lines 115-121 if ( C4::Context->preference('ExtendedPatronAttributes') ) { Link Here
115
$template->param(
115
$template->param(
116
    patron                     => $patron,
116
    patron                     => $patron,
117
    destination                => $destination,
117
    destination                => $destination,
118
    is_child                   => ( $category_type eq 'C' ),
119
    csrf_token                 => Koha::Token->new->generate_csrf({ session_id => scalar $input->cookie('CGISESSID'), }),
118
    csrf_token                 => Koha::Token->new->generate_csrf({ session_id => scalar $input->cookie('CGISESSID'), }),
120
);
119
);
121
120
(-)a/members/moremember.pl (-1 lines)
Lines 341-347 $template->param( Link Here
341
    totaldue_raw    => $total,
341
    totaldue_raw    => $total,
342
    overdues_exist  => $overdues_exist,
342
    overdues_exist  => $overdues_exist,
343
    StaffMember     => $category_type eq 'S',
343
    StaffMember     => $category_type eq 'S',
344
    is_child        => $category_type eq 'C',
345
    $category_type  => 1, # [% IF ( I ) %] = institutional/organisation
344
    $category_type  => 1, # [% IF ( I ) %] = institutional/organisation
346
    samebranch      => $samebranch,
345
    samebranch      => $samebranch,
347
    quickslip       => $quickslip,
346
    quickslip       => $quickslip,
(-)a/members/printfeercpt.pl (-1 lines)
Lines 122-128 $template->param( Link Here
122
    finesview           => 1,
122
    finesview           => 1,
123
    total               => sprintf("%.2f",$total),
123
    total               => sprintf("%.2f",$total),
124
    totalcredit         => $totalcredit,
124
    totalcredit         => $totalcredit,
125
    is_child            => ($category->category_type eq 'C'),
126
    accounts            => \@accountrows );
125
    accounts            => \@accountrows );
127
126
128
output_html_with_http_headers $input, $cookie, $template->output;
127
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/members/printinvoice.pl (-1 lines)
Lines 122-128 $template->param( Link Here
122
    finesview      => 1,
122
    finesview      => 1,
123
    total          => sprintf( "%.2f", $total ),
123
    total          => sprintf( "%.2f", $total ),
124
    totalcredit    => $totalcredit,
124
    totalcredit    => $totalcredit,
125
    is_child       => ( $category->category_type eq 'C' ),
126
    accounts       => \@accountrows
125
    accounts       => \@accountrows
127
);
126
);
128
127
(-)a/members/readingrec.pl (-2 lines)
Lines 116-122 if (C4::Context->preference('ExtendedPatronAttributes')) { Link Here
116
$template->param(
116
$template->param(
117
    patron            => $patron,
117
    patron            => $patron,
118
    readingrecordview => 1,
118
    readingrecordview => 1,
119
    is_child          => ( $category->category_type eq 'C' ),
120
    loop_reading      => $issues,
119
    loop_reading      => $issues,
121
);
120
);
122
output_html_with_http_headers $input, $cookie, $template->output;
121
output_html_with_http_headers $input, $cookie, $template->output;
123
- 

Return to bug 18789