Roundup Tracker - Issues

Message8272

Author rouilj
Recipients ajaksu2, rouilj, tobias-herp
Date 2025-01-15.04:20:17
Message-id <1736914818.13.0.654848331308.issue1513369@roundup.psfhosted.org>
In-reply-to
I happened to be coming through the template code today.

It looks like every input at least is supposed to have an id.
The radiobutton and checkbox branch of the code is broken.

def _set_input_default_args(dic):
    # 'text' is the default value anyway --
    # but for CSS usage it should be present
    dic.setdefault('type', 'text')
    # useful e.g for HTML LABELs:
    if 'id' not in dic:
        try:
            if dic['text'] in ('radio', 'checkbox'):
                dic['id'] = '%(name)s-%(value)s' % dic
            else:
                dic['id'] = dic['name']
        except KeyError:
            pass

maybe your patches just indicate that there are code paths missing a call to
_set_input_default_args?

issue 2551391 tracks fixing the bug (text should be type) above.
History
Date User Action Args
2025-01-15 04:20:18rouiljsetmessageid: <1736914818.13.0.654848331308.issue1513369@roundup.psfhosted.org>
2025-01-15 04:20:18rouiljsetrecipients: + rouilj, tobias-herp, ajaksu2
2025-01-15 04:20:18rouiljlinkissue1513369 messages
2025-01-15 04:20:17rouiljcreate