function signup_node_admin_summary_form in Signup 7
Same name and namespace in other branches
- 5.2 signup.module \signup_node_admin_summary_form()
- 6.2 includes/node_admin_summary.inc \signup_node_admin_summary_form()
- 6 includes/node_admin_summary.inc \signup_node_admin_summary_form()
@todo Please document this function.
See also
1 string reference to 'signup_node_admin_summary_form'
- signup_node_admin_page in includes/
node_admin.inc - Print the signup administration tab for a single node.
File
- includes/
node_admin_summary.inc, line 11 - Code related to the signup administration tab on each node.
Code
function signup_node_admin_summary_form($form, &$form_state, $node) {
if (isset($node->signup_effective_total) && $node->signup_close_signup_limit && $node->signup_effective_total >= $node->signup_close_signup_limit) {
$form['status'] = array(
'#type' => 'item',
'#title' => t('Signups are'),
'#markup' => t('Closed (limit reached)'),
);
}
else {
$form['status'] = array(
'#type' => 'select',
'#title' => t('Signups are'),
'#options' => array(
0 => t('Closed'),
1 => t('Open'),
),
'#default_value' => $node->signup_status,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Update'),
'#submit' => array(
'signup_node_admin_summary_form_submit',
),
);
}
$form['total_signups'] = array(
'#type' => 'item',
'#title' => t('Total signups'),
'#markup' => isset($node->signup_total) ? $node->signup_total : 0,
);
$form['slots_used'] = array(
'#type' => 'item',
'#title' => t('Signup slots used'),
'#markup' => isset($node->signup_effective_total) ? $node->signup_effective_total : 0,
);
$form['limit'] = array(
'#type' => 'item',
'#title' => t('Signup limit'),
'#markup' => l($node->signup_close_signup_limit, 'node/' . $node->nid . '/signups/settings', array(
'fragment' => 'signup-limit',
)),
);
$form['nid'] = array(
'#type' => 'value',
'#value' => $node->nid,
);
return $form;
}