<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">{:__('Study_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-study_id" data-rule="required" data-source="study/index" data-field="examname" class="form-control selectpage" name="row[study_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('题目')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('类型')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[type]', ['1'=>'文字', '2'=>'图片'])}
        </div>
    </div>
    <div class="form-group world">
        <label class="control-label col-xs-12 col-sm-2">选项</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-template="wenzi" data-name="row[option]">
                <dd>
                    <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[option]" class="form-control hide" cols="30" rows="5"></textarea>
            </dl>
            <!--定义模板-->
            <script type="text/html" id="wenzi">
                <dd class="form-inline">
                    <input type="text" name="row[<%=name%>][<%=index%>][name]" class="form-control" value="<%=row['name']%>" size="10">
                    <input type="text" name="row[<%=name%>][<%=index%>][gender]" class="form-control" value="<%=row['gender']%>" size="30">
                    <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>
        </div>
    </div>
    <div class="form-group pic">
        <label class="control-label col-xs-12 col-sm-2">选项</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-template="thumbnail" data-name="row[option1]">
                <dd>
                    <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[option1]" class="form-control hide" cols="30" rows="5"></textarea>
            </dl>
            <!--定义模板-->
            <script id="thumbnail" type="text/html">
                <dd class="form-inline">
                    <ins><input type="text" name="row[<%=name%>][<%=index%>][name]" class="form-control" value="<%=row['name']%>" size="10"></ins>
                    <ins>
                        <a href="<%=fullurl%>" data-url="<%=url%>" target="_blank" class="thumbnail">
                            <img src="<%=fullurl%>" class="img-responsive">
                        </a>
                        <input type="hidden" id="c-avatar<%=index%>" class="image" name="row[desc][<%=index%>][gender]" value=""/>
                        <button id="plupload<%=index%>" class="btn btn-danger plupload" data-input-id="c-avatar<%=index%>"><i class="fa fa-upload"></i> {:__('Upload')}</button>
                    </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>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Answer')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-answer" class="form-control" name="row[answer]" type="text">
        </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>