1 | <head> |
---|
2 | <meta name="layout" content="main" /> |
---|
3 | <title>Create Person</title> |
---|
4 | <nav:resources override="true"/> |
---|
5 | </head> |
---|
6 | |
---|
7 | <body> |
---|
8 | |
---|
9 | <div class="nav"> |
---|
10 | <nav:renderSubItems group="navAlt"/> |
---|
11 | </div> |
---|
12 | |
---|
13 | <div class="body"> |
---|
14 | <g:if test="${flash.message}"> |
---|
15 | <div class="message">${flash.message}</div> |
---|
16 | </g:if> |
---|
17 | <g:if test="${params.message}"> |
---|
18 | <div class="message">${params.message}</div> |
---|
19 | </g:if> |
---|
20 | <g:hasErrors bean="${person}"> |
---|
21 | <div class="errors"> |
---|
22 | <g:renderErrors bean="${person}" as="list" /> |
---|
23 | </div> |
---|
24 | </g:hasErrors> |
---|
25 | <g:form action="save"> |
---|
26 | <div class="dialog"> |
---|
27 | <table> |
---|
28 | <tbody> |
---|
29 | |
---|
30 | <tr class="prop"> |
---|
31 | <td valign="top" class="name"><label for="loginName">Login Name:</label></td> |
---|
32 | <td valign="top" class="value ${hasErrors(bean:person,field:'loginName','errors')}"> |
---|
33 | <input type="text" id="loginName" name="loginName" value="${person.loginName?.encodeAsHTML()}"/> |
---|
34 | <g:helpBalloon class="helpballoon" code="person.loginName" /> |
---|
35 | </td> |
---|
36 | </tr> |
---|
37 | |
---|
38 | <tr class="prop"> |
---|
39 | <td valign="top" class="name"><label for="firstName">First Name:</label></td> |
---|
40 | <td valign="top" class="value ${hasErrors(bean:person,field:'firstName','errors')}"> |
---|
41 | <input type="text" id="firstName" name="firstName" value="${person.firstName?.encodeAsHTML()}"/> |
---|
42 | <g:helpBalloon class="helpballoon" code="person.firstName" /> |
---|
43 | </td> |
---|
44 | </tr> |
---|
45 | |
---|
46 | <tr class="prop"> |
---|
47 | <td valign="top" class="name"><label for="lastName">Last Name:</label></td> |
---|
48 | <td valign="top" class="value ${hasErrors(bean:person,field:'lastName','errors')}"> |
---|
49 | <input type="text" id="lastName" name="lastName" value="${person.lastName?.encodeAsHTML()}"/> |
---|
50 | <g:helpBalloon class="helpballoon" code="person.lastName" /> |
---|
51 | </td> |
---|
52 | </tr> |
---|
53 | |
---|
54 | |
---|
55 | <tr class="prop"> |
---|
56 | <td valign="top" class="name"><label for="pass">Password:</label></td> |
---|
57 | <td valign="top" class="value ${hasErrors(bean:person,field:'pass','errors')}"> |
---|
58 | <input type="password" id="pass" name="pass"/> |
---|
59 | <g:helpBalloon class="helpballoon" code="person.password" /> |
---|
60 | </td> |
---|
61 | </tr> |
---|
62 | |
---|
63 | <tr class="prop"> |
---|
64 | <td valign="top" class="name"><label for="isActive">Active:</label></td> |
---|
65 | <td valign="top" class="value ${hasErrors(bean:person,field:'isActive','errors')}"> |
---|
66 | <g:checkBox name="isActive" value="${person.isActive}" ></g:checkBox> |
---|
67 | <g:helpBalloon class="helpballoon" code="person.isActive" /> |
---|
68 | </td> |
---|
69 | </tr> |
---|
70 | |
---|
71 | <tr class="prop"> |
---|
72 | <td valign="top" class="name"><label for="description">Description:</label></td> |
---|
73 | <td valign="top" class="value ${hasErrors(bean:person,field:'description','errors')}"> |
---|
74 | <input type="text" id="description" name="description" value="${person.description?.encodeAsHTML()}"/> |
---|
75 | </td> |
---|
76 | </tr> |
---|
77 | |
---|
78 | <tr class="prop"> |
---|
79 | <td valign="top" class="name"><label for="email">Email:</label></td> |
---|
80 | <td valign="top" class="value ${hasErrors(bean:person,field:'email','errors')}"> |
---|
81 | <input type="text" id="email" name="email" value="${person.email?.encodeAsHTML()}"/> |
---|
82 | </td> |
---|
83 | </tr> |
---|
84 | |
---|
85 | <tr class="prop"> |
---|
86 | <td valign="top" class="name"><label for="emailShow">Show Email:</label></td> |
---|
87 | <td valign="top" class="value ${hasErrors(bean:person,field:'emailShow','errors')}"> |
---|
88 | <g:checkBox name="emailShow" value="${person.emailShow}"/> |
---|
89 | </td> |
---|
90 | </tr> |
---|
91 | |
---|
92 | <tr class="prop"> |
---|
93 | <td valign="top" class="name"><label for="employeeID">employee ID:</label></td> |
---|
94 | <td valign="top" class="value ${hasErrors(bean:person,field:'employeeID','errors')}"> |
---|
95 | <input type="text" id="employeeID" name="employeeID" value="${person.employeeID?.encodeAsHTML()}"/> |
---|
96 | </td> |
---|
97 | </tr> |
---|
98 | |
---|
99 | <tr class="prop"> |
---|
100 | <td valign="top" class="name"> |
---|
101 | <label for="department">Department:</label> |
---|
102 | </td> |
---|
103 | <td valign="top" class="value ${hasErrors(bean:person,field:'department','errors')}"> |
---|
104 | <g:select optionKey="id" from="${Department.list()}" name="department.id" value="${person?.department?.id}" noSelection="['null':'--None--']"></g:select> |
---|
105 | </td> |
---|
106 | </tr> |
---|
107 | |
---|
108 | <tr class="prop"> |
---|
109 | <td valign="top" class="name"> |
---|
110 | <label for="personGroups">Groups:</label> |
---|
111 | </td> |
---|
112 | <td valign="top" class="value ${hasErrors(bean:person,field:'personGroups','errors')}"> |
---|
113 | <g:select id="personGroups" name="personGroups" |
---|
114 | from="${PersonGroup.list()}" |
---|
115 | optionKey="id" size="5" multiple="yes" |
---|
116 | value="${person?.personGroups?.id}" noSelection="['':'--None--']"/> |
---|
117 | <g:helpBalloon class="helpballoon" code="person.personGroups" /> |
---|
118 | </td> |
---|
119 | </tr> |
---|
120 | |
---|
121 | <tr class="prop"> |
---|
122 | <td valign="top" class="name" align="left"> |
---|
123 | Authorities: |
---|
124 | </td> |
---|
125 | <td valign="top" class="name" align="left"> |
---|
126 | <g:helpBalloon class="helpballoon" code="person.authorities" /> |
---|
127 | </td> |
---|
128 | </tr> |
---|
129 | |
---|
130 | <g:each in="${authorityList}"> |
---|
131 | <tr> |
---|
132 | <td valign="top" class="name" align="left">${it.authority.encodeAsHTML()}</td> |
---|
133 | <td align="left"> |
---|
134 | <g:checkBox name="${it.authority}" value="${it.authority == 'ROLE_AppUser'}"/> |
---|
135 | </td> |
---|
136 | </tr> |
---|
137 | </g:each> |
---|
138 | |
---|
139 | </tbody> |
---|
140 | </table> |
---|
141 | </div> |
---|
142 | |
---|
143 | <div class="buttons"> |
---|
144 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
145 | </div> |
---|
146 | |
---|
147 | </g:form> |
---|
148 | |
---|
149 | </div> |
---|
150 | </body> |
---|