Hi,

Our problem:
We have an install with about 70 domains. We often need to publish a node to 50-60 of them. Manually selecting each checkbox becomes time consuming.

Potential solution:
I’d like to add a “Select all” option to the top of the “Publish to” list. That way one can quick toggle on/off all the options. As it would be easier to turn all on, then manually turn off what isn’t needed.

I’m just wondering if this could be added as an option?
Or how I would go about hooking the domains list, and adding it in myself via submodule.

Thanks.

Comments

nickw created an issue. See original summary.

nickw’s picture

Just an update for anyone else needing this:
I ended up solving this by using the checkall module and a form_alter.

Leagnus’s picture

Yep, #2 works excellent:

function modulename_form_alter(...

	// Check/Uncheck all for Domain Access
	if (isset($form['domain'])){
		$form['domain']['domains']['#checkall'] = TRUE;
		$form['domain']['domains']['#checkall-toggle'] = FALSE;
		$form['domain']['domains']['#checkall-check-all'] = TRUE;
		$form['domain']['domains']['#checkall-uncheck-all'] = TRUE;
	}
bluegeek9’s picture

Status: Active » Closed (outdated)

Drupal 7 in End of Life and no longer supported. We encourage you to upgrade to a supported version of Drupal. For more information, see https://www.drupal.org/upgrade.

//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support of this project makes other volunteer contributions more sustainable.
There are multiple ways to show appreciation for the work contributed to this project, including:
  • Triaging issues and adding more context to existing issues.
  • Writing documentation or patches for this project.