

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Create MaintenanceAction</title>         
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${resource(dir:'')}">Home</a></span>
            <span class="menuButton"><g:link class="list" action="list">MaintenanceAction List</g:link></span>
        </div>
        <div class="body">
            <h1>Create 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 action="save" method="post" >
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <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="systemSection">System Section:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:maintenanceActionInstance,field:'systemSection','errors')}">
                                    <g:select optionKey="id" from="${SystemSection.list()}" name="systemSection.id" value="${maintenanceActionInstance?.systemSection?.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="assetType">Asset Type:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:maintenanceActionInstance,field:'assetType','errors')}">
                                    <g:select optionKey="id" from="${AssetType.list()}" name="assetType.id" value="${maintenanceActionInstance?.assetType?.id}" noSelection="['null':'']"></g:select>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="assembly">Assembly:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:maintenanceActionInstance,field:'assembly','errors')}">
                                    <g:select optionKey="id" from="${Assembly.list()}" name="assembly.id" value="${maintenanceActionInstance?.assembly?.id}" noSelection="['null':'']"></g:select>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="subAssembly">Sub Assembly:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:maintenanceActionInstance,field:'subAssembly','errors')}">
                                    <g:select optionKey="id" from="${SubAssembly.list()}" name="subAssembly.id" value="${maintenanceActionInstance?.subAssembly?.id}" noSelection="['null':'']"></g:select>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="componentItem">Component Item:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:maintenanceActionInstance,field:'componentItem','errors')}">
                                    <g:select optionKey="id" from="${ComponentItem.list()}" name="componentItem.id" value="${maintenanceActionInstance?.componentItem?.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="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="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="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"><input class="save" type="submit" value="Create" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
