diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 5e38a85898e9200b73beb68e84cb239b48e367a3..14ab91a2f3149b7d43121c4f3eea94aa073995f7 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -955,8 +955,15 @@ if ($id > 0) // Type of event if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) { - print '<tr><td class="fieldrequired">'.$langs->trans("Type").'</td><td colspan="3">'; - $formactions->select_type_actions(GETPOST("actioncode")?GETPOST("actioncode"):$object->type_code, "actioncode","systemauto"); + print '<tr><td class="fieldrequired">'.$langs->trans("Type").'</td><td colspan="3">'; + if ($object->type_code != 'AC_OTH_AUTO') + { + $formactions->select_type_actions(GETPOST("actioncode")?GETPOST("actioncode"):$object->type_code, "actioncode","systemauto"); + } + else + { + print '<input type="hidden" name="actioncode" value="'.$object->type_code.'">'.$langs->trans("Action".$object->type_code); + } print '</td></tr>'; } diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index 55f73575f78abe65f30803be0929c1d518202c5d..9cb14454cd510d651fd43e9e2ce3dcb4e706e11d 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -347,11 +347,13 @@ if ($resql) if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) { - $newparam.='&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year; + $tmpforcreatebutton=dol_getdate(dol_now(), true); + + $newparam.='&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$tmpforcreatebutton['year']; //$param='month='.$monthshown.'&year='.$year; $hourminsec='100000'; - $link = '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d",$year,$month,$day).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam?'?'.$newparam:'')).'">'; + $link = '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d",$tmpforcreatebutton['year'],$tmpforcreatebutton['mon'],$tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam?'?'.$newparam:'')).'">'; $link.= $langs->trans("NewAction"); $link.= '</a>'; } @@ -527,7 +529,7 @@ if ($resql) // Status/Percent $datep=$db->jdate($obj->datep); - print '<td align="center" class="nowrap">'.$actionstatic->LibStatut($obj->percent,3,1,$datep).'</td>'; + print '<td align="center" class="nowrap">'.$actionstatic->LibStatut($obj->percent,3,0,$datep).'</td>'; print '<td></td>';