function rate_ui_delete_form_submit in Rate 7.2
Implements hook_form_submit().
Delete widget submit form.
File
- ui/
rate_ui.form.inc, line 1154 - This file contains the differtent Rate UI forms.
Code
function rate_ui_delete_form_submit($form, &$form_state) {
// @todo: Delete uploaded files
db_delete('rate_widget')
->condition('wid', $form['#widget_wid'])
->execute();
db_delete('rate_widget_button')
->condition('wid', $form['#widget_wid'])
->execute();
db_delete('rate_widget_element')
->condition('wid', $form['#widget_wid'])
->execute();
drupal_set_message(t('The rate widget %name has been deleted.', array(
'%name' => $form['#widget_name'],
)));
$form_state['redirect'] = 'admin/structure/rate';
}