You are here

function lingotek_grid_customize_form in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 7.7 lingotek.bulk_grid.inc \lingotek_grid_customize_form()
  2. 7.4 lingotek.bulk_grid.inc \lingotek_grid_customize_form()
  3. 7.5 lingotek.bulk_grid.inc \lingotek_grid_customize_form()
1 string reference to 'lingotek_grid_customize_form'
lingotek_grid_customize in ./lingotek.bulk_grid.inc

File

./lingotek.bulk_grid.inc, line 468

Code

function lingotek_grid_customize_form($form, $form_state) {

  // Container to create styleable div class
  $form['customize_table_fieldset']['custom_columns'] = array(
    '#type' => 'container',
  );

  // Container to create styleable div class
  $form['customize_table_fieldset']['custom_buttons'] = array(
    '#type' => 'container',
  );

  // Submit customized columns button
  $form['customize_table_fieldset']['custom_buttons']['custom_submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
    '#submit' => array(
      'lingotek_grid_filter_submit',
    ),
  );

  // Reset column defaults button
  $form['customize_table_fieldset']['custom_buttons']['custom_clear'] = array(
    '#type' => 'submit',
    '#value' => t('Reset to Defaults'),
    '#submit' => array(
      'lingotek_grid_reset_columns',
    ),
  );
  $form_state['values']['columns'] = $form_state['entity_type'] == 'config' ? lingotek_grid_get_columns('config') : lingotek_grid_get_columns();
  $form['customize_table_fieldset']['custom_columns'] += $form_state['entity_type'] == 'config' ? lingotek_config_build_column_checkboxes($form_state) : lingotek_grid_build_column_checkboxes($form_state);
  return $form;
}