web/formwidgets.py
branchtls-sprint
changeset 1329 9c7cc717bb17
parent 1328 c050f9f8672e
child 1330 92343a468e2a
equal deleted inserted replaced
1328:c050f9f8672e 1329:9c7cc717bb17
    72         name, values, attrs = self._render_attrs(form, field)
    72         name, values, attrs = self._render_attrs(form, field)
    73         assert len(values) == 1
    73         assert len(values) == 1
    74         id = attrs.pop('id')
    74         id = attrs.pop('id')
    75         try:
    75         try:
    76             confirmname = '%s-confirm:%s' % tuple(name.rsplit(':', 1))
    76             confirmname = '%s-confirm:%s' % tuple(name.rsplit(':', 1))
    77         except ValueError:
    77         except TypeError:
    78             confirmname = '%s-confirm' % name
    78             confirmname = '%s-confirm' % name
    79         inputs = [tags.input(name=name, value=values[0], type=self.type, id=id, **attrs),
    79         inputs = [tags.input(name=name, value=values[0], type=self.type, id=id, **attrs),
    80                   '<br/>',
    80                   '<br/>',
    81                   tags.input(name=confirmname, value=values[0], type=self.type, **attrs),
    81                   tags.input(name=confirmname, value=values[0], type=self.type, **attrs),
    82                   '&nbsp;', tags.span(form.req._('confirm password'),
    82                   '&nbsp;', tags.span(form.req._('confirm password'),