You are here

function lingotek_setup_node_updates_form in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.2 lingotek.setup.inc \lingotek_setup_node_updates_form()
  2. 7.3 lingotek.setup.inc \lingotek_setup_node_updates_form()
  3. 7.4 lingotek.setup.inc \lingotek_setup_node_updates_form()
  4. 7.5 lingotek.setup.inc \lingotek_setup_node_updates_form()
  5. 7.6 lingotek.setup.inc \lingotek_setup_node_updates_form()

Future Page - Form Layout

1 string reference to 'lingotek_setup_node_updates_form'
lingotek_menu in ./lingotek.module
Implements hook_menu().

File

./lingotek.setup.inc, line 933

Code

function lingotek_setup_node_updates_form($form, $form_state) {
  $source_language = lingotek_get_source_language();
  $form['lingotek_header'] = array(
    '#markup' => '<h1>Node Updates</h1>',
  );

  //$form['lingotek_instructions'] = array( '#markup' => '<div>The Lingotek Translation module has be</div>' );
  $form['lingotek_header_line'] = array(
    '#markup' => '<hr />',
  );
  $form['lingotek_top_spacer'] = array(
    '#markup' => '<div>&nbsp;</div>',
  );
  $form['lingotek_message_1a'] = array(
    '#markup' => '<p>To enable full multilingual functionality on your site we recommend the following:</p>',
  );

  //$form['lingotek_message_1b'] = array( '#markup' => '<div>&nbsp;</div>' );
  $form['title_group'] = array(
    '#type' => 'fieldset',
    '#title' => t('Enable Multilingual Node Titles'),
    '#collapsible' => FALSE,
    '#collapsed' => FALSE,
  );
  $form['title_group']['lingotek_message_2a'] = array(
    '#markup' => '<p>Drupal\'s default node titles do not support multiple languages and translations.  For this reason Lingotek uses the Title module.</p>',
  );
  $form['title_group']['lingotek_message_2b'] = array(
    '#markup' => '<p>The Title module modifies your content types and adds a new title field, and copies over the current node titles.  The original node titles are left where they are, so you can switch back at any time.</p>',
  );
  $form['title_group']['lingotek_message_2c'] = array(
    '#markup' => '<p>The Title module will then respond to requests for node titles.</p>',
  );

  //$form['title_group']['lingotek_message_2n'] = array( '#markup' => '<div>&nbsp;</div>' );
  $form['title_group']['lingotek_message_2o'] = array(
    '#markup' => '<p style="padding-top: 10px;"><strong>This change will be made to the following content types:</strong></p>',
  );
  $form['title_group']['lingotek_message_2q'] = array(
    '#markup' => '<ul style="padding-left: 0px;">',
  );
  $form['title_group']['lingotek_message_2r'] = array(
    '#markup' => '<li>A Node Name</li>',
  );
  $form['title_group']['lingotek_message_2s'] = array(
    '#markup' => '</ul>',
  );
  $form['title_group']['transition_node_titles'] = array(
    '#type' => 'checkbox',
    '#title' => t('Yes, Enable Multilingual Node Titles'),
    '#prefix' => '<div style="padding-left: 30px; padding-top: 10px;">',
    '#suffix' => '</div>',
  );
  $form['language_group'] = array(
    '#type' => 'fieldset',
    '#title' => t('Update Nodes with Undefined Languages'),
    '#collapsible' => FALSE,
    '#collapsed' => FALSE,
  );
  $form['language_group']['lingotek_message_3a'] = array(
    '#markup' => '<p>Currently you have X nodes that do not identify what language their content is in.</p>',
  );
  $form['language_group']['lingotek_message_3b'] = array(
    '#markup' => '<p>To properly translate a node it needs to have a language defined.</p>',
  );
  $form['language_group']['lingotek_message_3c'] = array(
    '#markup' => '<p>To simplify the process, we can set the language setting for any nodes with an undefined language.</p>',
  );
  $form['language_group']['update_node_language'] = array(
    '#type' => 'checkbox',
    '#title' => t('Yes, Set Nodes with no Specified Language to @language.', array(
      '@language' => $source_language,
    )),
    '#prefix' => '<div style="padding-left: 30px; padding-top: 10px;">',
    '#suffix' => '</div>',
  );
  $form['lingotek_middle_spacer'] = array(
    '#markup' => '<div>&nbsp;</div>',
  );
  $form['lingotek_back_button'] = lingotek_setup_link(LINGOTEK_MENU_LANG_BASE_URL . '/new-account', t('Previous Step'));
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Next'),
  );
  return $form;
}