294 type = 'password' |
294 type = 'password' |
295 |
295 |
296 def render(self, form, field): |
296 def render(self, form, field): |
297 self.add_media(form) |
297 self.add_media(form) |
298 name, values, attrs = self._render_attrs(form, field) |
298 name, values, attrs = self._render_attrs(form, field) |
299 inputs = [tags.input(name=name, value=value, type=self.type, **attrs), |
299 assert len(values) == 1 |
|
300 inputs = [tags.input(name=name, value=values[0], type=self.type, **attrs), |
300 '<br/>', |
301 '<br/>', |
301 tags.input(name=name+'-confirm', type=self.type, **attrs), |
302 tags.input(name=name+'-confirm', type=self.type, **attrs), |
302 ' ', tags.span(form.req._('confirm password'), |
303 ' ', tags.span(form.req._('confirm password'), |
303 **{'class': 'emphasis'})] |
304 **{'class': 'emphasis'})] |
304 return u'\n'.join(inputs) |
305 return u'\n'.join(inputs) |