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:render template="/shared/messages" /> |
---|
15 | <g:hasErrors bean="${person}"> |
---|
16 | <div class="errors"> |
---|
17 | <g:renderErrors bean="${person}" as="list" /> |
---|
18 | </div> |
---|
19 | </g:hasErrors> |
---|
20 | <g:form action="save"> |
---|
21 | <div class="dialog"> |
---|
22 | <table> |
---|
23 | <tbody> |
---|
24 | |
---|
25 | <tr class="prop"> |
---|
26 | <td valign="top" class="name"><label for="loginName">Login Name:</label></td> |
---|
27 | <td valign="top" class="value ${hasErrors(bean:person,field:'loginName','errors')}"> |
---|
28 | <input type="text" id="loginName" name="loginName" value="${person.loginName?.encodeAsHTML()}"/> |
---|
29 | <g:helpBalloon class="helpballoon" code="person.loginName" /> |
---|
30 | </td> |
---|
31 | </tr> |
---|
32 | |
---|
33 | <tr class="prop"> |
---|
34 | <td valign="top" class="name"><label for="firstName">First Name:</label></td> |
---|
35 | <td valign="top" class="value ${hasErrors(bean:person,field:'firstName','errors')}"> |
---|
36 | <input type="text" id="firstName" name="firstName" value="${person.firstName?.encodeAsHTML()}"/> |
---|
37 | <g:helpBalloon class="helpballoon" code="person.firstName" /> |
---|
38 | </td> |
---|
39 | </tr> |
---|
40 | |
---|
41 | <tr class="prop"> |
---|
42 | <td valign="top" class="name"><label for="lastName">Last Name:</label></td> |
---|
43 | <td valign="top" class="value ${hasErrors(bean:person,field:'lastName','errors')}"> |
---|
44 | <input type="text" id="lastName" name="lastName" value="${person.lastName?.encodeAsHTML()}"/> |
---|
45 | <g:helpBalloon class="helpballoon" code="person.lastName" /> |
---|
46 | </td> |
---|
47 | </tr> |
---|
48 | |
---|
49 | |
---|
50 | <tr class="prop"> |
---|
51 | <td valign="top" class="name"><label for="pass">Password:</label></td> |
---|
52 | <td valign="top" class="value ${hasErrors(bean:person,field:'pass','errors')}"> |
---|
53 | <input type="password" id="pass" name="pass"/> |
---|
54 | <g:helpBalloon class="helpballoon" code="person.password" /> |
---|
55 | </td> |
---|
56 | </tr> |
---|
57 | |
---|
58 | <tr class="prop"> |
---|
59 | <td valign="top" class="name"><label for="isActive">Active:</label></td> |
---|
60 | <td valign="top" class="value ${hasErrors(bean:person,field:'isActive','errors')}"> |
---|
61 | <g:checkBox name="isActive" value="${person.isActive}" ></g:checkBox> |
---|
62 | <g:helpBalloon class="helpballoon" code="person.isActive" /> |
---|
63 | </td> |
---|
64 | </tr> |
---|
65 | |
---|
66 | <tr class="prop"> |
---|
67 | <td valign="top" class="name"><label for="description">Description:</label></td> |
---|
68 | <td valign="top" class="value ${hasErrors(bean:person,field:'description','errors')}"> |
---|
69 | <input type="text" id="description" name="description" value="${person.description?.encodeAsHTML()}"/> |
---|
70 | </td> |
---|
71 | </tr> |
---|
72 | |
---|
73 | <tr class="prop"> |
---|
74 | <td valign="top" class="name"><label for="employeeID">employee ID:</label></td> |
---|
75 | <td valign="top" class="value ${hasErrors(bean:person,field:'employeeID','errors')}"> |
---|
76 | <input type="text" id="employeeID" name="employeeID" value="${person.employeeID?.encodeAsHTML()}"/> |
---|
77 | </td> |
---|
78 | </tr> |
---|
79 | |
---|
80 | <tr class="prop"> |
---|
81 | <td valign="top" class="name"> |
---|
82 | <label for="department">Department:</label> |
---|
83 | </td> |
---|
84 | <td valign="top" class="value ${hasErrors(bean:person,field:'department','errors')}"> |
---|
85 | <g:select optionKey="id" from="${Department.list()}" name="department.id" value="${person?.department?.id}" noSelection="['null':'--None--']"></g:select> |
---|
86 | </td> |
---|
87 | </tr> |
---|
88 | |
---|
89 | <tr class="prop"> |
---|
90 | <td valign="top" class="name"> |
---|
91 | <label for="personGroups">Groups:</label> |
---|
92 | </td> |
---|
93 | <td valign="top" class="value ${hasErrors(bean:person,field:'personGroups','errors')}"> |
---|
94 | <g:helpBalloon class="helpballoon" code="person.personGroups" /> |
---|
95 | <custom:checkBoxList name="personGroups" |
---|
96 | from="${PersonGroup.findAllByIsActive(true)}" |
---|
97 | value="${person?.personGroups?.collect{it.id}}" |
---|
98 | optionKey="id" |
---|
99 | sortBy="name" |
---|
100 | linkController="personGroupDetailed" |
---|
101 | linkAction="show"/> |
---|
102 | <g:link controller="personGroupDetailed" action="create">+Add Group</g:link> |
---|
103 | </td> |
---|
104 | </tr> |
---|
105 | |
---|
106 | <tr class="prop"> |
---|
107 | <td valign="top" class="name" align="left"> |
---|
108 | Authorities: |
---|
109 | </td> |
---|
110 | <td valign="top" class="name" align="left"> |
---|
111 | <g:helpBalloon class="helpballoon" code="person.authorities" /> |
---|
112 | </td> |
---|
113 | </tr> |
---|
114 | |
---|
115 | <g:each in="${authorityList}"> |
---|
116 | <tr> |
---|
117 | <td valign="top" class="name" align="left">${it.description.encodeAsHTML()}</td> |
---|
118 | <td align="left"> |
---|
119 | <g:checkBox name="${it.authority}" value="${it.authority == 'ROLE_AppUser'}"/> |
---|
120 | </td> |
---|
121 | </tr> |
---|
122 | </g:each> |
---|
123 | |
---|
124 | </tbody> |
---|
125 | </table> |
---|
126 | </div> |
---|
127 | |
---|
128 | <div class="buttons"> |
---|
129 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
130 | </div> |
---|
131 | |
---|
132 | </g:form> |
---|
133 | |
---|
134 | </div> |
---|
135 | </body> |
---|