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 InventoryItem</title> |
---|
8 | <nav:resources override="true"/> |
---|
9 | <g:render template="/shared/pictureHead" /> |
---|
10 | </head> |
---|
11 | <body> |
---|
12 | <div class="nav"> |
---|
13 | <nav:renderSubItems group="nav"/> |
---|
14 | </div> |
---|
15 | <div class="body"> |
---|
16 | <g:if test="${flash.message}"> |
---|
17 | <div class="message">${flash.message}</div> |
---|
18 | </g:if> |
---|
19 | <g:hasErrors bean="${inventoryItemInstance}"> |
---|
20 | <div class="errors"> |
---|
21 | <g:renderErrors bean="${inventoryItemInstance}" as="list" /> |
---|
22 | </div> |
---|
23 | </g:hasErrors> |
---|
24 | <g:form method="post" > |
---|
25 | <input type="hidden" name="id" value="${inventoryItemInstance?.id}" /> |
---|
26 | <input type="hidden" name="version" value="${inventoryItemInstance?.version}" /> |
---|
27 | <div class="dialog"> |
---|
28 | <table> |
---|
29 | <tbody> |
---|
30 | |
---|
31 | <tr class="prop"> |
---|
32 | <td valign="top" class="name">Picture:</td> |
---|
33 | <td valign="top" class="value"> |
---|
34 | <g:if test="${inventoryItemInstance.picture}" > |
---|
35 | <span class='gallery'> |
---|
36 | <wa:pictureLightboxAnchor picture="${inventoryItemInstance.picture}" size="${Image.Medium}" lightboxSize="${Image.Large}" target="_blank" title="Show Original" /> |
---|
37 | </span> |
---|
38 | <br /> |
---|
39 | <g:link controller="pictureDetailed" action="edit" id="${inventoryItemInstance.picture.id}" > |
---|
40 | Edit Picture |
---|
41 | </g:link> |
---|
42 | </g:if> |
---|
43 | </td> |
---|
44 | </tr> |
---|
45 | |
---|
46 | <tr class="prop"> |
---|
47 | <td valign="top" class="name"> |
---|
48 | <label for="name">Name:</label> |
---|
49 | </td> |
---|
50 | <td valign="top"> |
---|
51 | <input class="description ${hasErrors(bean:inventoryItemInstance,field:'name','errors')}" |
---|
52 | type="text" maxlength="50" id="name" name="name" |
---|
53 | value="${fieldValue(bean:inventoryItemInstance,field:'name')}"/> |
---|
54 | </td> |
---|
55 | </tr> |
---|
56 | |
---|
57 | <tr class="prop"> |
---|
58 | <td valign="top" class="name"> |
---|
59 | <label for="description">Description:</label> |
---|
60 | </td> |
---|
61 | <td valign="top"> |
---|
62 | <input class="description ${hasErrors(bean:inventoryItemInstance,field:'description','errors')}" |
---|
63 | type="text" id="description" name="description" |
---|
64 | value="${fieldValue(bean:inventoryItemInstance,field:'description')}"/> |
---|
65 | </td> |
---|
66 | </tr> |
---|
67 | |
---|
68 | <tr class="prop"> |
---|
69 | <td valign="top" class="name"> |
---|
70 | <label for="unitsInStock">In Stock:</label> |
---|
71 | </td> |
---|
72 | <td valign="top" class="value"> |
---|
73 | ${inventoryItemInstance.unitsInStock} ${inventoryItemInstance.unitOfMeasure.encodeAsHTML()} |
---|
74 | </td> |
---|
75 | </tr> |
---|
76 | |
---|
77 | <tr class="prop"> |
---|
78 | <td valign="top" class="name"> |
---|
79 | <label for="inventoryLocation">Location:</label> |
---|
80 | </td> |
---|
81 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryLocation','errors')}"> |
---|
82 | <g:select optionKey="id" from="${InventoryLocation.list()}" name="inventoryLocation.id" value="${inventoryItemInstance?.inventoryLocation?.id}" ></g:select> |
---|
83 | </td> |
---|
84 | </tr> |
---|
85 | |
---|
86 | <tr class="prop"> |
---|
87 | <td valign="top" class="name"> |
---|
88 | <label for="isActive">Active:</label> |
---|
89 | </td> |
---|
90 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'isActive','errors')}"> |
---|
91 | <g:checkBox name="isActive" value="${inventoryItemInstance?.isActive}" ></g:checkBox> |
---|
92 | </td> |
---|
93 | </tr> |
---|
94 | |
---|
95 | <tr class="prop"> |
---|
96 | <td valign="top" class="name"> |
---|
97 | <label for="reorderPoint">Reorder Point:</label> |
---|
98 | </td> |
---|
99 | <td valign="top"> |
---|
100 | <input class="medium ${hasErrors(bean:inventoryItemInstance,field:'reorderPoint','errors')}" |
---|
101 | type="text" id="reorderPoint" name="reorderPoint" |
---|
102 | value="${fieldValue(bean:inventoryItemInstance,field:'reorderPoint')}" /> |
---|
103 | ${inventoryItemInstance.unitOfMeasure.encodeAsHTML()} |
---|
104 | </td> |
---|
105 | </tr> |
---|
106 | |
---|
107 | <tr class="prop"> |
---|
108 | <td valign="top" class="name"> |
---|
109 | <label for="recommendedReorderPoint">Recommended Reorder Point:</label> |
---|
110 | </td> |
---|
111 | <td valign="top"> |
---|
112 | <input class="medium ${hasErrors(bean:inventoryItemInstance,field:'recommendedReorderPoint','errors')}" |
---|
113 | type="text" id="recommendedReorderPoint" name="recommendedReorderPoint" |
---|
114 | value="${fieldValue(bean:inventoryItemInstance,field:'recommendedReorderPoint')}" /> |
---|
115 | ${inventoryItemInstance.unitOfMeasure.encodeAsHTML()} |
---|
116 | </td> |
---|
117 | </tr> |
---|
118 | |
---|
119 | <tr class="prop"> |
---|
120 | <td valign="top" class="name"> |
---|
121 | <label for="enableReorder">Enable Reorder:</label> |
---|
122 | </td> |
---|
123 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'enableReorder','errors')}"> |
---|
124 | <g:checkBox name="enableReorder" value="${inventoryItemInstance?.enableReorder}" ></g:checkBox> |
---|
125 | </td> |
---|
126 | </tr> |
---|
127 | |
---|
128 | <tr class="prop"> |
---|
129 | <td valign="top" class="name"> |
---|
130 | <label for="isObsolete">Obsolete:</label> |
---|
131 | </td> |
---|
132 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'isObsolete','errors')}"> |
---|
133 | <g:checkBox name="isObsolete" value="${inventoryItemInstance?.isObsolete}" ></g:checkBox> |
---|
134 | </td> |
---|
135 | </tr> |
---|
136 | |
---|
137 | <tr class="prop"> |
---|
138 | <td valign="top" class="name"> |
---|
139 | <label for="averageDeliveryTime">Average Delivery Time:</label> |
---|
140 | </td> |
---|
141 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'averageDeliveryTime','errors')}"> |
---|
142 | <input type="text" id="averageDeliveryTime" name="averageDeliveryTime" value="${fieldValue(bean:inventoryItemInstance,field:'averageDeliveryTime')}" /> |
---|
143 | <g:select optionKey="id" from="${Period.list()}" name="averageDeliveryPeriod.id" value="${inventoryItemInstance?.averageDeliveryPeriod?.id}" noSelection="['null':'--None--']"></g:select> |
---|
144 | </td> |
---|
145 | </tr> |
---|
146 | |
---|
147 | <tr class="prop"> |
---|
148 | <td valign="top" class="name"> |
---|
149 | <label for="suppliersPartNumber">Suppliers Part Number:</label> |
---|
150 | </td> |
---|
151 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'suppliersPartNumber','errors')}"> |
---|
152 | <input type="text" id="suppliersPartNumber" name="suppliersPartNumber" value="${fieldValue(bean:inventoryItemInstance,field:'suppliersPartNumber')}"/> |
---|
153 | </td> |
---|
154 | </tr> |
---|
155 | |
---|
156 | <tr class="prop"> |
---|
157 | <td valign="top" class="name"> |
---|
158 | <label for="suppliers">Suppliers:</label> |
---|
159 | </td> |
---|
160 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'suppliers','errors')}"> |
---|
161 | <g:select id="suppliers" name="suppliers" |
---|
162 | from="${Supplier.list()}" |
---|
163 | size="5" multiple="yes" optionKey="id" |
---|
164 | value="${inventoryItemInstance?.suppliers.id}" noSelection="['':'--None--']"/> |
---|
165 | |
---|
166 | </td> |
---|
167 | </tr> |
---|
168 | |
---|
169 | <tr class="prop"> |
---|
170 | <td valign="top" class="name"> |
---|
171 | <label for="manufacturersPartNumber">Manufacturers Part Number:</label> |
---|
172 | </td> |
---|
173 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'manufacturersPartNumber','errors')}"> |
---|
174 | <input type="text" id="manufacturersPartNumber" name="manufacturersPartNumber" value="${fieldValue(bean:inventoryItemInstance,field:'manufacturersPartNumber')}"/> |
---|
175 | </td> |
---|
176 | </tr> |
---|
177 | |
---|
178 | <tr class="prop"> |
---|
179 | <td valign="top" class="name"> |
---|
180 | <label for="manufacturers">Manufacturers:</label> |
---|
181 | </td> |
---|
182 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'manufacturers','errors')}"> |
---|
183 | <g:select id="manufacturers" name="manufacturers" |
---|
184 | from="${Manufacturer.list()}" |
---|
185 | size="5" multiple="yes" optionKey="id" |
---|
186 | value="${inventoryItemInstance?.manufacturers.id}" noSelection="['':'--None--']"/> |
---|
187 | </td> |
---|
188 | </tr> |
---|
189 | |
---|
190 | <tr class="prop"> |
---|
191 | <td valign="top" class="name"> |
---|
192 | <label for="spareFor">Spare For:</label> |
---|
193 | </td> |
---|
194 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'spareFor','errors')}"> |
---|
195 | <g:select name="spareFor" |
---|
196 | from="${Asset.list()}" |
---|
197 | size="5" multiple="yes" optionKey="id" |
---|
198 | value="${inventoryItemInstance?.spareFor}" noSelection="['':'--None--']"/> |
---|
199 | |
---|
200 | </td> |
---|
201 | </tr> |
---|
202 | |
---|
203 | <tr class="prop"> |
---|
204 | <td valign="top" class="name"> |
---|
205 | <label for="alternateItems">Alternate Items:</label> |
---|
206 | </td> |
---|
207 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'alternateItems','errors')}"> |
---|
208 | <g:select name="alternateItems" |
---|
209 | from="${InventoryItem.list()}" |
---|
210 | size="5" multiple="yes" optionKey="id" |
---|
211 | value="${inventoryItemInstance?.alternateItems}" noSelection="['':'--None--']"/> |
---|
212 | |
---|
213 | </td> |
---|
214 | </tr> |
---|
215 | |
---|
216 | <tr class="prop"> |
---|
217 | <td valign="top" class="name"> |
---|
218 | <label for="inventoryGroup">Inventory Group:</label> |
---|
219 | </td> |
---|
220 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryGroup','errors')}"> |
---|
221 | <g:select optionKey="id" from="${InventoryGroup.list()}" name="inventoryGroup.id" value="${inventoryItemInstance?.inventoryGroup?.id}" ></g:select> |
---|
222 | </td> |
---|
223 | </tr> |
---|
224 | |
---|
225 | <tr class="prop"> |
---|
226 | <td valign="top" class="name"> |
---|
227 | <label for="inventoryType">Inventory Type:</label> |
---|
228 | </td> |
---|
229 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryType','errors')}"> |
---|
230 | <g:select optionKey="id" from="${InventoryType.list()}" name="inventoryType.id" value="${inventoryItemInstance?.inventoryType?.id}" ></g:select> |
---|
231 | </td> |
---|
232 | </tr> |
---|
233 | |
---|
234 | </tbody> |
---|
235 | </table> |
---|
236 | </div> |
---|
237 | <div class="buttons"> |
---|
238 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
239 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
240 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
241 | </div> |
---|
242 | </g:form> |
---|
243 | </div> |
---|
244 | </body> |
---|
245 | </html> |
---|