You are here

function elfinder_admin_profile_change_volume in elFinder file manager 7.3

Same name and namespace in other branches
  1. 7.2 inc/elfinder.admin.profiles.inc \elfinder_admin_profile_change_volume()
2 string references to 'elfinder_admin_profile_change_volume'
elfinder_admin_dir_form in inc/elfinder.admin.profiles.inc
elfinder_admin_profile in inc/elfinder.admin.profiles.inc
@file file manager admin profile settings page

File

inc/elfinder.admin.profiles.inc, line 390
file manager admin profile settings page

Code

function elfinder_admin_profile_change_volume($form, &$form_state) {
  $clickedbutton = $form_state['clicked_button']['#name'];
  if (preg_match("/^rmfield-(\\d+)/", $clickedbutton, $m)) {
    $itemid = $m[1];
    unset($form_state['values']['volume'][$itemid]);
    $form_state['values']['volume'] = array_values($form_state['values']['volume']);
    unset($form_state['input']['volume'][$itemid]);
    $form_state['input']['volume'] = array_values($form_state['input']['volume']);
  }
  elseif ($clickedbutton = 'addfield') {
    $form_state['input']['volume'][] = '';
  }
  $form_state['rebuild'] = TRUE;
}