function pay_node_admin_settings in Pay 6
Same name and namespace in other branches
- 7 modules/pay_node/includes/pay_node.admin.inc \pay_node_admin_settings()
Menu callback for pay_node admin screen.
1 string reference to 'pay_node_admin_settings'
- pay_node_menu in modules/
pay_node/ pay_node.module - Implementation of hook_menu().
File
- modules/
pay_node/ includes/ pay_node.admin.inc, line 11 - Menu callbacks to administrative screens for node payments.
Code
function pay_node_admin_settings(&$form_state) {
$form = array();
// Available node payment models.
$pay_node_models = variable_get('pay_node_models', array());
$form['pay_node_models'] = array(
'#type' => 'checkboxes',
'#title' => t('Available node payment models'),
);
$form['pay_node_models']['form'] = array(
'#type' => 'checkbox',
'#title' => t('Node creation'),
'#default_value' => $pay_node_models['form'],
'#description' => t('Payment information will be requested on node creation forms. This is useful for paid directory listings or other account information stored as nodes.'),
);
$form['pay_node_models']['view'] = array(
'#type' => 'checkbox',
'#title' => t('Node display'),
'#default_value' => $pay_node_models['view'],
'#description' => t('A payment form will be included on the display view of your nodes. This is useful when you want to create multiple payment forms, such as fundraising campaigns, as nodes.'),
);
// Allowable form types.
$pay_node_forms = variable_get('pay_node_forms', array());
$form['pay_node_forms'] = array(
'#type' => 'checkboxes',
'#title' => t('Available node payment forms'),
);
foreach (pay_handlers('pay_form') as $name => $info) {
$pay_form = pay_form_load($name);
if ($pay_form
->embeddable()) {
$form['pay_node_forms'][$name] = array(
'#type' => 'checkbox',
'#title' => $info['title'],
'#default_value' => $pay_node_forms[$name],
);
}
}
return system_settings_form($form);
}