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

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

Add comment attribute to Section and limit description to 75 char.
Update detailed views to suite.

File size: 4.9 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 Section</title>
8    </head>
9    <body>
10        <div class="nav">
11            <span class="menuButton"><g:link class="list" action="list">Section List</g:link></span>
12        </div>
13        <div class="body">
14            <h1>Create Section</h1>
15            <g:if test="${flash.message}">
16            <div class="message">${flash.message}</div>
17            </g:if>
18            <g:hasErrors bean="${sectionInstance}">
19            <div class="errors">
20                <g:renderErrors bean="${sectionInstance}" 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:sectionInstance,field:'name','errors')}">
33                                    <input type="text" class="description" maxlength="50" id="name" name="name" value="${fieldValue(bean:sectionInstance,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:sectionInstance,field:'description','errors')}">
42                                    <input type="text" class="description" maxlength="75" id="description" name="description" value="${fieldValue(bean:sectionInstance,field:'description')}"/>
43                                </td>
44                            </tr>
45                           
46                            <tr class="prop">
47                                <td valign="top" class="name">
48                                    <label for="comment">Comment:</label>
49                                </td>
50                                <td valign="top" class="value ${hasErrors(bean:sectionInstance,field:'comment','errors')}">
51                                    <textarea rows="5" cols="40" name="comment">${fieldValue(bean:sectionInstance, field:'comment')}</textarea>
52                                </td>
53                            </tr>
54                       
55                            <tr class="prop">
56                                <td valign="top" class="name">
57                                    <label for="isActive">Is Active:</label>
58                                </td>
59                                <td valign="top" class="value ${hasErrors(bean:sectionInstance,field:'isActive','errors')}">
60                                    <g:checkBox name="isActive" value="${sectionInstance?.isActive}" ></g:checkBox>
61                                </td>
62                            </tr>
63                       
64                            <tr class="prop">
65                                <td valign="top" class="name">
66                                    <label for="department">Department:</label>
67                                </td>
68                                <td valign="top" class="value ${hasErrors(bean:sectionInstance,field:'department','errors')}">
69                                    <g:select optionKey="id" from="${Department.list()}" name="department.id" value="${sectionInstance?.department?.id}" ></g:select>
70                                    <p>
71                                        <g:link controller="departmentDetailed" action="create">Add Department</g:link>
72                                    </p>
73                                </td>
74                            </tr>
75                       
76                            <tr class="prop">
77                                <td valign="top" class="name">
78                                    <label for="site">Site:</label>
79                                </td>
80                                <td valign="top" class="value ${hasErrors(bean:sectionInstance,field:'site','errors')}">
81                                    <g:select optionKey="id" from="${Site.list()}" name="site.id" value="${sectionInstance?.site?.id}" ></g:select>
82                                </td>
83                            </tr>
84                       
85                        </tbody>
86                    </table>
87                </div>
88                <div class="buttons">
89                    <span class="button"><input class="save" type="submit" value="Create" /></span>
90                </div>
91            </g:form>
92        </div>
93    </body>
94</html>
Note: See TracBrowser for help on using the repository browser.