source: trunk/grails-app/views/inventoryType/edit.gsp @ 178

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

Resolve ticket #12 again.
Turn query cache on again since this did not resolve the problem.
Implement fix as per http://jira.codehaus.org/browse/GRAILS-5111, add flush:true to save.
Adjust templates to include above and remove home url.
Re-generate all non detailed views and controllers.
Manually add flush:true and remove home url to detailed views and controllers.

File size: 4.2 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 InventoryType</title>
8    </head>
9    <body>
10        <div class="nav">
11            <span class="menuButton"><g:link class="list" action="list">InventoryType List</g:link></span>
12            <span class="menuButton"><g:link class="create" action="create">New InventoryType</g:link></span>
13        </div>
14        <div class="body">
15            <h1>Edit InventoryType</h1>
16            <g:if test="${flash.message}">
17            <div class="message">${flash.message}</div>
18            </g:if>
19            <g:hasErrors bean="${inventoryTypeInstance}">
20            <div class="errors">
21                <g:renderErrors bean="${inventoryTypeInstance}" as="list" />
22            </div>
23            </g:hasErrors>
24            <g:form method="post" >
25                <input type="hidden" name="id" value="${inventoryTypeInstance?.id}" />
26                <input type="hidden" name="version" value="${inventoryTypeInstance?.version}" />
27                <div class="dialog">
28                    <table>
29                        <tbody>
30                       
31                            <tr class="prop">
32                                <td valign="top" class="name">
33                                    <label for="description">Description:</label>
34                                </td>
35                                <td valign="top" class="value ${hasErrors(bean:inventoryTypeInstance,field:'description','errors')}">
36                                    <input type="text" id="description" name="description" value="${fieldValue(bean:inventoryTypeInstance,field:'description')}"/>
37                                </td>
38                            </tr>
39                       
40                            <tr class="prop">
41                                <td valign="top" class="name">
42                                    <label for="inventoryItems">Inventory Items:</label>
43                                </td>
44                                <td valign="top" class="value ${hasErrors(bean:inventoryTypeInstance,field:'inventoryItems','errors')}">
45                                   
46<ul>
47<g:each var="i" in="${inventoryTypeInstance?.inventoryItems?}">
48    <li><g:link controller="inventoryItem" action="show" id="${i.id}">${i?.encodeAsHTML()}</g:link></li>
49</g:each>
50</ul>
51<g:link controller="inventoryItem" params="['inventoryType.id':inventoryTypeInstance?.id]" action="create">Add InventoryItem</g:link>
52
53                                </td>
54                            </tr>
55                       
56                            <tr class="prop">
57                                <td valign="top" class="name">
58                                    <label for="isActive">Is Active:</label>
59                                </td>
60                                <td valign="top" class="value ${hasErrors(bean:inventoryTypeInstance,field:'isActive','errors')}">
61                                    <g:checkBox name="isActive" value="${inventoryTypeInstance?.isActive}" ></g:checkBox>
62                                </td>
63                            </tr>
64                       
65                            <tr class="prop">
66                                <td valign="top" class="name">
67                                    <label for="name">Name:</label>
68                                </td>
69                                <td valign="top" class="value ${hasErrors(bean:inventoryTypeInstance,field:'name','errors')}">
70                                    <input type="text" id="name" name="name" value="${fieldValue(bean:inventoryTypeInstance,field:'name')}"/>
71                                </td>
72                            </tr>
73                       
74                        </tbody>
75                    </table>
76                </div>
77                <div class="buttons">
78                    <span class="button"><g:actionSubmit class="save" value="Update" /></span>
79                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
80                </div>
81            </g:form>
82        </div>
83    </body>
84</html>
Note: See TracBrowser for help on using the repository browser.