Hi,
Here is a suggestion to reduce the 'complexity' of the user interface. When only one category is defined and it is set as the default (selected), the user does not need to see the select box for the categories when sending a mass contact message (since there is nothing to choose from).
Here is my proposal code for lines 552-559 in mass_contact.module, to hide the categories selection in this case:

function mass_contact_mail_page() {
/* [...] */
    if ((count($categories) > 1) || !isset($default_category)) { // display a choice when one is needed
      $form['cid'] = array(
        '#type'          => 'select',
        '#title'         => t('Category'),
        '#default_value' => $default_category,
        '#options'       => $categories,
        '#required'      => true,
        '#multiple'      => true,
      );
    } else { // otherwise, just use the default category
      $form['cid'] = array(
        '#type'          => 'value',
        '#value'         => array($default_category), // this must be an array, otherwise the code breaks upon submit
      );
    }
/* [...] */
}
CommentFileSizeAuthor
#2 hide_bcc_checkbox.patch1.57 KBjosvl

Comments

oadaeh’s picture

Assigned: Unassigned » oadaeh
Status: Needs review » Active

Yes, I could do that, and it certainly makes sense.

BTW, for your future information, it's not a patch unless you attach a patch file to the message. What you've done is to paste a snippet of code into the issue, which is fine for me and this issue, but it's not fine for everyone or for every issue. See Creating patches for more details.

There's no need for you to create a patch and attach it for this issue. I'll take your snippet and apply it where it needs to go. Thanks for the feedback.

josvl’s picture

StatusFileSize
new1.57 KB

Thanks for pointing out the meaning of patches; I've looked into it and will make a better attempt this time.

Here is a related suggestion that I'm not sure is worth to be called an issue in itself:

Similar to the redundant category-choice issue, users could find it confusing to see a disabled 'Send as BCC' option. On the other hand, it does give them the information how the message is sent (as BCC or not). But then: the average user will not understand an unchecked, disabled checkbox.. In my site I've hidden that too in the same way, when overriding the BCC option is not allowed.
Perhaps hiding this information altogether is too rigorous, but it could be presented internally as an 'value' field-type which can have a #value attribute to contain the BCC setting and an additional 'item' field-type that can have a title depending on the actual setting. Attached is a patch (but I'm not sure if it is in the correct format, I used TortoiseSVN on WinXP to create it..).

oadaeh’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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