[2] | 1 | <%inherit file="/base.mako"/> |
---|
| 2 | <%namespace file="/message.mako" import="render_msg" /> |
---|
| 3 | |
---|
| 4 | %if redirect_url: |
---|
| 5 | <script type="text/javascript"> |
---|
| 6 | top.location.href = '${redirect_url}'; |
---|
| 7 | </script> |
---|
| 8 | %endif |
---|
| 9 | |
---|
| 10 | <%def name="javascripts()"> |
---|
| 11 | ${parent.javascripts()} |
---|
| 12 | </%def> |
---|
| 13 | |
---|
| 14 | <% |
---|
| 15 | from galaxy.web.form_builder import CheckboxField |
---|
| 16 | subscribe_check_box = CheckboxField( 'subscribe' ) |
---|
| 17 | %> |
---|
| 18 | %if not redirect_url and message: |
---|
| 19 | ${render_msg( message, status )} |
---|
| 20 | %endif |
---|
| 21 | |
---|
| 22 | ## An admin user may be creating a new user account, in which case we want to display the registration form. |
---|
| 23 | ## But if the current user is not an admin user, then don't display the registration form. |
---|
| 24 | %if trans.user_is_admin() or not trans.user: |
---|
| 25 | <div class="toolForm"> |
---|
| 26 | <form name="registration" id="registration" action="${h.url_for( controller='user', action='create', admin_view=admin_view )}" method="post" > |
---|
| 27 | <div class="toolFormTitle">Create account</div> |
---|
| 28 | <div class="form-row"> |
---|
| 29 | <label>Email address:</label> |
---|
| 30 | <input type="text" name="email" value="${email}" size="40"/> |
---|
| 31 | <input type="hidden" name="webapp" value="${webapp}" size="40"/> |
---|
| 32 | <input type="hidden" name="referer" value="${referer}" size="40"/> |
---|
| 33 | </div> |
---|
| 34 | <div class="form-row"> |
---|
| 35 | <label>Password:</label> |
---|
| 36 | <input type="password" name="password" value="${password}" size="40"/> |
---|
| 37 | </div> |
---|
| 38 | <div class="form-row"> |
---|
| 39 | <label>Confirm password:</label> |
---|
| 40 | <input type="password" name="confirm" value="${confirm}" size="40"/> |
---|
| 41 | </div> |
---|
| 42 | <div class="form-row"> |
---|
| 43 | <label>Public name:</label> |
---|
| 44 | <input type="text" name="username" size="40" value="${username}"/> |
---|
| 45 | <div class="toolParamHelp" style="clear: both;"> |
---|
| 46 | Your public name is an identifier that will be used to generate addresses for information |
---|
| 47 | you share publicly. Public names must be at least four characters in length and contain only lower-case |
---|
| 48 | letters, numbers, and the '-' character. |
---|
| 49 | </div> |
---|
| 50 | </div> |
---|
| 51 | %if trans.app.config.smtp_server: |
---|
| 52 | <div class="form-row"> |
---|
| 53 | <label>Subscribe to mailing list:</label> |
---|
| 54 | %if subscribe_checked: |
---|
| 55 | <% subscribe_check_box.checked = True %> |
---|
| 56 | %endif |
---|
| 57 | ${subscribe_check_box.get_html()} |
---|
| 58 | </div> |
---|
| 59 | %endif |
---|
| 60 | %if user_info_select: |
---|
| 61 | <div class="form-row"> |
---|
| 62 | <label>User type</label> |
---|
| 63 | ${user_info_select.get_html()} |
---|
| 64 | </div> |
---|
| 65 | %endif |
---|
| 66 | %if user_info_form: |
---|
| 67 | %for field in widgets: |
---|
| 68 | <div class="form-row"> |
---|
| 69 | <label>${field['label']}</label> |
---|
| 70 | ${field['widget'].get_html()} |
---|
| 71 | <div class="toolParamHelp" style="clear: both;"> |
---|
| 72 | ${field['helptext']} |
---|
| 73 | </div> |
---|
| 74 | <div style="clear: both"></div> |
---|
| 75 | </div> |
---|
| 76 | %endfor |
---|
| 77 | %if not user_info_select: |
---|
| 78 | <input type="hidden" name="user_info_select" value="${user_info_form.id}"/> |
---|
| 79 | %endif |
---|
| 80 | %endif |
---|
| 81 | <div class="form-row"> |
---|
| 82 | <input type="submit" name="create_user_button" value="Submit"/> |
---|
| 83 | </div> |
---|
| 84 | </form> |
---|
| 85 | </div> |
---|
| 86 | %endif |
---|