source: trunk/grails-app/views/person/create.gsp @ 399

Last change on this file since 399 was 399, checked in by gav, 14 years ago

Remove email and emailShow from Person in preparation for ContactDetails.

File size: 6.4 KB
Line 
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="employeeID">employee ID:</label></td>
80                        <td valign="top" class="value ${hasErrors(bean:person,field:'employeeID','errors')}">
81                            <input type="text" id="employeeID" name="employeeID" value="${person.employeeID?.encodeAsHTML()}"/>
82                        </td>
83                    </tr>
84
85                    <tr class="prop">
86                        <td valign="top" class="name">
87                            <label for="department">Department:</label>
88                        </td>
89                        <td valign="top" class="value ${hasErrors(bean:person,field:'department','errors')}">
90                            <g:select optionKey="id" from="${Department.list()}" name="department.id" value="${person?.department?.id}" noSelection="['null':'--None--']"></g:select>
91                        </td>
92                    </tr>
93
94                    <tr class="prop">
95                        <td valign="top" class="name">
96                            <label for="personGroups">Groups:</label>
97                        </td>
98                        <td valign="top" class="value ${hasErrors(bean:person,field:'personGroups','errors')}">
99                            <g:helpBalloon class="helpballoon" code="person.personGroups" />
100                            <custom:checkBoxList name="personGroups"
101                                                            from="${PersonGroup.list().sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}"
102                                                            value="${person?.personGroups?.collect{it.id}}"
103                                                            optionKey="id"/>
104                        </td>
105                    </tr>
106
107                    <tr class="prop">
108                        <td valign="top" class="name" align="left">
109                            Authorities:
110                        </td>
111                        <td valign="top" class="name" align="left">
112                            <g:helpBalloon class="helpballoon" code="person.authorities" />
113                        </td>
114                    </tr>
115
116                    <g:each in="${authorityList}">
117                    <tr>
118                        <td valign="top" class="name" align="left">${it.description.encodeAsHTML()}</td>
119                        <td align="left">
120                            <g:checkBox name="${it.authority}" value="${it.authority == 'ROLE_AppUser'}"/>
121                        </td>
122                    </tr>
123                    </g:each>
124
125                </tbody>
126                </table>
127            </div>
128
129            <div class="buttons">
130                <span class="button"><input class="save" type="submit" value="Create" /></span>
131            </div>
132
133        </g:form>
134
135    </div>
136</body>
Note: See TracBrowser for help on using the repository browser.