in content_distribution_form_alter():

  //hide workflow options that have no effect on CMS
  if ($form['#id'] == 'node-form' && $user->uid != 1) {
    unset($form['options']['sticky']);
    unset($form['options']['promote']);
  }

What's this for?
This looks like it's maybe specific to the system this module was first built for. If so, can it be removed?

Comments

greg.harvey’s picture

Well, I wouldn't take it out. In our use case, we wanted Drupal workflow settings to be site specific, so we hid them in the "server" module to clean up the UI and avoid confusion. What would be smarter would be an admin setting saying something like "Set Drupal workflow on distributing instance?" - if checked, exclude this code so standard Drupal workflow is shown, if not checked, include it so workflow settings are not available. I guess?

joachim’s picture

It seems like feature creep to me -- something individual sites should be doing either with permissions or a site-specific hook_form_alter.

I think it should be taken out, but as you're using this on your site, I'll leave this open for now.

greg.harvey’s picture

I see your point - to be honest, I don't think anything would break on tayzlor's site if you removed it. But best for him to say!

tayzlor’s picture

yep, this looks custom. Would be best to remove this from form alter and use any default permissions or override_node_options module permissions to handle this stuff.

joachim’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Active » Fixed
StatusFileSize
new949 bytes

#663442 by joachim: Removed unsetting of node form elements in hook_form_alter().

Removed the removal on 6--2.

This should probably be left as is on 6--1.

Status: Fixed » Closed (fixed)

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