You are here

function bueditor_selaction_submit in BUEditor 7

Same name and namespace in other branches
  1. 6.2 admin/bueditor.admin.inc \bueditor_selaction_submit()
  2. 6 bueditor.admin.inc \bueditor_selaction_submit()

Selected buttons actions form submission.

1 string reference to 'bueditor_selaction_submit'
bueditor_selaction_form in admin/bueditor.admin.inc
Selected buttons actions form.

File

admin/bueditor.admin.inc, line 474

Code

function bueditor_selaction_submit($form, &$form_state) {
  $bids = array_keys(array_filter($form_state['values']['checks']));
  switch ($form_state['values']['selaction']) {
    case 'delete':
      bueditor_delete_buttons($bids);
      break;
    case 'export':
      bueditor_export_buttons($bids);
      break;
    case 'copyto':
      $_SESSION['bueimport'] = bueditor_buttons_by_id($bids);
      $form_state['redirect'] = 'admin/config/content/bueditor/' . $form_state['values']['copyto'];
      break;
  }

  //don't forget to save editor specific changes.
  $editor = (object) $form_state['values']['editor'];
  $editor->eid && bueditor_write_editor($editor);
}