Completed
Pull Request — release-2.1 (#4915)
by Rick
09:22
created
Themes/default/Poll.template.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
 		}
39 39
 	</script>';
40 40
 
41
-	if (!empty($context['poll_error']['messages']))
42
-		echo '
41
+	if (!empty($context['poll_error']['messages'])) {
42
+			echo '
43 43
 			<div class="errorbox">
44 44
 				<dl class="poll_error">
45 45
 					<dt>
@@ -50,6 +50,7 @@  discard block
 block discarded – undo
50 50
 					</dt>
51 51
 				</dl>
52 52
 			</div>';
53
+	}
53 54
 
54 55
 	// Start the main poll form.
55 56
 	echo '
@@ -79,8 +80,9 @@  discard block
 block discarded – undo
79 80
 								<input type="text" name="options[', $choice['id'], ']" id="options-', $choice['id'], '" value="', $choice['label'], '" size="80" maxlength="255">';
80 81
 
81 82
 		// Does this option have a vote count yet, or is it new?
82
-		if ($choice['votes'] != -1)
83
-			echo ' (', $choice['votes'], ' ', $txt['votes'], ')';
83
+		if ($choice['votes'] != -1) {
84
+					echo ' (', $choice['votes'], ' ', $txt['votes'], ')';
85
+		}
84 86
 
85 87
 		echo '
86 88
 							</dd>';
@@ -118,14 +120,15 @@  discard block
 block discarded – undo
118 120
 								<input type="checkbox" id="poll_change_vote" name="poll_change_vote"', !empty($context['poll']['change_vote']) ? ' checked' : '', '>
119 121
 							</dd>';
120 122
 
121
-		if ($context['poll']['guest_vote_allowed'])
122
-			echo '
123
+		if ($context['poll']['guest_vote_allowed']) {
124
+					echo '
123 125
 							<dt>
124 126
 								<label for="poll_guest_vote">', $txt['poll_guest_vote'], ':</label>
125 127
 							</dt>
126 128
 							<dd>
127 129
 								<input type="checkbox" id="poll_guest_vote" name="poll_guest_vote"', !empty($context['poll']['guest_vote']) ? ' checked' : '', '>
128 130
 							</dd>';
131
+		}
129 132
 	}
130 133
 
131 134
 	echo '
@@ -141,12 +144,13 @@  discard block
 block discarded – undo
141 144
 					</fieldset>';
142 145
 
143 146
 	// If this is an edit, we can allow them to reset the vote counts.
144
-	if ($context['is_edit'])
145
-		echo '
147
+	if ($context['is_edit']) {
148
+			echo '
146 149
 					<fieldset id="poll_reset">
147 150
 						<legend>', $txt['reset_votes'], '</legend>
148 151
 						<input type="checkbox" name="resetVoteCount" value="on"> ' . $txt['reset_votes_check'] . '
149 152
 					</fieldset>';
153
+	}
150 154
 	echo '
151 155
 					<input type="submit" name="post" value="', $txt['save'], '" onclick="return submitThisOnce(this);" accesskey="s" class="button">
152 156
 				</div><!-- .roundframe -->
Please login to merge, or discard this patch.