function homebox_clone_page_submit in Homebox 7.2
Same name and namespace in other branches
- 7.3 homebox.admin.inc \homebox_clone_page_submit()
Submit callback for clone form.
1 string reference to 'homebox_clone_page_submit'
- homebox_clone_page in ./
homebox.admin.inc - Form callback for cloning a homebox.
File
- ./
homebox.admin.inc, line 290 - Homebox admin file, takes care admin interface for homebox
Code
function homebox_clone_page_submit($form, &$form_state) {
$page = new stdClass();
$page->name = $form_state['values']['name'];
if ($form_state['values']['import']) {
// First get the settings from the cloned homebox.
$page->settings = $form_state['values']['import']->settings;
// Now overwrite with the values from the form.
homebox_admin_form_to_page($page, $form_state);
}
homebox_save_page($page);
$form_state['redirect'] = 'admin/structure/homebox';
menu_rebuild();
}