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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt (+3 lines)
Lines 33-38 Link Here
33
    <div class="row">
33
    <div class="row">
34
        <div class="col-sm-10 col-sm-push-2">
34
        <div class="col-sm-10 col-sm-push-2">
35
            <main>
35
            <main>
36
                            [% USE Dumper %] [% Dumper.dump(message, message_type) %]
37
36
38
37
                [% IF ( op == 'show_form' ) %]
39
                [% IF ( op == 'show_form' ) %]
38
                <h1>Batch patron modification</h1>
40
                <h1>Batch patron modification</h1>
Lines 426-431 Link Here
426
            </aside>
428
            </aside>
427
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
429
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
428
     </div> <!-- /.row -->
430
     </div> <!-- /.row -->
431
                [% USE Dumper %] [% Dumper.dump(message, message_type) %]
429
432
430
[% MACRO jsinclude BLOCK %]
433
[% MACRO jsinclude BLOCK %]
431
    [% INCLUDE 'calendar.inc' %]
434
    [% INCLUDE 'calendar.inc' %]
(-)a/tools/modborrowers.pl (-23 / +13 lines)
Lines 439-469 if ( $op eq 'do' ) { Link Here
439
            }
439
            }
440
            $i++;
440
            $i++;
441
        }
441
        }
442
        # Create a block to save in database the patron_messages update + security slice : "if" this field is filled-up then...etc
442
443
        my $patron_messages = Koha::Patron::Messages->search(
443
        # Handle patron messages
444
        my $message          = $input->param('message');
445
        my $branchcode       = C4::Context::mybranch;
446
        my $message_type     = $input->param('add_message_type');
447
448
        Koha::Patron::Message->new(
444
            {
449
            {
445
                'me.borrowernumber' => $patron->borrowernumber,
450
                borrowernumber => $borrowernumber,
446
            }
451
                branchcode     => $branchcode,
447
        );
452
                message_type   => $message_type,
448
        if ( defined $patron_messages ) {
453
                message        => $message,
449
            if ( defined $infos ) {
450
                my $message          = $input->param('message');
451
                my $borrowernumber   = $patron->borrowernumber;
452
                my $branchcode       = C4::Context::mybranch;
453
                my $message_type     = $input->param('add_message_type');
454
455
                Koha::Patron::Message->new(
456
                    {
457
                        borrowernumber => $borrowernumber,
458
                        branchcode     => $branchcode,
459
                        message_type   => $message_type,
460
                        message        => $message,
461
                    }
462
                )->store;
463
                $template->param( message_type => $message_type );
464
            }
454
            }
465
        }
455
        )->store;
466
    }
456
    }
457
467
    $op = "show_results"; # We have process modifications, the user want to view its
458
    $op = "show_results"; # We have process modifications, the user want to view its
468
459
469
    # Construct the results list
460
    # Construct the results list
470
- 

Return to bug 27123