mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/10411] Use AJAX to move items up/down and delete them
PHPBB3-10411
This commit is contained in:
@@ -899,6 +899,12 @@ class acp_groups
|
||||
}
|
||||
}
|
||||
|
||||
if (($action == 'move_up' || $action == 'move_down') && $request->is_ajax())
|
||||
{
|
||||
$json_response = new phpbb_json_response;
|
||||
$json_response->send(array('success' => true));
|
||||
}
|
||||
|
||||
$sql = 'SELECT group_id, group_name, group_colour, group_type, group_legend
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
ORDER BY group_legend ASC, group_type DESC, group_name ASC';
|
||||
@@ -911,13 +917,13 @@ class acp_groups
|
||||
if ($row['group_legend'])
|
||||
{
|
||||
$template->assign_block_vars('legend', array(
|
||||
'GROUP_NAME' => $group_name,
|
||||
'GROUP_COLOUR' => ($row['group_colour']) ? ' style="color: #' . $row['group_colour'] . '"' : '',
|
||||
'GROUP_TYPE' => $user->lang[phpbb_groupposition_legend::group_type_language($row['group_type'])],
|
||||
'GROUP_NAME' => $group_name,
|
||||
'GROUP_COLOUR' => ($row['group_colour']) ? ' style="color: #' . $row['group_colour'] . '"' : '',
|
||||
'GROUP_TYPE' => $user->lang[phpbb_groupposition_legend::group_type_language($row['group_type'])],
|
||||
|
||||
'U_MOVE_DOWN' => "{$this->u_action}&field=legend&action=move_down&g=" . $row['group_id'],
|
||||
'U_MOVE_UP' => "{$this->u_action}&field=legend&action=move_up&g=" . $row['group_id'],
|
||||
'U_DELETE' => "{$this->u_action}&field=legend&action=delete&g=" . $row['group_id'],
|
||||
'U_MOVE_DOWN' => "{$this->u_action}&field=legend&action=move_down&g=" . $row['group_id'],
|
||||
'U_MOVE_UP' => "{$this->u_action}&field=legend&action=move_up&g=" . $row['group_id'],
|
||||
'U_DELETE' => "{$this->u_action}&field=legend&action=delete&g=" . $row['group_id'],
|
||||
));
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user