mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
FIX edit label of survey
This commit is contained in:
parent
9b68d78fe5
commit
b51dc54db8
|
|
@ -255,7 +255,7 @@ print '<tr><td>';
|
|||
$adresseadmin = $object->mail_admin;
|
||||
print $langs->trans("Title").'</td><td>';
|
||||
if ($action == 'edit') {
|
||||
print '<input type="text" name="nouveautitre" style="width: 95%" value="'.dol_escape_htmltag(dol_htmlentities($object->title)).'">';
|
||||
print '<input class="width300" type="text" name="nouveautitre" value="'.dolPrintHTML($object->title).'">';
|
||||
} else {
|
||||
print dol_htmlentities($object->title);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ if (empty($_SESSION['title'])) {
|
|||
//partie creation du sondage dans la base SQL
|
||||
//On prépare les données pour les inserer dans la base
|
||||
|
||||
print '<form name="formulaire" action="#bas" method="POST">'."\n";
|
||||
print '<form name="formulaire" id="surveyform" action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
|
||||
print load_fiche_titre($langs->trans("CreatePoll").' (2 / 2)');
|
||||
|
|
@ -143,6 +143,7 @@ for ($i = 0; $i < $_SESSION["nbrecases"]; $i++) {
|
|||
}
|
||||
print '<tr><td>'.$langs->trans("TitleChoice").' '.$j.': </td><td><input type="text" name="choix[]" size="40" maxlength="40" value="'.dol_escape_htmltag($_SESSION["choix$i"]).'" id="choix'.$i.'">';
|
||||
$tmparray = array('checkbox' => $langs->trans("CheckBox"), 'yesno' => $langs->trans("YesNoList"), 'foragainst' => $langs->trans("PourContreList"));
|
||||
|
||||
print ' '.$langs->trans("Type").' '.$form->selectarray("typecolonne[]", $tmparray, $_SESSION["typecolonne$i"]);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
|
|
@ -151,7 +152,15 @@ print '</table>'."\n";
|
|||
|
||||
//ajout de cases supplementaires
|
||||
print '<table><tr>'."\n";
|
||||
print '<td>'.$langs->trans("5MoreChoices").'</td><td><input type="image" name="ajoutcases" src="../img/add-16.png"></td>'."\n";
|
||||
print '<td>'.$langs->trans("5MoreChoices").'</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print '<div id="addchoice">';
|
||||
print img_picto('', 'add', '', 0, 0, 0, '', 'fa-2x valignmiddle btnTitle-icon');
|
||||
print '</div>';
|
||||
} else {
|
||||
print '<input type="image" name="ajoutcases" src="../img/add-16.png">';
|
||||
}
|
||||
print '</td>'."\n";
|
||||
print '</tr></table>'."\n";
|
||||
print'<br>'."\n";
|
||||
|
||||
|
|
@ -159,6 +168,15 @@ print '<table><tr>'."\n";
|
|||
print '<td></td><td><input type="submit" class="button" name="confirmecreation" value="'.dol_escape_htmltag($langs->trans("CreatePoll")).'"></td>'."\n";
|
||||
print '</tr></table>'."\n";
|
||||
|
||||
print '<script>
|
||||
// jQuery code to handle the div click event
|
||||
$(document).ready(function() {
|
||||
$("#addchoice").on("click", function() {
|
||||
$("#surveyform").submit();
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
|
||||
//fin du formulaire et bandeau de pied
|
||||
print '</form>'."\n";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user