You are here

function filebrowser_form_actions in Filebrowser 7.4

Same name and namespace in other branches
  1. 8 filebrowser.module \filebrowser_form_actions()
  2. 6.2 filebrowser.form.actions.inc \filebrowser_form_actions()
  3. 7.2 filebrowser.module \filebrowser_form_actions()
  4. 7.3 filebrowser.module \filebrowser_form_actions()
1 string reference to 'filebrowser_form_actions'
theme_dir_listing_list_view in ./filebrowser.theme.inc
Theming function for list view.

File

./filebrowser.module, line 816

Code

function filebrowser_form_actions($form, &$form_state, $header, $options, $actions, $node) {
  $form = array();
  $form['#node'] = $node;
  $form['table'] = array(
    '#type' => 'tableselect',
    '#header' => $header,
    '#options' => $options,
    '#multiple' => TRUE,
  );

  // search $options array to find the "Up Dir" line and de-activate the checkbox
  foreach ($options as $key => $option) {
    if (!$option['fid']) {
      $form['table'][$key]['#disabled'] = true;
    }
  }
  $fb_options = array(
    '' => t('choose an action'),
  );
  foreach ($actions as $action) {
    $fb_options[$action['operation']] = $action['title'];
  }
  $form['action'] = array(
    '#prefix' => '<br/><div class="container-inline">',
    '#title' => t('actions'),
    '#type' => 'select',
    '#options' => $fb_options,
  );
  $form['submit'] = array(
    '#value' => t('Process'),
    '#type' => 'submit',
    '#suffix' => '</div><br/>',
  );
  return $form;
}