|
Lines 170-184
Link Here
|
| 170 |
</td> |
170 |
</td> |
| 171 |
<td class="actions"> |
171 |
<td class="actions"> |
| 172 |
[% IF line.note %] |
172 |
[% IF line.note %] |
| 173 |
<a href="#" class="add-note" data-accountlines_id="[% line.accountlines_id | html %]" style="display:none;"><i class="fa fa-plus"></i> Add note</a> |
173 |
[% line.note | html_line_break %] |
| 174 |
<span class="payment_note" id="payment_note_[% line.accountlines_id | html %]" |
174 |
[% IF CAN_user_updatecharges_edit_accountline_notes %] |
| 175 |
><input type="text" size="10" name="payment_note_[% line.accountlines_id | html %]" value="[% line.note | html %]" /> <a href="#" class="cancel-note"><i class="fa fa-times"></i></a |
175 |
<button |
| 176 |
></span> |
176 |
type="button" |
|
|
177 |
class="btn btn-default btn-xs edit-action" |
| 178 |
data-bs-toggle="modal" |
| 179 |
data-bs-target="#editNoteModal" |
| 180 |
data-accountline="[% line.accountlines_id | html %]" |
| 181 |
data-note="[% line.note | html %]" |
| 182 |
data-member="[% line.borrowernumber | html %]" |
| 183 |
><i class="fa-solid fa-pen"></i> Edit</button |
| 184 |
> |
| 185 |
[% END %] |
| 177 |
[% ELSE %] |
186 |
[% ELSE %] |
| 178 |
<a href="#" class="add-note" data-accountlines_id="[% line.accountlines_id | html %]"><i class="fa fa-plus"></i> Add note</a> |
187 |
<button |
| 179 |
<span class="payment_note" id="payment_note_[% line.accountlines_id | html %]" style="display:none" |
188 |
type="button" |
| 180 |
><input type="text" size="10" name="payment_note_[% line.accountlines_id | html %]" value="" /> <a href="#" class="cancel-note"><i class="fa fa-times"></i></a |
189 |
class="btn btn-default btn-xs edit-action" |
| 181 |
></span> |
190 |
data-bs-toggle="modal" |
|
|
191 |
data-bs-target="#editNoteModal" |
| 192 |
data-accountline="[% line.accountlines_id | html %]" |
| 193 |
data-note="[% line.note | html %]" |
| 194 |
data-member="[% line.borrowernumber | html %]" |
| 195 |
><i class="fa-solid fa-plus"></i> Add</button |
| 196 |
> |
| 182 |
[% END %] |
197 |
[% END %] |
| 183 |
</td> |
198 |
</td> |
| 184 |
<td class="debit" style="text-align: right;">[% line.amount | $Price %]</td> |
199 |
<td class="debit" style="text-align: right;">[% line.amount | $Price %]</td> |
|
Lines 228-234
Link Here
|
| 228 |
</div> |
243 |
</div> |
| 229 |
<!-- /.toptabs --> |
244 |
<!-- /.toptabs --> |
| 230 |
[% END %] |
245 |
[% END %] |
|
|
246 |
<!-- Edit note modal --> |
| 247 |
<div class="modal" id="editNoteModal" tabindex="-1" role="dialog" aria-labelledby="editNoteLabel"> |
| 248 |
<form id="edit_form" action="/cgi-bin/koha/members/pay.pl" method="post" enctype="multipart/form-data" class="validated"> |
| 249 |
[% INCLUDE 'csrf-token.inc' %] |
| 250 |
<input type="hidden" name="accountlines_id" value="" id="noteline" /> |
| 251 |
<input type="hidden" name="op" value="cud-edit_note" /> |
| 252 |
<input type="hidden" name="borrowernumber" value="[% line.borrowernumber | html %]" /> |
| 253 |
|
| 254 |
<div class="modal-dialog" role="document"> |
| 255 |
<div class="modal-content"> |
| 256 |
<div class="modal-header"> |
| 257 |
<h1 class="modal-title" id="editNoteLabel">Edit note</h1> |
| 258 |
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> |
| 259 |
</div> |
| 260 |
|
| 261 |
<div class="modal-body"> |
| 262 |
<fieldset class="rows"> |
| 263 |
<ol> |
| 264 |
<li> |
| 265 |
<label for="payment_note">Note: </label> |
| 266 |
<textarea id="payment_note" name="payment_note" rows="5" cols="30"></textarea> |
| 267 |
</li> |
| 268 |
</ol> |
| 269 |
</fieldset> |
| 270 |
<!-- /.rows --> |
| 271 |
</div> |
| 272 |
<!-- /.modal-body --> |
| 231 |
|
273 |
|
|
|
274 |
<div class="modal-footer"> |
| 275 |
<button type="submit" class="btn btn-default">Confirm</button> |
| 276 |
<button type="button" class="btn btn-default" data-bs-dismiss="modal">Cancel</button> |
| 277 |
</div> |
| 278 |
<!-- /.modal-footer --> |
| 279 |
</div> |
| 280 |
<!-- /.modal-content --> |
| 281 |
</div> |
| 282 |
<!-- /.modal-dialog --> |
| 283 |
</form> |
| 284 |
<!-- /#void_form --> |
| 285 |
</div> |
| 286 |
<!-- /#editNoteModal --> |
| 232 |
[% MACRO jsinclude BLOCK %] |
287 |
[% MACRO jsinclude BLOCK %] |
| 233 |
[% INCLUDE 'str/members-menu.inc' %] |
288 |
[% INCLUDE 'str/members-menu.inc' %] |
| 234 |
[% Asset.js("js/members-menu.js") | $raw %] |
289 |
[% Asset.js("js/members-menu.js") | $raw %] |
|
Lines 296-301
Link Here
|
| 296 |
table_settings |
351 |
table_settings |
| 297 |
); |
352 |
); |
| 298 |
}); |
353 |
}); |
|
|
354 |
$("#editNoteModal").on("shown.bs.modal", function(e) { |
| 355 |
var button = $(e.relatedTarget); |
| 356 |
var accountline = button.data('accountline'); |
| 357 |
$('#noteline').val(accountline); |
| 358 |
var note = button.data('note'); |
| 359 |
$('#payment_note').val(note); |
| 360 |
}); |
| 299 |
</script> |
361 |
</script> |
| 300 |
[% END %] |
362 |
[% END %] |
| 301 |
|
363 |
|