

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Create StoredItem</title>         
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
            <span class="menuButton"><g:link class="list" action="list">StoredItem List</g:link></span>
        </div>
        <div class="body">
            <h1>Create StoredItem</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${storedItemInstance}">
            <div class="errors">
                <g:renderErrors bean="${storedItemInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form action="save" method="post" >
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="quantity">Quantity:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:storedItemInstance,field:'quantity','errors')}">
                                    <input type="text" id="quantity" name="quantity" value="${fieldValue(bean:storedItemInstance,field:'quantity')}" />
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="inventoryItem">Inventory Item:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:storedItemInstance,field:'inventoryItem','errors')}">
                                    <g:select optionKey="id" from="${InventoryItem.list()}" name="inventoryItem.id" value="${storedItemInstance?.inventoryItem?.id}" ></g:select>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="storeLocation">Store Location:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:storedItemInstance,field:'storeLocation','errors')}">
                                    <g:select optionKey="id" from="${StoreLocation.list()}" name="storeLocation.id" value="${storedItemInstance?.storeLocation?.id}" ></g:select>
                                </td>
                            </tr> 
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><input class="save" type="submit" value="Create" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
