View | Details | Raw Unified | Return to bug 23808
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-11 / +46 lines)
Lines 352-359 Link Here
352
                            </li>
352
                            </li>
353
                        [% ELSE %]
353
                        [% ELSE %]
354
                            <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
354
                            <li class="guarantor-details" data-borrowernumber="[% r.guarantor_id | $raw %]">
355
                                <span class="label">Patron #:</span>
355
                                <span class="label">Patron card number:</span>
356
                                <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% r.guarantor_id | uri %]" target="blank">[% r.guarantor_id | html %]</a>
356
                                <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% r.guarantor_id | uri %]" target="blank">[% r.guarantor.cardnumber | html %]</a>
357
                            </li>
357
                            </li>
358
358
359
                            [% IF r.guarantor.surname %]
359
                            [% IF r.guarantor.surname %]
Lines 383-394 Link Here
383
                    </ol>
383
                    </ol>
384
                </fieldset>
384
                </fieldset>
385
            [% END # END relationships foreach %]
385
            [% END # END relationships foreach %]
386
            [% IF guarantor && (!relationships) %]
387
                <fieldset class="rows">
388
                    <ol>
389
                        <li class="guarantor-details" data-borrowernumber="0">
390
                            <span class="label">Patron card number:</span>
391
                            <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber | uri %]" target="blank">[% guarantor.cardnumber | html %]</a>
392
                            <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]"/>
393
                        </li>
394
395
                        <li>
396
                            <label for="guarantor_surname">Surname: </label>
397
                            <span class="new_guarantor_surname_text">[% guarantor.surname | html %]</span>
398
                        </li>
399
400
                        <li>
401
                            <label for="guarantor_firstname">First name: </label>
402
                            <span class="new_guarantor_firstname_text">[% guarantor.firstname | html %]</span>
403
                        </li>
404
405
                        <li>
406
                            <label for="guarantor_relationship">Relationship: </label>
407
                            <select class="new_guarantor_relationship" name="new_guarantor_relationship">
408
                                [% FOREACH pr IN possible_relationships.split('\|') %]
409
                                    <option value="[% pr | html %]">[% pr | html %]</option>
410
                                [% END %]
411
                            </select>
412
                        </li>
413
414
                        <li>
415
                            <label for="guarantor_cancel">&nbsp;</label>
416
                            <span><a href="#" class="guarantor_cancel">Remove</a></span>
417
                        </li>
418
                    </ol>
419
                </fieldset>
420
            [% END %]
386
        </span>
421
        </span>
387
422
388
        <fieldset class="rows guarantor" id="guarantor_template">
423
        <fieldset class="rows guarantor" id="guarantor_template">
389
            <ol>
424
            <ol>
390
                <li class="guarantor-details" data-borrowernumber="0">
425
                <li class="guarantor-details" data-borrowernumber="0">
391
                    <span class="label">Patron #:</span>
426
                    <span class="label">Patron card number:</span>
392
                    <span class="new_guarantor_id_text"></span>
427
                    <span class="new_guarantor_id_text"></span>
393
                    <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
428
                    <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
394
                </li>
429
                </li>
Lines 484-490 Link Here
484
                    <label for="contactname">
519
                    <label for="contactname">
485
                [% END %]
520
                [% END %]
486
                Guarantor surname: </label>
521
                Guarantor surname: </label>
487
                <input type="text" id="contactname" name="contactname" value="[% contactname | html %]" />
522
                <input type="text" id="contactname" name="contactname" value="[% patron.contactname | html %]" />
488
                [% IF ( mandatorycontactname ) %]<span class="required">Required</span>[% END %]<div class="hint">Non-patron guarantor surname</div>
523
                [% IF ( mandatorycontactname ) %]<span class="required">Required</span>[% END %]<div class="hint">Non-patron guarantor surname</div>
489
            </li>
524
            </li>
490
        [% END %]
525
        [% END %]
Lines 497-503 Link Here
497
                    <label for="contactfirstname">
532
                    <label for="contactfirstname">
498
                [% END %]
533
                [% END %]
499
                Guarantor first name: </label>
534
                Guarantor first name: </label>
500
                <input type="text" id="contactfirstname" name="contactfirstname" value="[% contactfirstname | html %]" />
535
                <input type="text" id="contactfirstname" name="contactfirstname" value="[% patron.contactfirstname | html %]" />
501
                [% IF ( mandatorycontactfirstname ) %]<span class="required">Required</span>[% END %]<div class="hint">Non-patron guarantor first name</div>
536
                [% IF ( mandatorycontactfirstname ) %]<span class="required">Required</span>[% END %]<div class="hint">Non-patron guarantor first name</div>
502
            </li>
537
            </li>
503
        [% END %]
538
        [% END %]
Lines 528-534 Link Here
528
                    <label for="phone">
563
                    <label for="phone">
