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 ' ', tags.span(form.req._('confirm password'), |
82 ' ', tags.span(form.req._('confirm password'), |