You are here

function globallink_adaptor_settings in GlobalLink Connect for Drupal 7.7

Same name and namespace in other branches
  1. 7.5 globallink_settings.inc \globallink_adaptor_settings()
  2. 7.6 globallink_settings.inc \globallink_adaptor_settings()

Renders form for globallink_adaptor_settings.

1 string reference to 'globallink_adaptor_settings'
globallink_settings_page in ./globallink_settings.inc

File

./globallink_settings.inc, line 272

Code

function globallink_adaptor_settings() {
  $form = array();
  $form['globallink_adaptor_settings'] = array(
    '#type' => 'fieldset',
    '#title' => t('Adaptor Settings'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['globallink_adaptor_settings']['globallink_pager_limit'] = array(
    '#type' => 'textfield',
    '#title' => t('Dashboard Pager Limit'),
    '#default_value' => variable_get('globallink_pager_limit', 10),
    '#required' => TRUE,
    '#size' => 50,
  );
  $form['globallink_adaptor_settings']['globallink_enable_preview'] = array(
    '#type' => 'radios',
    '#title' => t('Enable Preview For Receive Translations'),
    '#default_value' => variable_get('globallink_enable_preview', 1),
    '#options' => array(
      t('No'),
      t('Yes'),
    ),
  );
  $form['globallink_adaptor_settings']['globallink_publish_node'] = array(
    '#type' => 'radios',
    '#title' => t('Publish Translated Content'),
    '#default_value' => variable_get('globallink_publish_node', 0),
    '#options' => array(
      t('No'),
      t('Yes'),
      t('Use Source Content Setting'),
    ),
  );
  $form['globallink_adaptor_settings']['globallink_cron_type'] = array(
    '#type' => 'radios',
    '#title' => t('Automatic Update Status'),
    '#default_value' => variable_get('globallink_cron_type', 0),
    '#options' => array(
      t('Disabled'),
      t('Drupal Cron'),
    ),
  );
  $form['globallink_adaptor_settings']['globallink_proxy_url'] = array(
    '#type' => 'textfield',
    '#title' => t('Proxy URL'),
    '#default_value' => variable_get('globallink_proxy_url', ''),
    '#required' => FALSE,
    '#size' => 50,
  );
  $form['globallink_adaptor_settings']['globallink_entity_create_revisions'] = array(
    '#type' => 'radios',
    '#title' => t('Create Revisions for Entities'),
    '#default_value' => variable_get('globallink_entity_create_revisions', 0),
    '#options' => array(
      t('No'),
      t('Yes'),
    ),
  );
  $form['globallink_adaptor_settings']['globallink_enable_debug'] = array(
    '#type' => 'radios',
    '#title' => t('Enable Debug Mode'),
    '#default_value' => variable_get('globallink_enable_debug', 0),
    '#options' => array(
      t('No'),
      t('Yes'),
    ),
  );
  $entity_version = system_get_info('module', 'entity_translation');
  if ($entity_version['version'] == '7.x-1.0-beta5') {
    $form['globallink_adaptor_settings']['globallink_override_localize'] = array(
      '#type' => 'radios',
      '#title' => t('Override Localize with Translate for Taxonomy'),
      '#default_value' => variable_get('globallink_override_localize', 0),
      '#options' => array(
        t('No'),
        t('Yes'),
      ),
    );
  }
  $form['globallink_adaptor_settings']['submit_general_save'] = array(
    '#type' => 'submit',
    '#value' => t('Save Adaptor Settings'),
  );
  return $form;
}