

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

                                <td valign="top" class="value">
                                    <g:link controller="assetDetailed" action="show" id="${assetExtendedAttributeInstance?.asset?.id}">
                                        <g:hiddenField name="asset.id" value="${assetExtendedAttributeInstance?.asset.id}" />
                                        ${assetExtendedAttributeInstance?.asset?.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="${assetExtendedAttributeInstance?.extendedAttributeType?.id}" >
                                    </g:select>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:assetExtendedAttributeInstance,field:'value','errors')}">
                                    <input type="text" maxlength="100" id="value" name="value" value="${fieldValue(bean:assetExtendedAttributeInstance,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>
