Setting up a Contact form for your Drupal site already takes about 9 steps too long as it is, but one of the things that makes it even longer is having to enable the "Contact" menu item first from the list at admin/build/menu, and then move it to Primary Links in the edit page.
If the menu item edit screen had the "Enabled" checkbox, we could do everything from one page.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | menu-item-edit-enabled.patch | 1.89 KB | Nick Lewis |
| #5 | menu.admin-hidden-field.patch | 1.84 KB | Nick Lewis |
| #4 | menu-enabled.patch | 2.07 KB | jody lynn |
| #3 | menu.admin_.inc-checkbox.patch | 1.19 KB | Nick Lewis |
Comments
Comment #1
Nick Lewis commented+1 to killing that minor annoyance (which over the course of years has taken away hours of my time).
Comment #2
patchnewbie commentedThis would be a good patch for someone new to core development.
Comment #3
Nick Lewis commentedAnyone have a clue why -- regardless of the ordering of form elements -- this checkbox is floating to the very top?
That said, if we're cool with it showing up at the top of the form, and avoiding explaining what a disabled menu item will do in all circumstances than I think this is ready.
***
As for documenting what this checkbox does, I think we'd need a paragraph to explain the caveats (so I avoided it...). The caveats include and are not limited to: admin vs regular users being able to access the page that the menu item refers to (and the different behavior between a system menu item vs a custom item), what happens to child elements if a parent is disabled, and the menu is collapsed, vs expanded etc...
Comment #4
jody lynnI found why it was coming up too high (it was already being created as a hidden 'value' field) and fixed that. Also added a basic description to match description depth of other fields.
Comment #5
Nick Lewis commentedThanks Lynn, with that I think this small patch is ready to be committed. Made a small change to the ordering of the form elements, placing the enabled checkbox directly above the expanded checkbox.
Comment #6
gábor hojtsyHrm, why not call the form item 'enabled' then and reverse that to 'hidden'? Having two different meanings for hidden seems to be bad to me.
Comment #7
Nick Lewis commentedGood point. Rerolled the patch.
Comment #8
jody lynnTested patch.
Comment #9
gábor hojtsyI slightly edited the patch for coding style to get to this:
and committed. Thanks.
Comment #10
Nick Lewis commentedI knew there was a better way! Thx for the tip.
Comment #11
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.