You are here

function node_recur_node_recur_form in Node recur 7

Same name and namespace in other branches
  1. 7.2 node_recur.pages.inc \node_recur_node_recur_form()

The node recur form

1 string reference to 'node_recur_node_recur_form'
node_recur_menu in ./node_recur.module
Implements hook_menu().

File

./node_recur.pages.inc, line 6

Code

function node_recur_node_recur_form($form, $form_state, $node) {

  // Check if the form was already submitted
  if (isset($form_state['values'])) {
    return node_recur_node_recur_confirm($form, $form_state, $node);
  }

  // Display this node's date
  $start = node_recur_get_node_date_field_value($node);
  $end = node_recur_get_node_date_field_value($node, FALSE);
  $form['node_date'] = array(
    '#type' => 'item',
    '#title' => t('Date'),
    '#markup' => node_recur_format_date($start, $end),
  );
  $form = array_merge($form, _node_recur_node_recur_form($node->type));

  // Remove the "no repeat" option
  unset($form['option']['#options']['none']);
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Generate'),
  );
  $form['#node'] = $node;
  return $form;
}