source: trunk/grails-app/views/person/edit.gsp

Last change on this file was 1430, checked in by work@…, 13 years ago
  • set keyword expansion
  • Property svn:keywords set to Rev Author Date
File size: 8.7 KB
Line 
1
2<%@ page import="dbnp.studycapturing.Person" %>
3<html>
4    <head>
5        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6        <meta name="layout" content="${layout}" />
7        <g:set var="entityName" value="${message(code: 'person.label', default: 'Person')}" />
8        <title><g:message code="default.edit.label" args="[entityName]" /></title>
9    </head>
10    <body>
11        <div class="body">
12            <h1><g:message code="default.edit.label" args="[entityName]" /></h1>
13            <g:if test="${flash.message}">
14            <div class="message">${flash.message}</div>
15            </g:if>
16            <g:hasErrors bean="${personInstance}">
17            <div class="errors">
18                <g:renderErrors bean="${personInstance}" as="list" />
19            </div>
20            </g:hasErrors>
21            <g:form method="post" >
22                <g:hiddenField name="id" value="${personInstance?.id}" />
23                <g:hiddenField name="version" value="${personInstance?.version}" />
24                <div class="dialog">
25                    <table>
26                        <tbody>
27
28                            <tr class="prop">
29                                <td valign="top" class="name">
30                                  <label for="title"><g:message code="person.title.label" default="Title" /></label>
31                                </td>
32                                <td colspan="3" valign="top" class="value ${hasErrors(bean: personInstance, field: 'title', 'errors')}">
33                                    <g:textField name="title" value="${personInstance?.title}" />
34                                </td>
35                            </tr>
36
37                            <tr class="prop">
38                                <td valign="top" class="name">
39                                    <label for="gender"><g:message code="person.gender.label" default="Gender" /></label>
40                                </td>
41                                <td colspan="3" valign="top" class="value ${hasErrors(bean: personInstance, field: 'gender', 'errors')}">
42                                  <g:select name="gender" from="${possibleGenders}" noSelection="['' : 'Not specified']" value="${personInstance?.gender}" />
43                                </td>
44                            </tr>
45                           
46                            <tr class="prop">
47                                <td valign="top" class="name">
48                                  <label for="firstName"><g:message code="person.firstName.label" default="First Name" /></label>
49                                </td>
50                                <td valign="top" class="value ${hasErrors(bean: personInstance, field: 'firstName', 'errors')}">
51                                    <g:textField name="firstName" value="${personInstance?.firstName}" />
52                                </td>
53                                <td valign="top" class="name">
54                                  <label for="initials"><g:message code="person.initials.label" default="Initials" /></label>
55                                </td>
56                                <td valign="top" class="value ${hasErrors(bean: personInstance, field: 'initials', 'errors')}">
57                                    <g:textField name="initials" value="${personInstance?.initials}" />
58                                </td>
59                            </tr>
60
61                            <tr class="prop">
62                                <td valign="top" class="name">
63                                  <label for="lastName"><g:message code="person.lastName.label" default="Last Name" /></label>
64                                </td>
65                                <td valign="top" class="value ${hasErrors(bean: personInstance, field: 'lastName', 'errors')}">
66                                    <g:textField name="lastName" value="${personInstance?.lastName}" />
67                                </td>
68                                <td valign="top" class="name">
69                                    <label for="prefix"><g:message code="person.prefix.label" default="Prefix" /> (e.g. 'van de')</label>
70                                </td>
71                                <td valign="top" class="value ${hasErrors(bean: personInstance, field: 'prefix', 'errors')}">
72                                    <g:textField name="prefix" value="${personInstance?.prefix}" />
73                                </td>
74                            </tr>
75
76                            <tr class="prop">
77                                <td valign="top" class="name">
78                                  <label for="address"><g:message code="person.address.label" default="Address" /></label>
79                                </td>
80                                <td colspan="3" valign="top" class="value ${hasErrors(bean: personInstance, field: 'address', 'errors')}">
81                                    <g:textField name="address" value="${personInstance?.address}" />
82                                </td>
83                            </tr>
84
85                            <tr class="prop">
86                                <td valign="top" class="name">
87                                    <label for="phone"><g:message code="person.phone.label" default="Work Phone" /></label>
88                                </td>
89                                <td colspan="3" valign="top" class="value ${hasErrors(bean: personInstance, field: 'phone', 'errors')}">
90                                    <g:textField name="phone" value="${personInstance?.phone}" />
91                                </td>
92                            </tr>
93
94                            <tr class="prop">
95                                <td valign="top" class="name">
96                                    <label for="mobile"><g:message code="person.mobile.label" default="Mobile Phone" /></label>
97                                </td>
98                                <td colspan="3" valign="top" class="value ${hasErrors(bean: personInstance, field: 'mobile', 'errors')}">
99                                    <g:textField name="mobile" value="${personInstance?.phone}" />
100                                </td>
101                            </tr>
102
103                       
104                            <tr class="prop">
105                                <td valign="top" class="name">
106                                  <label for="fax"><g:message code="person.fax.label" default="Fax" /></label>
107                                </td>
108                                <td colspan="3" valign="top" class="value ${hasErrors(bean: personInstance, field: 'fax', 'errors')}">
109                                    <g:textField name="fax" value="${personInstance?.fax}" />
110                                </td>
111                            </tr>
112                       
113                            <tr class="prop">
114                                <td valign="top" class="name">
115                                  <label for="email"><g:message code="person.email.label" default="Email" /></label>
116                                </td>
117                                <td colspan="3" valign="top" class="value ${hasErrors(bean: personInstance, field: 'email', 'errors')}">
118                                    <g:textField name="email" value="${personInstance?.email}" />
119                                </td>
120                            </tr>
121                       
122                            <tr class="prop">
123                                <td valign="top" class="name">
124                                  <label for="affiliations"><g:message code="person.affiliations.label" default="Affiliations" /></label>
125                                </td>
126                                <td colspan="3" valign="top" class="value ${hasErrors(bean: personInstance, field: 'affiliations', 'errors')}">
127                                    <g:select name="affiliations" from="${dbnp.studycapturing.PersonAffiliation.list()}" multiple="yes" optionKey="id" size="5" value="${personInstance?.affiliations}" />
128
129                                                                        <g:link controller="personAffiliation" action="list" params="${extraparams}">Edit Affiliations</g:link>
130                                                                </td>
131                            </tr>
132                       
133                        </tbody>
134                    </table>
135                </div>
136                <div class="buttons">
137                   <g:each in="${extraparams}" var="param">
138                     <input type="hidden" name="${param.key}" value="${param.value}">
139                   </g:each>
140
141                    <span class="button"><g:actionSubmit class="save" action="update" value="${message(code: 'default.button.update.label', default: 'Update')}" /></span>
142                    <span class="button"><g:actionSubmit class="cancel" action="show" value="Cancel" /></span>
143                </div>
144            </g:form>
145        </div>
146    </body>
147</html>
Note: See TracBrowser for help on using the repository browser.