Lines 1-4
Link Here
|
1 |
[% USE Asset %] |
1 |
[% USE Asset %] |
|
|
2 |
[% USE To %] |
2 |
[% USE Koha %] |
3 |
[% USE Koha %] |
3 |
[% USE KohaDates %] |
4 |
[% USE KohaDates %] |
4 |
[% USE Branches %] |
5 |
[% USE Branches %] |
Lines 297-409
Link Here
|
297 |
</fieldset> |
298 |
</fieldset> |
298 |
[% END # hide fieldset %] |
299 |
[% END # hide fieldset %] |
299 |
|
300 |
|
300 |
[% IF ( showguarantor ) %] |
301 |
[% IF show_guarantor || guarantor %] |
301 |
<input type="hidden" id="guarantorid" name="guarantorid" value="[% guarantorid %]" /> |
302 |
[% SET possible_relationships = Koha.Preference('borrowerRelationship') %] |
302 |
[% UNLESS step_6 %] |
303 |
<fieldset class="rows"> |
303 |
<input type="hidden" name="branchcode" value="[% branchcode %]" /> |
304 |
<legend>Guarantor information</legend> |
304 |
[% END %] |
305 |
|
305 |
<fieldset id="memberentry_guarantor" class="rows"> |
306 |
<span id="guarantor_relationships"> |
306 |
<legend id="guarantor_lgd">Guarantor information</legend> |
307 |
[% FOREACH r IN relationships %] |
307 |
<ol> |
308 |
<fieldset class="rows"> |
308 |
[% IF ( P ) %] |
309 |
<ol> |
309 |
[% IF ( guarantorid ) %] |
310 |
[% IF category_type == 'P' %] |
310 |
<li id="contact-details"> |
311 |
<li id="contact-details"> |
311 |
[% ELSE %] |
312 |
<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 %] |
312 |
<li id="contact-details" style="display: none"> |
313 |
</li> |
313 |
[% END %] |
314 |
|
314 |
<span class="label">Organization #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %] |
315 |
<li> |
315 |
</li> |
316 |
<label for="guarantor_surname">Organization name: </label> |
316 |
<li> |
317 |
<span>[% r.guarantor.surname %]</span> |
317 |
<label for="contactname">Organization name: </label> |
318 |
</li> |
318 |
[% IF ( guarantorid ) %] |
319 |
[% ELSE %] |
319 |
<span>[% contactname %]</span> |
320 |
<li id="contact-details"> |
320 |
<input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname | html %]" /> |
321 |
<span class="label">Patron #:</span> |
321 |
[% ELSE %] |
322 |
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% r.guarantor_id %]" target="blank">[% r.guarantor_id %]</a> |
322 |
<input name="contactname" id="contactname" type="text" size="20" value="[% contactname | html %]" /> |
323 |
</li> |
323 |
[% END %] |
324 |
|
324 |
</li> |
325 |
[% IF r.guarantor.surname %] |
325 |
[% ELSE %] |
326 |
<li> |
326 |
[% IF ( C ) %] |
327 |
<label for="guarantor_surname">Surname: </label> |
327 |
[% IF ( guarantorid ) %] |
328 |
<span>[% r.guarantor.surname %]</span> |
328 |
<li id="contact-details"> |
329 |
</li> |
329 |
[% ELSE %] |
330 |
[% END %] |
330 |
<li id="contact-details" style="display: none"> |
331 |
|
331 |
[% END %] |
332 |
[% IF r.guarantor.firstname %] |
332 |
<span class="label">Patron #:</span> |
333 |
<li> |
333 |
[% IF guarantorid %] |
334 |
<label for="guarantor_firstname">First name: </label> |
334 |
[% IF logged_in_user.can_see_patron_infos( guarantor ) %] |
335 |
<span>[% r.guarantor.firstname %]</span> |
335 |
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid | html %]</a> |
336 |
</li> |
336 |
[% ELSE %] |
337 |
[% END %] |
337 |
[% guarantorid | html %] |
338 |
|
338 |
[% END %] |
339 |
<li> |
339 |
[% END %] |
340 |
<label for="relationship">Relationship: </label> |
340 |
</li> |
341 |
<span>[% r.relationship %]</span> |
341 |
[% UNLESS nocontactname %] |
342 |
</li> |
342 |
<li> |
343 |
|
343 |
<label for="contactname">Surname: </label> |
344 |
<li> |
344 |
[% IF ( guarantorid ) %] |
345 |
<label for="delete_guarantor-[% r.id %]">Delete: </label> |
345 |
<span>[% contactname %]</span> |
346 |
<input type="checkbox" id="delete_guarantor-[% r.id %]" name="delete_guarantor" value="[% r.id %]" /> |
346 |
<input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname | html %]" /> |
347 |
</li> |
347 |
[% ELSE %] |
348 |
[% END %] |
348 |
<input name="contactname" id="contactname" type="text" size="20" value="[% contactname | html %]" /> |
349 |
</ol> |
349 |
[% END %] |
350 |
</fieldset> |
350 |
</li> |
351 |
[% END # END relationships foreach %] |
351 |
[% END %] |
352 |
</span> |
352 |
[% UNLESS nocontactfirstname %] |
353 |
|
353 |
<li> |
354 |
<fieldset class="rows guarantor" id="guarantor_template"> |
354 |
<label for="contactfirstname">First name: </label> |
355 |
<ol> |
355 |
[% IF ( guarantorid ) %] |
356 |
<li class="guarantor_id"> |
356 |
<span>[% contactfirstname %]</span> |
357 |
<span class="label">Patron #:</span> |
357 |
<input name="contactfirstname" id="contactfirstname" type="hidden" size="20" value="[% contactfirstname | html %]" /> |
358 |
<span class="new_guarantor_id_text"></span> |
358 |
[% ELSE %] |
359 |
<input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/> |
359 |
<input name="contactfirstname" id="contactfirstname" type="text" size="20" value="[% contactfirstname | html %]" /> |
360 |
</li> |
360 |
[% END %] |
361 |
|
361 |
</li> |
362 |
<li> |
362 |
[% END %] |
363 |
<label for="guarantor_surname">Surname: </label> |
363 |
[% IF ( relshiploop ) %] |
364 |
<span class="new_guarantor_surname_text"></span> |
364 |
<li> |
365 |
<input type="hidden" class="new_guarantor_surname" name="new_guarantor_surname" value=""/> |
365 |
<label for="relationship">Relationship: </label> |
366 |
</li> |
366 |
<select name="relationship" id="relationship" > |
367 |
|
367 |
[% FOREACH relshiploo IN relshiploop %] |
368 |
<li> |
368 |
[% IF ( relshiploo.selected ) %] |
369 |
<label for="guarantor_firstname">First name: </label> |
369 |
<option value="[% relshiploo.relationship %]" selected="selected" >[% relshiploo.relationship %]</option> |
370 |
<span class="new_guarantor_firstname_text"></span> |
370 |
[% ELSE %] |
371 |
<input type="hidden" class="new_guarantor_firstname" name="new_guarantor_firstname" value=""/> |
371 |
<option value="[% relshiploo.relationship %]">[% relshiploo.relationship %]</option> |
372 |
</li> |
372 |
[% END %] |
373 |
|
373 |
[% END %] |
374 |
<li> |
374 |
</select> |
375 |
<label for="guarantor_relationship">Relationship: </label> |
375 |
</li> |
376 |
<select class="new_guarantor_relationship" name="new_guarantor_relationship"> |
376 |
[% END %] |
377 |
[% FOREACH pr IN possible_relationships.split('\|') %] |
377 |
[% END %] |
378 |
<option value="[% pr %]">[% pr %]</option> |
378 |
[% END %] |
379 |
[% END %] |
379 |
<li> |
380 |
</select> |
380 |
<span class="label"> </span> |
381 |
</li> |
381 |
[% IF ( guarantorid ) %] |
382 |
|
382 |
<input id="guarantorsearch" type="button" value="Change" onclick="Dopopguarantor('guarantor_search.pl');" /> |
383 |
<li> |
383 |
[% ELSE %] |
384 |
<label for="guarantor_cancel"> </label> |
384 |
<input id="guarantorsearch" type="button" value="Set to patron" onclick="Dopopguarantor('guarantor_search.pl');" /> |
385 |
<span><a href="#" class="guarantor_cancel">Cancel</a></span> |
385 |
[% END %] |
386 |
</li> |
386 |
<input id="guarantordelete" type="button" value="Delete" /> |
387 |
</ol> |
387 |
</li> |
388 |
</fieldset> |
388 |
[% IF guarantorid && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %] |
389 |
|
389 |
<li> |
390 |
<ol> |
390 |
<label for="privacy_guarantor_checkouts">Show checkouts to guarantor</label> |
391 |
<input type="hidden" id="guarantor_id" value="" /> |
391 |
<select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts"> |
392 |
<input name="guarantor_surname" id="guarantor_surname" type="hidden" /> |
392 |
[% IF privacy_guarantor_checkouts %] |
393 |
<input name="guarantor_firstname" id="guarantor_firstname" type="hidden" /> |
393 |
<option value="0">No</option> |
394 |
|
394 |
<option value="1" selected>Yes</option> |
395 |
<li> |
395 |
[% ELSE %] |
396 |
<a href="#" id="guarantor_search" class="btn btn-sm"><i class="fa fa-search"></i> Search</a> |
396 |
<option value="0" selected>No</option> |
397 |
</li> |
397 |
<option value="1">Yes</option> |
398 |
|
|
|
399 |
[% IF relationships && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %] |
400 |
<li> |
401 |
<label for="privacy_guarantor_checkouts">Show checkouts to guarantors</label> |
402 |
<select name="privacy_guarantor_checkouts" id="privacy_guarantor_checkouts"> |
403 |
[% IF privacy_guarantor_checkouts %] |
404 |
<option value="0">No</option> |
405 |
<option value="1" selected>Yes</option> |
406 |
[% ELSE %] |
407 |
<option value="0" selected>No</option> |
408 |
<option value="1">Yes</option> |
409 |
[% END %] |
410 |
</select> |
411 |
<div class="hint">Allow guarantors of this patron to view this patron's checkouts from the OPAC</div> |
412 |
</li> |
398 |
[% END %] |
413 |
[% END %] |
399 |
</select> |
414 |
</ol> |
400 |
<div class="hint">Allow guarantor of this patron to view this patron's checkouts from the OPAC</div> |
|
|
401 |
</li> |
402 |
[% END %] |
403 |
</ol> |
404 |
</fieldset> |
415 |
</fieldset> |
405 |
|
|
|
406 |
[% END %] |
416 |
[% END %] |
|
|
417 |
|
418 |
|
407 |
[% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %] |
419 |
[% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %] |
408 |
[% IF Koha.Preference( 'AddressFormat' ) %] |
420 |
[% IF Koha.Preference( 'AddressFormat' ) %] |
409 |
[% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %] |
421 |
[% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %] |
Lines 413-496
Link Here
|
413 |
[% END # nostreet && nocity etc group%] |
425 |
[% END # nostreet && nocity etc group%] |
414 |
|
426 |
|
415 |
[% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %] |
427 |
[% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %] |
416 |
<fieldset class="rows" id="memberentry_contact"> |
428 |
<fieldset class="rows" id="memberentry_contact"> |
417 |
<legend id="contact_lgd">Contact</legend><ol> |
429 |
<legend id="contact_lgd">Contact</legend><ol> |
418 |
[% UNLESS nophone %] |
|
|
419 |
<li> |
420 |
[% IF ( mandatoryphone ) %] |
421 |
<label for="phone" class="required"> |
422 |
[% ELSE %] |
423 |
<label for="phone"> |
424 |
[% END %] |
425 |
Primary phone: </label> |
426 |
<input type="text" id="phone" name="phone" value="[% phone | html %]" /> |
427 |
[% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div> |
428 |
|
430 |
|
429 |
</li> |
431 |
[% UNLESS nocontactname %] |
|
|
432 |
<li> |
433 |
[% IF ( mandatorycontactname ) %] |
434 |
<label for="contactname" class="required"> |
435 |
[% ELSE %] |
436 |
<label for="contactname"> |
437 |
[% END %] |
438 |
Guarantor surname: </label> |
439 |
<input type="text" id="contactname" name="contactname" value="[% contactname | html %]" /> |
440 |
[% IF ( mandatorycontactname ) %]<span class="required">Required</span>[% END %]<div class="hint">Non-patron guarantor surname</div> |
441 |
</li> |
430 |
[% END %] |
442 |
[% END %] |
|
|
443 |
|
444 |
[% UNLESS nocontactfirstname %] |
445 |
<li> |
446 |
[% IF ( mandatorycontactfirstname ) %] |
447 |
<label for="contactfirstname" class="required"> |
448 |
[% ELSE %] |
449 |
<label for="contactfirstname"> |
450 |
[% END %] |
451 |
Guarantor first name: </label> |
452 |
<input type="text" id="contactfirstname" name="contactfirstname" value="[% contactfirstname | html %]" /> |
453 |
[% IF ( mandatorycontactfirstname ) %]<span class="required">Required</span>[% END %]<div class="hint">Non-patron guarantor first name</div> |
454 |
</li> |
455 |
[% END %] |
456 |
|
457 |
[% UNLESS norelationship %] |
458 |
[% IF possible_relationships %] |
459 |
<li> |
460 |
<label for="relationship">Relationship: </label> |
461 |
<select class="relationship" name="relationship"> |
462 |
<option value=""></option> |
463 |
[% FOREACH pr IN possible_relationships.split('\|') %] |
464 |
[% IF pr == relationship %] |
465 |
<option value="[% pr %]" selected="selected">[% pr %]</option> |
466 |
[% ELSE %] |
467 |
<option value="[% pr %]">[% pr %]</option> |
468 |
[% END %] |
469 |
[% END %] |
470 |
</select> |
471 |
</li> |
472 |
[% END %] |
473 |
[% END %] |
474 |
|
475 |
[% UNLESS nophone %] |
476 |
<li> |
477 |
[% IF ( mandatoryphone ) %] |
478 |
<label for="phone" class="required"> |
479 |
[% ELSE %] |
480 |
<label for="phone"> |
481 |
[% END %] |
482 |
Primary phone: </label> |
483 |
<input type="text" id="phone" name="phone" value="[% phone | html %]" /> |
484 |
[% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div> |
485 |
</li> |
486 |
[% END %] |
487 |
|
431 |
[% UNLESS nophonepro %] |
488 |
[% UNLESS nophonepro %] |
432 |
<li> |
489 |
<li> |
433 |
[% IF ( mandatoryphonepro ) %] |
490 |
[% IF ( mandatoryphonepro ) %] |
434 |
<label for="phonepro" class="required"> |
491 |
<label for="phonepro" class="required"> |
435 |
[% ELSE %] |
492 |
[% ELSE %] |
436 |
<label for="phonepro"> |
493 |
<label for="phonepro"> |
437 |
[% END %] |
494 |
[% END %] |
438 |
Secondary phone: </label> |
495 |
Secondary phone: </label> |
439 |
<input type="text" id="phonepro" name="phonepro" value="[% phonepro | html %]" /> |
496 |
<input type="text" id="phonepro" name="phonepro" value="[% phonepro | html %]" /> |
440 |
[% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %] |
497 |
[% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %] |
441 |
</li> |
498 |
</li> |
442 |
[% END %] |
499 |
[% END %] |
|
|
500 |
|
443 |
[% UNLESS nomobile %] |
501 |
[% UNLESS nomobile %] |
444 |
<li> |
502 |
<li> |
445 |
[% IF ( mandatorymobile ) %] |
503 |
[% IF ( mandatorymobile ) %] |
446 |
<label for="mobile" class="required"> |
504 |
<label for="mobile" class="required"> |
447 |
[% ELSE %] |
505 |
[% ELSE %] |
448 |
<label for="mobile"> |
506 |
<label for="mobile"> |
449 |
[% END %] |
507 |
[% END %] |
450 |
Other phone: </label> |
508 |
Other phone: </label> |
451 |
<input type="text" id="mobile" name="mobile" value="[% mobile | html %]" /> |
509 |
<input type="text" id="mobile" name="mobile" value="[% mobile | html %]" /> |
452 |
[% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %] |
510 |
[% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %] |
453 |
</li> |
511 |
</li> |
454 |
[% END %] |
512 |
[% END %] |
455 |
[% UNLESS noemail %] |
|
|
456 |
<li> |
457 |
[% IF ( mandatoryemail ) %] |
458 |
<label for="email" class="required"> |
459 |
[% ELSE %] |
460 |
<label for="email"> |
461 |
[% END %] |
462 |
Primary email: </label> |
463 |
<input type="text" id="email" name="email" size="45" value="[% email | html %]" /> |
464 |
[% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div> |
465 |
|
513 |
|
466 |
</li> |
514 |
[% UNLESS noemail %] |
|
|
515 |
<li> |
516 |
[% IF ( mandatoryemail ) %] |
517 |
<label for="email" class="required"> |
518 |
[% ELSE %] |
519 |
<label for="email"> |
520 |
[% END %] |
521 |
Primary email: </label> |
522 |
<input type="text" id="email" name="email" size="45" value="[% email | html %]" /> |
523 |
[% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div> |
524 |
</li> |
467 |
[% END %] |
525 |
[% END %] |
|
|
526 |
|
468 |
[% UNLESS noemailpro %] |
527 |
[% UNLESS noemailpro %] |
469 |
<li> |
528 |
<li> |
470 |
[% IF ( mandatoryemailpro ) %] |
529 |
[% IF ( mandatoryemailpro ) %] |
471 |
<label for="emailpro" class="required"> |
530 |
<label for="emailpro" class="required"> |
472 |
[% ELSE %] |
531 |
[% ELSE %] |
473 |
<label for="emailpro"> |
532 |
<label for="emailpro"> |
474 |
[% END %] |
533 |
[% END %] |
475 |
Secondary email: </label> |
534 |
Secondary email: </label> |
476 |
<input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro | html %]" /> |
535 |
<input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro | html %]" /> |
477 |
[% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %] |
536 |
[% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %] |
478 |
</li> |
537 |
</li> |
479 |
[% END %] |
538 |
[% END %] |
|
|
539 |
|
480 |
[% UNLESS nofax %] |
540 |
[% UNLESS nofax %] |
481 |
<li> |
541 |
<li> |
482 |
[% IF ( mandatoryfax ) %] |
542 |
[% IF ( mandatoryfax ) %] |
483 |
<label for="fax" class="required"> |
543 |
<label for="fax" class="required"> |
484 |
[% ELSE %] |
544 |
[% ELSE %] |
485 |
<label for="fax"> |
545 |
<label for="fax"> |
486 |
[% END %] |
546 |
[% END %] |
487 |
Fax: </label> |
547 |
Fax: </label> |
488 |
<input type="text" id="fax" name="fax" value="[% fax | html %]" /> |
548 |
<input type="text" id="fax" name="fax" value="[% fax | html %]" /> |
489 |
[% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %] |
549 |
[% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %] |
490 |
</li> |
550 |
</li> |
491 |
[% END %] |
551 |
[% END %] |
492 |
</ol> |
552 |
</ol> |
493 |
</fieldset> |
553 |
</fieldset> |
494 |
[%END # hide fieldset %] |
554 |
[%END # hide fieldset %] |
495 |
|
555 |
|
496 |
<!-- ************************ STEP_1 *********************** --> |
556 |
<!-- ************************ STEP_1 *********************** --> |
Lines 1193-1198
Link Here
|
1193 |
update_category_code( category_code ); |
1253 |
update_category_code( category_code ); |
1194 |
} |
1254 |
} |
1195 |
[% END %] |
1255 |
[% END %] |
|
|
1256 |
|
1257 |
[% IF guarantor %] |
1258 |
select_user( '[% guarantor.borrowernumber %]', [% To.json( guarantor.unblessed ) %] ); |
1259 |
[% END %] |
1260 |
|
1196 |
}); |
1261 |
}); |
1197 |
|
1262 |
|
1198 |
function update_cardnumber_warning(size){ |
1263 |
function update_cardnumber_warning(size){ |