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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-6 / +28 lines)
Lines 477-488 legend:hover { Link Here
477
                                                            </li>
477
                                                            </li>
478
478
479
                                                            <li>
479
                                                            <li>
480
                                                                <label for="guarantor_relationship">Relationship: </label>
480
                                                                [% UNLESS empty_relationship_allowed %]
481
                                                                <select class="new_guarantor_relationship" name="new_guarantor_relationship">
481
                                                                    <label for="guarantor_relationship" class="required">Relationship: </label>
482
                                                                    <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
483
                                                                [% ELSE %]
484
                                                                    <label for="guarantor_relationship">Relationship: </label>
485
                                                                    <select class="new_guarantor_relationship" name="new_guarantor_relationship">
486
                                                                [% END %]
487
                                                                    <option value="" selected>Empty option</option>
482
                                                                    [% FOREACH pr IN possible_relationships.split('\|') %]
488
                                                                    [% FOREACH pr IN possible_relationships.split('\|') %]
483
                                                                        <option value="[% pr | html %]">[% pr | html %]</option>
489
                                                                        [% IF pr != "" %]
490
                                                                            <option value="[% pr | html %]">[% pr | html %]</option>
491
                                                                        [% END %]
484
                                                                    [% END %]
492
                                                                    [% END %]
485
                                                                </select>
493
                                                                </select>
494
                                                                [% UNLESS empty_relationship_allowed %]
495
                                                                    <span class="required">Required</span>
496
                                                                [% END %]
486
                                                            </li>
497
                                                            </li>
487
498
488
                                                            <li>
499
                                                            <li>
Lines 513-524 legend:hover { Link Here
513
                                                    </li>
524
                                                    </li>
514
525
515
                                                    <li>
526
                                                    <li>
516
                                                        <label for="guarantor_relationship">Relationship: </label>
527
                                                        [% UNLESS empty_relationship_allowed %]
517
                                                        <select class="new_guarantor_relationship" name="new_guarantor_relationship">
528
                                                            <label for="guarantor_relationship" class="required">Relationship: </label>
529
                                                            <select class="new_guarantor_relationship" name="new_guarantor_relationship" required="required">
530
                                                        [% ELSE %]
531
                                                            <label for="guarantor_relationship">Relationship: </label>
532
                                                            <select class="new_guarantor_relationship" name="new_guarantor_relationship">
533
                                                        [% END %]
534
                                                            <option value="" selected></option>
518
                                                            [% FOREACH pr IN possible_relationships.split('\|') %]
535
                                                            [% FOREACH pr IN possible_relationships.split('\|') %]
519
                                                                <option value="[% pr | html %]">[% pr | html %]</option>
536
                                                                [% IF pr != "" %]
537
                                                                    <option value="[% pr | html %]">[% pr | html %]</option>
538
                                                                [% END %]
520
                                                            [% END %]
539
                                                            [% END %]
521
                                                        </select>
540
                                                        </select>
541
                                                        [% UNLESS empty_relationship_allowed %]
542
                                                            <span class="required">Required</span>
543
                                                        [% END %]
522
                                                    </li>
544
                                                    </li>
523
545
524
                                                    <li>
546
                                                    <li>
(-)a/members/memberentry.pl (-1 / +4 lines)
Lines 107-112 my @messages; Link Here
107
## Deal with guarantor stuff
107
## Deal with guarantor stuff
108
$template->param( relationships => scalar $patron->guarantor_relationships ) if $patron;
108
$template->param( relationships => scalar $patron->guarantor_relationships ) if $patron;
109
109
110
my @relations = split /,|\|/, C4::Context->preference('borrowerRelationship');
111
my $empty_relationship_allowed = grep {$_ eq ""} @relations;
112
$template->param( empty_relationship_allowed => $empty_relationship_allowed );
113
110
my $guarantor_id = $input->param('guarantor_id');
114
my $guarantor_id = $input->param('guarantor_id');
111
my $guarantor = undef;
115
my $guarantor = undef;
112
$guarantor = Koha::Patrons->find( $guarantor_id ) if $guarantor_id;
116
$guarantor = Koha::Patrons->find( $guarantor_id ) if $guarantor_id;
113
- 

Return to bug 25322