You are here

function rate_choose_template_form_submit in Rate 6.2

Same name and namespace in other branches
  1. 7 rate.admin.inc \rate_choose_template_form_submit()

Form submit callback for the choose_template_form.

File

./rate.admin.inc, line 97
Rating admin

Code

function rate_choose_template_form_submit($form, &$form_state) {
  $template = $form_state['values']['template'];
  $query = 'template=' . urlencode($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, $query);
}