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

(-)a/circ/add_message.pl (-2 / +2 lines)
Lines 51-55 Koha::Patron::Message->new( Link Here
51
    }
51
    }
52
)->store;
52
)->store;
53
53
54
print $input->redirect(
54
my $url = $input->referer() // "/cgi-bin/koha/circ/circulation.pl?borrowernumber=$borrowernumber";
55
    "/cgi-bin/koha/circ/circulation.pl?borrowernumber=$borrowernumber");
55
print $input->redirect($url);
(-)a/circ/circulation.pl (-5 lines)
Lines 652-666 $template->param( Link Here
652
my $patron_image = Koha::Patron::Images->find($borrower->{borrowernumber});
652
my $patron_image = Koha::Patron::Images->find($borrower->{borrowernumber});
653
$template->param( picture => 1 ) if $patron_image;
653
$template->param( picture => 1 ) if $patron_image;
654
654
655
# get authorised values with type of BOR_NOTES
656
657
my $canned_notes = GetAuthorisedValues("BOR_NOTES");
658
659
$template->param(
655
$template->param(
660
    debt_confirmed            => $debt_confirmed,
656
    debt_confirmed            => $debt_confirmed,
661
    SpecifyDueDate            => $duedatespec_allow,
657
    SpecifyDueDate            => $duedatespec_allow,
662
    CircAutocompl             => C4::Context->preference("CircAutocompl"),
658
    CircAutocompl             => C4::Context->preference("CircAutocompl"),
663
    canned_bor_notes_loop     => $canned_notes,
664
    debarments                => GetDebarments({ borrowernumber => $borrowernumber }),
659
    debarments                => GetDebarments({ borrowernumber => $borrowernumber }),
665
    todaysdate                => output_pref( { dt => dt_from_string()->set(hour => 23)->set(minute => 59), dateformat => 'sql' } ),
660
    todaysdate                => output_pref( { dt => dt_from_string()->set(hour => 23)->set(minute => 59), dateformat => 'sql' } ),
666
);
661
);
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc (+45 lines)
Lines 1-5 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE Borrowers %]
2
[% USE Borrowers %]
3
[% USE Branches %]
4
[% USE AuthorisedValues %]
3
[% SET NorwegianPatronDBEnable = Koha.Preference( 'NorwegianPatronDBEnable' ) %]
5
[% SET NorwegianPatronDBEnable = Koha.Preference( 'NorwegianPatronDBEnable' ) %]
4
<script type="text/javascript">
6
<script type="text/javascript">
5
//<![CDATA[
7
//<![CDATA[
Lines 170-175 function searchToHold(){ Link Here
170
        <a id="searchtohold" class="btn btn-small" href="#"><i class="fa fa-search"></i> Search to hold</a>
172
        <a id="searchtohold" class="btn btn-small" href="#"><i class="fa fa-search"></i> Search to hold</a>
171
    [% END %]
173
    [% END %]
172
174
175
    <a id="addnewmessageLabel" href="#add_message_form" data-toggle="modal" class="btn btn-small"><i class="fa fa-comment-o"></i> Add message</a>
176
173
         <div class="btn-group">
177
         <div class="btn-group">
174
        <button class="btn btn-small dropdown-toggle" data-toggle="dropdown">More <span class="caret"></span></button>
178
        <button class="btn btn-small dropdown-toggle" data-toggle="dropdown">More <span class="caret"></span></button>
175
            <ul class="dropdown-menu">
179
            <ul class="dropdown-menu">
Lines 209-211 function searchToHold(){ Link Here
209
            </ul>
213
            </ul>
210
    </div>
214
    </div>
211
</div>
215
</div>
216
217
<!-- Modal -->
218
<div id="add_message_form" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="addnewmessageLabel" aria-hidden="true">
219
    <div class="modal-body">
220
        <form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f">
221
        <fieldset id="borrower_messages" class="brief">
222
            <legend>Leave a message</legend>
223
            <ol>
224
                <li>
225
                    <label for="message_type">Add a message for:</label>
226
                    <select name="message_type" id="message_type">
227
                        <option value="L">Staff - Internal note</option>
228
                        <option value="B">OPAC - [% firstname %] [% surname %]</option>
229
                    </select>
230
                </li>
231
                [% bor_notes = AuthorisedValues.Get( 'BOR_NOTES' ) %]
232
                [% IF bor_notes %]
233
                    <li>
234
                        <label for="type">Predefined notes: </label>
235
                        <select name="type" id="type" onchange="this.form.borrower_message.value=this.options[this.selectedIndex].value;">
236
                            <option value="">Select note</option>
237
                            [% FOREACH bor_note IN bor_notes %]
238
                                <option value="[% bor_note.lib %]">[% bor_note.lib %]</option>
239
                            [% END %]
240
                        </select>
241
                    </li>
242
                [% END %]
243
                <li>
244
                    <textarea rows="3" cols="60" name="borrower_message" id="borrower_message" ></textarea>
245
                </li>
246
            </ol>
247
            <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
248
            <input type="hidden" name="branchcode" value="[% LoginBranchcode %]" />
249
        </fieldset>
250
    </div>
251
    <div class="modal-footer">
252
        <fieldset class="action">
253
            <input type="submit" value="Save" /> </form><a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
254
        </fieldset>
255
    </div>
256
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-38 / +1 lines)
Lines 45-51 var relatives_borrowernumbers = new Array(); Link Here
45
    relatives_borrowernumbers.push("[% b %]");
45
    relatives_borrowernumbers.push("[% b %]");
46
[% END %]
46
[% END %]
47
47
48
var MSG_ADD_MESSAGE = _("Add a new message");
49
var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
48
var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
50
var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone.");
49
var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone.");
51
50
Lines 159-201 $(document).ready(function() { Link Here
159
[% END %]
158
[% END %]
160
159
161
<!--  INITIAL BLOC : PARAMETERS & BORROWER INFO -->
160
<!--  INITIAL BLOC : PARAMETERS & BORROWER INFO -->
162
<div style="display: none;" id="add_message_form">
163
<form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f">
164
<fieldset id="borrower_messages" class="brief">
165
<legend>Leave a message</legend>
166
	<ol>
167
    <li>
168
            <label for="message_type">Add a message for:</label>
169
          <select name="message_type" id="message_type">
170
            <option value="L">Staff - Internal note</option>
171
            <option value="B">OPAC - [% firstname %] [% surname %]</option>
172
        </select>
173
    </li>
174
    [% IF ( canned_bor_notes_loop ) %]
175
        <li>
176
                <label for="type">Predefined notes: </label>
177
                <select name="type" id="type" onchange="this.form.borrower_message.value=this.options[this.selectedIndex].value;">
178
                    <option value="">Select note</option>
179
                    [% FOREACH canned_bor_notes_loo IN canned_bor_notes_loop %]
180
                    <option value="[% canned_bor_notes_loo.lib %]">[% canned_bor_notes_loo.lib %]</option>
181
                    [% END %]
182
                </select>
183
        </li>
184
    [% END %]
185
    <li>
186
        <textarea rows="3" cols="60" name="borrower_message" id="borrower_message" ></textarea>
187
    </li>
188
	</ol>
189
    <fieldset class="action">
190
        <input type="submit" value="Save" /> <a href="#" class="cancel">Cancel</a>
191
    </fieldset>
192
193
        <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
194
        <input type="hidden" name="branchcode" value="[% branch %]" />
195
</fieldset>
196
</form>
197
</div>
198
199
[% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry | $KohaDates %]</div>[% END %]
161
[% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry | $KohaDates %]</div>[% END %]
200
162
201
[% IF additional_materials %]
163
[% IF additional_materials %]
Lines 856-861 No patron matched <span class="ex">[% message %]</span> Link Here
856
                [% END %]</li>
818
                [% END %]</li>
857
            [% END %]
819
            [% END %]
858
        </ul>
820
        </ul>
821
        <a id="addnewmessageLabel" href="#add_message_form" data-toggle="modal">Add a new message</a>
859
    </div>
822
    </div>
860
823
861
</div>
824
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt (-2 / +2 lines)
Lines 70-76 $(document).ready(function() { Link Here
70
    [% END %]
70
    [% END %]
71
  </div>
71
  </div>
72
[% ELSIF borrower and not checkout_infos %]
72
[% ELSIF borrower and not checkout_infos %]
73
  <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/circ/circulation.pl">
73
  <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrowernumber %]&batch=1">
74
    <fieldset id="circ_circulation_issue">
74
    <fieldset id="circ_circulation_issue">
75
      <label for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
75
      <label for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
76
      <fieldset class="rows">
76
      <fieldset class="rows">
Lines 101-107 $(document).ready(function() { Link Here
101
[% ELSIF borrower %]
101
[% ELSIF borrower %]
102
  [% IF confirmation_needed && CAN_user_circulate_force_checkout %]
102
  [% IF confirmation_needed && CAN_user_circulate_force_checkout %]
103
    <h3>Batch checkout confirmation [% IF borrowernumber %] for [% INCLUDE 'patron-title.inc' invert_name = 1 %] [% END %]</h3>
103
    <h3>Batch checkout confirmation [% IF borrowernumber %] for [% INCLUDE 'patron-title.inc' invert_name = 1 %] [% END %]</h3>
104
    <form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
104
    <form method="post" action="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrowernumber %]" id="mainform" name="mainform" autocomplete="off">
105
  [% ELSE %]
105
  [% ELSE %]
106
    <h3>Batch checkout information [% IF borrowernumber %] for [% INCLUDE 'patron-title.inc' invert_name = 1 %] [% END %]</h3>
106
    <h3>Batch checkout information [% IF borrowernumber %] for [% INCLUDE 'patron-title.inc' invert_name = 1 %] [% END %]</h3>
107
  [% END %]
107
  [% END %]
(-)a/members/readingrec.pl (-1 lines)
Lines 119-125 if (C4::Context->preference('ExtendedPatronAttributes')) { Link Here
119
    );
119
    );
120
}
120
}
121
121
122
123
$template->param(%$data);
122
$template->param(%$data);
124
123
125
$template->param(
124
$template->param(
(-)a/members/routing-lists.pl (-2 lines)
Lines 101-107 if ($borrowernumber) { Link Here
101
101
102
##################################################################################
102
##################################################################################
103
103
104
105
$template->param(%$borrower);
104
$template->param(%$borrower);
106
105
107
$template->param(
106
$template->param(
108
- 

Return to bug 3669