Roundup Tracker - Issues

Message8271

Author rouilj
Recipients rouilj
Date 2025-01-15.04:15:22
Message-id <1736914522.98.0.7686718395.issue2551391@roundup.psfhosted.org>
In-reply-to
When I was groveling through the template code, I came across this:

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


I think dic['text'] is wrong and dic['type'] was meant.
It looks like an attempt to create a series of
checkbox/radiobutton with unique id's.

Anybody have an alternate view?
History
Date User Action Args
2025-01-15 04:15:23rouiljsetrecipients: + rouilj
2025-01-15 04:15:22rouiljsetmessageid: <1736914522.98.0.7686718395.issue2551391@roundup.psfhosted.org>
2025-01-15 04:15:22rouiljlinkissue2551391 messages
2025-01-15 04:15:22rouiljcreate