source: trunk/grails-app/views/inventoryItemDetailed/create.gsp @ 182

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

Add support for inventory item Pictures and Images.
Add new PersonService, refactor CreateDataService and TaskService to suite.

File size: 9.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>Create InventoryItem</title>   
8        <nav:resources override="true"/>     
9    </head>
10    <body>
11        <div class="nav">
12            <nav:renderSubItems group="nav"/>
13        </div>
14        <div class="body">
15            <g:if test="${flash.message}">
16            <div class="message">${flash.message}</div>
17            </g:if>
18            <g:hasErrors bean="${inventoryItemInstance}">
19            <div class="errors">
20                <g:renderErrors bean="${inventoryItemInstance}" as="list" />
21            </div>
22            </g:hasErrors>
23            <g:form action="save" method="post" >
24                <div class="dialog">
25                    <table>
26                        <tbody>
27                       
28                            <tr class="prop">
29                                <td valign="top" class="name">
30                                    <label for="name">Name:</label>
31                                </td>
32                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'name','errors')}">
33                                    <input type="text" class="description" maxlength="50" id="name" name="name" value="${fieldValue(bean:inventoryItemInstance,field:'name')}"/>
34                                </td>
35                            </tr>
36                       
37                            <tr class="prop">
38                                <td valign="top" class="name">
39                                    <label for="description">Description:</label>
40                                </td>
41                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'description','errors')}">
42                                    <input type="text" class="description" id="description" name="description" value="${fieldValue(bean:inventoryItemInstance,field:'description')}"/>
43                                </td>
44                            </tr>
45                       
46                            <tr class="prop">
47                                <td valign="top" class="name">
48                                    <label for="inventoryLocation">Inventory Location:</label>
49                                </td>
50                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryLocation','errors')}">
51                                    <g:select optionKey="id" from="${InventoryLocation.list()}" name="inventoryLocation.id" value="${inventoryItemInstance?.inventoryLocation?.id}" ></g:select>
52                                </td>
53                            </tr>
54                       
55                            <tr class="prop">
56                                <td valign="top" class="name">
57                                    <label for="reorderPoint">Reorder Point:</label>
58                                </td>
59                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'reorderPoint','errors')}">
60                                    <input type="text" id="reorderPoint" name="reorderPoint" value="${fieldValue(bean:inventoryItemInstance,field:'reorderPoint')}" />
61                                    <g:select optionKey="id" from="${UnitOfMeasure.list()}" name="unitOfMeasure.id" value="${inventoryItemInstance?.unitOfMeasure?.id}" ></g:select>
62                                </td>
63                            </tr>
64                       
65                            <tr class="prop">
66                                <td valign="top" class="name">
67                                    <label for="enableReorder">Enable Reorder:</label>
68                                </td>
69                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'enableReorder','errors')}">
70                                    <g:checkBox name="enableReorder" value="${inventoryItemInstance?.enableReorder}" ></g:checkBox>
71                                </td>
72                            </tr>
73                       
74                            <tr class="prop">
75                                <td valign="top" class="name">
76                                    <label for="inventoryGroup">Inventory Group:</label>
77                                </td>
78                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryGroup','errors')}">
79                                    <g:select optionKey="id" from="${InventoryGroup.list()}" name="inventoryGroup.id" value="${inventoryItemInstance?.inventoryGroup?.id}" ></g:select>
80                                </td>
81                            </tr>
82                       
83                            <tr class="prop">
84                                <td valign="top" class="name">
85                                    <label for="inventoryType">Inventory Type:</label>
86                                </td>
87                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryType','errors')}">
88                                    <g:select optionKey="id" from="${InventoryType.list()}" name="inventoryType.id" value="${inventoryItemInstance?.inventoryType?.id}" ></g:select>
89                                </td>
90                            </tr>
91                       
92                            <tr class="prop">
93                                <td valign="top" class="name">
94                                    <label for="manufacturersPartNumber">Manufacturers Part Number:</label>
95                                </td>
96                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'manufacturersPartNumber','errors')}">
97                                    <input type="text" id="manufacturersPartNumber" name="manufacturersPartNumber" value="${fieldValue(bean:inventoryItemInstance,field:'manufacturersPartNumber')}"/>
98                                </td>
99                            </tr>
100                       
101                            <tr class="prop">
102                                <td valign="top" class="name">
103                                    <label for="manufacturers">Manufacturers:</label>
104                                </td>
105                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'manufacturers','errors')}">
106                                    <g:select id="manufacturers" name="manufacturers"
107                                                        from="${Manufacturer.list()}"
108                                                        size="5" multiple="yes" optionKey="id"
109                                                        value="${inventoryItemInstance?.manufacturers?.id}" noSelection="['':'--None--']" />
110
111                                </td>
112                            </tr>
113                       
114                            <tr class="prop">
115                                <td valign="top" class="name">
116                                    <label for="suppliersPartNumber">Suppliers Part Number:</label>
117                                </td>
118                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'suppliersPartNumber','errors')}">
119                                    <input type="text" id="suppliersPartNumber" name="suppliersPartNumber" value="${fieldValue(bean:inventoryItemInstance,field:'suppliersPartNumber')}"/>
120                                </td>
121                            </tr>
122                       
123                            <tr class="prop">
124                                <td valign="top" class="name">
125                                    <label for="suppliers">Suppliers:</label>
126                                </td>
127                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'suppliers','errors')}">
128                                    <g:select id="suppliers" name="suppliers"
129                                                        from="${Supplier.list()}"
130                                                        size="5" multiple="yes" optionKey="id"
131                                                        value="${inventoryItemInstance?.suppliers?.id}" noSelection="['':'--None--']"/>
132
133                                </td>
134                            </tr>
135                       
136                            <tr class="prop">
137                                <td valign="top" class="name">
138                                    <label for="averageDeliveryTime">Average Delivery Time:</label>
139                                </td>
140                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'averageDeliveryTime','errors')}">
141                                    <input type="text" id="averageDeliveryTime" name="averageDeliveryTime" value="${fieldValue(bean:inventoryItemInstance,field:'averageDeliveryTime')}" />
142                                    <g:select optionKey="id" from="${Period.list()}" name="averageDeliveryPeriod.id" value="${inventoryItemInstance?.averageDeliveryPeriod?.id}" noSelection="['null':'--None--']"></g:select>
143                                </td>
144                            </tr>
145                       
146                        </tbody>
147                    </table>
148                </div>
149                <div class="buttons">
150                    <span class="button"><input class="save" type="submit" value="Create" /></span>
151                </div>
152            </g:form>
153        </div>
154    </body>
155</html>
Note: See TracBrowser for help on using the repository browser.