-
Notifications
You must be signed in to change notification settings - Fork 1
/
commerce_autopay.admin.inc
35 lines (31 loc) · 1.12 KB
/
commerce_autopay.admin.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/*
* @file commerce_autopay.admin.inc
* Provides admin form for commerce_autopay
* @copyright Copyright(c) 2011 Lee Rowlands
* @license GPL v2 http://www.fsf.org/licensing/licenses/gpl.html
* @author Lee Rowlands contact at rowlandsgroup dot com
*
*/
/**
* Form builder to display admin form
*/
function commerce_autopay_admin_form($form, $form_state) {
$form = array();
$form['commerce_autopay_batch_process'] = array(
'#type' => 'select',
'#options' => drupal_map_assoc(range(1,50)),
'#title' => t('Batch size'),
'#description' => t('Recurring orders are process in batches of this size.'),
'#default_value' => variable_get('commerce_autopay_batch_process', 20)
);
$form['commerce_autopay_payment_interval'] = array(
'#type' => 'select',
'#field_suffix' => t(' days'),
'#options' => drupal_map_assoc(range(0,30)),
'#title' => t('Payment due'),
'#description' => t('Payments for recurring orders are due this many days after the order is created.'),
'#default_value' => variable_get('commerce_autopay_payment_interval', 20)
);
return system_settings_form($form);
}