Skip to content
Snippets Groups Projects
Commit 1e6c0c0b authored by Marcos García de La Fuente's avatar Marcos García de La Fuente
Browse files

There is no poll format A+ or D+

parent 29126795
Branches
Tags
No related merge requests found
......@@ -196,7 +196,7 @@ print '</td>';
print '</tr>';
// Type
$type=($object->format=="A"||$object->format=="A+")?'classic':'date';
$type=($object->format=="A")?'classic':'date';
print '<tr><td>'.$langs->trans("Type").'</td><td colspan="2">';
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").'</td></tr>';
......
......@@ -59,7 +59,7 @@ $toutsujet=explode(",",$object->sujet);
$input.=$langs->trans("Name").";";
for ($i=0;$toutsujet[$i];$i++)
{
if ($object->format=="D"||$object->format=="D+")
if ($object->format=="D")
{
$input.=''.dol_print_date($toutsujet[$i],'dayhour').';';
} else {
......
......@@ -95,7 +95,7 @@ while ($i < min($num,$limit))
print '<td>';
print '<a href="'.dol_buildpath('/opensurvey/card.php',1).'?id='.$obj->id_sondage.'">'.img_picto('','object_opensurvey').' '.$obj->id_sondage.'</a>';
print '</td><td>'.dol_htmlentities($obj->titre).'</td><td>';
$type=($obj->format=='A' || $obj->format=='A+')?'classic':'date';
$type=($obj->format=='A')?'classic':'date';
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");
print '</td><td>'.dol_htmlentities($obj->nom_admin).'</td>';
......
......@@ -262,7 +262,7 @@ print '<br><br>'."\n";
print '<table class="resultats">'."\n";
// Show choice titles
if ($object->format=="D"||$object->format=="D+")
if ($object->format=="D")
{
//affichage des sujets du sondage
print '<tr>'."\n";
......@@ -637,7 +637,7 @@ $meilleursujet = '';
for ($i = 0; $i < $nbcolonnes; $i++) {
if (isset($sumfor[$i]) && isset($meilleurecolonne) && $sumfor[$i] == $meilleurecolonne) {
$meilleursujet.=", ";
if ($object->format=="D"||$object->format=="D+") {
if ($object->format=="D") {
$meilleursujetexport = $toutsujet[$i];
if (strpos($toutsujet[$i], '@') !== false) {
......
......@@ -157,7 +157,7 @@ if ($testmodifier)
}
// Add column (not for date)
if (GETPOST("ajoutercolonne") && GETPOST('nouvellecolonne') && ($object->format == "A" || $object->format == "A+"))
if (GETPOST("ajoutercolonne") && GETPOST('nouvellecolonne') && ($object->format == "A"))
{
// Security check
if (!$user->rights->opensurvey->write) accessforbidden();
......@@ -178,7 +178,7 @@ if (GETPOST("ajoutercolonne") && GETPOST('nouvellecolonne') && ($object->format
}
// Add column (with format date)
if (isset($_POST["ajoutercolonne"]) && ($object->format == "D" || $object->format == "D+"))
if (isset($_POST["ajoutercolonne"]) && ($object->format == "D"))
{
// Security check
if (!$user->rights->opensurvey->write) accessforbidden();
......@@ -443,7 +443,7 @@ print '</td>';
print '</tr>';
// Type
$type=($object->format=="A"||$object->format=="A+")?'classic':'date';
$type=($object->format=="A")?'classic':'date';
print '<tr><td>'.$langs->trans("Type").'</td><td colspan="2">';
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").'</td></tr>';
......@@ -487,7 +487,7 @@ if (GETPOST('ajoutsujet'))
print "<br><br>"."\n";
// Add new column
if ($object->format=="A"||$object->format=="A+")
if ($object->format=="A")
{
print $langs->trans("AddNewColumn") .':<br><br>';
print $langs->trans("Title").' <input type="text" name="nouvellecolonne" size="40"><br>';
......@@ -593,7 +593,7 @@ print '</tr>'."\n";
// Show choice titles
if ($object->format=="D"||$object->format=="D+")
if ($object->format=="D")
{
//affichage des sujets du sondage
print '<tr>'."\n";
......@@ -1009,7 +1009,7 @@ for ($i = 0; $i < $nbcolonnes; $i++) {
if (isset($sumfor[$i]) === true && isset($meilleurecolonne) === true && $sumfor[$i] == $meilleurecolonne) {
$meilleursujet.=", ";
if ($object->format == "D" || $object->format == "D+") {
if ($object->format == "D") {
$meilleursujetexport = $toutsujet[$i];
if (strpos($toutsujet[$i], '@') !== false) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment