function abjs_test_delete_confirm_form_submit in A/B Test JS 7
Deletes test and associated test-condition and test-experience rows.
File
- ./
abjs.admin.inc, line 558 - Admin forms to view/add/edit/delete tests, conditions, experiences.
Code
function abjs_test_delete_confirm_form_submit($form, &$form_state) {
if ($form_state['values']['confirm']) {
db_delete('abjs_test')
->condition('tid', $form_state['values']['tid'])
->execute();
db_delete('abjs_test_condition')
->condition('tid', $form_state['values']['tid'])
->execute();
db_delete('abjs_test_experience')
->condition('tid', $form_state['values']['tid'])
->execute();
drupal_set_message(t('Test "%name" has been deleted.', array(
'%name' => $form_state['values']['name'],
)));
}
$form_state['redirect'] = 'admin/config/user-interface/abjs/tests';
}