function node_registration_registrations_settings_form in Node registration 7
Return a form for a node's registration settings.
1 string reference to 'node_registration_registrations_settings_form'
- node_registration_menu in ./
node_registration.module - Implements hook_menu().
File
- includes/
node_registration.forms.inc, line 1329 - New registration forms. Public and admin.
Code
function node_registration_registrations_settings_form($form, &$form_state, $node) {
$form['#node'] = $node;
$form['#attributes']['class'][] = 'node-registration';
$type = $node->type;
$settings = $node->registration;
$form += _node_registration_type_settings_form($type, $settings, $node);
$status = $settings
->enabled() ? '<span class="registration-status enabled">' . t('Enabled') . '</span>' : '<span class="registration-status disabled">' . t('Disabled') . '</span>';
$form['register_cancel']['prestatus'] = array(
'#markup' => '<div class="form-item">',
'#weight' => -11,
);
$form['register_cancel']['status'] = array(
'#type' => 'submit',
'#value' => $settings
->enabled() ? t('Disable registrations') : t('Enable registrations'),
'#weight' => -10,
'#submit' => array(
'node_registration_node_settings_status_submit',
),
'#prefix' => '<span>' . t('Current status: !status', array(
'!status' => $status,
)) . '</span> ',
);
$form['register_cancel']['poststatus'] = array(
'#markup' => '</div>',
'#weight' => -9,
);
$form['actions'] = array(
'#type' => 'actions',
);
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save Settings'),
);
$form['#submit'][] = 'node_registration_registrations_settings_form_submit';
$form['#submit'][] = 'node_registration_submit_locale_kick';
return $form;
}