source: trunk/grails-app/views/sectionDetailed/create.gsp @ 273

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

Correct site-inventoryStores relationship and generate-all.
Copy section views over sectionDetailed.

File size: 4.1 KB
RevLine 
[118]1
2
3<html>
4    <head>
5        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
6        <meta name="layout" content="main" />
[273]7        <title>Create Section</title>
[118]8    </head>
9    <body>
10        <div class="nav">
[273]11            <span class="menuButton"><g:link class="list" action="list">Section List</g:link></span>
[118]12        </div>
13        <div class="body">
[273]14            <h1>Create Section</h1>
[118]15            <g:if test="${flash.message}">
16            <div class="message">${flash.message}</div>
17            </g:if>
[273]18            <g:hasErrors bean="${sectionInstance}">
[118]19            <div class="errors">
[273]20                <g:renderErrors bean="${sectionInstance}" as="list" />
[118]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">
[162]30                                    <label for="name">Name:</label>
31                                </td>
[273]32                                <td valign="top" class="value ${hasErrors(bean:sectionInstance,field:'name','errors')}">
33                                    <input type="text" maxlength="50" id="name" name="name" value="${fieldValue(bean:sectionInstance,field:'name')}"/>
[162]34                                </td>
[273]35                            </tr>
[162]36                       
37                            <tr class="prop">
38                                <td valign="top" class="name">
[118]39                                    <label for="description">Description:</label>
40                                </td>
[273]41                                <td valign="top" class="value ${hasErrors(bean:sectionInstance,field:'description','errors')}">
42                                    <input type="text" maxlength="100" id="description" name="description" value="${fieldValue(bean:sectionInstance,field:'description')}"/>
[118]43                                </td>
[273]44                            </tr>
[118]45                       
46                            <tr class="prop">
47                                <td valign="top" class="name">
[273]48                                    <label for="isActive">Is Active:</label>
[118]49                                </td>
[273]50                                <td valign="top" class="value ${hasErrors(bean:sectionInstance,field:'isActive','errors')}">
51                                    <g:checkBox name="isActive" value="${sectionInstance?.isActive}" ></g:checkBox>
[118]52                                </td>
53                            </tr>
54                       
55                            <tr class="prop">
56                                <td valign="top" class="name">
[162]57                                    <label for="department">Department:</label>
[118]58                                </td>
[273]59                                <td valign="top" class="value ${hasErrors(bean:sectionInstance,field:'department','errors')}">
60                                    <g:select optionKey="id" from="${Department.list()}" name="department.id" value="${sectionInstance?.department?.id}" ></g:select>
[118]61                                </td>
62                            </tr>
63                       
[122]64                            <tr class="prop">
65                                <td valign="top" class="name">
66                                    <label for="site">Site:</label>
67                                </td>
[273]68                                <td valign="top" class="value ${hasErrors(bean:sectionInstance,field:'site','errors')}">
69                                    <g:select optionKey="id" from="${Site.list()}" name="site.id" value="${sectionInstance?.site?.id}" ></g:select>
[122]70                                </td>
71                            </tr>
72                       
[118]73                        </tbody>
74                    </table>
75                </div>
76                <div class="buttons">
77                    <span class="button"><input class="save" type="submit" value="Create" /></span>
78                </div>
79            </g:form>
80        </div>
81    </body>
82</html>
Note: See TracBrowser for help on using the repository browser.