<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-title" data-rule="required" class="form-control " rows="5" name="row[title]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
                {foreach name="typeList" item="vo"}
                    <option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group option">
        <label class="control-label col-xs-12 col-sm-2">选项:</label>
        <div class="col-xs-12 col-sm-8">
           <dl data-template="answer0" class="fieldlist fieldlist0 " data-name="row[selectdata0]" data-listidx="0">
                <dd>
                    <ins>选项</ins>
                    <ins>答案</ins>
                    <ins>正确答案</ins>
                </dd>
                <dd>
                    <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a>
                </dd>
                <textarea name="row[selectdata0]" class="form-control hide" cols="30" rows="5">[{"key":"A","value":""},{"key":"B","value":""},{"key":"C","value":""},{"key":"D","value":""}]</textarea>
            </dl>
            <dl data-template="answer1" class="fieldlist fieldlist1 hidden" data-name="row[selectdata1]" data-listidx="0">
                <dd>
                    <ins>选项</ins>
                    <ins>答案</ins>
                    <ins>正确答案</ins>
                </dd>
                <dd>
                    <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a>
                </dd>
                <textarea name="row[selectdata1]" class="form-control hide" cols="30" rows="5">[{"key":"A","value":""},{"key":"B","value":""},{"key":"C","value":""},{"key":"D","value":""}]</textarea>
            </dl>
            <dl data-template="answer2" class="fieldlist fieldlist2 hidden" data-name="row[selectdata2]" data-listidx="0">
                <dd>
                    <ins>选项</ins>
                    <ins>答案</ins>
                    <ins>正确答案</ins>
                </dd>
                <dd class="hidden">
                    <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a>
                </dd>
                <textarea name="row[selectdata2]" class="form-control hide" cols="30" rows="5">[{"key":"A","value":"\u5bf9"},{"key":"B","value":"\u9519"}]</textarea>
            </dl>
            <!--单选题 -->
            <script id="answer0" type="text/html">
                <dd class="form-inline">
                    <ins><input type="text" name="<%=name%>[<%=index%>][key]" class="form-control" placeholder="选项" size="10" value="<%=row.key%>"/></ins>
                    <ins><input type="text" name="<%=name%>[<%=index%>][value]" class="form-control" placeholder="" value="<%=row.value%>"/></ins>
                    <ins><input type="radio" name="row[answer0]" value="<%=row.key%>" <%=row.checked%>/></ins>
                    <!--下面的两个按钮务必保留-->
                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                    <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                </dd>
            </script>
            <!--多选题 -->
            <script id="answer1" type="text/html">
                <dd class="form-inline">
                    <ins><input type="text" name="<%=name%>[<%=index%>][key]" class="form-control" placeholder="选项" size="10"  value="<%=row.key%>"/></ins>
                    <ins><input type="text" name="<%=name%>[<%=index%>][value]" class="form-control" placeholder=""  value="<%=row.value%>"/></ins>
                    <ins><input type="checkbox" name="row[answer1][]" value="<%=row.key%>" <%=row.checked%>/></ins>
                    <!--下面的两个按钮务必保留-->
                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                    <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                </dd>
            </script>
            <!--判断题 -->
            <script id="answer2" type="text/html">
                <dd class="form-inline">
                    <ins><input type="text" name="<%=name%>[<%=index%>][key]" class="form-control" placeholder="选项" size="10" value="<%=row.key%>" readonly=""/></ins>
                    <ins><input type="text" name="<%=name%>[<%=index%>][value]" class="form-control" placeholder="" value="<%=row.value%>" readonly=""/></ins>
                    <ins><input type="radio" name="row[answer2]" value="<%=row.key%>" <%=row.checked%>/></ins>
                    <!--下面的两个按钮务必保留-->
                </dd>
            </script>
            <div style="color:red;">*请选中正确答案</div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Score')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-score" data-rule="required" class="form-control" name="row[score]" type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Analysis_video')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-analysis_video" class="form-control" size="50" name="row[analysis_video]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-analysis_video" class="btn btn-danger plupload" data-input-id="c-analysis_video" data-mimetype="video/mp4,video/flv,video/mp3,video/wma" data-multiple="false" data-preview-id="p-analysis_video"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-analysis_video" class="btn btn-primary fachoose" data-input-id="c-analysis_video" data-mimetype="video/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-analysis_video"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-analysis_video"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Analysis_text')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-analysis_text" class="form-control " rows="5" name="row[analysis_text]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>