<form method="post" action="cmsTemplate/save" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
    <input type="hidden" name="_csrf" value="<@tools.csrfToken admin=true/>"/>
    <div class="formBar card">
        <ul>
            <li><a class="button" href="cmsTemplate/delete?path=${(path?url)!}&navTabId=cmsTemplate/list&_csrf=<@tools.csrfToken admin=true/>" title="<@t.page 'confirm.delete_file'/>" target="ajaxTodo"><i class="icon-trash icon-large"></i><@t.page 'button.delete'/></a></li>
    <@sys.authorized roleIds=admin.roles url='cmsPage/metadata'>
        <@sys.deptItem itemType='page' deptId=admin.deptId!'' itemIds=path>
            <li><a class="button" href="cmsPage/list.html?path=${(path?url)!}" target="navTab" rel="cmsPage/list"><@t.page 'page.management'/></a></li>
        </@sys.deptItem>
    </@sys.authorized>
            <li><a class="button" href="cmsTemplate/metadata.html?path=${(path?url)!}" target="ajax" rel="cmsTemplateBox"><@t.page 'metadata'/></a></li>
            <li><button type="submit" class="buttonActive" title="ctrl+s"<#if path?has_content> lock-url="common/lock?itemType=template&itemId=${(path?url)!}" close-url="common/unlock?itemType=template&itemId=${(path?url)!}"</#if>><@t.page 'button.save'/></button></li>
        </ul>
    </div>
    <div class="card">
        <h2 class="contentTitle">
             <a class="button" href="cmsTemplate/ftlLookup.html" target="dialog" mask="true"><@t.page 'template.fragment'/></a>
             <a class="button" href="placeTemplate/lookup.html" target="dialog" mask="true"><@t.page 'place'/></a>
             <a class="button" href="cmsWebFile/lookup.html" target="dialog" mask="true"><@t.page 'webfile'/></a>
             <a class="button" href="cmsTemplate/help.html?path=${(path?url)!}" target="dialog" mask="true"><@t.page 'template.help'/></a>
             <a class="button" href="cmsFileHistory/list.html?path=${(path?url)!}" lookupGroup=""><@t.page 'history'/></a>
             <a class="button" href="<@t.page 'template.manual.url'/>" target="_blank"><@t.page 'template.manual'/></a>
             <a class="button" href="<@t.page 'template.directive.manual.url'/>" target="_blank"><@t.page 'template.directive.manual'/></a>
             <div class="float-right">
                <select class="combox codeTheme">
                <#list codeTheme as k,a>
                    <option value="${k}">${a}</option>
                </#list>
                </select>
             </div>
        </h2>
        <div class="pageFormContent" layoutH>
            <div class="exclude-translate">
                <input name="path" type="hidden" value="${path}"/>
                <textarea name="content" class="code" escape="true" mode="freemarkermixed"><@tools.fileContent path=path>${(object)!}</@tools.fileContent></textarea>
            </div>
        </div>
    </div>
</form>