function rate_choose_template_form_submit in Rate 7
Same name and namespace in other branches
- 6.2 rate.admin.inc \rate_choose_template_form_submit()
Form submit callback for the choose_template_form.
File
- ./
rate.admin.inc, line 96 - Rating admin
Code
function rate_choose_template_form_submit($form, &$form_state) {
$template = $form_state['values']['template'];
$query = array(
'template' => $template,
);
if (isset($form['#widget_id'])) {
/**
* @todo: Copy over the options array from the template to the widget.
*/
$path = str_replace('%', $form['#widget_id'], RATE_PATH_ADMIN_PAGE_EDIT);
}
else {
$path = RATE_PATH_ADMIN_PAGE_ADD;
}
drupal_goto($path, array(
'query' => $query,
));
}