function current_search_delete_item_form in Facet API 7.2
Same name and namespace in other branches
- 6.3 contrib/current_search/plugins/export_ui/current_search_export_ui.class.php \current_search_delete_item_form()
- 7 contrib/current_search/plugins/export_ui/current_search_export_ui.class.php \current_search_delete_item_form()
Form constructor for the revert form.
1 string reference to 'current_search_delete_item_form'
- current_search_menu in contrib/
current_search/ current_search.module - Implements hook_menu_alter().
File
- contrib/
current_search/ plugins/ export_ui/ current_search_export_ui.class.php, line 544 - Export UI display customizations.
Code
function current_search_delete_item_form($form, &$form_state, stdClass $item, $name) {
$form['#current_search'] = array(
'item' => $item,
'name' => $name,
);
$form['text'] = array(
'#markup' => '<p>' . t('Are you sure you want to remove the item %name from the current search block configuration?.', array(
'%name' => $name,
)) . '</p>',
);
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Remove item'),
);
$form['actions']['cancel'] = array(
'#type' => 'link',
'#title' => t('Cancel'),
'#href' => 'admin/config/search/current_search/list/' . $item->name . '/edit',
'#attributes' => array(
'title' => t('Go back to current search block configuration'),
),
);
$form['#submit'][] = 'current_search_delete_item_form_submit';
return $form;
}