|
Lines 123-187
Link Here
|
| 123 |
|
123 |
|
| 124 |
<!-- Modal --> |
124 |
<!-- Modal --> |
| 125 |
<div id="add_message_form" class="modal" tabindex="-1" role="dialog" aria-labelledby="addnewmessageLabel" aria-hidden="true"> |
125 |
<div id="add_message_form" class="modal" tabindex="-1" role="dialog" aria-labelledby="addnewmessageLabel" aria-hidden="true"> |
| 126 |
<div class="modal-dialog"> |
126 |
<div class="modal-dialog modal-lg" role="document"> |
| 127 |
<div class="modal-content"> |
127 |
<div class="modal-content modal-lg"> |
| 128 |
<form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f"> |
128 |
<form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f"> |
| 129 |
[% INCLUDE 'csrf-token.inc' %] |
129 |
[% INCLUDE 'csrf-token.inc' %] |
| 130 |
<input type="hidden" name="op" value="cud-add_message"> |
130 |
<input type="hidden" name="op" value="cud-add_message"> |
| 131 |
<div class="modal-header"> |
131 |
<div class="modal-header"> |
| 132 |
<h3>Leave a message</h3> |
132 |
<button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"> |
|
|
133 |
<span aria-hidden="true">×</span> |
| 134 |
</button> |
| 135 |
<h4>Leave a message</h4> |
| 133 |
</div> |
136 |
</div> |
| 134 |
<div class="modal-body"> |
137 |
<div class="modal-body"> |
| 135 |
<div class="form-group"> |
138 |
<fieldset id="message_fieldset"> |
| 136 |
<label for="message_type">Add a message for:</label> |
139 |
<ol> |
| 137 |
<select name="message_type" id="message_type"> |
140 |
<li class="form-group form-row"> |
| 138 |
<option value="L">Staff - Internal note</option> |
141 |
<label for="message_type" class="col-form-label">Add a message for:</label> |
| 139 |
<option value="B">OPAC - [% patron.firstname | html %] [% patron.surname | html %]</option> |
142 |
<select name="message_type" id="message_type" class="form-control"> |
| 140 |
[% IF CAN_user_borrowers_send_messages_to_borrowers %] |
143 |
<option value="L">Staff - Internal note</option> |
| 141 |
<option value="E">Email - email addresses of patron</option> |
144 |
<option value="B">OPAC - [% patron.firstname | html %] [% patron.surname | html %]</option> |
| 142 |
[% END %] |
145 |
[% IF CAN_user_borrowers_send_messages_to_borrowers %] |
| 143 |
</select> |
146 |
<option value="E">Email - email addresses of patron</option> |
| 144 |
</div> |
147 |
[% END %] |
| 145 |
[% bor_notes = AuthorisedValues.Get( 'BOR_NOTES' ) %] |
148 |
</select> |
| 146 |
[% IF bor_notes %] |
149 |
</li> |
| 147 |
<div class="form-group"> |
150 |
|
| 148 |
<label for="select_patron_messages">Predefined notes: </label> |
151 |
[% bor_notes = AuthorisedValues.Get( 'BOR_NOTES' ) %] |
| 149 |
<select name="type" id="select_patron_messages"> |
152 |
[% IF bor_notes %] |
| 150 |
<option value="">Select note</option> |
153 |
<li class="form-group form-row"> |
| 151 |
[% FOREACH bor_note IN bor_notes %] |
154 |
<label for="select_patron_messages" class="col-form-label">Predefined notes: </label> |
| 152 |
<option value="[% bor_note.lib | html %]">[% bor_note.lib | html %]</option> |
155 |
<select name="type" id="select_patron_messages" class="form-control"> |
| 153 |
[% END %] |
156 |
<option value="">Select note</option> |
| 154 |
</select> |
157 |
[% FOREACH bor_note IN bor_notes %] |
| 155 |
</div> |
158 |
<option value="[% bor_note.lib | html %]">[% bor_note.lib | html %]</option> |
| 156 |
[% END %] |
159 |
[% END %] |
| 157 |
|
160 |
</select> |
| 158 |
[% patron_letters = NoticeTemplates.GetByModule( 'add_message' ) %] |
|
|
| 159 |
[% IF patron_letters %] |
| 160 |
<div class="form-group"> |
| 161 |
<label for="select_patron_notice" style="display:none;">Patron notice: </label> |
| 162 |
<select name="select_patron_notice" id="select_patron_notice" style="display:none;"> |
| 163 |
<option value="">Select notice</option> |
| 164 |
[% FOREACH letter IN patron_letters %] |
| 165 |
<option value="[% letter.code | html %]">[% letter.name | html %]</option> |
| 166 |
[% END %] |
| 167 |
</select> |
| 168 |
</div> |
| 169 |
[% END %] |
| 170 |
|
| 171 |
<div class="form-group"> |
| 172 |
<fieldset class="rows"> |
| 173 |
<ol> |
| 174 |
<li id="subject_form" style="display: none;"> |
| 175 |
<label for="borrower_subject">Subject:</label> |
| 176 |
<input type="text" size="60" name="borrower_subject" id="borrower_subject"/> |
| 177 |
</li> |
161 |
</li> |
| 178 |
<li> |
162 |
[% END %] |
| 179 |
<label for="borrower_message" style="display: none;">Body:</label> |
163 |
|
| 180 |
<textarea cols="65" rows="5" name="borrower_message" id="borrower_message" ></textarea> |
164 |
[% patron_letters = NoticeTemplates.GetByModule( 'add_message' ) %] |
|
|
165 |
[% IF patron_letters %] |
| 166 |
<li class="form-group form-row"> |
| 167 |
<label for="select_patron_notice" class="col-form-lable" style="display:none;">Patron notice: </label> |
| 168 |
<select name="select_patron_notice" id="select_patron_notice" class="form-control" style="display:none;"> |
| 169 |
<option value="">Select notice</option> |
| 170 |
[% FOREACH letter IN patron_letters %] |
| 171 |
<option value="[% letter.code | html %]">[% letter.name | html %]</option> |
| 172 |
[% END %] |
| 173 |
</select> |
| 181 |
</li> |
174 |
</li> |
| 182 |
</ol> |
175 |
[% END %] |
| 183 |
</fieldset> |
176 |
|
| 184 |
</div> |
177 |
<li class="form-group form-row" id="subject_form" style="display: none;"> |
|
|
178 |
<label for="borrower_subject" class="col-form-label">Subject:</label> |
| 179 |
<input type="text" size="60" name="borrower_subject" class="form-control" id="borrower_subject"/> |
| 180 |
</li> |
| 181 |
<li class="form-group form-row"> |
| 182 |
<label for="borrower_message" class="col-form-label" style="display: none;">Body:</label> |
| 183 |
<textarea cols="65" rows="5" name="borrower_message" class="form-control" id="borrower_message" ></textarea> |
| 184 |
</li> |
| 185 |
</ol> |
| 186 |
</fieldset> |
| 185 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
187 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
| 186 |
<input type="hidden" name="batch" value="[% batch | html %]" /> |
188 |
<input type="hidden" name="batch" value="[% batch | html %]" /> |
| 187 |
<input type="hidden" name="branchcode" value="[% Branches.GetLoggedInBranchcode | html %]" /> |
189 |
<input type="hidden" name="branchcode" value="[% Branches.GetLoggedInBranchcode | html %]" /> |
| 188 |
- |
|
|