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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (-1 / +1 lines)
Lines 328-334 Patrons: Link Here
328
         - "Guarantors can be the following of those they guarantee:"
328
         - "Guarantors can be the following of those they guarantee:"
329
         - pref: borrowerRelationship
329
         - pref: borrowerRelationship
330
           class: multi
330
           class: multi
331
         - (input multiple choices separated by |). Leave empty to deactivate.
331
         - (input multiple choices separated by |).
332
     -
332
     -
333
         - "When adding a guarantee to a guarantor, whether it's from the guarantor's form or the guarantee's form, fill the following fields in the guarantee's member entry form from the guarantors record:"
333
         - "When adding a guarantee to a guarantor, whether it's from the guarantor's form or the guarantee's form, fill the following fields in the guarantee's member entry form from the guarantors record:"
334
         - pref: PrefillGuaranteeField
334
         - pref: PrefillGuaranteeField
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-21 / +29 lines)
Lines 508-516 legend:hover { Link Here
508
                                                                <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]"/>
508
                                                                <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value="[% guarantor.borrowernumber | html %]"/>
509
                                                            </li>
509
                                                            </li>
510
510
511
                                                            [% IF possible_relationships %]
511
                                                            [% UNLESS norelationship %]
512
                                                                <li>
512
                                                                <li>
513
                                                                    [% UNLESS empty_relationship_allowed %]
513
                                                                    [% IF mandatoryrelationship %]
514
                                                                        <label for="guarantor_relationship" class="required">Relationship: </label>
514
                                                                        <label for="guarantor_relationship" class="required">Relationship: </label>
515
                                                                        <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
515
                                                                        <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
516
                                                                    [% ELSE %]
516
                                                                    [% ELSE %]
