You are here

function dropbox_client_settings in Dropbox Client 7

Same name and namespace in other branches
  1. 7.4 dropbox_client.module \dropbox_client_settings()
  2. 7.2 dropbox_client.module \dropbox_client_settings()
  3. 7.3 dropbox_client.module \dropbox_client_settings()
1 string reference to 'dropbox_client_settings'
dropbox_client_menu in ./dropbox_client.module
Implements hook_menu().

File

./dropbox_client.module, line 77

Code

function dropbox_client_settings() {
  $form['dropbox_client_account_type'] = array(
    '#type' => 'select',
    '#title' => t('Selected'),
    '#options' => array(
      0 => t('Select'),
      1 => t('Widesite Drobox Account'),
      2 => t('Drobox Account per User'),
    ),
    '#default_value' => variable_get('dropbox_client_account_type', 0),
    '#description' => t('Configure how Dropbox Will be integrated with Drupal. 1) Widesite dropbox account ideal to share files with all users
                             2) Enable each user to use his own Drobox Account '),
  );
  if (variable_get('dropbox_client_account_type', 0) === 1 && (is_string(variable_get('dropbox_client_website_token_secret', 0)) && is_string(variable_get('dropbox_client_website_oauth_token', 0)) && is_string(variable_get('dropbox_client_website_oauth_token_secret', 0)))) {
    $form['dropbox_install_widesite'] = array(
      '#type' => 'item',
      '#markup' => '<span>' . l('Link Dropbox to Website', 'dropbox_client/install') . '</span>',
    );
  }
  else {
    if (variable_get('dropbox_client_account_type', 0) == 1) {
      $form['dropbox_install_widesite'] = array(
        '#type' => 'item',
        '#markup' => t('Dropbox Client for Website was configured sucessfully') . '<span>' . "  " . l('Link Dropbox to Website with another account', 'dropbox_client/install') . '</span>',
      );
    }
  }
  return system_settings_form($form);
}