{template "header.html"}
<div class="note note-danger">
    <p>调用系统自定义字段控件的HTML代码，以便完成二次开发</p>
    <p>部分控件代码需要系统默认css和js的支撑，例如文件上传组件需要jq的支撑</p>
</div>

<div class="right-card-box">
    <form class="form-horizontal" role="form" id="myform">
        {dr_form_hidden()}
        <div class="table-scrollable">
            <table class="table table-striped table-bordered fc-head-table table-hover table-checkable">
                <thead>
                <tr class="heading">
                    <th style="text-align: center;font-size: 15px;" width="60">Id</th>
                    <th width="230">{dr_lang('字段')}</th>
                    <th width="90">{dr_lang('类别')}</th>
                    <th width="80"  style="text-align: center">{dr_lang('XSS过滤')}</th>
                    <th width="70" style="text-align: center">{dr_lang('前端')}</th>
                    <th width="70" style="text-align: center">{dr_lang('可用')}</th>
                    <th>{dr_lang('控件HTML代码')}</th>
                </tr>
                </thead>
                <tbody>
                {loop $list $t}
                <tr class="odd gradeX" id="dr_row_{$t.id}">
                    <td style="text-align: center;font-size: 15px;">{$t.id}</td>
                    <td> {$t.spacer}  {$t.name} / {$t.fieldname}</td>
                    <td>{$t.fieldtype}</td>

                    <td style="text-align:center">
                        <a href="javascript:;" onclick="dr_ajax_open_close(this, '{dr_url('field/option', ['rname' => $rname, 'rid' => $rid, 'op' => 'xss', 'id'=>$t.id])}', 1);" class="badge badge-{if $t['setting']['validate']['xss']}no{else}yes{/if}"><i class="fa fa-{if $t['setting']['validate']['xss']}times{else}check{/if}"></i></a>
                    </td>
                    <td style="text-align:center">
                        <a href="javascript:;" onclick="dr_ajax_open_close(this, '{dr_url('field/option', ['rname' => $rname, 'rid' => $rid, 'op' => 'member','id'=>$t.id])}', 0);" class="badge badge-{if !$t.ismember}no{else}yes{/if}"><i class="fa fa-{if !$t.ismember}times{else}check{/if}"></i></a>
                    </td>
                    <td style="text-align:center">
                        <a href="javascript:;" onclick="dr_ajax_open_close(this, '{dr_url('field/option', ['rname' => $rname, 'rid' => $rid, 'op' => 'disabled','id'=>$t.id])}', 1);" class="badge badge-{if $t.disabled}no{else}yes{/if}"><i class="fa fa-{if $t.disabled}times{else}check{/if}"></i></a>
                    </td>
                    <td>
                    <code>
                        {$ci->field_code($t.id)}
                    </code>
                    </td>
                </tr>
                {/loop}
                </tbody>
            </table>
        </div>


    </form>
</div>

{template "footer.html"}