Fix: L'option du mode de syncro avec webcalendar positionné mal le choix de syncro par défaut sur la création d'une action non rendez-vous
This commit is contained in:
parent
b37ced5db5
commit
f5c4925e6b
@ -20,7 +20,7 @@
|
|||||||
* $Source$
|
* $Source$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/**
|
||||||
\file htdocs/comm/action/fiche.php
|
\file htdocs/comm/action/fiche.php
|
||||||
\ingroup commercial
|
\ingroup commercial
|
||||||
\brief Page de la fiche action commercial
|
\brief Page de la fiche action commercial
|
||||||
@ -256,34 +256,7 @@ if ($_GET["action"] == 'create')
|
|||||||
print_duree_select("duree");
|
print_duree_select("duree");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Lien avec calendrier si module activé
|
add_row_for_webcal_link();
|
||||||
if ($conf->webcal->enabled) {
|
|
||||||
if ($conf->webcal->syncro != 'never')
|
|
||||||
{
|
|
||||||
$langs->load("other");
|
|
||||||
if (! $user->webcal_login)
|
|
||||||
{
|
|
||||||
print '<tr><td width="10%">'.$langs->trans("AddCalendarEntry").'</td>';
|
|
||||||
print '<td><input type="checkbox" disabled name="todo_webcal">';
|
|
||||||
print ' '.$langs->trans("ErrorWebcalLoginNotDefined","<a href=\"/user/fiche.php?id=".$user->id."\">".$user->login."</a>");
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ($conf->webcal->syncro == 'always')
|
|
||||||
{
|
|
||||||
print '<input type="hidden" name="todo_webcal" value="on">';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<tr><td width="10%">'.$langs->trans("AddCalendarEntry").'</td>';
|
|
||||||
print '<td><input type="checkbox" name="todo_webcal"'.(($conf->webcal->syncro=='always' || $conf->webcal->syncro=='yesbydefault')?' checked':'').'></td>';
|
|
||||||
print '</tr>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<tr><td valign="top">'.$langs->trans("Comment").'</td><td>';
|
print '<tr><td valign="top">'.$langs->trans("Comment").'</td><td>';
|
||||||
print '<textarea cols="60" rows="6" name="todo_note"></textarea></td></tr>';
|
print '<textarea cols="60" rows="6" name="todo_note"></textarea></td></tr>';
|
||||||
@ -375,12 +348,7 @@ if ($_GET["action"] == 'create')
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Lien avec calendrier si module activé
|
add_row_for_webcal_link();
|
||||||
if ($conf->webcal->enabled)
|
|
||||||
{
|
|
||||||
$langs->load("other");
|
|
||||||
print '<tr><td width="10%">'.$langs->trans("AddCalendarEntry").'</td><td><input type="checkbox" name="todo_webcal"></td></tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
|
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
|
||||||
@ -520,4 +488,47 @@ if ($_GET["id"])
|
|||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Ajoute une ligne de tableau a 2 colonnes pour avoir l'option webcalendar
|
||||||
|
*/
|
||||||
|
function add_row_for_webcal_link()
|
||||||
|
{
|
||||||
|
global $conf,$langs,$user;
|
||||||
|
|
||||||
|
// Lien avec calendrier si module activé
|
||||||
|
if ($conf->webcal->enabled) {
|
||||||
|
if ($conf->webcal->syncro != 'never')
|
||||||
|
{
|
||||||
|
$langs->load("other");
|
||||||
|
if (! $user->webcal_login)
|
||||||
|
{
|
||||||
|
print '<tr><td width="10%">'.$langs->trans("AddCalendarEntry").'</td>';
|
||||||
|
print '<td><input type="checkbox" disabled name="todo_webcal">';
|
||||||
|
print ' '.$langs->trans("ErrorWebcalLoginNotDefined","<a href=\"/user/fiche.php?id=".$user->id."\">".$user->login."</a>");
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($conf->webcal->syncro == 'always')
|
||||||
|
{
|
||||||
|
print '<input type="hidden" name="todo_webcal" value="on">';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<tr><td width="10%">'.$langs->trans("AddCalendarEntry").'</td>';
|
||||||
|
print '<td><input type="checkbox" name="todo_webcal"'.(($conf->webcal->syncro=='always' || $conf->webcal->syncro=='yesbydefault')?' checked':'').'></td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user