In using this great module, I noticed that the form generated by the form_alter function is not collapsed. So when creating a new node, the request to "Enable signups for this %node_type" is not collapsed like the other implementations of hook_form_alter. It kind of sticks out like a sore thumb, whatever that means.
I am sorry that I do not know how to create a patch, but I can describe the simple change. The code, beginning with line 274 reads:
elseif (user_access('admin signups')) {
$form['signup_enable'] = array('#type' => 'checkbox', '#title' => t('Enable signups for this %node_type', array('%node_type' => node_get_name($form['type']['#value']))));
return $form;
It can simply be amended to:
elseif (user_access('admin signups')) {
$form['collapse'] = array(
'#type' => 'fieldset',
'#title' => t('Allow signups'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#weight' => 30,
);
$form['collapse']['signup_enable'] = array('#type' => 'checkbox', '#title' => t('Enable signups for this %node_type', array('%node_type' => node_get_name($form['type']['#value']))));
return $form;
All this does is add the form whose type is 'fieldset' and collapses it.
If I need to do something else to help make this change, just let me know.
Comments
Comment #1
dwwthanks for the report. i modified the code you proposed and commited this to HEAD (revision 1.55) and DRUPAL-4-7 (revision 1.45.2.9). if you're interested, i'm attaching the patch i committed.
-derek
p.s. testing the solution to this issue made me notice http://drupal.org/node/67509, which should also be fixed.
Comment #2
monjohn commentedIt works great! Thanks.
Comment #3
(not verified) commented