diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index bc63b319efd..c32b49ff1a1 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -222,20 +222,21 @@ dol_banner_tab($object, 'id', $linkback, 1, 'id_sondage', 'id_sondage', $morehtm print '
| '.$langs->trans("Type").' | '; +print ' | ||
| '.$langs->trans("Type").' | '; print img_picto('', dol_buildpath('/opensurvey/img/'.($type == 'classic' ? 'chart-32.png' : 'calendar-32.png'), 1), 'width="16"', 1); print ' '.$langs->trans($type == 'classic' ? "TypeClassic" : "TypeDate").' | ||
| '; $adresseadmin = $object->mail_admin; -print $langs->trans("Title").' | '; +print $langs->trans("Title").' | '; if ($action == 'edit') { print ''; } else { @@ -244,7 +245,7 @@ if ($action == 'edit') { print ' | |
| '.$langs->trans("Description").' | '; +print ' | ||
| '.$langs->trans("Description").' | '; if ($action == 'edit') { $doleditor = new DolEditor('nouveauxcommentaires', $object->description, '', 120, 'dolibarr_notes', 'In', 1, 1, 1, ROWS_7, '90%'); $doleditor->Create(0, ''); @@ -256,17 +257,17 @@ print ' | ||
| '.$langs->trans("EMail").' | '; + print ' | ||
| '.$langs->trans("EMail").' | '; if ($action == 'edit') { print ''; } else { - print dol_print_email($object->mail_admin, 0, 0, 1); + print dol_print_email($object->mail_admin, 0, 0, 1, 0, 1, 1); } print ' | ||
| '.$langs->trans('ToReceiveEMailForEachVote').' | '; +print ' | ||
| '.$langs->trans('ToReceiveEMailForEachVote').' | '; if ($action == 'edit') { print 'mailsonde ? 'checked="checked"' : '').'">'; } else { @@ -282,7 +283,7 @@ if ($action == 'edit') { print ' | ||
| '.$langs->trans('CanComment').' | '; +print ' | ||
| '.$langs->trans('CanComment').' | '; if ($action == 'edit') { print 'allow_comments ? 'checked="checked"' : '').'">'; } else { @@ -291,7 +292,7 @@ if ($action == 'edit') { print ' | ||
| '.$langs->trans('CanSeeOthersVote').' | '; +print ' | ||
| '.$langs->trans('CanSeeOthersVote').' | '; if ($action == 'edit') { print 'allow_spy ? 'checked="checked"' : '').'">'; } else { @@ -299,8 +300,16 @@ if ($action == 'edit') { } print ' | ||
| '.$langs->trans('ExpireDate').' | '; +print ' | ||
| '.$langs->trans('ExpireDate').' | '; if ($action == 'edit') { print $form->selectDate($expiredate ? $expiredate : $object->date_fin, 'expire', 0, 0, 0, '', 1, 0); } else { @@ -313,7 +322,7 @@ print ' | ||
| '; -print $langs->trans("Author").' | '; +print $langs->trans("Author").' | '; if ($object->fk_user_creat) { print $userstatic->getLoginUrl(1); } else { @@ -322,7 +331,7 @@ if ($object->fk_user_creat) { print ' | |
| '.img_picto('', 'globe').' '.$langs->trans("UrlForSurvey", '').' | '; +print ' | ||
| '.img_picto('', 'globe').' '.$langs->trans("UrlForSurvey", '').' | '; // Define $urlwithroot $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); @@ -338,8 +347,10 @@ if ($action != 'edit') { print ' | ||
| '.$langs->trans("Type").' | '; +print ' | ||
| '.$langs->trans("Type").' | '; print img_picto('', dol_buildpath('/opensurvey/img/'.($type == 'classic' ? 'chart-32.png' : 'calendar-32.png'), 1), 'width="16"', 1); print ' '.$langs->trans($type == 'classic' ? "TypeClassic" : "TypeDate").' | ||
| '; $adresseadmin = $object->mail_admin; -print $langs->trans("Title").' | '; +print $langs->trans("Title").' | '; if ($action == 'edit') { print ''; } else { @@ -476,8 +477,39 @@ if ($action == 'edit') { } print ' | |
| '.$langs->trans("Description").' | '; +if ($action == 'edit') { + $doleditor = new DolEditor('nouveauxcommentaires', $object->description, '', 120, 'dolibarr_notes', 'In', 1, 1, 1, ROWS_7, '90%'); + $doleditor->Create(0, ''); +} else { + print (dol_textishtml($object->description) ? $object->description : dol_nl2br($object->description, 1, true)); +} +print ' | ||
| '.$langs->trans("EMail").' | '; + if ($action == 'edit') { + print ''; + } else { + print dol_print_email($object->mail_admin, 0, 0, 1, 0, 1, 1); + } + print ' | ||
| '.$langs->trans('ExpireDate').' | '; +print ' | ||
| '.$langs->trans('ExpireDate').' | '; if ($action == 'edit') { print $form->selectDate($expiredate ? $expiredate : $object->date_fin, 'expire', 0, 0, 0, '', 1, 0); } else { @@ -490,7 +522,7 @@ print ' | ||
| '; -print $langs->trans("Author").' | '; +print $langs->trans("Author").' | '; if ($object->fk_user_creat) { print $userstatic->getLoginUrl(1); } else { @@ -499,7 +531,7 @@ if ($object->fk_user_creat) { print ' | |
| '.img_picto('', 'globe').' '.$langs->trans("UrlForSurvey", '').' | '; +print ' | ||
| '.img_picto('', 'globe').' '.$langs->trans("UrlForSurvey", '').' | '; // Define $urlwithroot $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); @@ -521,8 +553,10 @@ if ($action != 'edit') { print ' | ||