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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-1 / +4 lines)
Lines 214-219 legend.collapsed i.fa.fa-caret-down::before { Link Here
214
                                    [% IF ( ERROR_cannot_delete_guarantor ) %]
214
                                    [% IF ( ERROR_cannot_delete_guarantor ) %]
215
                                        <li id="ERROR_cannot_delete_guarantor">Cannot delete guarantor(s). A child patron needs a guarantor.</li>
215
                                        <li id="ERROR_cannot_delete_guarantor">Cannot delete guarantor(s). A child patron needs a guarantor.</li>
216
                                    [% END %]
216
                                    [% END %]
217
                                    [% IF ( ERROR_invalid_relationship ) %]
218
                                        <li id="ERROR_invalid_relationship">Guarantor relationship is invalid.</li>
219
                                    [% END %]
217
                                </ul>
220
                                </ul>
218
                            </div>
221
                            </div>
219
                        [% END %]
222
                        [% END %]
Lines 553-559 legend.collapsed i.fa.fa-caret-down::before { Link Here
553
                                                                            [% END %]
556
                                                                            [% END %]
554
                                                                        [% END %]
557
                                                                        [% END %]
555
                                                                    </select>
558
                                                                    </select>
556
                                                                    [% UNLESS mandatoryrelationship %]
559
                                                                    [% IF mandatoryrelationship %]
557
                                                                        <span class="required">Required</span>
560
                                                                        <span class="required">Required</span>
558
                                                                    [% END %]
561
                                                                    [% END %]
559
                                                                </li>
562
                                                                </li>
(-)a/members/memberentry.pl (-1 / +16 lines)
Lines 285-290 foreach my $guarantor (@guarantors) { Link Here
285
    }
285
    }
286
}
286
}
287
287
288
my @valid_relationships = split(/\|/, C4::Context->preference('borrowerRelationship'), -1);
289
if (@valid_relationships) {
290
    my @new_guarantor_id           = $input->multi_param('new_guarantor_id');
291
    my @new_guarantor_relationship = $input->multi_param('new_guarantor_relationship');
292
293
    for ( my $i = 0 ; $i < scalar @new_guarantor_id; $i++ ) {
294
        my $guarantor_id = $new_guarantor_id[$i];
295
        my $relationship = $new_guarantor_relationship[$i];
296
297
        next unless $guarantor_id;
298
        unless ( grep { $_ eq $relationship } @valid_relationships ) {
299
            push @errors, 'ERROR_invalid_relationship';
300
        }
301
    }
302
}
303
288
###############test to take the right zipcode, country and city name ##############
304
###############test to take the right zipcode, country and city name ##############
289
# set only if parameter was passed from the form
305
# set only if parameter was passed from the form
290
$newdata{'city'}    = $input->param('city')    if defined($input->param('city'));
306
$newdata{'city'}    = $input->param('city')    if defined($input->param('city'));
291
- 

Return to bug 37528