You are here

function slickgrid_views_ui_rearrange_form_submit in Slickgrid 6

Additional submit handler for views_ui_rearrange_form Delete any user settings for the view which will prevent reraranged fields from displaying properly

_state

Parameters

array $form:

1 string reference to 'slickgrid_views_ui_rearrange_form_submit'
slickgrid_form_alter in ./slickgrid.module
Implementation of hook_form_alter().

File

./slickgrid.module, line 823

Code

function slickgrid_views_ui_rearrange_form_submit($form, $form_state) {
  global $user;

  // Get any settings for this view
  $settings = slickgrid_get_settings($user->uid, $form_state['view']->name);

  // If there are settings, wipe hidden_columns & ordered_columns
  if (is_array($settings)) {
    slickgrid_set_settings($user->uid, $form_state['view']->name, array(
      'hidden_columns' => null,
      'ordered_columns' => null,
    ));
  }
}