Index: trunk/grails-app/views/inventoryItemDetailed/edit.gsp
===================================================================
--- trunk/grails-app/views/inventoryItemDetailed/edit.gsp	(revision 182)
+++ trunk/grails-app/views/inventoryItemDetailed/edit.gsp	(revision 223)
@@ -28,5 +28,5 @@
                     <table>
                         <tbody>
-                    
+
                             <tr class="prop">
                                 <td valign="top" class="name">Picture:</td>
@@ -43,41 +43,78 @@
                                 </td>
                             </tr>
-                        
+
                             <tr class="prop">
                                 <td valign="top" class="name">
                                     <label for="name">Name:</label>
                                 </td>
-                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'name','errors')}">
-                                    <input type="text" maxlength="50" id="name" name="name" value="${fieldValue(bean:inventoryItemInstance,field:'name')}"/>
-                                </td>
-                            </tr> 
-                        
+                                <td valign="top">
+                                    <input class="description ${hasErrors(bean:inventoryItemInstance,field:'name','errors')}"
+                                                type="text" maxlength="50" id="name" name="name"
+                                                value="${fieldValue(bean:inventoryItemInstance,field:'name')}"/>
+                                </td>
+                            </tr>
+
                             <tr class="prop">
                                 <td valign="top" class="name">
                                     <label for="description">Description:</label>
                                 </td>
-                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'description','errors')}">
-                                    <input type="text" id="description" name="description" value="${fieldValue(bean:inventoryItemInstance,field:'description')}"/>
-                                </td>
-                            </tr> 
-                        
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="unitsInStock">Units In Stock:</label>
+                                <td valign="top">
+                                    <input class="description ${hasErrors(bean:inventoryItemInstance,field:'description','errors')}"
+                                                type="text" id="description" name="description"
+                                                value="${fieldValue(bean:inventoryItemInstance,field:'description')}"/>
+                                </td>
+                            </tr>
+
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="unitsInStock">In Stock:</label>
                                 </td>
                                 <td valign="top" class="value">
-                                    ${inventoryItemInstance.unitsInStock} ${inventoryItemInstance.unitOfMeasure}
-                                </td>
-                            </tr>
-                        
+                                    ${inventoryItemInstance.unitsInStock} ${inventoryItemInstance.unitOfMeasure.encodeAsHTML()}
+                                </td>
+                            </tr>
+
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="inventoryLocation">Location:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryLocation','errors')}">
+                                    <g:select optionKey="id" from="${InventoryLocation.list()}" name="inventoryLocation.id" value="${inventoryItemInstance?.inventoryLocation?.id}" ></g:select>
+                                </td>
+                            </tr>
+
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="isActive">Active:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'isActive','errors')}">
+                                    <g:checkBox name="isActive" value="${inventoryItemInstance?.isActive}" ></g:checkBox>
+                                </td>
+                            </tr>
+
                             <tr class="prop">
                                 <td valign="top" class="name">
                                     <label for="reorderPoint">Reorder Point:</label>
                                 </td>
-                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'reorderPoint','errors')}">
-                                    <input type="text" id="reorderPoint" name="reorderPoint" value="${fieldValue(bean:inventoryItemInstance,field:'reorderPoint')}" />
-                                </td>
-                            </tr> 
-                        
+                                <td valign="top">
+                                    <input  class="medium ${hasErrors(bean:inventoryItemInstance,field:'reorderPoint','errors')}"
+                                                    type="text" id="reorderPoint" name="reorderPoint"
+                                                    value="${fieldValue(bean:inventoryItemInstance,field:'reorderPoint')}" />
+                                     ${inventoryItemInstance.unitOfMeasure.encodeAsHTML()}
+                                </td>
+                            </tr>
+
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="recommendedReorderPoint">Recommended Reorder Point:</label>
+                                </td>
+                                <td valign="top">
+                                    <input class="medium ${hasErrors(bean:inventoryItemInstance,field:'recommendedReorderPoint','errors')}"
+                                                type="text" id="recommendedReorderPoint" name="recommendedReorderPoint"
+                                                value="${fieldValue(bean:inventoryItemInstance,field:'recommendedReorderPoint')}" />
+                                     ${inventoryItemInstance.unitOfMeasure.encodeAsHTML()}
+                                </td>
+                            </tr>
+
                             <tr class="prop">
                                 <td valign="top" class="name">