Lines 524-530 legend:hover { Link Here
524
                                                                            [% END %]
524
                                                                            [% END %]
525
                                                                        [% END %]
525
                                                                        [% END %]
526
                                                                    </select>
526
                                                                    </select>
527
                                                                    [% UNLESS empty_relationship_allowed %]
527
                                                                    [% UNLESS mandatoryrelationship %]
528
                                                                        <span class="required">Required</span>
528
                                                                        <span class="required">Required</span>
529
                                                                    [% END %]
529
                                                                    [% END %]
530
                                                                </li>
530
                                                                </li>
Lines 552-560 legend:hover { Link Here
552
                                                        <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
552
                                                        <input type="hidden" class="new_guarantor_id" name="new_guarantor_id" value=""/>
553
                                                    </li>
553
                                                    </li>
554
554
555
                                                    [% IF possible_relationships %]
555
                                                    [% UNLESS norelationship %]
556
                                                        <li>
556
                                                        <li>
557
                                                            [% UNLESS empty_relationship_allowed %]
557
                                                            [% IF mandatoryrelationship %]
558
                                                                <label for="guarantor_relationship" class="required">Relationship: </label>
558
                                                                <label for="guarantor_relationship" class="required">Relationship: </label>
559
                                                                <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
559
                                                                <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
560
                                                            [% ELSE %]
560
                                                            [% ELSE %]
Lines 568-574 legend:hover { Link Here
568
                                                                    [% END %]
568
                                                                    [% END %]
569
                                                                [% END %]
569
                                                                [% END %]
570
                                                            </select>
570
                                                            </select>
571
                                                            [% UNLESS empty_relationship_allowed %]
571
                                                            [% IF mandatoryrelationship %]
572
                                                                <span class="required">Required</span>
572
                                                                <span class="required">Required</span>
573
                                                            [% END %]
573
                                                            [% END %]
574
                                                        </li>
574
                                                        </li>
Lines 665-685 legend:hover { Link Here
665
                                                [% END # /UNLESS noaltcontactfirstname %]
665
                                                [% END # /UNLESS noaltcontactfirstname %]
666
666
667
                                                [% UNLESS norelationship %]
667
                                                [% UNLESS norelationship %]
668
                                                    [% IF possible_relationships %]
668
                                                    <li>
669
                                                        <li>
669
                                                        [% IF mandatoryrelationship %]
670
                                                            <label for="relationship" class="required">Relationship: </label>
671
                                                            <select class="relationship" name="relationship" required="required">
672
                                                        [% ELSE %]
670
                                                            <label for="relationship">Relationship: </label>
673
                                                            <label for="relationship">Relationship: </label>
671
                                                            <select class="relationship" name="relationship">
674
                                                            <select class="relationship" name="relationship">
672
                                                                <option value=""></option>
675
                                                        [% END %]
673
                                                                [% FOREACH pr IN possible_relationships.split('\|') %]
676
                                                            <option value=""></option>
674
                                                                    [% IF pr == borrower_data.relationship %]
677
                                                            [% FOREACH pr IN possible_relationships.split('\|') %]
675
                                                                        <option value="[% pr | html %]" selected="selected">[% pr | html %]</option>
678
                                                                [% IF pr == borrower_data.relationship %]
676
                                                                    [% ELSE %]
679
                                                                    <option value="[% pr | html %]" selected="selected">[% pr | html %]</option>
677
                                                                        <option value="[% pr | html %]">[% pr | html %]</option>
680
                                                                [% ELSE %]
678
                                                                    [% END %]
681
                                                                    <option value="[% pr | html %]">[% pr | html %]</option>
679
                                                                [% END %]
682
                                                                [% END %]
680
                                                            </select>
683
                                                            [% END %]
681
                                                        </li>
684
                                                        </select>
682
                                                    [% END #/IF possible_relationships %]
685
                                                        [% IF mandatoryrelationship %]
686
                                                            <span class="required">Required</span>
687
                                                        [% END %]
688
                                                    </li>
683
                                                [% END # /UNLESS norelationship %]
689
                                                [% END # /UNLESS norelationship %]
684
                                            </ol>
690
                                            </ol>
685
                                        </fieldset> <!-- /#non_patron_guarantor -->
691
                                        </fieldset> <!-- /#non_patron_guarantor -->
Lines 1943-1951 legend:hover { Link Here
1943
                           new_field.appendTo("#quick_add_list");
1949
                           new_field.appendTo("#quick_add_list");
1944
                       } else {
1950
                       } else {
1945
                           let orig_input_id = orig_li.children("input,textarea,select").attr("id");
1951
                           let orig_input_id = orig_li.children("input,textarea,select").attr("id");
1946
                           let new_field = orig_li.clone();
1952
                           if ( orig_input_id ) {
1947
                           new_field.children("#"+orig_input_id).attr("id",orig_input_id + "_quick_add");
1953
                               let new_field = orig_li.clone();
1948
                           new_field.appendTo("#quick_add_list");
1954
                               new_field.children("#"+orig_input_id).attr("id",orig_input_id + "_quick_add");
1955
                               new_field.appendTo("#quick_add_list");
1956
                           }
1949
                           [% UNLESS mandatorypassword %]
1957
                           [% UNLESS mandatorypassword %]
1950
                                 if( input_label == 'password' ){
1958
                                 if( input_label == 'password' ){
1951
                                     let orig_p2 = $("#entryform label[for='password2']").parent();
1959
                                     let orig_p2 = $("#entryform label[for='password2']").parent();
(-)a/members/memberentry.pl (-6 lines)
Lines 100-110 my @messages; Link Here
100
## Deal with guarantor stuff
100
## Deal with guarantor stuff
101
$template->param( relationships => $patron->guarantor_relationships ) if $patron;
101
$template->param( relationships => $patron->guarantor_relationships ) if $patron;
102
102
103
my @relations = split /\|/, C4::Context->preference('borrowerRelationship'), -1;
104
@relations = ('') unless @relations;
105
my $empty_relationship_allowed = grep {$_ eq ""} @relations;
106
$template->param( empty_relationship_allowed => $empty_relationship_allowed );
107
108
my $guarantor_id = $input->param('guarantor_id');
103
my $guarantor_id = $input->param('guarantor_id');
109
my $guarantor = undef;
104
my $guarantor = undef;
110
$guarantor = Koha::Patrons->find( $guarantor_id ) if $guarantor_id;
105
$guarantor = Koha::Patrons->find( $guarantor_id ) if $guarantor_id;
111
- 

Return to bug 30987