# HG changeset patch # User Adrien Di Mascio # Date 1235147918 -3600 # Node ID 4685a8c21d73594aa1dfae8a198031e12fb4f97c # Parent 192800415f596127bb5075fa3c67d55f6bdfc2af select needs to accept an id diff -r 192800415f59 -r 4685a8c21d73 common/tags.py --- a/common/tags.py Fri Feb 20 17:20:53 2009 +0100 +++ b/common/tags.py Fri Feb 20 17:38:38 2009 +0100 @@ -15,11 +15,14 @@ label = tag('label') option = tag('option') -def select(name, multiple=False, options=[]): +def select(name, id=None, multiple=False, options=[]): + attrs = {} if multiple: - html = [u'' % name] + attrs['multiple'] = 'multiple' + if id: + attrs['id'] = id + html = [u'') return u'\n'.join(html)