Personal wiki notebook (not under development)

Redeem_reset_note.py 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. from Tags import Span, H3, P, Form, P, Div, Strong, Br, Input
  2. class Redeem_reset_note( Span ):
  3. def __init__( self, password_reset_id, users ):
  4. Span.__init__(
  5. self,
  6. H3( u"complete your password reset" ),
  7. P(
  8. """
  9. Below is a list of Luminotes users matching your email address. You can reset
  10. the passwords of any of these users. If you just needed a username reminder and
  11. you already know your password, then click the login link above without performing
  12. a password reset.
  13. """
  14. ),
  15. Form(
  16. [ Span(
  17. P(
  18. Div( Strong( u"%s: new password" % user.username ) ),
  19. Input( type = u"password", name = user.object_id, size = 30, maxlength = 30, class_ = u"text_field" ),
  20. ),
  21. P(
  22. Div( Strong( u"%s: new password (again)" % user.username ) ),
  23. Input( type = u"password", name = user.object_id, size = 30, maxlength = 30, class_ = u"text_field" ),
  24. ),
  25. ) for user in users ],
  26. P(
  27. Input( type = u"hidden", id = u"password_reset_id", name = u"password_reset_id", value = password_reset_id ),
  28. Input(
  29. type = u"submit",
  30. name = u"reset_button",
  31. id = u"reset_button",
  32. class_ = u"button",
  33. value = ( len( users ) > 1 ) and u"reset passwords" or u"reset password" ),
  34. ),
  35. id = "reset_form",
  36. target = "/users/reset_password",
  37. ),
  38. P(
  39. Strong( u"tip:" ),
  40. u"""
  41. When you submit this form, you'll be redirected to the front page where you can login with
  42. your new password.
  43. """,
  44. ),
  45. )