

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Edit MaintenanceAction</title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><g:link class="list" action="list">MaintenanceAction List</g:link></span>
            <span class="menuButton"><g:link class="create" action="create">New MaintenanceAction</g:link></span>
        </div>
        <div class="body">
            <h1>Edit MaintenanceAction</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${maintenanceActionInstance}">
            <div class="errors">
                <g:renderErrors bean="${maintenanceActionInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <input type="hidden" name="id" value="${maintenanceActionInstance?.id}" />
                <input type="hidden" name="version" value="${maintenanceActionInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="section">Section:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:maintenanceActionInstance,field:'section','errors')}">
                                    <g:select optionKey="id" from="${Section.list()}" name="section.id" value="${maintenanceActionInstance?.section?.id}" noSelection="['null':'']"></g:select>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="asset">Asset:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:maintenanceActionInstance,field:'asset','errors')}">
                                    <g:select optionKey="id" from="${Asset.list()}" name="asset.id" value="${maintenanceActionInstance?.asset?.id}" noSelection="['null':'']"></g:select>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="assetSubItem">Asset Sub Item:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:maintenanceActionInstance,field:'assetSubItem','errors')}">
                                    <g:select optionKey="id" from="${AssetSubItem.list()}" name="assetSubItem.id" value="${maintenanceActionInstance?.assetSubItem?.id}" noSelection="['null':'']"></g:select>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="maintenancePolicy">Maintenance Policy:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:maintenanceActionInstance,field:'maintenancePolicy','errors')}">
                                    <g:select optionKey="id" from="${MaintenancePolicy.list()}" name="maintenancePolicy.id" value="${maintenanceActionInstance?.maintenancePolicy?.id}" noSelection="['null':'']"></g:select>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="procedureStepNumber">Procedure Step Number:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:maintenanceActionInstance,field:'procedureStepNumber','errors')}">
                                    <input type="text" id="procedureStepNumber" name="procedureStepNumber" value="${fieldValue(bean:maintenanceActionInstance,field:'procedureStepNumber')}" />
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="description">Description:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:maintenanceActionInstance,field:'description','errors')}">
                                    <input type="text" id="description" name="description" value="${fieldValue(bean:maintenanceActionInstance,field:'description')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="reasoning">Reasoning:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:maintenanceActionInstance,field:'reasoning','errors')}">
                                    <input type="text" id="reasoning" name="reasoning" value="${fieldValue(bean:maintenanceActionInstance,field:'reasoning')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="isActive">Is Active:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:maintenanceActionInstance,field:'isActive','errors')}">
                                    <g:checkBox name="isActive" value="${maintenanceActionInstance?.isActive}" ></g:checkBox>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="taskProcedure">Task Procedure:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:maintenanceActionInstance,field:'taskProcedure','errors')}">
                                    <g:select optionKey="id" from="${TaskProcedure.list()}" name="taskProcedure.id" value="${maintenanceActionInstance?.taskProcedure?.id}" ></g:select>
                                </td>
                            </tr> 
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" value="Update" /></span>
                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
