Enclosed patch to checkall.module adds the ability for mere mortals to specify if they want a checkbox group to also include the "Check all/Toggle/Uncheck all" links in their CCK-based form. In other words, this patch brings the Checkall option out of the obscurity of code-in-custom-modules and into the bright shiny world of Browser-GUI-based form development with CCK.

Please review and consider adding this feature to the Checkall module. Thank you!

Comments

markus_petrux’s picture

Status: Needs review » Needs work

Ah, this is another good idea. It seems than the new addition to CCK, the new hook_widget_settings_alter() opened Pandora's box. :)

However, I think the patch needs work:

- use $settings instead of $v in checkall_widget_settings_alter().
- Also in checkall_widget_settings_alter(), use isset() to make sure widget attributes exist.
- The assignment to $children_checkall becomes too long. I would rather use if/else blocks for readability. I would also check if the checkall attribute isset.
- Do we want to add support for other widgets?

If you don't have the time do it, I'll revisit this issue later with a new patch for review. Thanks.

bshensky’s picture

Your suggestions sound spot on, but some of them might be just over my head at the moment. I'll give them a go and we'll see what happens.

markus_petrux’s picture

Don't worry, I started to work on it this afternoon, and I expect to post a patch for review soon.

markus_petrux’s picture

Title: Patch: Expose the #checkall condition as a form element attribute in the CCK form builder field definition interface » Expose the #checkall condition as a form element attribute in the CCK form builder field definition interface
Status: Needs work » Needs review
StatusFileSize
new3.35 KB

Sorry, it took me a bit more time to finish what I started on saturday afternoon.

Could you please try this one?

markus_petrux’s picture

Status: Needs review » Fixed

Well, we've been testing this at the office with several fields and it's been working nicely.

Committed to CVS. Thanks! :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

bshensky’s picture

Issue closed? A 2-week August vacation will do that. ;-)

FWIW, our tests match yours - the mods work nicely. Thanks SO much for bringing this feature to fruition!

markus_petrux’s picture

You're welcome! :)

It's been a nice feature to add.