Fix edit of automatic event should keep its type.
This commit is contained in:
parent
fbca244212
commit
e1ba69eee0
@ -955,8 +955,15 @@ if ($id > 0)
|
|||||||
// Type of event
|
// Type of event
|
||||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||||
{
|
{
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("Type").'</td><td colspan="3">';
|
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");
|
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>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -347,11 +347,13 @@ if ($resql)
|
|||||||
|
|
||||||
if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create)
|
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;
|
//$param='month='.$monthshown.'&year='.$year;
|
||||||
$hourminsec='100000';
|
$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.= $langs->trans("NewAction");
|
||||||
$link.= '</a>';
|
$link.= '</a>';
|
||||||
}
|
}
|
||||||
@ -527,7 +529,7 @@ if ($resql)
|
|||||||
|
|
||||||
// Status/Percent
|
// Status/Percent
|
||||||
$datep=$db->jdate($obj->datep);
|
$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>';
|
print '<td></td>';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user