Lines 1-3
Link Here
|
|
|
1 |
[% USE To %] |
1 |
[% USE Koha %] |
2 |
[% USE Koha %] |
2 |
[% USE KohaDates %] |
3 |
[% USE KohaDates %] |
3 |
[% INCLUDE 'doc-head-open.inc' %] |
4 |
[% INCLUDE 'doc-head-open.inc' %] |
Lines 6-39
Link Here
|
6 |
[% INCLUDE 'calendar.inc' %] |
7 |
[% INCLUDE 'calendar.inc' %] |
7 |
<script type="text/javascript"> |
8 |
<script type="text/javascript"> |
8 |
//<![CDATA[ |
9 |
//<![CDATA[ |
9 |
$(document).ready(function() { |
10 |
$(document).ready(function() { |
10 |
[% IF categorycode %] |
11 |
[% IF categorycode %] |
11 |
update_category_code( "[% categorycode %]" ); |
12 |
update_category_code( "[% categorycode %]" ); |
12 |
[% ELSE %] |
13 |
[% ELSE %] |
13 |
if ( $("#categorycode_entry").length > 0 ){ |
14 |
if ( $("#categorycode_entry").length > 0 ){ |
14 |
var category_code = $("#categorycode_entry").find("option:selected").val(); |
15 |
var category_code = $("#categorycode_entry").find("option:selected").val(); |
15 |
update_category_code( category_code ); |
16 |
update_category_code( category_code ); |
16 |
} |
17 |
} |
17 |
[% END %] |
18 |
[% END %] |
18 |
}); |
|
|
19 |
|
19 |
|
20 |
var MSG_SEPARATOR = _("Separator must be / in field %s"); |
20 |
[% IF guarantor %] |
21 |
var MSG_INCORRECT_DAY = _("Invalid day entered in field %s"); |
21 |
select_user( '[% guarantor.borrowernumber %]', [% To.json( guarantor.unblessed ) %] ); |
22 |
var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s"); |
22 |
$('#guarantor_add').ready(function() { |
23 |
var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s"); |
23 |
$('#guarantor_add').click(); |
24 |
var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron"); |
24 |
}); |
25 |
var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization"); |
25 |
[% END %] |
26 |
var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date"); |
26 |
}); |
27 |
var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron"); |
27 |
|
28 |
var MSG_PASSWORD_MISMATCH = _("The passwords entered do not match"); |
28 |
var MSG_SEPARATOR = _("Separator must be / in field %s"); |
29 |
var MSG_PASSWORD_CONTAINS_TRAILING_SPACES = _("Password contains leading and/or trailing spaces."); |
29 |
var MSG_INCORRECT_DAY = _("Invalid day entered in field %s"); |
30 |
var MSG_MONTH = _("%s month") |
30 |
var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s"); |
31 |
var MSG_MONTHS = _("%s months") |
31 |
var MSG_INCORRECT_YEAR = _("Invalid year entered in field %s"); |
32 |
var MSG_YEAR = _("%s year") |
32 |
var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron"); |
33 |
var MSG_YEARS = _("%s years") |
33 |
var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization"); |
34 |
var LABEL_CHANGE = _("Change"); |
34 |
var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date"); |
35 |
var LABEL_SET_TO_PATRON = _("Set to patron"); |
35 |
var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron"); |
36 |
var LABEL_AGE = _("Age"); |
36 |
var MSG_PASSWORD_MISMATCH = _("The passwords entered do not match"); |
|
|
37 |
var MSG_PASSWORD_CONTAINS_TRAILING_SPACES = _("Password contains leading and/or trailing spaces."); |
38 |
var MSG_MONTH = _("%s month") |
39 |
var MSG_MONTHS = _("%s months") |
40 |
var MSG_YEAR = _("%s year") |
41 |
var MSG_YEARS = _("%s years") |
42 |
var LABEL_CHANGE = _("Change"); |
43 |
var LABEL_SET_TO_PATRON = _("Set to patron"); |
44 |
var LABEL_AGE = _("Age"); |
37 |
|
45 |
|
38 |
//]]> |
46 |
//]]> |
39 |
</script> |
47 |
</script> |
Lines 289-394
$(document).ready(function() {
Link Here
|
289 |
</fieldset> |
297 |
</fieldset> |
290 |
[% END # hide fieldset %] |
298 |
[% END # hide fieldset %] |
291 |
|
299 |
|
292 |
[% IF ( showguarantor ) %] |
300 |
[% IF show_guarantor || guarantor %] |
293 |
<input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid %]" /> |
301 |
[% SET possible_relationships = Koha.Preference('borrowerRelationship') %] |
294 |
[% UNLESS step_6 %] |
302 |
<fieldset class="rows"> |
295 |
<input type="hidden" name="branchcode" value="[% branchcode %]" /> |
303 |
<legend>Guarantor information</legend> |
296 |
[% END %] |
304 |
|
297 |
<fieldset id="memberentry_guarantor" class="rows"> |
305 |
<span id="guarantor_relationships"> |
298 |
<legend id="guarantor_lgd">Guarantor information</legend> |
306 |
[% FOREACH r IN relationships %] |
299 |
<ol> |
307 |
<fieldset class="rows"> |
300 |
[% IF ( P ) %] |
308 |
<ol> |
301 |
[% IF ( guarantorid ) %] |
309 |
[% IF catetory_type == 'P' %] |
302 |
<li id="contact-details"> |
310 |
[% IF ( r.guarantor_id ) %] |
303 |
[% ELSE %] |
311 |
<li id="contact-details"> |
304 |
<li id="contact-details" style="display: none"> |
312 |
[% ELSE %] |
305 |
[% END %] |
313 |
<li id="contact-details" style="display: none"> |
306 |
<span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %] |
314 |
[% END %] |
307 |
</li> |
315 |
<span class="label">Organization #:</span> [% IF ( r.guarantor_id ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% r.guarantor_id %]" target="blank">[% r.guarantor_id %]</a>[% END %] |
308 |
<li> |
316 |
</li> |
309 |
<label for="contactname">Organization name: </label> |
317 |
|
310 |
[% IF ( guarantorid ) %] |
318 |
<li> |
311 |
<span>[% contactname %]</span> |
319 |
<label for="guarantor_surname">Organization name: </label> |
312 |
<input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" /> |
320 |
[% IF ( r.guarantor_id ) %] |
313 |
[% ELSE %] |
321 |
<span>[% r.guarantor.surname %]</span> |
314 |
<input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" /> |
322 |
[% END %] |
315 |
[% END %] |
323 |
</li> |
316 |
</li> |
324 |
[% ELSE %] |
317 |
[% ELSE %] |
325 |
[% IF category_type == 'C' %] |
318 |
[% IF ( C ) %] |
326 |
[% IF ( r.guarantor_id ) %] |
319 |
[% IF ( guarantorid ) %] |
327 |
<li id="contact-details"> |
320 |
<li id="contact-details"> |
328 |
[% ELSE %] |
321 |
[% ELSE %] |
329 |
<li id="contact-details" style="display: none"> |
322 |
<li id="contact-details" style="display: none"> |
330 |
[% END %] |
323 |
[% END %] |
331 |
|
324 |
<span class="label">Patron #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %] |
332 |
<span class="label">Patron #:</span> |
325 |
</li> |
333 |
[% IF ( r.guarantor_id ) %] |
326 |
[% UNLESS nocontactname %] |
334 |
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% r.guarantor_id %]" target="blank">[% r.guarantor_id %]</a> |
327 |
<li> |
335 |
[% END %] |
328 |
<label for="contactname">Surname: </label> |
336 |
|
329 |
[% IF ( guarantorid ) %] |
337 |
</li> |
330 |
<span>[% contactname %]</span> |
338 |
|
331 |
<input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" /> |
339 |
[% IF r.surname || r.guarantor.surname %] |
332 |
[% ELSE %] |
340 |
<li> |
333 |
<input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" /> |
341 |
<label for="guarantor_surname">Surname: </label> |
334 |
[% END %] |
342 |
<span>[% r.surname || r.guarantor.surname %]</span> |
335 |
</li> |
343 |
</li> |
336 |
[% END %] |
344 |
[% END %] |
337 |
[% UNLESS nocontactfirstname %] |
345 |
|
338 |
<li> |
346 |
[% IF r.firstname || r.guarantor.firstname %] |
339 |
<label for="contactfirstname">First name: </label> |
347 |
<li> |
340 |
[% IF ( guarantorid ) %] |
348 |
<label for="guarantor_firstname">First name: </label> |
341 |
<span>[% contactfirstname %]</span> |
349 |
<span>[% r.firstname || r.guarantor.firstname %]</span> |
342 |
<input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname %]" /> |
350 |
</li> |
343 |
[% ELSE %] |
351 |
[% END %] |
344 |
<input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname %]" /> |
352 |
|
345 |
[% END %] |
353 |
<li> |
346 |
</li> |
354 |
<label for="relationship">Relationship: </label> |
347 |
[% END %] |
355 |
<span>[% r.relationship %]</span> |
348 |
[% IF ( relshiploop ) %] |
356 |
</li> |
349 |
<li> |
357 |
|
350 |
<label for="relationship">Relationship: </label> |
358 |
<li> |
351 |
<select name="relationship" id="relationship" > |
359 |
<label for="delete_guarantor">Delete: </label> |
352 |
[% FOREACH relshiploo IN relshiploop %] |
360 |
<input type="checkbox" name="delete_guarantor" value="[% r.id %]" /> |
353 |
[% IF ( relshiploo.selected ) %] |
361 |
</li> |
354 |
<option value="[% relshiploo.relationship %]" selected="selected" >[% relshiploo.relationship %]</option> |
362 |
[% END %] |
355 |
[% ELSE %] |
363 |
[% END %] |
356 |
<option value="[% relshiploo.relationship %]">[% relshiploo.relationship %]</option> |
364 |
</ol> |
357 |
[% END %] |
365 |
</fieldset> |
358 |
[% END %] |
366 |
[% END # END relationships foreach %] |
359 |
</select> |
367 |
</span> |
360 |
</li> |
368 |
|
361 |
[% END %] |
369 |
<fieldset class="rows guarantor" id="guarantor_template"> |
362 |
[% END %] |
370 |
<ol> |
363 |
[% END %] |
371 |
<li class="guarantor_id"> |
364 |
<li> |
372 |
<span class="label">Patron #:</span> |
365 |
<span class="label"> </span> |
373 |
<span class="new_guarantor_id_text"></span> |
366 |
[% IF ( guarantorid ) %] |
374 |
<input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/> |
367 |
<input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" /> |
375 |
</li> |
368 |
[% ELSE %] |
376 |
|
369 |
<input id="guarantorsearch" type="button" value="Set to patron" onclick="Dopopguarantor('guarantor_search.pl');" /> |
377 |
<li> |
370 |
[% END %] |
378 |
<label for="guarantor_surname">Surname: </label> |
371 |
<input id="guarantordelete" type="button" value="Delete" /> |
379 |
<span class="new_guarantor_surname_text"></span> |
372 |
</li> |
380 |
<input type="hidden" class="new_guarantor_surname" name="new_guarantor_surname" value=""/> |
373 |
[% IF guarantorid && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %] |
381 |
</li> |
374 |
<li> |
382 |
|
375 |
<label for="privacy_guarantor_checkouts">Show checkouts to guarantor</label> |
383 |
<li> |
376 |
<select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts"> |
384 |
<label for="guarantor_firstname">First name: </label> |
377 |
[% IF privacy_guarantor_checkouts %] |
385 |
<span class="new_guarantor_firstname_text"></span> |
378 |
<option value="0">No</option> |
386 |
<input type="hidden" class="new_guarantor_firstname" name="new_guarantor_firstname" value=""/> |
379 |
<option value="1" selected>Yes</option> |
387 |
</li> |
|
|
388 |
|
389 |
<li> |
390 |
<label for="guarantor_relationship">Relationship: </label> |
391 |
<select class="new_guarantor_relationship" name="new_guarantor_relationship"> |
392 |
[% FOREACH pr IN possible_relationships.split('\|') %] |
393 |
<option value="[% pr %]">[% pr %]</option> |
394 |
[% END %] |
395 |
</select> |
396 |
</li> |
397 |
|
398 |
<li> |
399 |
<label for="guarantor_cancel"> </label> |
400 |
<span><a href="#" class="guarantor_cancel">Cancel</a></span> |
401 |
</li> |
402 |
</ol> |
403 |
</fieldset> |
404 |
|
405 |
<fieldset class="rows"> |
406 |
<legend>Add new guarantor</legend> |
407 |
<ol> |
408 |
<input type="hidden" id="guarantor_id" value=""/> |
409 |
|
410 |
[% IF catetory_type == 'P' %] |
411 |
<li> |
412 |
<label for="guarantor_surname">Organization name: </label> |
413 |
<input name="guarantor_surname" id="guarantor_surname" type="hidden" size="20"/> |
414 |
</li> |
380 |
[% ELSE %] |
415 |
[% ELSE %] |
381 |
<option value="0" selected>No</option> |
416 |
<li> |
382 |
<option value="1">Yes</option> |
417 |
<label for="guarantor_surname">Surname: </label> |
|
|
418 |
<input name="guarantor_surname" id="guarantor_surname" type="text" size="20" /> |
419 |
</li> |
420 |
|
421 |
<li> |
422 |
<label for="guarantor_firstname">First name: </label> |
423 |
<input name="guarantor_firstname" id="guarantor_firstname" type="text" size="20" /> |
424 |
</li> |
425 |
|
426 |
[% IF ( possible_relationships ) %] |
427 |
<li> |
428 |
<label for="relationship">Relationship: </label> |
429 |
<select name="relationship" id="relationship" > |
430 |
[% FOREACH pr IN possible_relationships.split('\|') %] |
431 |
<option value="[% pr %]">[% pr %]</option> |
432 |
[% END %] |
433 |
</select> |
434 |
</li> |
435 |
[% END %] |
383 |
[% END %] |
436 |
[% END %] |
384 |
</select> |
|
|
385 |
<div class="hint">Allow guarantor of this patron to view this patron's checkouts from the OPAC</div> |
386 |
</li> |
387 |
[% END %] |
388 |
</ol> |
389 |
</fieldset> |
390 |
|
437 |
|
|
|
438 |
<li> |
439 |
<span class="label"> </span> |
440 |
<a href="#" id="guarantor_add" class="btn btn-small"><i class="fa fa-plus"></i> Add guarantor</a> |
441 |
<a href="#" id="guarantor_search" class="btn btn-small"><i class="fa fa-search"></i> Set to patron</a> |
442 |
<a href="#" id="guarantor_clear">Clear</a> |
443 |
</li> |
444 |
|
445 |
[% IF relationships && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %] |
446 |
<li> |
447 |
<label for="privacy_guarantor_checkouts">Show checkouts to guarantors</label> |
448 |
<select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts"> |
449 |
[% IF privacy_guarantor_checkouts %] |
450 |
<option value="0">No</option> |
451 |
<option value="1" selected>Yes</option> |
452 |
[% ELSE %] |
453 |
<option value="0" selected>No</option> |
454 |
<option value="1">Yes</option> |
455 |
[% END %] |
456 |
</select> |
457 |
<div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div> |
458 |
</li> |
459 |
[% END %] |
460 |
</ol> |
461 |
</fieldset> |
462 |
</fieldset> |
391 |
[% END %] |
463 |
[% END %] |
|
|
464 |
|
392 |
[% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %] |
465 |
[% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %] |
393 |
[% IF Koha.Preference( 'AddressFormat' ) %] |
466 |
[% IF Koha.Preference( 'AddressFormat' ) %] |
394 |
[% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %] |
467 |
[% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %] |
Lines 491-503
$(document).ready(function() {
Link Here
|
491 |
[% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %] |
564 |
[% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %] |
492 |
[% END %] |
565 |
[% END %] |
493 |
[% IF ( step_2 ) %] |
566 |
[% IF ( step_2 ) %] |
494 |
[% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %] |
567 |
[% UNLESS noaltcontactsurname && noaltguarantor_firstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %] |
495 |
[% IF Koha.Preference( 'AddressFormat' ) %] |
568 |
[% IF Koha.Preference( 'AddressFormat' ) %] |
496 |
[% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %] |
569 |
[% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %] |
497 |
[% ELSE %] |
570 |
[% ELSE %] |
498 |
[% INCLUDE 'member-alt-contact-style-us.inc' %] |
571 |
[% INCLUDE 'member-alt-contact-style-us.inc' %] |
499 |
[% END %] |
572 |
[% END %] |
500 |
[% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %] |
573 |
[% END # UNLESS noaltcontactsurname && noaltguarantor_firstname etc %] |
501 |
|
574 |
|
502 |
[% END %] |
575 |
[% END %] |
503 |
[% IF ( step_3 ) %] |
576 |
[% IF ( step_3 ) %] |