function uc_recurring_order_settings_form in UC Recurring Payments and Subscriptions 6.2
Same name and namespace in other branches
- 7.2 modules/uc_recurring_order/uc_recurring_order.module \uc_recurring_order_settings_form()
Settings for recurring orders
1 string reference to 'uc_recurring_order_settings_form'
- uc_recurring_order_menu in modules/
uc_recurring_order/ uc_recurring_order.module - Implementation of hook_menu().
File
- modules/
uc_recurring_order/ uc_recurring_order.module, line 37 - Provides a way to duplicate entire orders.
Code
function uc_recurring_order_settings_form($form) {
drupal_set_title(t('Recurring Order Settings'));
$intervals = variable_get('uc_recurring_order_interval_options', array());
foreach ($intervals as $int => $value) {
$options[] = $int . '|' . $value;
}
$options = !empty($options) ? implode("\n", $options) : '';
$form = array();
$form['interval_options'] = array(
'#type' => 'textarea',
'#required' => TRUE,
'#default_value' => $options,
'#title' => t('Available Recurring Interval Options'),
'#description' => t('Enter one allowed interval per line, in the format time|label, for example: 1 day|Daily. Times must be in valid <a href="@link">strotime</a> format. To enter a 0 value (non-recurring), make sure to enter valid strotime such as "0 months"', array(
'@link' => url('http://php.net/manual/en/function.strtotime.php'),
)),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
return $form;
}