function commerce_cop_settings_form in Commerce Custom Offline Payments 7
Payment method callback: settings form.
File
- ./
commerce_cop.module, line 234 - Custom offline payment methods for Drupal Commerce.
Code
function commerce_cop_settings_form($settings = NULL) {
$settings = (array) $settings + array(
'information' => array(
'value' => '',
'format' => 'plain_text',
),
);
$form = array();
$form['information'] = array(
'#type' => 'text_format',
'#title' => t('Information'),
'#description' => t('Information you would like to be shown to users when they select this payment method, such as delivery payment details.'),
'#default_value' => $settings['information']['value'],
'#format' => $settings['information']['format'],
);
if (module_exists('token')) {
$form['token_tree'] = array(
'#theme' => 'token_tree',
'#token_types' => array(
'site',
'commerce_order',
'commerce-order',
),
'#dialog' => TRUE,
);
}
return $form;
}