Fix warning on late surveys
This commit is contained in:
parent
6d5f2b2f21
commit
8450c78dff
@ -310,7 +310,7 @@ if ($action == 'edit') print $form->select_date($expiredate?$expiredate:$object-
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print dol_print_date($object->date_fin,'day');
|
print dol_print_date($object->date_fin,'day');
|
||||||
if ($object->date_fin && $object->date_fin < dol_now()) print img_warning($langs->trans("Expired"));
|
if ($object->date_fin && $object->date_fin < dol_now() && $object->status == Opensurveysondage::STATUS_VALIDATED) print img_warning($langs->trans("Expired"));
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -211,7 +211,7 @@ while ($i < min($num,$limit))
|
|||||||
print'<td align="right">'.$nbuser.'</td>'."\n";
|
print'<td align="right">'.$nbuser.'</td>'."\n";
|
||||||
|
|
||||||
print '<td align="center">'.dol_print_date($db->jdate($obj->date_fin),'day');
|
print '<td align="center">'.dol_print_date($db->jdate($obj->date_fin),'day');
|
||||||
if ($db->jdate($obj->date_fin) < time()) { print img_warning($langs->trans("Expired")); }
|
if ($db->jdate($obj->date_fin) < $now && $obj->status == Opensurveysondage::STATUS_VALIDATED) { print img_warning($langs->trans("Expired")); }
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print'<td align="center">'.$opensurvey_static->getLibStatut(5).'</td>'."\n";
|
print'<td align="center">'.$opensurvey_static->getLibStatut(5).'</td>'."\n";
|
||||||
|
|||||||
@ -389,13 +389,13 @@ for ($i = 0; $i < $nbcolonnes; $i++)
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$form=new Form($db);
|
||||||
|
|
||||||
if ($object->fk_user_creat) {
|
if ($object->fk_user_creat) {
|
||||||
$userstatic = new User($db);
|
$userstatic = new User($db);
|
||||||
$userstatic->fetch($object->fk_user_creat);
|
$userstatic->fetch($object->fk_user_creat);
|
||||||
}
|
}
|
||||||
|
|
||||||
$form=new Form($db);
|
|
||||||
|
|
||||||
$result=$object->fetch(0,$numsondage);
|
$result=$object->fetch(0,$numsondage);
|
||||||
if ($result <= 0)
|
if ($result <= 0)
|
||||||
{
|
{
|
||||||
@ -430,7 +430,7 @@ dol_fiche_head($head,'preview',$langs->trans("Survey"), -1, DOL_URL_ROOT.'/opens
|
|||||||
|
|
||||||
$morehtmlref = '';
|
$morehtmlref = '';
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/opensurvey/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/opensurvey/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
dol_banner_tab($object, 'id', $linkback, 1, 'id_sondage', 'id_sondage', $morehtmlref);
|
dol_banner_tab($object, 'id', $linkback, 1, 'id_sondage', 'id_sondage', $morehtmlref);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user