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