Lines 308-352
Link Here
|
308 |
<fieldset class="rows"> |
308 |
<fieldset class="rows"> |
309 |
<ol> |
309 |
<ol> |
310 |
[% IF category_type == 'P' %] |
310 |
[% IF category_type == 'P' %] |
311 |
[% IF ( r.guarantor_id ) %] |
311 |
<li id="contact-details"> |
312 |
<li id="contact-details"> |
|
|
313 |
[% ELSE %] |
314 |
<li id="contact-details" style="display: none"> |
315 |
[% END %] |
316 |
<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 |
<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 %] |
317 |
</li> |
313 |
</li> |
318 |
|
314 |
|
319 |
<li> |
315 |
<li> |
320 |
<label for="guarantor_surname">Organization name: </label> |
316 |
<label for="guarantor_surname">Organization name: </label> |
321 |
[% IF ( r.guarantor_id ) %] |
317 |
<span>[% r.guarantor.surname %]</span> |
322 |
<span>[% r.guarantor.surname %]</span> |
|
|
323 |
[% END %] |
324 |
</li> |
318 |
</li> |
325 |
[% ELSE %] |
319 |
[% ELSE %] |
326 |
[% IF ( r.guarantor_id ) %] |
320 |
<li id="contact-details"> |
327 |
<li id="contact-details"> |
|
|
328 |
[% ELSE %] |
329 |
<li id="contact-details" style="display: none"> |
330 |
[% END %] |
331 |
|
332 |
<span class="label">Patron #:</span> |
321 |
<span class="label">Patron #:</span> |
333 |
[% IF ( r.guarantor_id ) %] |
322 |
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% r.guarantor_id %]" target="blank">[% r.guarantor_id %]</a> |
334 |
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% r.guarantor_id %]" target="blank">[% r.guarantor_id %]</a> |
|
|
335 |
[% END %] |
336 |
|
337 |
</li> |
323 |
</li> |
338 |
|
324 |
|
339 |
[% IF r.surname || r.guarantor.surname %] |
325 |
[% IF r.guarantor.surname %] |
340 |
<li> |
326 |
<li> |
341 |
<label for="guarantor_surname">Surname: </label> |
327 |
<label for="guarantor_surname">Surname: </label> |
342 |
<span>[% r.surname || r.guarantor.surname %]</span> |
328 |
<span>[% r.guarantor.surname %]</span> |
343 |
</li> |
329 |
</li> |
344 |
[% END %] |
330 |
[% END %] |
345 |
|
331 |
|
346 |
[% IF r.firstname || r.guarantor.firstname %] |
332 |
[% IF r.guarantor.firstname %] |
347 |
<li> |
333 |
<li> |
348 |
<label for="guarantor_firstname">First name: </label> |
334 |
<label for="guarantor_firstname">First name: </label> |
349 |
<span>[% r.firstname || r.guarantor.firstname %]</span> |
335 |
<span>[% r.guarantor.firstname %]</span> |
350 |
</li> |
336 |
</li> |
351 |
[% END %] |
337 |
[% END %] |
352 |
|
338 |
|
Lines 401-444
Link Here
|
401 |
</ol> |
387 |
</ol> |
402 |
</fieldset> |
388 |
</fieldset> |
403 |
|
389 |
|
404 |
<fieldset class="rows"> |
|
|
405 |
<legend>Add new guarantor</legend> |
406 |
<ol> |
390 |
<ol> |
407 |
<input type="hidden" id="guarantor_id" value=""/> |
391 |
<input type="hidden" id="guarantor_id" value="" /> |
408 |
|
392 |
<input name="guarantor_surname" id="guarantor_surname" type="hidden" /> |
409 |
[% IF catetory_type == 'P' %] |
393 |
<input name="guarantor_firstname" id="guarantor_firstname" type="hidden" /> |
410 |
<li> |
|
|
411 |
<label for="guarantor_surname">Organization name: </label> |
412 |
<input name="guarantor_surname" id="guarantor_surname" type="hidden" size="20"/> |
413 |
</li> |
414 |
[% ELSE %] |
415 |
<li> |
416 |
<label for="guarantor_surname">Surname: </label> |
417 |
<input name="guarantor_surname" id="guarantor_surname" type="text" size="20" /> |
418 |
</li> |
419 |
|
420 |
<li> |
421 |
<label for="guarantor_firstname">First name: </label> |
422 |
<input name="guarantor_firstname" id="guarantor_firstname" type="text" size="20" /> |
423 |
</li> |
424 |
|
425 |
[% IF ( possible_relationships ) %] |
426 |
<li> |
427 |
<label for="relationship">Relationship: </label> |
428 |
<select name="relationship" id="relationship" > |
429 |
[% FOREACH pr IN possible_relationships.split('\|') %] |
430 |
<option value="[% pr %]">[% pr %]</option> |
431 |
[% END %] |
432 |
</select> |
433 |
</li> |
434 |
[% END %] |
435 |
[% END %] |
436 |
|
394 |
|
437 |
<li> |
395 |
<li> |
438 |
<span class="label"> </span> |
396 |
<a href="#" id="guarantor_search" class="btn btn-sm"><i class="fa fa-search"></i> Search</a> |
439 |
<a href="#" id="guarantor_add" class="btn btn-sm"><i class="fa fa-plus"></i> Add guarantor</a> |
|
|
440 |
<a href="#" id="guarantor_search" class="btn btn-sm"><i class="fa fa-search"></i> Set to patron</a> |
441 |
<a href="#" id="guarantor_clear">Clear</a> |
442 |
</li> |
397 |
</li> |
443 |
|
398 |
|
444 |
[% IF relationships && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %] |
399 |
[% IF relationships && Koha.Preference('AllowStaffToSetCheckoutsVisibilityForGuarantor') %] |
Lines 457-463
Link Here
|
457 |
</li> |
412 |
</li> |
458 |
[% END %] |
413 |
[% END %] |
459 |
</ol> |
414 |
</ol> |
460 |
</fieldset> |
|
|
461 |
</fieldset> |
415 |
</fieldset> |
462 |
[% END %] |
416 |
[% END %] |
463 |
|
417 |
|
Lines 471-554
Link Here
|
471 |
[% END # nostreet && nocity etc group%] |
425 |
[% END # nostreet && nocity etc group%] |
472 |
|
426 |
|
473 |
[% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %] |
427 |
[% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %] |
474 |
<fieldset class="rows" id="memberentry_contact"> |
428 |
<fieldset class="rows" id="memberentry_contact"> |
475 |
<legend id="contact_lgd">Contact</legend><ol> |
429 |
<legend id="contact_lgd">Contact</legend><ol> |
476 |
[% UNLESS nophone %] |
|
|
477 |
<li> |
478 |
[% IF ( mandatoryphone ) %] |
479 |
<label for="phone" class="required"> |
480 |
[% ELSE %] |
481 |
<label for="phone"> |
482 |
[% END %] |
483 |
Primary phone: </label> |
484 |
<input type="text" id="phone" name="phone" value="[% phone | html %]" /> |
485 |
[% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div> |
486 |
|
430 |
|
487 |
</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> |
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> |
488 |
[% END %] |
486 |
[% END %] |
|
|
487 |
|
489 |
[% UNLESS nophonepro %] |
488 |
[% UNLESS nophonepro %] |
490 |
<li> |
489 |
<li> |
491 |
[% IF ( mandatoryphonepro ) %] |
490 |
[% IF ( mandatoryphonepro ) %] |
492 |
<label for="phonepro" class="required"> |
491 |
<label for="phonepro" class="required"> |
493 |
[% ELSE %] |
492 |
[% ELSE %] |
494 |
<label for="phonepro"> |
493 |
<label for="phonepro"> |
495 |
[% END %] |
494 |
[% END %] |
496 |
Secondary phone: </label> |
495 |
Secondary phone: </label> |
497 |
<input type="text" id="phonepro" name="phonepro" value="[% phonepro | html %]" /> |
496 |
<input type="text" id="phonepro" name="phonepro" value="[% phonepro | html %]" /> |
498 |
[% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %] |
497 |
[% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %] |
499 |
</li> |
498 |
</li> |
500 |
[% END %] |
499 |
[% END %] |
|
|
500 |
|
501 |
[% UNLESS nomobile %] |
501 |
[% UNLESS nomobile %] |
502 |
<li> |
502 |
<li> |
503 |
[% IF ( mandatorymobile ) %] |
503 |
[% IF ( mandatorymobile ) %] |
504 |
<label for="mobile" class="required"> |
504 |
<label for="mobile" class="required"> |
505 |
[% ELSE %] |
505 |
[% ELSE %] |
506 |
<label for="mobile"> |
506 |
<label for="mobile"> |
507 |
[% END %] |
507 |
[% END %] |
508 |
Other phone: </label> |
508 |
Other phone: </label> |
509 |
<input type="text" id="mobile" name="mobile" value="[% mobile | html %]" /> |
509 |
<input type="text" id="mobile" name="mobile" value="[% mobile | html %]" /> |
510 |
[% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %] |
510 |
[% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %] |
511 |
</li> |
511 |
</li> |
512 |
[% END %] |
512 |
[% END %] |
513 |
[% UNLESS noemail %] |
|
|
514 |
<li> |
515 |
[% IF ( mandatoryemail ) %] |
516 |
<label for="email" class="required"> |
517 |
[% ELSE %] |
518 |
<label for="email"> |
519 |
[% END %] |
520 |
Primary email: </label> |
521 |
<input type="text" id="email" name="email" size="45" value="[% email | html %]" /> |
522 |
[% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div> |
523 |
|
513 |
|
524 |
</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> |
525 |
[% END %] |
525 |
[% END %] |
|
|
526 |
|
526 |
[% UNLESS noemailpro %] |
527 |
[% UNLESS noemailpro %] |
527 |
<li> |
528 |
<li> |
528 |
[% IF ( mandatoryemailpro ) %] |
529 |
[% IF ( mandatoryemailpro ) %] |
529 |
<label for="emailpro" class="required"> |
530 |
<label for="emailpro" class="required"> |
530 |
[% ELSE %] |
531 |
[% ELSE %] |
531 |
<label for="emailpro"> |
532 |
<label for="emailpro"> |
532 |
[% END %] |
533 |
[% END %] |
533 |
Secondary email: </label> |
534 |
Secondary email: </label> |
534 |
<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 %]" /> |
535 |
[% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %] |
536 |
[% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %] |
536 |
</li> |
537 |
</li> |
537 |
[% END %] |
538 |
[% END %] |
|
|
539 |
|
538 |
[% UNLESS nofax %] |
540 |
[% UNLESS nofax %] |
539 |
<li> |
541 |
<li> |
540 |
[% IF ( mandatoryfax ) %] |
542 |
[% IF ( mandatoryfax ) %] |
541 |
<label for="fax" class="required"> |
543 |
<label for="fax" class="required"> |
542 |
[% ELSE %] |
544 |
[% ELSE %] |
543 |
<label for="fax"> |
545 |
<label for="fax"> |
544 |
[% END %] |
546 |
[% END %] |
545 |
Fax: </label> |
547 |
Fax: </label> |
546 |
<input type="text" id="fax" name="fax" value="[% fax | html %]" /> |
548 |
<input type="text" id="fax" name="fax" value="[% fax | html %]" /> |
547 |
[% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %] |
549 |
[% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %] |
548 |
</li> |
550 |
</li> |
549 |
[% END %] |
551 |
[% END %] |
550 |
</ol> |
552 |
</ol> |
551 |
</fieldset> |
553 |
</fieldset> |
552 |
[%END # hide fieldset %] |
554 |
[%END # hide fieldset %] |
553 |
|
555 |
|
554 |
<!-- ************************ STEP_1 *********************** --> |
556 |
<!-- ************************ STEP_1 *********************** --> |
Lines 1254-1262
Link Here
|
1254 |
|
1256 |
|
1255 |
[% IF guarantor %] |
1257 |
[% IF guarantor %] |
1256 |
select_user( '[% guarantor.borrowernumber %]', [% To.json( guarantor.unblessed ) %] ); |
1258 |
select_user( '[% guarantor.borrowernumber %]', [% To.json( guarantor.unblessed ) %] ); |
1257 |
$('#guarantor_add').ready(function() { |
|
|
1258 |
$('#guarantor_add').click(); |
1259 |
}); |
1260 |
[% END %] |
1259 |
[% END %] |
1261 |
|
1260 |
|
1262 |
}); |
1261 |
}); |