<@cms.content id=contentId><#assign content=object/></@cms.content>
<@cms.content id=relatedContentId absoluteURL=false><#assign related=object/></@cms.content>
<div class="pageContent">
    <form action="cmsContent/related?callbackType=closeCurrent" method="post" autocomplete="off" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
        <input name="contentId" type="hidden" value="${contentId!}" />
        <input name="relatedContentId" type="hidden" value="${relatedContentId!}"/>
        <input name="url" type="hidden" value="${related.url!}" />
        <input type="hidden" name="_csrf" value="<@tools.csrfToken admin=true/>"/>
        <div class="formBar">
            <ul>
                <li><button type="submit" class="buttonActive" title="ctrl+s"><@t.page 'button.save'/></button></li>
                <li><button type="button" class="button close"><@t.page 'button.close'/></button></li>
            </ul>
        </div>
        <div class="pageFormContent" layoutH>
            <dl class="nowrap">
                <dt><@t.page 'recommend_to'/>:</dt>
                <dd>${(content.title)!}</dd>
            </dl>
            <#if relationType?has_content>
                <dl class="nowrap">
                    <dt><@t.page 'relation'/>:</dt>
                    <dd>
                        <input name="relationType" type="hidden" value="${relationType}"/>
                        <select class="combox" name="relation">
                            <option value><@t.page 'please_select'/></option>
                            <@cms.dictionaryDataList dictionaryId=relationType>
                                <#list list as a>
                                    <option value="${a.id.value}">${a.text}</option>
                                </#list>
                            </@cms.dictionaryDataList>
                        </select>
                    </dd>
                </dl>
            </#if>
            <dl class="nowrap">
                <dt><@t.page 'title'/>:</dt>
                <dd>
                    <input class="required" type="text" name="title" maxlength="255" size="60" value="${(related.title)!}"/>
                </dd>
            </dl>
            <dl class="nowrap">
                <dt><@t.page 'description'/>:</dt>
                <dd>
                    <textarea class="required" name="description" maxlength="150" cols="80" rows="4">${(related.description)!}</textarea>
                </dd>
            </dl>
        </div>
    </form>
</div>