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 660-674 $template->param( Link Here
660
my $patron_image = Koha::Patron::Images->find($borrower->{borrowernumber});
660
my $patron_image = Koha::Patron::Images->find($borrower->{borrowernumber});
661
$template->param( picture => 1 ) if $patron_image;
661
$template->param( picture => 1 ) if $patron_image;
662
662
663
# get authorised values with type of BOR_NOTES
664
665
my $canned_notes = GetAuthorisedValues("BOR_NOTES");
666
667
$template->param(
663
$template->param(
668
    debt_confirmed            => $debt_confirmed,
664
    debt_confirmed            => $debt_confirmed,
669
    SpecifyDueDate            => $duedatespec_allow,
665
    SpecifyDueDate            => $duedatespec_allow,
670
    CircAutocompl             => C4::Context->preference("CircAutocompl"),
666
    CircAutocompl             => C4::Context->preference("CircAutocompl"),
671
    canned_bor_notes_loop     => $canned_notes,
672
    debarments                => GetDebarments({ borrowernumber => $borrowernumber }),
667
    debarments                => GetDebarments({ borrowernumber => $borrowernumber }),
673
    todaysdate                => output_pref( { dt => dt_from_string()->set(hour => 23)->set(minute => 59), dateformat => 'sql' } ),
668
    todaysdate                => output_pref( { dt => dt_from_string()->set(hour => 23)->set(minute => 59), dateformat => 'sql' } ),
674
    modifications             => Koha::Patron::Modifications->GetModifications({ borrowernumber => $borrowernumber }),
669
    modifications             => Koha::Patron::Modifications->GetModifications({ borrowernumber => $borrowernumber }),
(-)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 46-52 var relatives_borrowernumbers = new Array(); Link Here
46
    relatives_borrowernumbers.push("[% b %]");
46
    relatives_borrowernumbers.push("[% b %]");
47
[% END %]
47
[% END %]
48
48
49
var MSG_ADD_MESSAGE = _("Add a new message");
50
var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
49
var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
51
var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone.");
50
var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone.");
52
51
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 926-931 No patron matched <span class="ex">[% message %]</span> Link Here
926
                [% END %]</li>
888
                [% END %]</li>
927
            [% END %]
889
            [% END %]
928
        </ul>
890
        </ul>
891
        <a id="addnewmessageLabel" href="#add_message_form" data-toggle="modal">Add a new message</a>
929
    </div>
892
    </div>
930
893
931
</div>
894
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt (-2 / +2 lines)
Lines 79-85 $(document).ready(function() { Link Here
79
    [% END %]
79
    [% END %]
80
  </div>
80
  </div>
81
[% ELSIF borrower and not checkout_infos %]
81
[% ELSIF borrower and not checkout_infos %]
82
  <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/circ/circulation.pl">
82
  <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrowernumber %]&batch=1">
83
    <fieldset id="circ_circulation_issue">
83
    <fieldset id="circ_circulation_issue">
84
      <label for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
84
      <label for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
85
      <fieldset class="rows">
85
      <fieldset class="rows">
Lines 110-116 $(document).ready(function() { Link Here
110
[% ELSIF borrower %]
110
[% ELSIF borrower %]
111
  [% IF confirmation_needed && CAN_user_circulate_force_checkout %]
111
  [% IF confirmation_needed && CAN_user_circulate_force_checkout %]
112
    <h3>Batch checkout confirmation [% IF borrowernumber %] for [% INCLUDE 'patron-title.inc' invert_name = 1 %] [% END %]</h3>
112
    <h3>Batch checkout confirmation [% IF borrowernumber %] for [% INCLUDE 'patron-title.inc' invert_name = 1 %] [% END %]</h3>
113
    <form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
113
    <form method="post" action="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrowernumber %]" id="mainform" name="mainform" autocomplete="off">
114
  [% ELSE %]
114
  [% ELSE %]
115
    <h3>Batch checkout information [% IF borrowernumber %] for [% INCLUDE 'patron-title.inc' invert_name = 1 %] [% END %]</h3>
115
    <h3>Batch checkout information [% IF borrowernumber %] for [% INCLUDE 'patron-title.inc' invert_name = 1 %] [% END %]</h3>
116
  [% END %]
116
  [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-1 lines)
Lines 42-48 var relatives_borrowernumbers = new Array(); Link Here
42
    relatives_borrowernumbers.push("[% b %]");
42
    relatives_borrowernumbers.push("[% b %]");
43
[% END %]
43
[% END %]
44
44
45
var MSG_ADD_MESSAGE = _("Add a new message");
46
var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
45
var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
47
46
48
columns_settings = [% ColumnsSettings.GetColumns( 'members', 'moremember', 'issues-table', 'json' ) %]
47
columns_settings = [% ColumnsSettings.GetColumns( 'members', 'moremember', 'issues-table', 'json' ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js (-2 lines)
Lines 14-21 $(document).ready(function() { Link Here
14
        }
14
        }
15
    });
15
    });
16
16
17
    $("#messages ul").after("<a href=\"#\" id=\"addmessage\">"+MSG_ADD_MESSAGE+"</a>");
18
19
    $("#borrower_messages .cancel").on("click",function(){
17
    $("#borrower_messages .cancel").on("click",function(){
20
        $("#add_message_form").hide();
18
        $("#add_message_form").hide();
21
        $("#addmessage").show();
19
        $("#addmessage").show();
(-)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 88-94 if ($borrowernumber) { Link Here
88
88
89
##################################################################################
89
##################################################################################
90
90
91
92
$template->param(%$borrower);
91
$template->param(%$borrower);
93
92
94
$template->param(
93
$template->param(
95
- 

Return to bug 3669