source: trunk/grails-app/views/lifePlan/edit.gsp @ 118

Last change on this file since 118 was 118, checked in by gav, 15 years ago

First commit of Asset domain, including domain-classes, controllers, views and bootstrap.

File size: 10.6 KB
Line 
1
2
3<html>
4    <head>
5        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
6        <meta name="layout" content="main" />
7        <title>Edit LifePlan</title>
8    </head>
9    <body>
10        <div class="nav">
11            <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
12            <span class="menuButton"><g:link class="list" action="list">LifePlan List</g:link></span>
13            <span class="menuButton"><g:link class="create" action="create">New LifePlan</g:link></span>
14        </div>
15        <div class="body">
16            <h1>Edit LifePlan</h1>
17            <g:if test="${flash.message}">
18            <div class="message">${flash.message}</div>
19            </g:if>
20            <g:hasErrors bean="${lifePlanInstance}">
21            <div class="errors">
22                <g:renderErrors bean="${lifePlanInstance}" as="list" />
23            </div>
24            </g:hasErrors>
25            <g:form method="post" >
26                <input type="hidden" name="id" value="${lifePlanInstance?.id}" />
27                <input type="hidden" name="version" value="${lifePlanInstance?.version}" />
28                <div class="dialog">
29                    <table>
30                        <tbody>
31                       
32                            <tr class="prop">
33                                <td valign="top" class="name">
34                                    <label for="asset">Asset:</label>
35                                </td>
36                                <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'asset','errors')}">
37                                    <g:select optionKey="id" from="${Asset.list()}" name="asset.id" value="${lifePlanInstance?.asset?.id}" noSelection="['null':'']"></g:select>
38                                </td>
39                            </tr>
40                       
41                            <tr class="prop">
42                                <td valign="top" class="name">
43                                    <label for="form">Form:</label>
44                                </td>
45                                <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'form','errors')}">
46                                    <g:select optionKey="id" from="${Form.list()}" name="form.id" value="${lifePlanInstance?.form?.id}" noSelection="['null':'']"></g:select>
47                                </td>
48                            </tr>
49                       
50                            <tr class="prop">
51                                <td valign="top" class="name">
52                                    <label for="frequency">Frequency:</label>
53                                </td>
54                                <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'frequency','errors')}">
55                                    <g:select optionKey="id" from="${Frequency.list()}" name="frequency.id" value="${lifePlanInstance?.frequency?.id}" noSelection="['null':'']"></g:select>
56                                </td>
57                            </tr>
58                       
59                            <tr class="prop">
60                                <td valign="top" class="name">
61                                    <label for="assetType">Asset Type:</label>
62                                </td>
63                                <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'assetType','errors')}">
64                                    <g:select optionKey="id" from="${AssetType.list()}" name="assetType.id" value="${lifePlanInstance?.assetType?.id}" noSelection="['null':'']"></g:select>
65                                </td>
66                            </tr>
67                       
68                            <tr class="prop">
69                                <td valign="top" class="name">
70                                    <label for="assembly">Assembly:</label>
71                                </td>
72                                <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'assembly','errors')}">
73                                    <g:select optionKey="id" from="${Assembly.list()}" name="assembly.id" value="${lifePlanInstance?.assembly?.id}" noSelection="['null':'']"></g:select>
74                                </td>
75                            </tr>
76                       
77                            <tr class="prop">
78                                <td valign="top" class="name">
79                                    <label for="subAssembly">Sub Assembly:</label>
80                                </td>
81                                <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'subAssembly','errors')}">
82                                    <g:select optionKey="id" from="${SubAssembly.list()}" name="subAssembly.id" value="${lifePlanInstance?.subAssembly?.id}" noSelection="['null':'']"></g:select>
83                                </td>
84                            </tr>
85                       
86                            <tr class="prop">
87                                <td valign="top" class="name">
88                                    <label for="componentItem">Component Item:</label>
89                                </td>
90                                <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'componentItem','errors')}">
91                                    <g:select optionKey="id" from="${ComponentItem.list()}" name="componentItem.id" value="${lifePlanInstance?.componentItem?.id}" noSelection="['null':'']"></g:select>
92                                </td>
93                            </tr>
94                       
95                            <tr class="prop">
96                                <td valign="top" class="name">
97                                    <label for="description">Description:</label>
98                                </td>
99                                <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'description','errors')}">
100                                    <input type="text" id="description" name="description" value="${fieldValue(bean:lifePlanInstance,field:'description')}"/>
101                                </td>
102                            </tr>
103                       
104                            <tr class="prop">
105                                <td valign="top" class="name">
106                                    <label for="isActive">Is Active:</label>
107                                </td>
108                                <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'isActive','errors')}">
109                                    <g:checkBox name="isActive" value="${lifePlanInstance?.isActive}" ></g:checkBox>
110                                </td>
111                            </tr>
112                       
113                            <tr class="prop">
114                                <td valign="top" class="name">
115                                    <label for="maintenanceAction">Maintenance Action:</label>
116                                </td>
117                                <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'maintenanceAction','errors')}">
118                                    <input type="text" id="maintenanceAction" name="maintenanceAction" value="${fieldValue(bean:lifePlanInstance,field:'maintenanceAction')}"/>
119                                </td>
120                            </tr>
121                       
122                            <tr class="prop">
123                                <td valign="top" class="name">
124                                    <label for="name">Name:</label>
125                                </td>
126                                <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'name','errors')}">
127                                    <input type="text" id="name" name="name" value="${fieldValue(bean:lifePlanInstance,field:'name')}"/>
128                                </td>
129                            </tr>
130                       
131                            <tr class="prop">
132                                <td valign="top" class="name">
133                                    <label for="notes">Notes:</label>
134                                </td>
135                                <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'notes','errors')}">
136                                    <input type="text" id="notes" name="notes" value="${fieldValue(bean:lifePlanInstance,field:'notes')}"/>
137                                </td>
138                            </tr>
139                       
140                            <tr class="prop">
141                                <td valign="top" class="name">
142                                    <label for="resourceNumber">Resource Number:</label>
143                                </td>
144                                <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'resourceNumber','errors')}">
145                                    <input type="text" id="resourceNumber" name="resourceNumber" value="${fieldValue(bean:lifePlanInstance,field:'resourceNumber')}"/>
146                                </td>
147                            </tr>
148                       
149                            <tr class="prop">
150                                <td valign="top" class="name">
151                                    <label for="systemSections">System Sections:</label>
152                                </td>
153                                <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'systemSections','errors')}">
154                                   
155                                </td>
156                            </tr>
157                       
158                            <tr class="prop">
159                                <td valign="top" class="name">
160                                    <label for="timeInHours">Time In Hours:</label>
161                                </td>
162                                <td valign="top" class="value ${hasErrors(bean:lifePlanInstance,field:'timeInHours','errors')}">
163                                    <input type="text" id="timeInHours" name="timeInHours" value="${fieldValue(bean:lifePlanInstance,field:'timeInHours')}" />
164                                </td>
165                            </tr>
166                       
167                        </tbody>
168                    </table>
169                </div>
170                <div class="buttons">
171                    <span class="button"><g:actionSubmit class="save" value="Update" /></span>
172                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
173                </div>
174            </g:form>
175        </div>
176    </body>
177</html>
Note: See TracBrowser for help on using the repository browser.