function rate_widget_delete_form in Rate 6.2
Same name and namespace in other branches
- 7 rate.admin.inc \rate_widget_delete_form()
Form for deleting widgets.
1 string reference to 'rate_widget_delete_form'
- rate_menu in ./
rate.module - Implements hook_menu().
File
- ./
rate.admin.inc, line 716 - Rating admin
Code
function rate_widget_delete_form(&$form_state, $id) {
$form = array();
$widgets = variable_get(RATE_VAR_WIDGETS, array());
$form['#widget_id'] = $id;
if (!($title = $widgets[$id]->title)) {
drupal_not_found();
module_invoke_all('exit') & exit;
}
$form['info'] = array(
'#value' => '<p>' . t('Are you sure you want to delete widget %title?', array(
'%title' => $title,
)) . '</p>',
);
$form['buttons']['submit'] = array(
'#type' => 'submit',
'#value' => t('Delete'),
);
$form['buttons']['cancel'] = array(
'#value' => l('Cancel', RATE_PATH_ADMIN_PAGE),
);
return $form;
}