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

Return to bug 37528