web/form.py
branchtls-sprint
changeset 911 467fb77c6a33
parent 908 136d91725ecf
child 913 5dfba71b1872
equal deleted inserted replaced
908:136d91725ecf 911:467fb77c6a33
   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                   '&nbsp;', tags.span(form.req._('confirm password'),
   303                   '&nbsp;', tags.span(form.req._('confirm password'),
   303                                       **{'class': 'emphasis'})]
   304                                       **{'class': 'emphasis'})]
   304         return u'\n'.join(inputs)
   305         return u'\n'.join(inputs)