-
-
Notifications
You must be signed in to change notification settings - Fork 399
/
signup.gsp
137 lines (122 loc) · 5.59 KB
/
signup.gsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="layout" content="custom" />
<title><warehouse:message code="auth.signup.label"/></title>
<!-- Specify content to overload like global navigation links, page titles, etc. -->
<style>
#hd { display: none; }
</style>
</head>
<body>
<div class="body">
<g:form controller="auth" action="handleSignup" method="POST">
<div class="dialog">
<div id="signupForm">
<g:if test="${flash.message}">
<div class="message">${flash.message}</div>
</g:if>
<g:hasErrors bean="${userInstance}">
<div class="errors">
<g:renderErrors bean="${userInstance}" as="list" />
</div>
</g:hasErrors>
<div id="loginBox" class="box">
<h2>
<img src="${createLinkTo(dir:'images/icons/silk',file:'lock.png')}" class="middle"/> Signup for an account
</h2>
<table>
<tbody>
<tr class="prop">
<td colspan="2">
<warehouse:message code="auth.alreadyHaveAccount.text"/>
<g:link class="list" controller="auth" action="login">
<warehouse:message code="auth.login.label" default="Login"/>
</g:link>
</td>
</tr>
<tr class="prop">
<td class="name middle right">
<label for="email"><warehouse:message code="user.email.label" default="Email" /></label>
</td>
<td class="value ${hasErrors(bean: userInstance, field: 'email', 'errors')}">
<g:textField name="email" value="${userInstance?.email}" class="text" size="40"/>
</td>
</tr>
<tr class="prop">
<td class="name middle right" width="35%">
<label for="firstName"><warehouse:message code="user.firstName.label" default="First Name" /></label>
</td>
<td class="value ${hasErrors(bean: userInstance, field: 'firstName', 'errors')}">
<g:textField name="firstName" value="${userInstance?.firstName}" class="text" size="40"/>
</td>
</tr>
<tr class="prop">
<td class="name middle right">
<label for="lastName"><warehouse:message code="user.lastName.label" default="Last Name" /></label>
</td>
<td class="value ${hasErrors(bean: userInstance, field: 'lastName', 'errors')}">
<g:textField name="lastName" value="${userInstance?.lastName}" class="text" size="40"/>
</td>
</tr>
<tr class="prop">
<td class="name middle right">
<label for="locale"><warehouse:message code="default.locale.label"/></label>
</td>
<td class="value ${hasErrors(bean: userInstance, field: 'locale', 'errors')}">
<div style="width: 235px">
<g:select name="locale" from="${ grailsApplication.config.openboxes.locale.supportedLocales.collect{ new Locale(it) } }"
optionValue="displayName" value="${userInstance?.locale}" noSelection="['':'']" class="chzn-select-deselect"/>
</div>
</td>
</tr>
<tr class="prop">
<td valign="top" class="name">
<label for="locale"><warehouse:message
code="default.timezone.label" default="Timezone" /></label></td>
<td valign="top" class="value">
<g:select id="timezone" name="timezone" from="${TimeZone.getAvailableIDs().sort()}"
noSelection="['':'']" value="${userInstance?.timezone}" class="chzn-select-deselect"/>
</td>
</tr>
<tr class="prop">
<td class="name middle right">
<label for="username"><warehouse:message code="user.username.label" default="Username" /></label>
</td>
<td class="${hasErrors(bean: userInstance, field: 'username', 'errors')}">
<g:textField name="username" value="${userInstance?.username}" class="text" size="40" />
</td>
</tr>
<tr class="prop">
<td class="name middle right">
<label for="password"><warehouse:message code="user.password.label" default="Password" /></label>
</td>
<td class="value ${hasErrors(bean: userInstance, field: 'password', 'errors')}">
<g:passwordField name="password" value="${userInstance?.password}" class="text" size="40"/>
</td>
</tr>
<tr class="prop">
<td class="name middle right">
<label for="passwordConfirm"><warehouse:message code="user.confirmPassword.label" default="Confirm Password" /></label>
</td>
<td class="value ${hasErrors(bean: userInstance, field: 'passwordConfirm', 'errors')}">
<g:passwordField name="passwordConfirm" value="${userInstance?.passwordConfirm}" class="text" size="40" />
</td>
</tr>
<tr class="prop">
<td class="middle right"></td>
<td valign="top">
<button type="submit" class="button icon approve">
<warehouse:message code="auth.signup.label"/>
</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</g:form>
</div>
</body>
</html>