Bläddra i källkod

Add the second select box with all the other custom fields

Signed-off-by: Suki <[email protected]>
Suki 10 år sedan
förälder
incheckning
24e0f64c06
2 ändrade filer med 18 tillägg och 4 borttagningar
  1. 1 0
      Sources/ManageSettings.php
  2. 17 4
      Themes/default/Admin.template.php

+ 1 - 0
Sources/ManageSettings.php

@@ -1455,6 +1455,7 @@ function EditCustomProfiles()
 
 			while ($row = $smcFunc['db_fetch_assoc']($result))
 				$context['all_fields'][$row['id_field']] = array(
+					'id' => $row['id_field'],
 					'order' => $row['field_order'],
 					'name' => $row['field_name']
 				);

+ 17 - 4
Themes/default/Admin.template.php

@@ -1087,12 +1087,25 @@ function template_edit_profile_field()
 												<strong><label for="order">', $txt['custom_edit_order'], ':</label></strong>
 											</dt>
 											<dd>
-												<select id="order" name="field_placement">
-													', empty($context['field']['order']) ? '<option value="">(' .$txt['custom_edit_order_unchanged'] . ')</option>' : '', '
+												<select id="order" name="field_order_placement">
+													', (empty($context['field']['order']) ? '<option value="">(' .$txt['custom_edit_order_unchanged'] . ')</option>' : ''), '
 														<option value="after">' . $txt['custom_edit_order_after'] . '...</option>
 														<option value="before">' . $txt['custom_edit_order_before'] . '...</option>
-								</select>
-											</dd>
+												</select>';
+
+	echo '
+												<select id="field_order" name="field_order"', (empty($context['field']['order']) ? ' disabled' : ''), '>
+													', (empty($context['field']['order']) ? '<option value="">(' . $txt['custom_edit_order_unchanged'] . ')</option>' : '');
+
+	foreach ($context['all_fields'] as $order)
+		echo '
+													<option', $order['id'] == $context['fid'] ? ' selected' : '', ' value="', $order['id'], '">', $order['name'], '</option>';
+
+	echo '
+												</select>
+											</dd>';
+
+	echo '
 
 											<dt>
 												<strong><label for="placement">', $txt['custom_edit_placement'], ':</label></strong>