From 670e6464e8d08ea4fd26517ebb080bc2d3e4e73c Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Thu, 28 Nov 2024 22:25:53 +0100 Subject: [PATCH] Fix selection of state from country in member creation --- htdocs/adherents/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index b02702218c8..b5a71fc5484 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -1079,9 +1079,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // State if (!getDolGlobalString('MEMBER_DISABLE_STATE')) { print ''.$langs->trans('State').''; - 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; }