function postmark_settings_form in Postmark 7
Same name and namespace in other branches
- 6 postmark.admin.inc \postmark_settings_form()
Setting form for Postmark
1 string reference to 'postmark_settings_form'
- postmark_menu in ./
postmark.module - Implementation of hook_menu().
File
- ./
postmark.admin.inc, line 11 - Administration include for Postmark.
Code
function postmark_settings_form() {
// The user's Postmark API key
$form['postmark_api_key'] = array(
'#type' => 'textfield',
'#title' => t('Postmark API key'),
'#default_value' => variable_get('postmark_api_key', ''),
'#description' => t('You Postmark API key similar to : ed742D75-5a45-49b6-a0a1-5b9ec3dc9e5d (taken from the API page)'),
'#required' => TRUE,
);
// Debug settings fieldset
$form['debug'] = array(
'#type' => 'fieldset',
'#title' => t('Debugging'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['debug']['postmark_debug_mode'] = array(
'#type' => 'checkbox',
'#title' => t('Enable Postmark debugging'),
'#default_value' => variable_get('postmark_debug_mode', 0),
'#description' => t('Use Postmark debugging, just to display what is contained in the Drupal $message variable (this will be extended to include more debugging options)'),
);
$form['debug']['postmark_debug_email'] = array(
'#type' => 'textfield',
'#title' => t('Enable Postmark debugging email'),
'#default_value' => variable_get('postmark_debug_email', variable_get('site_mail', '')),
'#description' => t('Use a debugging email, so all system emails will go to this address. Debugging mode must be on for this to work'),
);
$form['debug']['postmark_debug_no_send'] = array(
'#type' => 'checkbox',
'#title' => t('Enable Postmark debugging to not send an email and therefore not use a credit'),
'#default_value' => variable_get('postmark_debug_no_send', 0),
'#description' => t('Disable credit usage when debugging'),
);
$form['test'] = array(
'#type' => 'fieldset',
'#title' => t('Test configuration'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['test']['test_address'] = array(
'#type' => 'textfield',
'#title' => t('Recipient'),
'#default_value' => '',
'#description' => t('Enter a valid email address to send a test email.'),
);
// Add our own submit to the form
$form['#submit'][] = 'postmark_settings_form_submit';
return system_settings_form($form);
}