Code Duplication    Length = 10-14 lines in 4 locations

Themes/default/ManageSmileys.template.php 1 location

@@ 447-456 (lines=10) @@
444
						<select name="icon_board" id="icon_board_select">
445
							<option value="0"', empty($context['icon']['board_id']) ? ' selected' : '', '>', $txt['icons_edit_icons_all_boards'], '</option>';
446
447
	foreach ($context['categories'] as $category)
448
	{
449
		echo '
450
							<optgroup label="', $category['name'], '">';
451
452
		foreach ($category['boards'] as $board)
453
			echo '
454
								<option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt;' : '', ' ', $board['name'], '</option>';
455
		echo '
456
							</optgroup>';
457
	}
458
	echo '
459
						</select>

Themes/default/MoveTopic.template.php 1 location

@@ 204-217 (lines=14) @@
201
					<form action="' . $scripturl . '?action=mergetopics;from=' . $context['origin_topic'] . ';targetboard=' . $context['target_board'] . ';board=' . $context['current_board'] . '.0" method="post" accept-charset="', $context['character_set'], '" id="mergeSelectBoard">
202
						', $txt['target_below'], ' (', $txt['board'], ':&nbsp;
203
						<select name="targetboard" onchange="this.form.submit();">';
204
		foreach ($context['merge_categories'] as $cat)
205
		{
206
			echo '
207
							<optgroup label="', $cat['name'], '">';
208
209
			foreach ($cat['boards'] as $board)
210
			{
211
				echo '
212
								<option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt;' : '', ' ', $board['name'], '&nbsp;</option>';
213
			}
214
215
			echo '
216
							</optgroup>';
217
		}
218
		echo '
219
						</select>)
220
						<input type="hidden" name="from" value="' . $context['origin_topic'] . '">

Themes/default/Post.template.php 1 location

@@ 181-190 (lines=10) @@
178
								<div>
179
									<span class="label">', $txt['calendar_post_in'], '</span>
180
								<select name="board">';
181
			foreach ($context['event']['categories'] as $category)
182
			{
183
				echo '
184
										<optgroup label="', $category['name'], '">';
185
186
				foreach ($category['boards'] as $board)
187
					echo '
188
											<option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt;' : '', ' ', $board['name'], '&nbsp;</option>';
189
				echo '
190
										</optgroup>';
191
			}
192
			echo '
193
									</select>

Themes/default/Calendar.template.php 1 location

@@ 887-896 (lines=10) @@
884
								<input type="checkbox" style="vertical-align: middle;" name="link_to_board"', (!empty($context['event']['board']) ? ' checked' : ''), ' onclick="toggleLinked(this.form);">
885
								<select name="board"', empty($context['event']['board']) ? ' disabled' : '', '>';
886
887
		foreach ($context['event']['categories'] as $category)
888
		{
889
			echo '
890
									<optgroup label="', $category['name'], '">';
891
892
			foreach ($category['boards'] as $board)
893
				echo '
894
										<option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=&gt;' : '', ' ', $board['name'], '&nbsp;</option>';
895
			echo '
896
									</optgroup>';
897
		}
898
		echo '
899
								</select>