<@cms.survey id=id><#assign a=object/></@cms.survey>
<form method="post" autocomplete="off" action="cmsSurvey/save?callbackType=closeCurrent&navTabId=cmsSurvey/list" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
    <input name="id" type="hidden" value="${id!}"/>
    <input type="hidden" name="_csrf" value="<@tools.csrfToken admin=true/>"/>
    <div class="formBar card">
        <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="card">
        <div class="pageFormContent" layoutH>
            <dl class="nowrap">
                <dt><@t.page 'title'/>:</dt>
                <dd>
                    <input class="required" name="title" type="text" size="50" maxlength="50" value="${(a.title)!}"/>
                    <label class="allowContribute">
                        <input name="allowAnonymous" type="checkbox"class="form-check-input"${((a.allowAnonymous)?has_content&&a.allowAnonymous)?then(' checked="checked"','')?no_esc}/>
                        <@t.page 'allow_anonymous'/>
                    </label>
                </dd>
            </dl>
            <dl class="nowrap">
                <dt><@t.page 'description'/>:</dt>
                <dd>
                    <textarea name="description" maxlength="150" cols="80" rows="2">${(a.description)!}</textarea>
                </dd>
            </dl>
            <dl class="nowrap">
                <dt><@t.page 'survey.type'/>:</dt>
                <dd>
                    <select class="combox" name="surveyType">
                        <option value="survey"${("survey"=((a.surveyType)!))?then(' selected="true"','')?no_esc}><@t.page 'survey.type.survey'/></option>
                        <option value="exam"${("exam"=((a.surveyType)!))?then(' selected="true"','')?no_esc}><@t.page 'survey.type.exam'/></option>
                    </select>
                </dd>
            </dl>
            <dl>
                <dt><@t.page 'start_date'/>:</dt>
                <dd>
                    <input type="text" name="startDate" class="required date" size="20" dateFmt="yyyy-MM-dd HH:mm:ss" value="${(a.startDate)!}"/>
                    <a class="inputDateButton" href="javascript:void(0);"></a>
                </dd>
            </dl>
            <dl>
                <dt><@t.page 'end_date'/>:</dt>
                <dd>
                    <input type="text" name="endDate" class="required date" size="20" dateFmt="yyyy-MM-dd HH:mm:ss" minDate="{%y}-%M-{%d}" value="${(a.endDate)!}"/>
                    <a class="inputDateButton" href="javascript:void(0);"></a>
                </dd>
            </dl>
        </div>
    </div>
</form>