<#macro tagTypes typeIds=''>
<dl class="nowrap tagTypes advanced">
    <dt><@t.page 'tag_type'/>:</dt>
    <dd>
        <div class="tagsBox" callback="reIndexTagType()"></div>
        <input name="type[].id" type="hidden"/>
        <input name="type[].name" type="text" size="20" postField="name" suggestfields="id,name" lookupgroup="type[]" suggestUrl="common/tagTypeSuggest.html"/>
        <a class="suggestButton" href="javascript:;" onclick="addTagType($('input[name=\'type\[\].id\']',navTab.getCurrentPanel()).val(),$('input[name=\'type\[\].name\']',navTab.getCurrentPanel()).val());return false;"><i class="icon-ok icon-large"></i><@t.page 'button.add'/></a>
    </dd>
</dl>
<script>
    <@cms.tagType ids=typeIds>
        <#list map as k,tagType>
        addTagType('${k}','${tagType.name?js_string}');
        </#list>
    </@cms.tagType>
</script>
</#macro>