

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Create AssetSubItemExtendedAttribute</title>
    </head>
    <body>
        <div class="nav">
            <h1>Create Extended Attribute</h1>
        </div>
        <div class="body">
            <g:render template="/shared/messages" />
            <g:hasErrors bean="${assetSubItemExtendedAttributeInstance}">
            <div class="errors">
                <g:renderErrors bean="${assetSubItemExtendedAttributeInstance}" 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="asset">Asset Sub Item:</label>
                                 </td>

                                 <td valign="top" class="value">
                                     <g:link controller="assetSubItemDetailed" action="show" id="${assetSubItemExtendedAttributeInstance?.assetSubItem?.id}">
                                          <g:hiddenField name="assetSubItem.id" value="${assetSubItemExtendedAttributeInstance?.assetSubItem.id}" />
                                          ${assetSubItemExtendedAttributeInstance?.assetSubItem?.encodeAsHTML()}
                                     </g:link>
                                 </td>
                             </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <g:select optionKey="id"
                                                        from="${ExtendedAttributeType.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }}"
                                                        name="extendedAttributeType.id"
                                                        value="${assetSubItemExtendedAttributeInstance?.extendedAttributeType?.id}" >
                                    </g:select>

                                </td>
                                <td valign="top" class="value ${hasErrors(bean:assetSubItemExtendedAttributeInstance,field:'value','errors')}">
                                    <input type="text" maxlength="100" id="value" name="value" value="${fieldValue(bean:assetSubItemExtendedAttributeInstance,field:'value')}"/>
                                </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>
