From f4743c7f1f1d69b6da3d5502122cb392d8e6d47f Mon Sep 17 00:00:00 2001 From: daraelmin Date: Tue, 19 Oct 2021 23:00:36 +0200 Subject: [PATCH 1/4] Fix wrong const in select MEMBER_ALLOW_CHANGE_OF_TYPE --- htdocs/adherents/admin/member.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/admin/member.php b/htdocs/adherents/admin/member.php index 018498c2457..f9e5388d735 100644 --- a/htdocs/adherents/admin/member.php +++ b/htdocs/adherents/admin/member.php @@ -228,7 +228,7 @@ print "\n"; // Allow members to change type on renewal forms /* To test during next beta print ''.$langs->trans("MemberAllowchangeOfType").''; -print $form->selectyesno('ADHERENT_LOGIN_NOT_REQUIRED', (!empty($conf->global->MEMBER_ALLOW_CHANGE_OF_TYPE) ? 0 : 1), 1); +print $form->selectyesno('MEMBER_ALLOW_CHANGE_OF_TYPE', (!empty($conf->global->MEMBER_ALLOW_CHANGE_OF_TYPE) ? 0 : 1), 1); print "\n"; */ From 417daa4289c2545bf7a254ff5bbd4f186a9e002b Mon Sep 17 00:00:00 2001 From: atm-florian Date: Wed, 20 Oct 2021 11:15:02 +0200 Subject: [PATCH 2/4] FIX 14.0 - civility field width inadequate due to select2 calculating the width while the field has no width (display: none) --- htdocs/societe/card.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index bfee51e5f8d..e283333070b 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1151,6 +1151,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $("#typent_id").change(); $("#effectif_id").val(id_ef15); $("#effectif_id").change(); + if ($("#civility_id").data("select2")) { + $("#civility_id").select2({width: "resolve"}); + } $("#TypeName").html(document.formsoc.LastName.value); document.formsoc.private.value=1; }); From f59f605bcc9dad53ba821a71c1165b4773eadfee Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 20 Oct 2021 11:29:34 +0200 Subject: [PATCH 3/4] Update card.php --- htdocs/societe/card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index e283333070b..c228fd29866 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1151,6 +1151,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $("#typent_id").change(); $("#effectif_id").val(id_ef15); $("#effectif_id").change(); + /* Force recompute width of a select2 field when it was hidden and then shown */ if ($("#civility_id").data("select2")) { $("#civility_id").select2({width: "resolve"}); } From ae1da432250d521728e575da33153670fb0afec7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 20 Oct 2021 11:30:38 +0200 Subject: [PATCH 4/4] Update card.php --- htdocs/societe/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index c228fd29866..5c9c0f63e94 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1151,7 +1151,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $("#typent_id").change(); $("#effectif_id").val(id_ef15); $("#effectif_id").change(); - /* Force recompute width of a select2 field when it was hidden and then shown */ + /* Force to recompute the width of a select2 field when it was hidden and then shown programatically */ if ($("#civility_id").data("select2")) { $("#civility_id").select2({width: "resolve"}); }