function lingotek_grid_customize_form in Lingotek Translation 7.6
Same name and namespace in other branches
- 7.7 lingotek.bulk_grid.inc \lingotek_grid_customize_form()
- 7.4 lingotek.bulk_grid.inc \lingotek_grid_customize_form()
- 7.5 lingotek.bulk_grid.inc \lingotek_grid_customize_form()
1 string reference to 'lingotek_grid_customize_form'
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;
}