Fix selection of state from country in member creation

This commit is contained in:
Laurent Destailleur (aka Eldy) 2024-11-28 22:25:53 +01:00
parent c83d362bc1
commit 670e6464e8

View File

@ -1079,9 +1079,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// State
if (!getDolGlobalString('MEMBER_DISABLE_STATE')) {
print '<tr><td>'.$langs->trans('State').'</td><td>';
if ($soc->country_id) {
if ($soc->country_id || GETPOSTISSET('country_id')) {
print img_picto('', 'state', 'class="pictofixedwidth"');
print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOSTINT('state_id') : $soc->state_id, $soc->country_code);
print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOSTINT('state_id') : $soc->state_id, GETPOSTISSET('country_id') ? GETPOSTINT('country_id') : $soc->country_code);
} else {
print $countrynotdefined;
}