@@ -88,23 +125,5 @@
                                 </td>
                             </tr>
-                            
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="recommendedReorderPoint">Recommended Reorder Point:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'recommendedReorderPoint','errors')}">
-                                    <input type="text" id="recommendedReorderPoint" name="recommendedReorderPoint" value="${fieldValue(bean:inventoryItemInstance,field:'recommendedReorderPoint')}" />
-                                </td>
-                            </tr> 
-                        
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="isActive">Active:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'isActive','errors')}">
-                                    <g:checkBox name="isActive" value="${inventoryItemInstance?.isActive}" ></g:checkBox>
-                                </td>
-                            </tr> 
-                        
+
                             <tr class="prop">
                                 <td valign="top" class="name">
@@ -114,24 +133,38 @@
                                     <g:checkBox name="isObsolete" value="${inventoryItemInstance?.isObsolete}" ></g:checkBox>
                                 </td>
-                            </tr> 
-                        
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="inventoryGroup">Inventory Group:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryGroup','errors')}">
-                                    <g:select optionKey="id" from="${InventoryGroup.list()}" name="inventoryGroup.id" value="${inventoryItemInstance?.inventoryGroup?.id}" ></g:select>
-                                </td>
-                            </tr> 
-                        
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="inventoryType">Inventory Type:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryType','errors')}">
-                                    <g:select optionKey="id" from="${InventoryType.list()}" name="inventoryType.id" value="${inventoryItemInstance?.inventoryType?.id}" ></g:select>
-                                </td>
-                            </tr>
-                        
+                            </tr>
+
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="averageDeliveryTime">Average Delivery Time:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'averageDeliveryTime','errors')}">
+                                    <input type="text" id="averageDeliveryTime" name="averageDeliveryTime" value="${fieldValue(bean:inventoryItemInstance,field:'averageDeliveryTime')}" />
+                                    <g:select optionKey="id" from="${Period.list()}" name="averageDeliveryPeriod.id" value="${inventoryItemInstance?.averageDeliveryPeriod?.id}" noSelection="['null':'--None--']"></g:select>
+                                </td>
+                            </tr>
+
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="suppliersPartNumber">Suppliers Part Number:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'suppliersPartNumber','errors')}">
+                                    <input type="text" id="suppliersPartNumber" name="suppliersPartNumber" value="${fieldValue(bean:inventoryItemInstance,field:'suppliersPartNumber')}"/>
+                                </td>
+                            </tr>
+
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="suppliers">Suppliers:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'suppliers','errors')}">
+                                    <g:select id="suppliers" name="suppliers"
+                                                        from="${Supplier.list()}"
+                                                        size="5" multiple="yes" optionKey="id"
+                                                        value="${inventoryItemInstance?.suppliers.id}" noSelection="['':'--None--']"/>
+
+                                </td>
+                            </tr>
+
                             <tr class="prop">
                                 <td valign="top" class="name">
@@ -141,62 +174,6 @@
                                     <input type="text" id="manufacturersPartNumber" name="manufacturersPartNumber" value="${fieldValue(bean:inventoryItemInstance,field:'manufacturersPartNumber')}"/>
                                 </td>
