FIX Can set default value of the nature of member

This commit is contained in:
ldestailleur
2025-05-11 12:31:55 +02:00
parent 5eaa46225e
commit a11e7db31c

View File

@@ -1054,7 +1054,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$morphys = array();
$morphys["phy"] = $langs->trans("Physical");
$morphys["mor"] = $langs->trans("Moral");
$checkednature = (GETPOSTISSET("morphy") ? GETPOST("morphy", 'alpha') : $object->morphy);
$checkednature = ((GETPOSTISSET("morphy") || $action == 'create' )? GETPOST("morphy", 'alpha') : $object->morphy);
print '<tr><td class="fieldrequired">'.$langs->trans("MemberNature")."</td><td>\n";
print '<span id="spannature1" class="nonature-back spannature paddinglarge marginrightonly"><label for="phisicalinput" class="valignmiddle">'.$morphys["phy"].'<input id="phisicalinput" class="flat checkforselect marginleftonly valignmiddle" type="radio" name="morphy" value="phy"'.($checkednature == "phy" ? ' checked="checked"' : '').'></label></span>';
print '<span id="spannature2" class="nonature-back spannature paddinglarge marginrightonly"><label for="moralinput" class="valignmiddle">'.$morphys["mor"].'<input id="moralinput" class="flat checkforselect marginleftonly valignmiddle" type="radio" name="morphy" value="mor"'.($checkednature == "mor" ? ' checked="checked"' : '').'></label></span>';