/templates/user/openid_associate.mako

https://bitbucket.org/cistrome/cistrome-harvard/ · Mako · 73 lines · 59 code · 14 blank · 0 comment · 7 complexity · 344953a458ce77324ab393eb5439a042 MD5 · raw file

  1. <%!
  2. def inherit(context):
  3. if context.get('use_panels'):
  4. return '/webapps/galaxy/base_panels.mako'
  5. else:
  6. return '/base.mako'
  7. %>
  8. <%inherit file="${inherit(context)}"/>
  9. <%def name="init()">
  10. <%
  11. self.has_left_panel=False
  12. self.has_right_panel=False
  13. self.active_view=active_view
  14. self.message_box_visible=False
  15. %>
  16. </%def>
  17. <%namespace file="/message.mako" import="render_msg" />
  18. <%namespace file="login.mako" import="render_login_form" />
  19. <%namespace file="register.mako" import="render_registration_form" />
  20. <%def name="center_panel()">
  21. ${body()}
  22. </%def>
  23. <%def name="body()">
  24. <div style="overflow: auto; height: 100%">
  25. %if context.get('use_panels'):
  26. <div class="page-container" style="padding: 10px;">
  27. %else:
  28. <div class="page-container">
  29. %endif
  30. %if message:
  31. ${render_msg( message, status )}
  32. %endif
  33. <h2>OpenID Account Association</h2>
  34. <div>
  35. OpenIDs must be associated with a Galaxy account before they can be used for authentication. This only needs to be done once per OpenID. You may associate your OpenID with an existing Galaxy account, or create a new one.
  36. </div>
  37. <br/>
  38. %if len( openids ) > 1:
  39. <div>
  40. The following OpenIDs will be associated with the account chosen or created below.
  41. <ul>
  42. %for openid in openids:
  43. <li>${openid.openid}</li>
  44. %endfor
  45. </ul>
  46. </div>
  47. %else:
  48. <div>
  49. The OpenID <strong>${openids[0].openid}</strong> will be associated with the account chosen or created.
  50. </div>
  51. %endif
  52. <br/>
  53. <% form_action = h.url_for( controller='user', action='openid_associate', cntrller=cntrller, use_panels=use_panels ) %>
  54. ${render_login_form( form_action=form_action )}
  55. <br/>
  56. ${render_registration_form( form_action=form_action )}
  57. </div>
  58. </div>
  59. </%def>