function abjs_condition_delete_confirm_form in A/B Test JS 7
Returns confirm form for deleting condition.
1 string reference to 'abjs_condition_delete_confirm_form'
- abjs_menu in ./
abjs.module - Implements hook_menu().
File
- ./
abjs.admin.inc, line 736 - Admin forms to view/add/edit/delete tests, conditions, experiences.
Code
function abjs_condition_delete_confirm_form($form, &$form_state, $cid) {
$form = array();
$condition_result = db_query('SELECT name FROM {abjs_condition} WHERE cid = :cid', array(
':cid' => $cid,
));
if (!empty($condition_result)) {
$form['cid'] = array(
'#type' => 'value',
'#value' => $cid,
);
$condition = $condition_result
->fetchObject();
$form['name'] = array(
'#type' => 'value',
'#value' => $condition->name,
);
return confirm_form($form, t('Are you sure you want to delete this condition: %name?', array(
'%name' => $condition->name,
)), 'admin/config/user-interface/abjs/conditions', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}
return $form;
}