diff --git a/htdocs/admin/menus/edit.php b/htdocs/admin/menus/edit.php index d92a3b30504..b0514dfc975 100644 --- a/htdocs/admin/menus/edit.php +++ b/htdocs/admin/menus/edit.php @@ -89,7 +89,6 @@ if ($action == 'update') $result = $menu->fetch(GETPOST('menuId', 'int')); if ($result > 0) { - $menu->titre = GETPOST('titre', 'alpha'); // deprecated $menu->title = GETPOST('titre', 'alpha'); $menu->leftmenu = GETPOST('leftmenu', 'aZ09'); $menu->url = GETPOST('url', 'alpha'); @@ -200,7 +199,6 @@ if ($action == 'add') $menu = new Menubase($db); $menu->menu_handler = preg_replace('/_menu$/', '', GETPOST('menu_handler', 'aZ09')); $menu->type = GETPOST('type', 'alpha'); - $menu->titre = GETPOST('titre', 'alpha'); // deprecated $menu->title = GETPOST('titre', 'alpha'); $menu->url = GETPOST('url', 'alpha'); $menu->langs = GETPOST('langs', 'alpha'); @@ -478,7 +476,7 @@ if ($action == 'create') //print ''.$langs->trans('Level').''.$menu->level.''.$langs->trans('DetailLevel').''; // Title - print ''.$langs->trans('Title').''.$langs->trans('DetailTitre').''; + print ''.$langs->trans('Title').''.$langs->trans('DetailTitre').''; // Url print ''.$langs->trans('URL').''.$langs->trans('DetailUrl').''; diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php index 0124507b081..855ac06545e 100644 --- a/htdocs/core/class/menubase.class.php +++ b/htdocs/core/class/menubase.class.php @@ -184,7 +184,7 @@ class Menubase $this->position = (int) $this->position; $this->url = trim($this->url); $this->target = trim($this->target); - $this->titre = trim($this->titre); + $this->title = trim($this->title); $this->langs = trim($this->langs); $this->perms = trim($this->perms); $this->enabled = trim($this->enabled); @@ -264,7 +264,7 @@ class Menubase $sql .= " ".((int) $this->position).","; $sql .= " '".$this->db->escape($this->url)."',"; $sql .= " '".$this->db->escape($this->target)."',"; - $sql .= " '".$this->db->escape($this->titre)."',"; + $sql .= " '".$this->db->escape($this->title)."',"; $sql .= " '".$this->db->escape($this->langs)."',"; $sql .= " '".$this->db->escape($this->perms)."',"; $sql .= " '".$this->db->escape($this->enabled)."',"; @@ -317,7 +317,7 @@ class Menubase $this->position = (int) $this->position; $this->url = trim($this->url); $this->target = trim($this->target); - $this->titre = trim($this->titre); + $this->title = trim($this->title); $this->langs = trim($this->langs); $this->perms = trim($this->perms); $this->enabled = trim($this->enabled); @@ -339,7 +339,7 @@ class Menubase $sql .= " position=".($this->position > 0 ? $this->position : 0).","; $sql .= " url='".$this->db->escape($this->url)."',"; $sql .= " target='".$this->db->escape($this->target)."',"; - $sql .= " titre='".$this->db->escape($this->titre)."',"; + $sql .= " titre='".$this->db->escape($this->title)."',"; $sql .= " langs='".$this->db->escape($this->langs)."',"; $sql .= " perms='".$this->db->escape($this->perms)."',"; $sql .= " enabled='".$this->db->escape($this->enabled)."',"; @@ -383,7 +383,7 @@ class Menubase $sql .= " t.position,"; $sql .= " t.url,"; $sql .= " t.target,"; - $sql .= " t.titre,"; + $sql .= " t.titre as title,"; $sql .= " t.langs,"; $sql .= " t.perms,"; $sql .= " t.enabled,"; @@ -414,7 +414,7 @@ class Menubase $this->position = $obj->position; $this->url = $obj->url; $this->target = $obj->target; - $this->titre = $obj->titre; + $this->title = $obj->title; $this->langs = $obj->langs; $this->perms = $obj->perms; $this->enabled = str_replace("\"", "'", $obj->enabled); @@ -475,10 +475,8 @@ class Menubase $this->position = ''; $this->url = 'http://dummy'; $this->target = ''; - $this->titre = 'Specimen menu'; // deprecated $this->title = 'Specimen menu'; $this->langs = ''; - $this->level = ''; $this->leftmenu = ''; $this->perms = ''; $this->enabled = ''; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 5d96b31488b..5dea5f9266e 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3011,7 +3011,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ $pictowithouttext = preg_replace('/(\.png|\.gif|\.svg)$/', '', $picto); if (empty($srconly) && in_array($pictowithouttext, array( '1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected', - 'accountancy', 'address', 'bank_account', 'barcode', 'bank', 'bill', 'bookmark', 'bom', 'building', + 'accountancy', 'add', 'address', 'bank_account', 'barcode', 'bank', 'bill', 'bookmark', 'bom', 'building', 'cash-register', 'category', 'check', 'clock', 'close_title', 'company', 'contact', 'contract', 'cubes', 'delete', 'dolly', 'dollyrevert', 'edit', 'ellipsis-h', 'email', 'external-link-alt', 'external-link-square-alt', 'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'help', @@ -3052,7 +3052,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ $pictowithouttext = str_replace('object_', '', $pictowithouttext); $arrayconvpictotofa = array( - 'account'=>'university', 'accountancy'=>'money-check-alt', 'action'=>'calendar-alt', 'address'=> 'address-book', + 'account'=>'university', 'accountancy'=>'money-check-alt', 'action'=>'calendar-alt', 'add'=>'plus-circle', 'address'=> 'address-book', 'bank_account'=>'university', 'bill'=>'file-invoice-dollar', 'billa'=>'file-excel', 'supplier_invoicea'=>'file-excel', 'billd'=>'file-medical', 'supplier_invoiced'=>'file-medical', 'bom'=>'cubes', 'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'conversation'=>'comments', 'donation'=>'file-alt', 'dynamicprice'=>'hand-holding-usd', 'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 764519862a6..af6e663bbc9 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -1867,7 +1867,6 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $menu->type = $this->menu[$key]['type']; $menu->mainmenu = isset($this->menu[$key]['mainmenu']) ? $this->menu[$key]['mainmenu'] : (isset($menu->fk_mainmenu) ? $menu->fk_mainmenu : ''); $menu->leftmenu = isset($this->menu[$key]['leftmenu']) ? $this->menu[$key]['leftmenu'] : ''; - $menu->titre = $this->menu[$key]['titre']; // deprecated $menu->title = $this->menu[$key]['titre']; $menu->url = $this->menu[$key]['url']; $menu->langs = $this->menu[$key]['langs']; diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index 919286b77bc..2f9b8babfed 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -112,8 +112,7 @@ if (empty($reshook)) if (!$error) { - $object->titre = GETPOST('nouveautitre', 'nohtml'); - $object->commentaires = GETPOST('nouveauxcommentaires', 'restricthtml'); + $object->title = GETPOST('nouveautitre', 'nohtml'); $object->description = GETPOST('nouveauxcommentaires', 'restricthtml'); $object->mail_admin = GETPOST('nouvelleadresse', 'alpha'); $object->date_fin = $expiredate; @@ -189,7 +188,7 @@ if ($object->fk_user_creat) $userstatic->fetch($object->fk_user_creat); } -$title = $object->titre." - ".$langs->trans('Card'); +$title = $object->title." - ".$langs->trans('Card'); $helpurl = ''; $arrayofjs = array(); $arrayofcss = array('/opensurvey/css/style.css'); @@ -240,8 +239,8 @@ $adresseadmin = $object->mail_admin; print $langs->trans("Title").''; if ($action == 'edit') { - print ''; -} else print dol_htmlentities($object->titre); + print ''; +} else print dol_htmlentities($object->title); print ''; // Description @@ -402,7 +401,7 @@ if ($comments) { print dol_htmlentities($comment->usercomment).': '.dol_nl2br(dol_htmlentities($comment->comment))."
"; } } else { - print $langs->trans("NoCommentYet").'
'; + print ''.$langs->trans("NoCommentYet").'
'; } print '
'; diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 01b8ef66326..0c2b00735ff 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -54,11 +54,6 @@ class Opensurveysondage extends CommonObject * @var string ID survey */ public $id_sondage; - /** - * @deprecated - * @see $description - */ - public $commentaires; /** * @var string description @@ -74,7 +69,11 @@ class Opensurveysondage extends CommonObject */ public $fk_user_creat; - public $titre; + /** + * @var string Title + */ + public $title; + public $date_fin = ''; public $status = 1; public $format; @@ -156,9 +155,9 @@ class Opensurveysondage extends CommonObject $sql .= "sujet"; $sql .= ") VALUES ("; $sql .= "'".$this->db->escape($this->id_sondage)."',"; - $sql .= " ".(empty($this->commentaires) ? 'NULL' : "'".$this->db->escape($this->commentaires)."'").","; + $sql .= " ".(empty($this->description) ? 'NULL' : "'".$this->db->escape($this->description)."'").","; $sql .= " ".$user->id.","; - $sql .= " '".$this->db->escape($this->titre)."',"; + $sql .= " '".$this->db->escape($this->title)."',"; $sql .= " '".$this->db->idate($this->date_fin)."',"; $sql .= " ".$this->status.","; $sql .= " '".$this->db->escape($this->format)."',"; @@ -215,11 +214,11 @@ class Opensurveysondage extends CommonObject { $sql = "SELECT"; $sql .= " t.id_sondage,"; + $sql .= " t.titre as title,"; $sql .= " t.commentaires as description,"; $sql .= " t.mail_admin,"; $sql .= " t.nom_admin,"; $sql .= " t.fk_user_creat,"; - $sql .= " t.titre,"; $sql .= " t.date_fin,"; $sql .= " t.status,"; $sql .= " t.format,"; @@ -242,11 +241,10 @@ class Opensurveysondage extends CommonObject $this->id_sondage = $obj->id_sondage; $this->ref = $this->id_sondage; //For compatibility - $this->commentaires = $obj->description; // deprecated $this->description = $obj->description; $this->mail_admin = $obj->mail_admin; $this->nom_admin = $obj->nom_admin; - $this->titre = $obj->titre; + $this->title = $obj->title; $this->date_fin = $this->db->jdate($obj->date_fin); $this->status = $obj->status; $this->format = $obj->format; @@ -295,19 +293,17 @@ class Opensurveysondage extends CommonObject // Update request $sql = "UPDATE ".MAIN_DB_PREFIX."opensurvey_sondage SET"; - $sql .= " id_sondage=".(isset($this->id_sondage) ? "'".$this->db->escape($this->id_sondage)."'" : "null").","; - $sql .= " commentaires=".(isset($this->commentaires) ? "'".$this->db->escape($this->commentaires)."'" : "null").","; + $sql .= " commentaires=".(isset($this->description) ? "'".$this->db->escape($this->description)."'" : "null").","; $sql .= " mail_admin=".(isset($this->mail_admin) ? "'".$this->db->escape($this->mail_admin)."'" : "null").","; $sql .= " nom_admin=".(isset($this->nom_admin) ? "'".$this->db->escape($this->nom_admin)."'" : "null").","; - $sql .= " titre=".(isset($this->titre) ? "'".$this->db->escape($this->titre)."'" : "null").","; + $sql .= " titre=".(isset($this->title) ? "'".$this->db->escape($this->title)."'" : "null").","; $sql .= " date_fin=".(dol_strlen($this->date_fin) != 0 ? "'".$this->db->idate($this->date_fin)."'" : 'null').","; $sql .= " status=".(isset($this->status) ? "'".$this->db->escape($this->status)."'" : "null").","; $sql .= " format=".(isset($this->format) ? "'".$this->db->escape($this->format)."'" : "null").","; $sql .= " mailsonde=".(isset($this->mailsonde) ? $this->db->escape($this->mailsonde) : "null").","; $sql .= " allow_comments=".$this->db->escape($this->allow_comments).","; $sql .= " allow_spy=".$this->db->escape($this->allow_spy); - $sql .= " WHERE id_sondage='".$this->db->escape($this->id_sondage)."'"; $this->db->begin(); @@ -505,11 +501,10 @@ class Opensurveysondage extends CommonObject $this->id = 0; $this->id_sondage = ''; - $this->commentaires = 'Comment of the specimen survey'; - $this->description = 'Comment of the specimen survey'; + $this->description = 'Description of the specimen survey'; $this->mail_admin = ''; $this->nom_admin = ''; - $this->titre = 'This is a specimen survey'; + $this->title = 'This is a specimen survey'; $this->date_fin = dol_now() + 3600 * 24 * 10; $this->status = 1; $this->format = 'classic'; @@ -593,11 +588,10 @@ class Opensurveysondage extends CommonObject private function cleanParameters() { $this->id_sondage = trim($this->id_sondage); - $this->commentaires = trim($this->commentaires); $this->description = trim($this->description); $this->mail_admin = trim($this->mail_admin); $this->nom_admin = trim($this->nom_admin); - $this->titre = trim($this->titre); + $this->title = trim($this->title); $this->status = trim($this->status); $this->format = trim($this->format); $this->mailsonde = ($this->mailsonde ? 1 : 0); diff --git a/htdocs/opensurvey/css/style.css b/htdocs/opensurvey/css/style.css index d9cf48c72ee..409b64dddf5 100644 --- a/htdocs/opensurvey/css/style.css +++ b/htdocs/opensurvey/css/style.css @@ -363,6 +363,7 @@ div.cadre td.non { div.cadre td.vide { background-color: #DDDDDD; text-align:center; + padding: 4px; } /*Case de tableau contenant les noms dans affichage de sondage*/ div.cadre td.nom { @@ -403,17 +404,6 @@ div.cadre td.mois { padding:1px 5px; } -/*affichage du calendrier*/ -div.calendrier { - padding:10px; - background-color: #AAA; - width:490px; - font-size:12px; - font-family:arial, sans-serif; - margin-left: 30%; - margin-right: 30%; - position:static; -} /*jour de la semaine dans calendrier*/ div.calendrier td.joursemaine { width:65px; @@ -432,19 +422,16 @@ div.calendrier td.jourwe { background-color: #C0C0C0; } /*jour avant le premier jour du mois dans calendrier*/ -div.calendrier td.avant { +div.calendrier td.avant, div.calendrier td.libre { width:65px; text-align: center; border: 2px; font-family:arial, sans-serif; - font-size:13px; + font-size: 1.1em; background-color: #DDDDDD; } /*jour libre dans calendrier*/ div.calendrier td.libre { - width:65px; - text-align: center; - border: 2px; background-color: #66FF99; } /*jour deja selectionné dans calendrier*/ @@ -458,7 +445,6 @@ div.calendrier td.choisi { p.affichageresultats{ text-align: center; font-family:arial, sans-serif; - font-size:13px; } div.comment{ @@ -485,13 +471,16 @@ div.titregestionadmin{ .bouton { - width: 65px; + /* width: 65px; */ border:0; padding:0 0 0 0; margin:0; cursor:pointer; font-family:arial, sans-serif; - font-size:13px; + background: transparent !important; +} +.choisi .bouton { + color: #fff; } /*les boutons pour choisir un jour non selectionné*/ .ON { diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 7be560cca28..4a3cb591b97 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -238,11 +238,10 @@ function ajouter_sondage() // Insert survey $opensurveysondage = new Opensurveysondage($db); $opensurveysondage->id_sondage = $sondage; - $opensurveysondage->commentaires = $_SESSION['commentaires']; - $opensurveysondage->description = $_SESSION['commentaires']; + $opensurveysondage->description = $_SESSION['description']; $opensurveysondage->mail_admin = $_SESSION['adresse']; $opensurveysondage->nom_admin = $_SESSION['nom']; - $opensurveysondage->titre = $_SESSION['titre']; + $opensurveysondage->title = $_SESSION['title']; $opensurveysondage->date_fin = $_SESSION['champdatefin']; $opensurveysondage->format = $_SESSION['formatsondage']; $opensurveysondage->mailsonde = $_SESSION['mailsonde']; @@ -256,10 +255,10 @@ function ajouter_sondage() dol_print_error($db); } - unset($_SESSION["titre"]); + unset($_SESSION["title"]); unset($_SESSION["nom"]); unset($_SESSION["adresse"]); - unset($_SESSION["commentaires"]); + unset($_SESSION["description"]); unset($_SESSION["mailsonde"]); unset($_SESSION['allow_comments']); unset($_SESSION['allow_spy']); diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index 4fcbb93a18c..e4eed717333 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -155,7 +155,7 @@ $help_url = ''; $title = $langs->trans('OpenSurveyArea'); -$sql = "SELECT p.id_sondage as rowid, p.fk_user_creat, p.format, p.date_fin, p.status, p.titre, p.nom_admin,"; +$sql = "SELECT p.id_sondage as rowid, p.fk_user_creat, p.format, p.date_fin, p.status, p.titre as title, p.nom_admin,"; $sql .= " u.login, u.firstname, u.lastname"; $sql .= " FROM ".MAIN_DB_PREFIX."opensurvey_sondage as p"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user u ON u.rowid = p.fk_user_creat"; @@ -359,7 +359,7 @@ while ($i < min($num, $limit)) $opensurvey_static->id = $obj->rowid; $opensurvey_static->ref = $obj->rowid; - $opensurvey_static->title = $obj->titre; + $opensurvey_static->title = $obj->title; $opensurvey_static->status = $obj->status; $opensurvey_static->date_fin = $db->jdate($obj->date_fin); @@ -373,7 +373,7 @@ while ($i < min($num, $limit)) if (!$i) $totalarray['nbfield']++; // Title - print ''.dol_htmlentities($obj->titre).''; + print ''.dol_htmlentities($obj->title).''; if (!$i) $totalarray['nbfield']++; // Type diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index 0acde0eb314..be252188190 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -393,7 +393,7 @@ if ($result <= 0) exit; } -$title = $object->titre." - ".$langs->trans('Card'); +$title = $object->title." - ".$langs->trans('Card'); $helpurl = ''; $arrayofjs = array(); $arrayofcss = array('/opensurvey/css/style.css'); @@ -441,10 +441,11 @@ print ' '.$langs->trans($type == 'classic' ? "TypeClassic" : "TypeDate").'< print ''; $adresseadmin = $object->mail_admin; print $langs->trans("Title").''; -if ($action == 'edit') -{ - print ''; -} else print dol_htmlentities($object->titre); +if ($action == 'edit') { + print ''; +} else { + print dol_htmlentities($object->title); +} print ''; // Expire date @@ -954,7 +955,7 @@ if (empty($testligneamodifier)) } // Affichage du bouton de formulaire pour inscrire un nouvel utilisateur dans la base - print ''."\n"; + print ''."\n"; print ''."\n"; } diff --git a/htdocs/opensurvey/wizard/choix_autre.php b/htdocs/opensurvey/wizard/choix_autre.php index 7a31e21c843..5819d901ec9 100644 --- a/htdocs/opensurvey/wizard/choix_autre.php +++ b/htdocs/opensurvey/wizard/choix_autre.php @@ -107,7 +107,7 @@ $arrayofjs = array(); $arrayofcss = array('/opensurvey/css/style.css'); llxHeader('', $langs->trans("OpenSurvey"), "", '', 0, 0, $arrayofjs, $arrayofcss); -if (empty($_SESSION['titre'])) +if (empty($_SESSION['title'])) { dol_print_error('', $langs->trans('ErrorOpenSurveyFillFirstSection')); llxFooter(); diff --git a/htdocs/opensurvey/wizard/choix_date.php b/htdocs/opensurvey/wizard/choix_date.php index 17d60d4a406..9ed44ae55c3 100644 --- a/htdocs/opensurvey/wizard/choix_date.php +++ b/htdocs/opensurvey/wizard/choix_date.php @@ -195,7 +195,7 @@ if (GETPOST('reset')) * View */ -if (!isset($_SESSION['commentaires']) && !isset($_SESSION['mail'])) +if (!isset($_SESSION['description']) && !isset($_SESSION['mail'])) { dol_print_error('', $langs->trans('ErrorOpenSurveyFillFirstSection')); exit; @@ -347,7 +347,7 @@ print ''."\n"; print ''."\n"; print ''."\n"; -print '
'."\n"; +print '
'."\n"; print ''."\n"; // The div class=center has no effect on table, so we must keep the align=center for table print ''."\n"; diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php index 5d7363b4c9f..e6b3cb3b97e 100644 --- a/htdocs/opensurvey/wizard/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -37,14 +37,14 @@ $langs->load("opensurvey"); // On teste toutes les variables pour supprimer l'ensemble des warnings PHP // On transforme en entites html les données afin éviter les failles XSS -$post_var = array('titre', 'commentaires', 'mailsonde', 'creation_sondage_date', 'creation_sondage_autre'); +$post_var = array('title', 'description', 'mailsonde', 'creation_sondage_date', 'creation_sondage_autre'); foreach ($post_var as $var) { $$var = GETPOST($var); } // On initialise egalement la session car sinon bonjour les warning :-) -$session_var = array('titre', 'commentaires', 'mailsonde'); +$session_var = array('title', 'description', 'mailsonde'); foreach ($session_var as $var) { if (isset($_SESSION[$var])) $_SESSION[$var] = null; @@ -57,8 +57,8 @@ $cochemail = ''; // Jump to correct page if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre")) { - $_SESSION["titre"] = $titre; - $_SESSION["commentaires"] = $commentaires; + $_SESSION["title"] = $title; + $_SESSION["description"] = $description; if (GETPOST('mailsonde') == 'on') { $_SESSION["mailsonde"] = true; @@ -101,7 +101,7 @@ if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre")) setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("ExpireDate")), null, 'errors'); } - if ($titre && $testdate) + if ($title && $testdate) { if (!empty($creation_sondage_date)) { @@ -141,15 +141,15 @@ dol_fiche_head(); // Affichage des différents champs textes a remplir print '
'."\n"; -print ''."\n"; -if (!$_SESSION["titre"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) +print ''."\n"; +if (!$_SESSION["title"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PollTitle")), null, 'errors'); } print ''."\n"; print ''."\n"; print ''."\n"; diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php index 4f437c07740..292f91f873f 100644 --- a/htdocs/public/opensurvey/studs.php +++ b/htdocs/public/opensurvey/studs.php @@ -77,7 +77,7 @@ if (GETPOST('ajoutcomment', 'alpha')) if (!$comment_user) { $error++; - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("User")), null, 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Name")), null, 'errors'); } if (!in_array($comment_user, $listofvoters)) @@ -161,7 +161,7 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout $body = str_replace('\n', '
', $langs->transnoentities('EmailSomeoneVoted', $nom, getUrlSondage($numsondage, true))); //var_dump($body);exit; - $cmailfile = new CMailFile("[".$application."] ".$langs->trans("Poll").': '.$object->titre, $email, $conf->global->MAIN_MAIL_EMAIL_FROM, $body, null, null, null, '', '', 0, -1); + $cmailfile = new CMailFile("[".$application."] ".$langs->trans("Poll").': '.$object->title, $email, $conf->global->MAIN_MAIL_EMAIL_FROM, $body, null, null, null, '', '', 0, -1); $result = $cmailfile->sendfile(); } } @@ -242,7 +242,7 @@ $form = new Form($db); $arrayofjs = array(); $arrayofcss = array('/opensurvey/css/style.css'); -llxHeaderSurvey($object->titre, "", 0, 0, $arrayofjs, $arrayofcss, $numsondage); +llxHeaderSurvey($object->title, "", 0, 0, $arrayofjs, $arrayofcss, $numsondage); if (empty($object->ref)) // For survey, id is a hex string { @@ -272,14 +272,14 @@ print $langs->trans("OpenSurveyHowTo").'

'; print '
'."\n"; -//affichage du titre du sondage -$titre = str_replace("\\", "", $object->titre); +// show title of survey +$titre = str_replace("\\", "", $object->title); print ''.dol_htmlentities($titre).'

'."\n"; -//affichage des commentaires du sondage -if ($object->commentaires) +// show description of survey +if ($object->description) { - print dol_htmlentitiesbr($object->commentaires); + print dol_htmlentitiesbr($object->description); print '
'."\n"; } @@ -598,7 +598,7 @@ if ($ligneamodifier < 0 && (!isset($_SESSION['nom']))) } // Affichage du bouton de formulaire pour inscrire un nouvel utilisateur dans la base - print '
'."\n"; + print ''."\n"; print ''."\n"; } @@ -716,7 +716,7 @@ $comments = $object->getComments(); if ($comments) { - print "
".$langs->trans("CommentsOfVoters").":
\n"; + print '
'.$langs->trans("CommentsOfVoters").':
'."\n"; foreach ($comments as $obj) { // ligne d'un usager pré-authentifié @@ -731,7 +731,7 @@ if ($comments) // Form to add comment if ($object->allow_comments) { - print '
'.$langs->trans("AddACommentForPoll")."
\n"; + print '
'.$langs->trans("AddACommentForPoll")."
\n"; print '
'."\n"; print $langs->trans("Name").': '; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 8185ddbec92..ee44af0a8dd 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -695,7 +695,9 @@ textarea.centpercent { font-size: 0.85em; opacity: 0.7; } - +.borderimp { + border: 1px solid #888 !important; +} .text-warning{ color : }
'.$langs->trans("PollTitle").'
'.$langs->trans("PollTitle").'
'.$langs->trans("Description").''; -$doleditor = new DolEditor('commentaires', $_SESSION["commentaires"], '', 120, 'dolibarr_notes', 'In', 1, 1, 1, ROWS_7, '90%'); +$doleditor = new DolEditor('description', $_SESSION["description"], '', 120, 'dolibarr_notes', 'In', 1, 1, 1, ROWS_7, '90%'); $doleditor->Create(0, ''); print '