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