function bg_image_ui_remove_path_form in Background Images 7
Confirm the removal of bg image path
1 string reference to 'bg_image_ui_remove_path_form'
- bg_image_ui_menu in bg_image_ui/
bg_image_ui.module - Implements hook_menu().
File
- bg_image_ui/
bg_image_ui.module, line 237
Code
function bg_image_ui_remove_path_form($form, &$form_state, $pid) {
$form = array();
$form['pid'] = array(
'#type' => 'value',
'#value' => $pid,
);
$item = bg_image_ui_get_path_item($pid);
if ($item) {
$question = t('Remove Background Image Item?');
$description = t('The Background Image will be removed from the page: @path<br/>This Action cannot be undone.', array(
'@path' => $item->path,
));
$path = 'admin/content/background-images';
return confirm_form($form, $question, $path, $description);
}
else {
$form['message'] = array(
'#markup' => '<p>Invalid background image path ID</p>',
);
$form['back'] = array(
'#markup' => l(t('<< Back to background images admin page'), 'admin/content/background-images'),
);
return $form;
}
}