-                            </tr> 
-                        
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="suppliersPartNumber">Suppliers Part Number:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'suppliersPartNumber','errors')}">
-                                    <input type="text" id="suppliersPartNumber" name="suppliersPartNumber" value="${fieldValue(bean:inventoryItemInstance,field:'suppliersPartNumber')}"/>
-                                </td>
-                            </tr>
-                        
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="averageDeliveryTime">Average Delivery Time:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'averageDeliveryTime','errors')}">
-                                    <input type="text" id="averageDeliveryTime" name="averageDeliveryTime" value="${fieldValue(bean:inventoryItemInstance,field:'averageDeliveryTime')}" />
-                                </td>
-                            </tr>
-                            
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="averageDeliveryPeriod">Average Delivery Period:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'averageDeliveryPeriod','errors')}">
-                                    <g:select optionKey="id" from="${Period.list()}" name="averageDeliveryPeriod.id" value="${inventoryItemInstance?.averageDeliveryPeriod?.id}" noSelection="['null':'']"></g:select>
-                                </td>
-                            </tr>
-                        
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="alternateItems">Alternate Items:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'alternateItems','errors')}">
-                                    <g:select name="alternateItems"
-from="${InventoryItem.list()}"
-size="5" multiple="yes" optionKey="id"
-value="${inventoryItemInstance?.alternateItems}" />
-
-                                </td>
-                            </tr> 
-                        
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="inventoryMovements">Inventory Movements:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryMovements','errors')}">
-                                    
-<ul>
-<g:each var="i" in="${inventoryItemInstance?.inventoryMovements?}">
-    <li><g:link controller="inventoryMovementDetailed" action="show" id="${i.id}">${i?.encodeAsHTML()}</g:link></li>
-</g:each>
-</ul>
-<g:link controller="inventoryMovementDetailed" params="['inventoryItem.id':inventoryItemInstance?.id]" action="create">Add InventoryMovement</g:link>
-
-                                </td>
-                            </tr> 
-                        
+                            </tr>
+
                             <tr class="prop">
                                 <td valign="top" class="name">
@@ -207,9 +184,8 @@
                                                         from="${Manufacturer.list()}"
                                                         size="5" multiple="yes" optionKey="id"
-                                                        value="${inventoryItemInstance?.manufacturers.id}" />
-
-                                </td>
-                            </tr> 
-                        
+                                                        value="${inventoryItemInstance?.manufacturers.id}" noSelection="['':'--None--']"/>
+                                </td>
+                            </tr>
+
                             <tr class="prop">
                                 <td valign="top" class="name">
@@ -218,33 +194,42 @@
                                 <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'spareFor','errors')}">
                                     <g:select name="spareFor"
-from="${Asset.list()}"
-size="5" multiple="yes" optionKey="id"
-value="${inventoryItemInstance?.spareFor}" />
-
-                                </td>
-                            </tr>
-                            
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="inventoryLocation">Inventory Location:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryLocation','errors')}">
-                                    <g:select optionKey="id" from="${InventoryLocation.list()}" name="inventoryLocation.id" value="${inventoryItemInstance?.inventoryLocation?.id}" ></g:select>
-                                </td>
-                            </tr>
-                        
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="suppliers">Suppliers:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'suppliers','errors')}">
-                                    <g:select id="suppliers" name="suppliers"
-                                                        from="${Supplier.list()}"
-                                                        size="5" multiple="yes" optionKey="id"
-                                                        value="${inventoryItemInstance?.suppliers.id}" noSelection="['':'--None--']"/>
-
-                                </td>
-                            </tr>
-                        
+                                                        from="${Asset.list()}"
+                                                        size="5" multiple="yes" optionKey="id"
+                                                        value="${inventoryItemInstance?.spareFor}" noSelection="['':'--None--']"/>
+
+                                </td>
+                            </tr>
+
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="alternateItems">Alternate Items:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'alternateItems','errors')}">
+                                    <g:select name="alternateItems"
+                                                        from="${InventoryItem.list()}"
+                                                        size="5" multiple="yes" optionKey="id"
+                                                        value="${inventoryItemInstance?.alternateItems}" noSelection="['':'--None--']"/>
+
+                                </td>
+                            </tr>
+
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="inventoryGroup">Inventory Group:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryGroup','errors')}">
+                                    <g:select optionKey="id" from="${InventoryGroup.list()}" name="inventoryGroup.id" value="${inventoryItemInstance?.inventoryGroup?.id}" ></g:select>
+                                </td>
+                            </tr>
+
+                            <tr class="prop">
+                                <td valign="top" class="name">
+                                    <label for="inventoryType">Inventory Type:</label>
+                                </td>
+                                <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryType','errors')}">
+                                    <g:select optionKey="id" from="${InventoryType.list()}" name="inventoryType.id" value="${inventoryItemInstance?.inventoryType?.id}" ></g:select>
+                                </td>
+                            </tr>
+
                         </tbody>
                     </table>
@@ -252,4 +237,5 @@
                 <div class="buttons">
                     <span class="button"><g:actionSubmit class="save" value="Update" /></span>
+                    <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span>
                     <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
                 </div>
