function forena_delete_form in Forena Reports 7.3
Same name and namespace in other branches
- 6.2 forena.admin.inc \forena_delete_form()
- 6 forena.admin.inc \forena_delete_form()
- 7 forena.admin.inc \forena_delete_form()
- 7.2 forena.admin.inc \forena_delete_form()
Form to confirm the delete of a form.
Parameters
$form_state:
Return value
unknown_type
1 string reference to 'forena_delete_form'
- forena_menu in ./
forena.module - Implementation of hook_menu.
File
- ./
forena.admin.inc, line 2003
Code
function forena_delete_form($form_state, $formid, $name_in) {
// Parse names from url
$report_name = $name_in;
$desc = Frx::Menu()
->parseURL($report_name);
$report_name = $desc['name'];
global $language;
$link = $desc['link'];
$form['report_name'] = array(
'#type' => 'value',
'#value' => $report_name,
);
if (module_exists('locale')) {
$options = array(
'all' => t('All Languages'),
'single' => t('Only %lang', array(
'%lang' => $language->native,
)),
);
$form['delete_all_languages'] = array(
'#type' => 'radios',
'#title' => t('Delete report in all languages?'),
'#options' => $options,
'#default_value' => 'single',
);
$form['base_name'] = array(
'#type' => 'value',
'#value' => $desc['base_name'],
);
}
return confirm_form($form, t('Are you sure you want to delete %title?', array(
'%title' => $report_name,
)), isset($_GET['destination']) ? $_GET['destination'] : $link, t('This action cannot be undone.'), t('Delete'), t('Cancel'));
return $form;
}