mediamosa_connector_settings

Versions
mediamosa-21
mediamosa_connector_settings()

Implement hook_settings().

Code

sites/all/modules/mediamosa_connector/mediamosa_connector.module, line 108

<?php
function mediamosa_connector_settings() {

  $form = array();

  $form['connection'] = array(
    '#type' => 'fieldset',
    '#title' => t('Connection settings to MediaMosa REST interface'),
    '#collapsible' => TRUE,
    '#weight' => -5,
  );
  $form['connection']['mediamosa_connector_url'] = array(
    '#type' => 'textfield',
    '#title' => t('URL'),
    '#description' => t('Enter the URL of the interface you want to connect to.'),
    '#required' => TRUE,
    '#default_value' => '',
  );
  $form['connection']['mediamosa_connector_username'] = array(
    '#type' => 'textfield',
    '#title' => t('Username'),
    '#description' => t('Enter the MediaMosa user name that needs to connect.'),
    '#required' => TRUE,
    '#default_value' => '',
  );
  $form['connection']['mediamosa_connector_password'] = array(
    '#type' => 'textfield',
    '#title' => t('Password'),
    '#description' => t('Password might be required to login.'),
    '#required' => FALSE,
    '#default_value' => '',
  );

  if (variable_get('mediamosa_connector_url', '') != '' && variable_get('mediamosa_connector_username', '') != '') {
    $form['connection']['check_connection'] = array(
      '#type' => 'submit',
      '#value' => t('Check connection'),
      '#submit' => array('mediamosa_connector_check_connection_submit'),
      '#weight' => 1,
    );
  }

  $form['other'] = array(
    '#type' => 'fieldset',
    '#title' => t('Other settings'),
    '#collapsible' => TRUE,
    '#weight' => 0,

  );
  $form['other']['mediamosa_connector_debug'] = array(
    '#type' => 'checkbox',
    '#title' => t('Verbose MediaMosa request information'),
    '#description' => t('Enable to view debug request information. This information is show in a drupal block. You must enable this block to view the debug contents.'),
    '#default_value' => FALSE,
  );

  $form['#submit'] = array('mediamosa_connector_settings_submit');
  $form = system_settings_form($form);

 // $form['buttons']['submit'] = array($form['buttons']['submit'], array('#type' => 'submit', '#value' => t('Check connection') ));
  return $form;
}
?>