[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" /> |
---|
| 7 | <title>Create Asset</title> |
---|
| 8 | </head> |
---|
| 9 | <body> |
---|
| 10 | <div class="nav"> |
---|
[151] | 11 | <span class="menuButton"><a class="home" href="${resource(dir:'')}">Home</a></span> |
---|
[118] | 12 | <span class="menuButton"><g:link class="list" action="list">Asset List</g:link></span> |
---|
| 13 | </div> |
---|
| 14 | <div class="body"> |
---|
| 15 | <h1>Create Asset</h1> |
---|
| 16 | <g:if test="${flash.message}"> |
---|
| 17 | <div class="message">${flash.message}</div> |
---|
| 18 | </g:if> |
---|
| 19 | <g:hasErrors bean="${assetInstance}"> |
---|
| 20 | <div class="errors"> |
---|
| 21 | <g:renderErrors bean="${assetInstance}" as="list" /> |
---|
| 22 | </div> |
---|
| 23 | </g:hasErrors> |
---|
| 24 | <g:form action="save" method="post" > |
---|
| 25 | <div class="dialog"> |
---|
| 26 | <table> |
---|
| 27 | <tbody> |
---|
| 28 | |
---|
| 29 | <tr class="prop"> |
---|
| 30 | <td valign="top" class="name"> |
---|
[131] | 31 | <label for="name">Name:</label> |
---|
| 32 | </td> |
---|
| 33 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'name','errors')}"> |
---|
| 34 | <input type="text" id="name" name="name" value="${fieldValue(bean:assetInstance,field:'name')}"/> |
---|
| 35 | </td> |
---|
| 36 | </tr> |
---|
| 37 | |
---|
| 38 | <tr class="prop"> |
---|
| 39 | <td valign="top" class="name"> |
---|
[118] | 40 | <label for="assetType">Asset Type:</label> |
---|
| 41 | </td> |
---|
| 42 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'assetType','errors')}"> |
---|
| 43 | <g:select optionKey="id" from="${AssetType.list()}" name="assetType.id" value="${assetInstance?.assetType?.id}" ></g:select> |
---|
| 44 | </td> |
---|
| 45 | </tr> |
---|
| 46 | |
---|
| 47 | <tr class="prop"> |
---|
| 48 | <td valign="top" class="name"> |
---|
[161] | 49 | <label for="costCode">Cost Code:</label> |
---|
| 50 | </td> |
---|
| 51 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'costCode','errors')}"> |
---|
| 52 | <input type="text" id="costCode" name="costCode" value="${fieldValue(bean:assetInstance,field:'costCode')}"/> |
---|
| 53 | </td> |
---|
| 54 | </tr> |
---|
| 55 | |
---|
| 56 | <tr class="prop"> |
---|
| 57 | <td valign="top" class="name"> |
---|
[118] | 58 | <label for="description">Description:</label> |
---|
| 59 | </td> |
---|
| 60 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'description','errors')}"> |
---|
| 61 | <input type="text" id="description" name="description" value="${fieldValue(bean:assetInstance,field:'description')}"/> |
---|
| 62 | </td> |
---|
| 63 | </tr> |
---|
| 64 | |
---|
| 65 | <tr class="prop"> |
---|
| 66 | <td valign="top" class="name"> |
---|
| 67 | <label for="isActive">Is Active:</label> |
---|
| 68 | </td> |
---|
| 69 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'isActive','errors')}"> |
---|
| 70 | <g:checkBox name="isActive" value="${assetInstance?.isActive}" ></g:checkBox> |
---|
| 71 | </td> |
---|
| 72 | </tr> |
---|
| 73 | |
---|
| 74 | <tr class="prop"> |
---|
| 75 | <td valign="top" class="name"> |
---|
[122] | 76 | <label for="systemSection">System Section:</label> |
---|
[118] | 77 | </td> |
---|
[122] | 78 | <td valign="top" class="value ${hasErrors(bean:assetInstance,field:'systemSection','errors')}"> |
---|
| 79 | <g:select optionKey="id" from="${SystemSection.list()}" name="systemSection.id" value="${assetInstance?.systemSection?.id}" ></g:select> |
---|
[118] | 80 | </td> |
---|
| 81 | </tr> |
---|
| 82 | |
---|
| 83 | </tbody> |
---|
| 84 | </table> |
---|
| 85 | </div> |
---|
| 86 | <div class="buttons"> |
---|
| 87 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
| 88 | </div> |
---|
| 89 | </g:form> |
---|
| 90 | </div> |
---|
| 91 | </body> |
---|
| 92 | </html> |
---|