[ticket/9548] Delete user quicktool drop down should have an empty or invalid selection as the default

PHPBB3-9548
This commit is contained in:
Joas Schilling 2010-04-18 15:13:53 +02:00
parent 03d50a2e83
commit 5f4c6e9c91
2 changed files with 21 additions and 14 deletions

View file

@ -140,7 +140,7 @@
<legend>{L_DELETE_USER}</legend>
<dl>
<dt><label for="delete_type">{L_DELETE_USER}:</label><br /><span>{L_DELETE_USER_EXPLAIN}</span></dt>
<dd><select id="delete_type" name="delete_type"><option value="retain">{L_RETAIN_POSTS}</option><option value="remove">{L_DELETE_POSTS}</option></select></dd>
<dd><select id="delete_type" name="delete_type"><option class="sep" value="">{L_SELECT_OPTION}</option><option value="retain">{L_RETAIN_POSTS}</option><option value="remove">{L_DELETE_POSTS}</option></select></dd>
</dl>
<p class="quick">
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />

View file

@ -191,6 +191,8 @@ class acp_users
trigger_error($user->lang['CANNOT_REMOVE_YOURSELF'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
}
if ($delete_type)
{
if (confirm_box(true))
{
user_delete($delete_type, $user_id, $user_row['username']);
@ -211,6 +213,11 @@ class acp_users
);
}
}
else
{
trigger_error($user->lang['NO_MODE'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
}
}
// Handle quicktool actions
switch ($action)