Fix: Autosubmit form is working again

This commit is contained in:
Laurent Destailleur 2012-02-19 01:46:00 +01:00
parent 8ecb412689
commit f0af1258e3

View File

@ -414,9 +414,9 @@ print '<tr><td>'.$langs->trans("Address").'</td><td>'."\n";
print '<textarea name="address" id="address" wrap="soft" cols="40" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('address')).'</textarea></td></tr>'."\n"; print '<textarea name="address" id="address" wrap="soft" cols="40" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('address')).'</textarea></td></tr>'."\n";
// Zip / Town // Zip / Town
print '<tr><td>'.$langs->trans('Zip').' / '.$langs->trans('Town').'</td><td>'; print '<tr><td>'.$langs->trans('Zip').' / '.$langs->trans('Town').'</td><td>';
print $formcompany->select_ziptown(GETPOST('zipcode'), 'zipcode', array('town','selectcountry_id','departement_id'), 6, 1); print $formcompany->select_ziptown(GETPOST('zipcode'), 'zipcode', array('town','selectcountry_id','state_id'), 6, 1);
print ' / '; print ' / ';
print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode','selectcountry_id','departement_id'), 0, 1); print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode','selectcountry_id','state_id'), 0, 1);
print '</td></tr>'; print '</td></tr>';
// Country // Country
print '<tr><td width="25%">'.$langs->trans('Country').'</td><td>'; print '<tr><td width="25%">'.$langs->trans('Country').'</td><td>';
@ -428,19 +428,19 @@ if (! $country_id && ! empty($conf->geoipmaxmind->enabled))
//print $country_code; //print $country_code;
if ($country_code) if ($country_code)
{ {
$new_pays_id=getCountry($country_code,3,$db,$langs); $new_country_id=getCountry($country_code,3,$db,$langs);
//print 'xxx'.$country_code.' - '.$new_pays_id; //print 'xxx'.$country_code.' - '.$new_country_id;
if ($new_pays_id) $country_id=$new_pays_id; if ($new_country_id) $country_id=$new_country_id;
} }
} }
$country_code=getCountry($country_id,2,$db,$langs); $country_code=getCountry($country_id,2,$db,$langs);
print $form->select_country($country_id,'pays_id'); print $form->select_country($country_id,'country_id');
print '</td></tr>'; print '</td></tr>';
// State // State
if (empty($conf->global->SOCIETE_DISABLE_STATE)) if (empty($conf->global->SOCIETE_DISABLE_STATE))
{ {
print '<tr><td>'.$langs->trans('State').'</td><td>'; print '<tr><td>'.$langs->trans('State').'</td><td>';
if ($country_code) print $formcompany->select_state(GETPOST("departement_id"),$country_code); if ($country_code) print $formcompany->select_state(GETPOST("state_id"),$country_code);
else print ''; else print '';
print '</td></tr>'; print '</td></tr>';
} }
@ -553,7 +553,8 @@ print '</center>';
print "<br></form>\n"; print "<br></form>\n";
$db->close();
llxFooterVierge(); llxFooterVierge();
$db->close();
?> ?>