Merge pull request #5605 from aspangaro/4.0-p39

Uniformize presentation on opensurvey
This commit is contained in:
Laurent Destailleur 2016-08-17 15:51:59 +02:00 committed by GitHub
commit eea175b7e7
3 changed files with 15 additions and 12 deletions

View File

@ -188,10 +188,11 @@ if ($object->fk_user_creat)
$userstatic->fetch($object->fk_user_creat); $userstatic->fetch($object->fk_user_creat);
} }
$title = $object->titre." - ".$langs->trans('Card');
$helpurl = '';
$arrayofjs=array(); $arrayofjs=array();
$arrayofcss=array('/opensurvey/css/style.css'); $arrayofcss=array('/opensurvey/css/style.css');
llxHeader('',$object->titre, 0, 0, 0, 0, $arrayofjs, $arrayofcss); llxHeader('',$title, $helpurl, 0, 0, 0, $arrayofjs, $arrayofcss);
// Define format of choices // Define format of choices
@ -219,7 +220,7 @@ print '<table class="border" width="100%">';
$linkback = '<a href="'.dol_buildpath('/opensurvey/list.php',1).'">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.dol_buildpath('/opensurvey/list.php',1).'">'.$langs->trans("BackToList").'</a>';
// Ref // Ref
print '<tr><td class="titlefieldcreate">'.$langs->trans('Ref').'</td>'; print '<tr><td class="titlefield">'.$langs->trans('Ref').'</td>';
print '<td colspan="3">'; print '<td colspan="3">';
print $form->showrefnav($object, 'id', $linkback, 1, 'id_sondage', 'id_sondage'); print $form->showrefnav($object, 'id', $linkback, 1, 'id_sondage', 'id_sondage');
print '</td>'; print '</td>';

View File

@ -403,9 +403,11 @@ if ($result <= 0)
exit; exit;
} }
$title = $object->titre." - ".$langs->trans('Card');
$helpurl = '';
$arrayofjs=array(); $arrayofjs=array();
$arrayofcss=array('/opensurvey/css/style.css'); $arrayofcss=array('/opensurvey/css/style.css');
llxHeader('',$object->titre, 0, 0, 0, 0, $arrayofjs, $arrayofcss); llxHeader('',$title, $helpurl, 0, 0, 0, $arrayofjs, $arrayofcss);
// Define format of choices // Define format of choices
@ -432,7 +434,7 @@ print '<table class="border" width="100%">';
$linkback = '<a href="'.dol_buildpath('/opensurvey/list.php',1).(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.dol_buildpath('/opensurvey/list.php',1).(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
// Ref // Ref
print '<tr><td class="titlefieldcreate">'.$langs->trans('Ref').'</td>'; print '<tr><td class="titlefield">'.$langs->trans('Ref').'</td>';
print '<td colspan="3">'; print '<td colspan="3">';
print $form->showrefnav($object, 'id', $linkback, 1, 'id_sondage', 'id_sondage'); print $form->showrefnav($object, 'id', $linkback, 1, 'id_sondage', 'id_sondage');
print '</td>'; print '</td>';

View File

@ -1,7 +1,7 @@
<?php <?php
/* Copyright (C) 2013-2014 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2013-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> * Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -141,7 +141,7 @@ dol_fiche_head();
// Affichage des différents champs textes a remplir // Affichage des différents champs textes a remplir
print '<table class="border" width="100%">'."\n"; print '<table class="border" width="100%">'."\n";
print '<tr><td class="fieldrequired">'. $langs->trans("PollTitle") .'</td><td><input type="text" name="titre" size="40" maxlength="80" value="'.$_SESSION["titre"].'"></td>'."\n"; print '<tr><td class="titlefieldcreate fieldrequired">'. $langs->trans("PollTitle") .'</td><td><input type="text" name="titre" size="40" maxlength="80" value="'.$_SESSION["titre"].'"></td>'."\n";
if (! $_SESSION["titre"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) if (! $_SESSION["titre"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre')))
{ {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PollTitle")), null, 'errors'); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PollTitle")), null, 'errors');
@ -180,7 +180,7 @@ if ($_SESSION['allow_comments']) $allow_comments = 'checked';
if (isset($_POST['allow_comments'])) $allow_comments=GETPOST('allow_comments')?'checked':''; if (isset($_POST['allow_comments'])) $allow_comments=GETPOST('allow_comments')?'checked':'';
print '<input type="checkbox" name="allow_comments" '.$allow_comments.'"> '.$langs->trans('CanComment').'<br />'."\n"; print '<input type="checkbox" name="allow_comments" '.$allow_comments.'"> '.$langs->trans('CanComment').'<br />'."\n";
if ($_SESSION['allow_spy']) $allow_spy = 'checed'; if ($_SESSION['allow_spy']) $allow_spy = 'checked';
if (isset($_POST['allow_spy'])) $allow_spy=GETPOST('allow_spy')?'checked':''; if (isset($_POST['allow_spy'])) $allow_spy=GETPOST('allow_spy')?'checked':'';
print '<input type="checkbox" name="allow_spy" '.$allow_spy.'> '.$langs->trans('CanSeeOthersVote').'<br />'."\n"; print '<input type="checkbox" name="allow_spy" '.$allow_spy.'> '.$langs->trans('CanSeeOthersVote').'<br />'."\n";