Fix duplicate field and look and feel

This commit is contained in:
Laurent Destailleur 2021-09-29 17:06:51 +02:00
parent 52fb627a64
commit 2dd55301de
2 changed files with 9 additions and 17 deletions

View File

@ -251,18 +251,6 @@ if ($action == 'edit') {
}
print '</td></tr>';
// EMail
//If linked user, then emails are going to be sent to users' email
if (!$object->fk_user_creat) {
print '<tr><td>'.$langs->trans("EMail").'</td><td colspan="2">';
if ($action == 'edit') {
print '<input type="text" name="nouvelleadresse" class="minwith200" value="'.$object->mail_admin.'">';
} else {
print dol_print_email($object->mail_admin, 0, 0, 1);
}
print '</td></tr>';
}
// Receive an email with each vote
print '<tr><td>'.$langs->trans('ToReceiveEMailForEachVote').'</td><td colspan="2">';
if ($action == 'edit') {
@ -312,10 +300,14 @@ print '</td></tr>';
// Author
print '<tr><td>';
print $langs->trans("Author").'</td><td colspan="2">';
if ($object->fk_user_creat) {
if ($object->fk_user_creat > 0) {
print $userstatic->getLoginUrl(1);
} else {
print dol_htmlentities($object->nom_admin);
if ($action == 'edit') {
print '<input type="text" name="nouvelleadresse" class="minwith200" value="'.$object->mail_admin.'">';
} else {
print dol_print_email($object->mail_admin, 0, 0, 1);
}
}
print '</td></tr>';

View File

@ -170,7 +170,7 @@ if ($_SESSION["mailsonde"]) {
$cochemail = "checked";
}
print '<input type="checkbox" name="mailsonde" '.$cochemail.'> '.$langs->trans("ToReceiveEMailForEachVote").'<br>'."\n";
print '<input type="checkbox" id="mailsonde" name="mailsonde" '.$cochemail.'> <label for="mailsonde">'.$langs->trans("ToReceiveEMailForEachVote").'</label><br>'."\n";
if ($_SESSION['allow_comments']) {
$allow_comments = 'checked';
@ -178,7 +178,7 @@ if ($_SESSION['allow_comments']) {
if (GETPOSTISSET('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" id="allow_comments" name="allow_comments" '.$allow_comments.'"> <label for="allow_comments">'.$langs->trans('CanComment').'</label><br>'."\n";
if ($_SESSION['allow_spy']) {
$allow_spy = 'checked';
@ -186,7 +186,7 @@ if ($_SESSION['allow_spy']) {
if (GETPOSTISSET('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" id="allow_spy" name="allow_spy" '.$allow_spy.'> <label for="allow_spy">'.$langs->trans('CanSeeOthersVote').'</label><br>'."\n";
if (GETPOST('choix_sondage')) {
if (GETPOST('choix_sondage') == 'date') {