You are here

function fonts_com_project_form_submit in @font-your-face 7.2

Sets active project, or creates a new project.

File

modules/fonts_com/fonts_com.module, line 536

Code

function fonts_com_project_form_submit($form, &$form_state) {
  if (isset($form_state['values']['project_name'])) {

    // Handles AJAX form submission, saves project info.
    fonts_com_project_edit_form_submit($form, $form_state);
  }
  else {

    // Handles non-AJAX for submission, redirects to project.
    $project_id = $form_state['values']['project'];
    $path_end = 'edit/' . $project_id;
    if ($project_id == '*new*') {
      $path_end = 'new';
    }

    // if
    drupal_goto('admin/config/user-interface/fontyourface/fonts_com/project/' . $path_end);
  }

  // else
}