Jelajahi Sumber

Fix duplicate field and look and feel

Laurent Destailleur 3 tahun lalu
induk
melakukan
2dd55301de
2 mengubah file dengan 9 tambahan dan 17 penghapusan
  1. 6 14
      htdocs/opensurvey/card.php
  2. 3 3
      htdocs/opensurvey/wizard/create_survey.php

+ 6 - 14
htdocs/opensurvey/card.php

@@ -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>';
 

+ 3 - 3
htdocs/opensurvey/wizard/create_survey.php

@@ -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') {