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

(-)a/Koha/ItemType.pm (+2 lines)
Lines 224-229 sub to_api_mapping { Link Here
224
    return {
224
    return {
225
        checkinmsg                   => 'checkin_message',
225
        checkinmsg                   => 'checkin_message',
226
        checkinmsgtype               => 'checkin_message_type',
226
        checkinmsgtype               => 'checkin_message_type',
227
        checkoutmsg                  => 'checkout_message',
228
        checkoutmsgtype              => 'checkout_message_type',
227
        defaultreplacecost           => 'default_replacement_cost',
229
        defaultreplacecost           => 'default_replacement_cost',
228
        hideinopac                   => 'hide_in_opac',
230
        hideinopac                   => 'hide_in_opac',
229
        imageurl                     => 'image_url',
231
        imageurl                     => 'image_url',
(-)a/admin/itemtypes.pl (-5 / +11 lines)
Lines 90-100 if ( $op eq 'add_form' ) { Link Here
90
          $image eq 'remoteImage' ? $input->param('remoteImage')
90
          $image eq 'remoteImage' ? $input->param('remoteImage')
91
        : $image
91
        : $image
92
      );
92
      );
93
    my $summary        = $input->param('summary');
93
    my $summary         = $input->param('summary');
94
    my $checkinmsg     = $input->param('checkinmsg');
94
    my $checkinmsg      = $input->param('checkinmsg');
95
    my $checkinmsgtype = $input->param('checkinmsgtype');
95
    my $checkinmsgtype  = $input->param('checkinmsgtype');
96
    my $hideinopac     = $input->param('hideinopac') // 0;
96
    my $checkoutmsg     = $input->param('checkoutmsg');
97
    my $searchcategory = $input->param('searchcategory');
97
    my $checkoutmsgtype = $input->param('checkoutmsgtype');
98
    my $hideinopac      = $input->param('hideinopac') // 0;
99
    my $searchcategory  = $input->param('searchcategory');
98
    my $rentalcharge_daily_calendar  = $input->param('rentalcharge_daily_calendar') // 0;
100
    my $rentalcharge_daily_calendar  = $input->param('rentalcharge_daily_calendar') // 0;
99
    my $rentalcharge_hourly_calendar = $input->param('rentalcharge_hourly_calendar') // 0;
101
    my $rentalcharge_hourly_calendar = $input->param('rentalcharge_hourly_calendar') // 0;
100
    my $automatic_checkin = $input->param('automatic_checkin') // 0;
102
    my $automatic_checkin = $input->param('automatic_checkin') // 0;
Lines 112-117 if ( $op eq 'add_form' ) { Link Here
112
        $itemtype->summary($summary);
114
        $itemtype->summary($summary);
113
        $itemtype->checkinmsg($checkinmsg);
115
        $itemtype->checkinmsg($checkinmsg);
114
        $itemtype->checkinmsgtype($checkinmsgtype);
116
        $itemtype->checkinmsgtype($checkinmsgtype);
117
        $itemtype->checkoutmsg($checkoutmsg);
118
        $itemtype->checkoutmsgtype($checkoutmsgtype);
115
        $itemtype->sip_media_type($sip_media_type);
119
        $itemtype->sip_media_type($sip_media_type);
116
        $itemtype->hideinopac($hideinopac);
120
        $itemtype->hideinopac($hideinopac);
117
        $itemtype->searchcategory($searchcategory);
121
        $itemtype->searchcategory($searchcategory);
Lines 145-150 if ( $op eq 'add_form' ) { Link Here
145
                summary             => $summary,
149
                summary             => $summary,
146
                checkinmsg          => $checkinmsg,
150
                checkinmsg          => $checkinmsg,
147
                checkinmsgtype      => $checkinmsgtype,
151
                checkinmsgtype      => $checkinmsgtype,
152
                checkoutmsg         => $checkoutmsg,
153
                checkoutmsgtype     => $checkoutmsgtype,
148
                sip_media_type      => $sip_media_type,
154
                sip_media_type      => $sip_media_type,
149
                hideinopac          => $hideinopac,
155
                hideinopac          => $hideinopac,
150
                searchcategory      => $searchcategory,
156
                searchcategory      => $searchcategory,
(-)a/circ/circulation.pl (+5 lines)
Lines 517-522 if (@$barcodes && $op eq 'cud-checkout') { Link Here
517
                    recall_id              => $recall_id,
517
                    recall_id              => $recall_id,
518
                }
518
                }
519
            );
519
            );
520
            my $itemtype = Koha::ItemTypes->find( $item->effective_itemtype );
521
            if ( $itemtype && $itemtype->checkoutmsg ) {
522
                $template_params->{checkoutmsg}     = $itemtype->checkoutmsg;
523
                $template_params->{checkoutmsgtype} = $itemtype->checkoutmsgtype;
524
            }
520
            $template_params->{issue} = $issue;
525
            $template_params->{issue} = $issue;
521
            $session->clear('auto_renew');
526
            $session->clear('auto_renew');
522
            $inprocess = 1;
527
            $inprocess = 1;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt (+19 lines)
Lines 318-323 Link Here
318
                        [% END %]
318
                        [% END %]
319
                    </select>
319
                    </select>
320
                </li>
320
                </li>
321
                <li>
322
                    <label for="checkoutmsg">Checkout message: </label>
323
                    <textarea id="checkoutmsg" name="checkoutmsg" cols="55" rows="5">[% itemtype.checkoutmsg | html %]</textarea>
324
                </li>
325
                <li>
326
                    <label for="checkoutmsgtype">Checkout message type: </label>
327
                    <select id="checkoutmsgtype" name="checkoutmsgtype">
328
                        [% IF itemtype.checkoutmsgtype == 'message' %]
329
                            <option value="message" selected="selected">Message</option>
330
                        [% ELSE %]
331
                            <option value="message">Message</option>
332
                        [% END %]
333
                        [% IF itemtype.checkoutmsgtype == 'alert' %]
334
                            <option value="alert" selected="selected">Alert</option>
335
                        [% ELSE %]
336
                            <option value="alert">Alert</option>
337
                        [% END %]
338
                    </select>
339
                </li>
321
                <li>
340
                <li>
322
                    <label for="sip_media_type">SIP media type: </label>
341
                    <label for="sip_media_type">SIP media type: </label>
323
                    <select id="sip_media_type" name="sip_media_type">
342
                    <select id="sip_media_type" name="sip_media_type">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-1 / +10 lines)
Lines 880-885 Link Here
880
                                                </p>
880
                                                </p>
881
                                            </div>
881
                                            </div>
882
                                        [% END %]
882
                                        [% END %]
883
884
                                        [% IF ( checkoutmsg ) %]
885
                                            [% IF ( checkoutmsgtype == 'alert' ) %]
886
                                                <div class="dialog alert" style="margin: 1em 0;">
887
                                            [% ELSE %]
888
                                                <div class="dialog message" style="margin: 1em 0;">
889
                                            [% END %]
890
                                                    <p class="ret_checkoutmsg">[% checkoutmsg | html_line_break %]</p>
891
                                                </div>
892
                                        [% END # /IF checkoutmsg %]
883
                                    </form> <!-- /#mainform -->
893
                                    </form> <!-- /#mainform -->
884
                                </div> <!-- /.col-sm-6 -->
894
                                </div> <!-- /.col-sm-6 -->
885
895
886
- 

Return to bug 32485