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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt (-7 / +21 lines)
Lines 14-28 Link Here
14
                $("#borrowerst").dataTable($.extend(true, {}, dataTablesDefaults, {
14
                $("#borrowerst").dataTable($.extend(true, {}, dataTablesDefaults, {
15
                    "sDom": 't',
15
                    "sDom": 't',
16
                    [% IF ( op == 'show_results' ) %]
16
                    [% IF ( op == 'show_results' ) %]
17
                        "aoColumns": [
17
                        "aoColumnDefs": [
18
                            null,null,null,null,null,{ "sType": "title-string" },{ "sType": "title-string" }[% FOREACH attrh IN attributes_header %],null[% END %]
18
                            { 'sType': "title-string", 'aTargets' : [ 'title-string'] }
19
                        ],
19
                        ],
20
                    [% ELSE %]
20
                    [% ELSE %]
21
                        "aoColumnDefs": [
21
                        "aoColumnDefs": [
22
                            { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
22
                            { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
23
                        ],
23
                            { 'sType': "title-string", 'aTargets' : [ 'title-string'] }
24
                        "aoColumns": [
25
                            null,null,null,null,null,null,{ "sType": "title-string" },{ "sType": "title-string" }[% FOREACH attrh IN attributes_header %],null[% END %]
26
                        ],
24
                        ],
27
                    [% END %]
25
                    [% END %]
28
                    "bPaginate": false
26
                    "bPaginate": false
Lines 232-239 Link Here
232
                                                <th>First name</th>
230
                                                <th>First name</th>
233
                                                <th>Library</th>
231
                                                <th>Library</th>
234
                                                <th>Category</th>
232
                                                <th>Category</th>
235
                                                <th>Registration date</th>
233
                                                <th>City</th>
236
                                                <th>Expiry date</th>
234
                                                <th>State</th>
235
                                                <th>Zip code</th>
236
                                                <th>Country</th>
237
                                                <th class="title-string">Registration date</th>
238
                                                <th class="title-string">Expiry date</th>
237
                                                [% FOREACH attrh IN attributes_header %]
239
                                                [% FOREACH attrh IN attributes_header %]
238
                                                    <th>[% attrh.attribute %]</th>
240
                                                    <th>[% attrh.attribute %]</th>
239
                                                [% END %]
241
                                                [% END %]
Lines 250-255 Link Here
250
                                                    <td>[% borrower.firstname %]</td>
252
                                                    <td>[% borrower.firstname %]</td>
251
                                                    <td>[% borrower.branchname %]</td>
253
                                                    <td>[% borrower.branchname %]</td>
252
                                                    <td>[% borrower.categorycode %]</td>
254
                                                    <td>[% borrower.categorycode %]</td>
255
                                                    <td>[% borrower.city %]</td>
256
                                                    <td>[% borrower.state %]</td>
257
                                                    <td>[% borrower.zipcode %]</td>
258
                                                    <td>[% borrower.country %]</td>
253
                                                    <td><span title="[% borrower.dateenrolled %]">[% borrower.dateenrolled | $KohaDates %]</span></td>
259
                                                    <td><span title="[% borrower.dateenrolled %]">[% borrower.dateenrolled | $KohaDates %]</span></td>
254
                                                    <td><span title="[% borrower.dateexpiry %]">[% borrower.dateexpiry | $KohaDates %]</span></td>
260
                                                    <td><span title="[% borrower.dateexpiry %]">[% borrower.dateexpiry | $KohaDates %]</span></td>
255
                                                    [% FOREACH pa IN borrower.patron_attributes %]
261
                                                    [% FOREACH pa IN borrower.patron_attributes %]
Lines 288-293 Link Here
288
                                                Library:
294
                                                Library:
289
                                                [% CASE 'categorycode' %]
295
                                                [% CASE 'categorycode' %]
290
                                                Category
296
                                                Category
297
                                                [% CASE 'city' %]
298
                                                City
299
                                                [% CASE 'state' %]
300
                                                State
301
                                                [% CASE 'zipcode' %]
302
                                                Zip code
303
                                                [% CASE 'country' %]
304
                                                Country
291
                                                [% CASE 'sort1' %]
305
                                                [% CASE 'sort1' %]
292
                                                Sort 1:
306
                                                Sort 1:
293
                                                [% CASE 'sort2' %]
307
                                                [% CASE 'sort2' %]
(-)a/tools/modborrowers.pl (-4 / +28 lines)
Lines 21-27 Link Here
21
#
21
#
22
# Batch Edit Patrons
22
# Batch Edit Patrons
23
# Modification for patron's fields:
23
# Modification for patron's fields:
24
# surname firstname branchcode categorycode sort1 sort2 dateenrolled dateexpiry borrowernotes
24
# surname firstname branchcode categorycode city state zipcode country sort1
25
# sort2 dateenrolled dateexpiry borrowernotes
25
# And for patron attributes.
26
# And for patron attributes.
26
27
27
use Modern::Perl;
28
use Modern::Perl;
Lines 169-175 if ( $op eq 'show' ) { Link Here
169
        {
170
        {
170
            name => "firstname",
171
            name => "firstname",
171
            type => "text",
172
            type => "text",
172
            mandatory => ( grep /surname/, @mandatoryFields ) ? 1 : 0,
173
            mandatory => ( grep /firstname/, @mandatoryFields ) ? 1 : 0,
173
        }
174
        }
174
        ,
175
        ,
175
        {
176
        {
Lines 187-192 if ( $op eq 'show' ) { Link Here
187
        }
188
        }
188
        ,
189
        ,
189
        {
190
        {
191
            name => "city",
192
            type => "text",
193
            mandatory => ( grep /city/, @mandatoryFields ) ? 1 : 0,
194
        }
195
        ,
196
        {
197
            name => "state",
198
            type => "text",
199
            mandatory => ( grep /state/, @mandatoryFields ) ? 1 : 0,
200
        }
201
        ,
202
        {
203
            name => "zipcode",
204
            type => "text",
205
            mandatory => ( grep /zipcode/, @mandatoryFields ) ? 1 : 0,
206
        }
207
        ,
208
        {
209
            name => "country",
210
            type => "text",
211
            mandatory => ( grep /country/, @mandatoryFields ) ? 1 : 0,
212
        }
213
        ,
214
        {
190
            name => "sort1",
215
            name => "sort1",
191
            type => @sort1_option ? "select" : "text",
216
            type => @sort1_option ? "select" : "text",
192
            option => \@sort1_option,
217
            option => \@sort1_option,
Lines 230-236 if ( $op eq 'do' ) { Link Here
230
255
231
    my @disabled = $input->param('disable_input');
256
    my @disabled = $input->param('disable_input');
232
    my $infos;
257
    my $infos;
233
    for my $field ( qw/surname firstname branchcode categorycode sort1 sort2 dateenrolled dateexpiry borrowernotes/ ) {
258
    for my $field ( qw/surname firstname branchcode categorycode city state zipcode country sort1 sort2 dateenrolled dateexpiry borrowernotes/ ) {
234
        my $value = $input->param($field);
259
        my $value = $input->param($field);
235
        $infos->{$field} = $value if $value;
260
        $infos->{$field} = $value if $value;
236
        $infos->{$field} = "" if grep { /^$field$/ } @disabled;
261
        $infos->{$field} = "" if grep { /^$field$/ } @disabled;
237
- 

Return to bug 12309