You are here

function sendgrid_integration_admin in SendGrid Integration 6

Same name and namespace in other branches
  1. 7 sendgrid_integration.admin.inc \sendgrid_integration_admin()

Provides Settings Form.

1 string reference to 'sendgrid_integration_admin'
sendgrid_integration_menu in ./sendgrid_integration.module
Implements hook_menu().

File

./sendgrid_integration.module, line 40
Main module file for SendGrid Integration.

Code

function sendgrid_integration_admin() {
  $form = array();
  $form['authentication'] = array(
    '#type' => 'fieldset',
    '#title' => t('Authentication'),
  );
  $form['authentication']['sendgrid_integration_username'] = array(
    '#type' => 'textfield',
    '#title' => t('Username'),
    '#description' => t('Your SendGrid Username'),
    '#required' => TRUE,
    '#default_value' => variable_get('sendgrid_integration_username', ''),
  );
  $form['authentication']['sendgrid_integration_apikey'] = array(
    '#type' => 'password',
    '#title' => t('API Key'),
    '#description' => t('Your SendGrid Password'),
    '#required' => TRUE,
    '#default_value' => variable_get('sendgrid_integration_apikey', ''),
  );
  $form['security'] = array(
    '#type' => 'fieldset',
    '#title' => t('Security'),
  );
  $form['security']['sendgrid_integration_ssl'] = array(
    '#type' => 'checkbox',
    '#title' => t('Use secure (SSL) connection?'),
    '#default_value' => variable_get('sendgrid_integration_ssl', TRUE),
  );
  return system_settings_form($form);
}