function cacheflush_form in CacheFlush 7.3
Cacheflush preset edit form.
1 string reference to 'cacheflush_form'
- cacheflush_ui_menu in modules/
cacheflush_ui/ cacheflush_ui.module - Implements hook_menu().
File
- modules/
cacheflush_ui/ includes/ cacheflush_ui.forms.inc, line 12
Code
function cacheflush_form($form, &$form_state, $entity = NULL) {
global $base_url;
$form['title'] = array(
'#type' => 'textfield',
'#title' => t('Title'),
'#default_value' => isset($entity->title) ? check_plain($entity->title) : NULL,
'#required' => TRUE,
);
$form_state['cacheflush'] = $entity;
cacheflush_ui_preset_form_options($form, $form_state);
$form['actions']['#weight'] = 100;
$form['actions']['save'] = array(
'#type' => 'submit',
'#value' => isset($entity->id) ? t('Update') : t('Save'),
);
$form['actions']['cancel'] = array(
'#markup' => l(t('Cancel'), $base_url . '/' . cacheflush_ui_get_path()),
);
$form['#validate'][] = 'cacheflush_ui_preset_form_validate';
$form['#submit'][] = 'cacheflush_ui_preset_form_submit';
return $form;
}