source: trunk/grails-app/views/costCodeDetailed/create.gsp @ 633

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

Domain change: Add PurchasingGroup?.
Logic and views to suite.

File size: 3.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 CostCode</title>
8        <nav:resources override="true"/>
9    </head>
10    <body>
11        <div class="nav">
12            <nav:renderSubItems group="navAlt"/>
13        </div>
14        <div class="body">
15            <g:render template="/shared/messages" />
16            <g:hasErrors bean="${costCodeInstance}">
17            <div class="errors">
18                <g:renderErrors bean="${costCodeInstance}" as="list" />
19            </div>
20            </g:hasErrors>
21            <g:form action="save" method="post" >
22                <div class="dialog">
23                    <table>
24                        <tbody>
25                       
26                            <tr class="prop">
27                                <td valign="top" class="name">
28                                    <label for="name">Name:</label>
29                                </td>
30                                <td valign="top" class="value ${hasErrors(bean:costCodeInstance,field:'name','errors')}">
31                                    <input type="text" maxlength="50" id="name" name="name" value="${fieldValue(bean:costCodeInstance,field:'name')}"/>
32                                </td>
33                            </tr>
34                       
35                            <tr class="prop">
36                                <td valign="top" class="name">
37                                    <label for="purchasingGroup">Purchasing Group:</label>
38                                </td>
39                                <td valign="top" class="value ${hasErrors(bean:costCodeInstance,field:'purchasingGroup','errors')}">
40                                    <g:select optionKey="id"
41                                                    from="${PurchasingGroup.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}"
42                                                    name="purchasingGroup.id"
43                                                    value="${costCodeInstance?.purchasingGroup?.id}" >
44                                    </g:select>
45                                    <p>
46                                        <g:link controller="purchasingGroupDetailed" action="create">+Add Group</g:link>
47                                    </p>
48                                </td>
49                            </tr>
50                       
51                            <tr class="prop">
52                                <td valign="top" class="name">
53                                    <label for="description">Description:</label>
54                                </td>
55                                <td valign="top" class="value ${hasErrors(bean:costCodeInstance,field:'description','errors')}">
56                                    <input type="text" maxlength="100" id="description" name="description" value="${fieldValue(bean:costCodeInstance,field:'description')}"/>
57                                </td>
58                            </tr>
59                       
60                            <tr class="prop">
61                                <td valign="top" class="name">
62                                    <label for="isActive">Is Active:</label>
63                                </td>
64                                <td valign="top" class="value ${hasErrors(bean:costCodeInstance,field:'isActive','errors')}">
65                                    <g:checkBox name="isActive" value="${costCodeInstance?.isActive}" ></g:checkBox>
66                                </td>
67                            </tr>
68                       
69                        </tbody>
70                    </table>
71                </div>
72                <div class="buttons">
73                    <span class="button"><input class="save" type="submit" value="Create" /></span>
74                </div>
75            </g:form>
76        </div>
77    </body>
78</html>
Note: See TracBrowser for help on using the repository browser.