function multiple_registration_remove_registration_form in Multiple Registration 7
Form for removing registration page.
1 string reference to 'multiple_registration_remove_registration_form'
- multiple_registration_menu in ./
multiple_registration.module - Implements hook_menu().
File
- ./
multiple_registration.module, line 253 - Add ability to create several registration pages.
Code
function multiple_registration_remove_registration_form($form, &$form_state, $rid) {
if (!isset($rid) || !is_numeric($rid)) {
return FALSE;
}
$roles = user_roles();
if (!isset($roles[$rid])) {
return FALSE;
}
$form['rid'] = array(
'#type' => 'value',
'#value' => $rid,
);
$form['message'] = array(
'#markup' => '<p>' . t('Are you sure want to delete registration page for !rol role?', array(
'!rol' => '<strong>' . $roles[$rid] . '</strong>',
)) . '</p>',
);
$form['dont_remove'] = array(
'#type' => 'submit',
'#value' => t('No'),
);
$form['remove'] = array(
'#type' => 'submit',
'#value' => t('Yes'),
);
$form['#submit'][] = 'multiple_registration_remove_registration_form_submit';
return $form;
}