You are here

function breakpoints_admin_breakpoint_actions_form_submit in Breakpoints 7

Admin action form submit

File

./breakpoints.admin.inc, line 606
Breakpoints - admin settings

Code

function breakpoints_admin_breakpoint_actions_form_submit($form, &$form_state) {
  $group_name = $form_state['group_name'];
  $action = $form_state['action'];
  $breakpoint = $form_state['breakpoint'];
  switch ($action) {
    case 'delete':
      breakpoints_breakpoint_delete_by_fullkey($breakpoint);
      break;
    case 'enable':
    case 'disable':
      breakpoints_breakpoint_toggle_status($breakpoint);
      break;
  }
  if (!empty($group_name)) {
    $form_state['redirect'] = 'admin/config/media/breakpoints/groups/' . $group_name;
  }
  else {
    $form_state['redirect'] = 'admin/config/media/breakpoints';
  }
}