<input style="text-transform:uppercase;" type="text" name="othernames" size="20" value="<!-- TMPL_VAR NAME="othernames" -->" >
</p>
- <!-- TMPL_UNLESS name="guarantorid"-->
+ <!-- TMPL_UNLESS NAME="add"-->
+ <p><a href="javascript:Dopopguarantor('guarantor_search.pl');">Modify guarantor</a></p>
+ <!-- /TMPL_UNLESS -->
+ <!-- TMPL_IF NAME="add" -->
+ <!-- TMPL_UNLESS NAME="guarantorid"-->
<p><a href="javascript:Dopopguarantor('guarantor_search.pl');">Find guarantor</a></p>
- <!-- /TMPL_UNLESS -->
-
+ <!-- /TMPL_UNLESS -->
+ <!-- /TMPL_IF -->
</fieldset>
<fieldset id="memberentry_identity">
<legend>Borrower type</legend>
$template->param( "mandatory$_" => 1);
}
+$template->param("add"=>1) if ($op eq 'add');
$template->param( "checked" => 1) if ($nodouble eq 1);
my $borrower_data=borrdata('',$borrowernumber);
$data{$column}=$borrower_data->{$column};
}
}
-
if ($op eq 'add' or $op eq 'modify') {
my @names=$input->param;
foreach my $key (@names){
$data{'fax'}=$guarantordata->{'fax'};
$data{'email'}=$guarantordata->{'email'};
$data{'emailpro'}=$guarantordata->{'emailpro'};
-
- $default_city=getidcity($data{'city'});
}
- }
+}
# CHECKS step by step
# STEP 1
$nok = 1;
}
}
+
}
# STEP 2
if ($step eq 2) {
-default=>$default_category,
-labels=>$labels);
#test in city
- if ($op eq 'modify' and $select_city eq '' ){
- my $selectcity=&getidcity($data{'city'});
- $default_city=$selectcity;
- }
+ $select_city=getidcity($data{'city'}) if ($guarantorid ne '');
+ ($default_city=$select_city) if ($step eq 0);
+ if ($select_city eq '' ){
+ my $selectcity=&getidcity($data{'city'});
+ $default_city=$selectcity;
+ }
my($cityid,$name_city)=getcities();
$template->param( city_cgipopup => 1) if ($cityid );
my $citypopup = CGI::popup_menu(-name=>'select_city',