{template "header.html"}
<div class="note note-danger">
    <p>{dr_lang('定义消息类型可以改变消息的命名，对消息进行分组')}</p>
</div>
<form class="form-horizontal myfbody" role="form" id="myform">
    {dr_form_hidden()}
    <div class="table-scrollable ">
        <table class="table table-striped table-bordered table-hover table-checkable dataTable">
            <thead>
            <tr class="heading">
                <th width="40"> Id </th>
                <th width="200"> {dr_lang('名称')} </th>
                <th width="200"> {dr_lang('图标')} </th>
                <th> {dr_lang('操作')}</th>
            </tr>
            </thead>
            <tbody>
            {loop $data $i $t}
            <tr class="odd gradeX input_{$i}">
                <td>{$i}</td>
                <td><input class="form-control" name="data[{$i}][name]" type="text" value="{htmlspecialchars($t['name'])}" placeholder="{dr_lang('名称')}"></td>
                <td><input class="form-control" type="text" name="data[{$i}][icon]" value="{htmlspecialchars($t['icon'])}" placeholder="{dr_lang('图标')}" /></td>
                <td><label><a href="javascript:$('.input_{$i}').remove();" class="btn btn-xs red"> <i class="fa fa-trash"></i> {dr_lang('删除')} </a></label></td>
            </tr>
            {/loop}
            {php $i++;}
            <tr class="odd gradeX">
                <td>{$i}</td>
                <td><input class="form-control" name="data[{$i}][name]" type="text" value="" placeholder="{dr_lang('名称')}"></td>
                <td><input class="form-control" type="text" name="data[{$i}][icon]" value="" placeholder="{dr_lang('图标')}" />
                </td>
            </tr>
            </tbody>
        </table>
    </div>

    <div class="portlet-body form myfooter">
        <div class="form-actions text-center">
            <button type="button" onclick="dr_ajax_submit('{dr_now_url()}&page='+$('#dr_page').val(), 'myform', '2000')" class="btn green"> <i class="fa fa-save"></i> {dr_lang('保存')}</button>
        </div>
    </div>

</form>


{template "footer.html"}