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 658-672 $template->param( Link Here
658
my $patron_image = Koha::Patron::Images->find($borrower->{borrowernumber});
658
my $patron_image = Koha::Patron::Images->find($borrower->{borrowernumber});
659
$template->param( picture => 1 ) if $patron_image;
659
$template->param( picture => 1 ) if $patron_image;
660
660
661
# get authorised values with type of BOR_NOTES
662
663
my $canned_notes = GetAuthorisedValues("BOR_NOTES");
664
665
$template->param(
661
$template->param(
666
    debt_confirmed            => $debt_confirmed,
662
    debt_confirmed            => $debt_confirmed,
667
    SpecifyDueDate            => $duedatespec_allow,
663
    SpecifyDueDate            => $duedatespec_allow,
668
    CircAutocompl             => C4::Context->preference("CircAutocompl"),
664
    CircAutocompl             => C4::Context->preference("CircAutocompl"),
669
    canned_bor_notes_loop     => $canned_notes,
670
    debarments                => GetDebarments({ borrowernumber => $borrowernumber }),
665
    debarments                => GetDebarments({ borrowernumber => $borrowernumber }),
671
    todaysdate                => output_pref( { dt => dt_from_string()->set(hour => 23)->set(minute => 59), dateformat => 'sql' } ),
666
    todaysdate                => output_pref( { dt => dt_from_string()->set(hour => 23)->set(minute => 59), dateformat => 'sql' } ),
672
    modifications             => Koha::Patron::Modifications->GetModifications({ borrowernumber => $borrowernumber }),
667
    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 212-214 function searchToHold(){ Link Here
212
            </ul>
216
            </ul>
213
    </div>
217
    </div>
214
</div>
218
</div>
219
220
<!-- Modal -->
221
<div id="add_message_form" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="addnewmessageLabel" aria-hidden="true">
222
    <div class="modal-body">
223
        <form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f">
224
        <fieldset id="borrower_messages" class="brief">
225
            <legend>Leave a message</legend>
226
            <ol>
227
                <li>
228
                    <label for="message_type">Add a message for:</label>
229
                    <select name="message_type" id="message_type">
230
                        <option value="L">Staff - Internal note</option>
231
                        <option value="B">OPAC - [% firstname %] [% surname %]</option>
232
                    </select>
233
                </li>
234
                [% bor_notes = AuthorisedValues.Get( 'BOR_NOTES' ) %]
235
                [% IF bor_notes %]
236
                    <li>
237
                        <label for="type">Predefined notes: </label>
238
                        <select name="type" id="type" onchange="this.form.borrower_message.value=this.options[this.selectedIndex].value;">
239
                            <option value="">Select note</option>
240
                            [% FOREACH bor_note IN bor_notes %]
241
                                <option value="[% bor_note.lib %]">[% bor_note.lib %]</option>
242
                            [% END %]
243
                        </select>
244
                    </li>
245
                [% END %]
246
                <li>
247
                    <textarea rows="3" cols="60" name="borrower_message" id="borrower_message" ></textarea>
248
                </li>
249
            </ol>
250
            <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
251
            <input type="hidden" name="branchcode" value="[% LoginBranchcode %]" />
252
        </fieldset>
253
    </div>
254
    <div class="modal-footer">
255
        <fieldset class="action">
256
            <input type="submit" value="Save" /> </form><a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
257
        </fieldset>
258
    </div>
259
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-38 / +1 lines)
Lines 47-53 var relatives_borrowernumbers = new Array(); Link Here
47
    relatives_borrowernumbers.push("[% b %]");
47
    relatives_borrowernumbers.push("[% b %]");
48
[% END %]
48
[% END %]
49
49
50
var MSG_ADD_MESSAGE = _("Add a new message");
51
var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
50
var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
52
var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone.");
51
var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone.");
53
52
Lines 140-182 $(document).ready(function() { Link Here
140
[% END %]
139
[% END %]
141
140
142
<!--  INITIAL BLOC : PARAMETERS & BORROWER INFO -->
141
<!--  INITIAL BLOC : PARAMETERS & BORROWER INFO -->
143
<div style="display: none;" id="add_message_form">
144
<form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f">
145
<fieldset id="borrower_messages" class="brief">
146
<legend>Leave a message</legend>
147
	<ol>
148
    <li>
149
            <label for="message_type">Add a message for:</label>
150
          <select name="message_type" id="message_type">
151
            <option value="L">Staff - Internal note</option>
152
            <option value="B">OPAC - [% firstname %] [% surname %]</option>
153
        </select>
154
    </li>
155
    [% IF ( canned_bor_notes_loop ) %]
156
        <li>
157
                <label for="type">Predefined notes: </label>
158
                <select name="type" id="type" onchange="this.form.borrower_message.value=this.options[this.selectedIndex].value;">
159
                    <option value="">Select note</option>
160
                    [% FOREACH canned_bor_notes_loo IN canned_bor_notes_loop %]
161
                    <option value="[% canned_bor_notes_loo.lib %]">[% canned_bor_notes_loo.lib %]</option>
162
                    [% END %]
163
                </select>
164
        </li>
165
    [% END %]
166
    <li>
167
        <textarea rows="3" cols="60" name="borrower_message" id="borrower_message" ></textarea>
168
    </li>
169
	</ol>
170
    <fieldset class="action">
171
        <input type="submit" value="Save" /> <a href="#" class="cancel">Cancel</a>
172
    </fieldset>
173
174
        <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
175
        <input type="hidden" name="branchcode" value="[% branch %]" />
176
</fieldset>
177
</form>
178
</div>
179
180
[% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry | $KohaDates %]</div>[% END %]
142
[% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry | $KohaDates %]</div>[% END %]
181
143
182
[% IF additional_materials %]
144
[% IF additional_materials %]
Lines 876-881 No patron matched <span class="ex">[% message %]</span> Link Here
876
                [% END %]</li>
838
                [% END %]</li>
877
            [% END %]
839
            [% END %]
878
        </ul>
840
        </ul>
841
        <a id="addnewmessageLabel" href="#add_message_form" data-toggle="modal">Add a new message</a>
879
    </div>
842
    </div>
880
843
881
</div>
844
</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