[Mailman-Developers] 2.1b1: new_member_options and web GUI

Barry A. Warsaw barry@zope.com
Thu, 28 Mar 2002 01:31:47 -0500


>>>>> "F" == Fil  <fil@rezo.net> writes:

    F> I mentioned this bug recently : it's apparently because the
    F> new_member_options is set by multiple checkboxes which all have
    F> the same name (ie new_member_options), instead of being
    F> new_member_options_bit0, new_member_options_bit1, and so on.

    F> I don't know if some web browsers accept this, but none of mine
    F> do.

Actually, the problem is that when none of the checkboxes are
selected, the form data will not include a key for
'new_member_options'.  The fact that the checkboxes all have the same
name is no problem; posting that form data just means the
'new_member_options' key will have a list value instead of a simple
string.  The list contains all the checked boxes.

The hack-around is to add a hidden field with the same name, but with
a value 'ignore'.  This guarantees that the form data will always
contain a 'new_member_options' key, even when all checkboxes are
deselected.

I will commit a patch shortly, which I've verified with Moz 0.9.9, NS
4.7x, and Konq 2.2, all on various Linuxes.  I'd be grateful if
someone could test IE5 and IE6 for me.

-Barry