529
                [% END %]
564
                [% END %]
530
                Primary phone: </label>
565
                Primary phone: </label>
531
                <input type="text" id="phone" name="phone" value="[% phone | html %]" />
566
                <input type="text" id="phone" name="phone" value="[% patron.phone | html %]" />
532
                [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
567
                [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
533
            </li>
568
            </li>
534
        [% END %]
569
        [% END %]
Lines 541-547 Link Here
541
                    <label for="phonepro">
576
                    <label for="phonepro">
542
                [% END %]
577
                [% END %]
543
                Secondary phone: </label>
578
                Secondary phone: </label>
544
                <input type="text" id="phonepro" name="phonepro" value="[% phonepro | html %]" />
579
                <input type="text" id="phonepro" name="phonepro" value="[% patron.phonepro | html %]" />
545
                [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
580
                [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
546
            </li>
581
            </li>
547
        [% END %]
582
        [% END %]
Lines 554-560 Link Here
554
                    <label for="mobile">
589
                    <label for="mobile">
555
                [% END %]
590
                [% END %]
556
                Other phone: </label>
591
                Other phone: </label>
557
                <input type="text" id="mobile" name="mobile" value="[% mobile | html %]" />
592
                <input type="text" id="mobile" name="mobile" value="[% patron.mobile | html %]" />
558
                [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
593
                [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
559
            </li>
594
            </li>
560
        [% END %]
595
        [% END %]
Lines 567-573 Link Here
567
                    <label for="email">
602
                    <label for="email">
568
                [% END %]
603
                [% END %]
569
                Primary email: </label>
604
                Primary email: </label>
570
                <input type="text" id="email" name="email" size="45" value="[% email | html %]" />
605
                <input type="text" id="email" name="email" size="45" value="[% patron.email | html %]" />
571
                [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
606
                [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
572
            </li>
607
            </li>
573
        [% END %]
608
        [% END %]
Lines 580-586 Link Here
580
                    <label for="emailpro">
615
                    <label for="emailpro">
581
                [% END %]
616
                [% END %]
582
                Secondary email: </label>
617
                Secondary email: </label>
583
                <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro | html %]" />
618
                <input type="text" id="emailpro" name="emailpro" size="45" value="[% patron.emailpro | html %]" />
584
                [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
619
                [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
585
            </li>
620
            </li>
586
        [% END %]
621
        [% END %]
Lines 593-599 Link Here
593
                    <label for="fax">
628
                    <label for="fax">
594
                [% END %]
629
                [% END %]
595
                Fax: </label>
630
                Fax: </label>
596
                <input type="text" id="fax" name="fax" value="[% fax | html %]" />
631
                <input type="text" id="fax" name="fax" value="[% patron.fax | html %]" />
597
                [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
632
                [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
598
            </li>
633
            </li>
599
        [% END %]
634
        [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/members.js (-1 / +1 lines)
Lines 181-187 function select_user(borrowernumber, borrower, relationship) { Link Here
181
        var guarantor_id = $('#guarantor_id').val();
181
        var guarantor_id = $('#guarantor_id').val();
182
        if ( guarantor_id ) {
182
        if ( guarantor_id ) {
183
            fieldset.find('.new_guarantor_id').first().val( guarantor_id );
183
            fieldset.find('.new_guarantor_id').first().val( guarantor_id );
184
            fieldset.find('.new_guarantor_id_text').first().text( guarantor_id );
184
            fieldset.find('.new_guarantor_id_text').first().text( borrower.cardnumber );
185
        } else {
185
        } else {
186
            fieldset.find('.guarantor_id').first().hide();
186
            fieldset.find('.guarantor_id').first().hide();
187
        }
187
        }
(-)a/members/memberentry.pl (-1 / +13 lines)
Lines 612-617 if (C4::Context->preference("IndependentBranches")) { Link Here
612
    }
612
    }
613
}
613
}
614
if ($op eq 'add'){
614
if ($op eq 'add'){
615
    if ($guarantor_id) {
616
        foreach (
617
            qw(
618
                streetnumber address streettype address2 zipcode country city state phone phonepro mobile
619
                fax email emailpro branchcode
620
                B_streetnumber B_streettype B_address B_address2
621
                B_city B_state B_zipcode B_country B_email B_phone
622
            )
623
          )
624
        {
625
            $newdata{$_} = $guarantor->$_;
626
        }
627
    }
615
    $template->param( updtype => 'I', step_1=>1, step_2=>1, step_3=>1, step_4=>1, step_5 => 1, step_6 => 1, step_7 => 1);
628
    $template->param( updtype => 'I', step_1=>1, step_2=>1, step_3=>1, step_4=>1, step_5 => 1, step_6 => 1, step_7 => 1);
616
}
629
}
617
if ($op eq "modify")  {
630
if ($op eq "modify")  {
618
- 

Return to bug 23808