<#include "/admin/layout/layout.ftl">
<#import "/admin/layout/macro.ftl" as macro>
<#assign css>

</#assign>
<#assign js>
<script>
    $(".btn-submit").click(function () {
        $.ajax({
            type: "POST",
            url: "${ctx!}/admin/dataDictionary/edit",
            data: $(".form-edit").serialize(),
            dataType: "JSON",
            success: function(res){
                layer.msg(res.message, {time: 2000
                }, function(){
                    location.reload();
                });
            }
        });
    });
</script>
</#assign>
<@layout title="数据字典编辑" active="dataDictionary">
<!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        数据字典编辑
        <small>编辑数据字典详细信息</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-cog"></i> 系统</a></li>
        <li><a href="#"><i class="fa fa-list-ul"></i> 数据字典管理</a></li>
        <li class="active"><i class="fa fa-table"></i> 数据字典列表</li>
    </ol>
</section>
<!-- Main content -->
<section class="content">
    <div class="row">
        <div class="col-md-10">
            <!-- Default box -->
            <div class="box  box-primary">
                <form class="form-horizontal form-edit" method="post" action="${ctx!}/admin/dataDictionary/edit">
                    <div class="box-body">
                    	<#if (dataDictionary.id)??>
                        <input type="hidden" id="id" name="id" value="${dataDictionary.id?c}">
                        </#if>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">数据类型代码：</label>
                            <div class="col-sm-8">
                                <input id="code" name="code" class="form-control" type="text" value="${dataDictionary.code}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">数据键：</label>
                            <div class="col-sm-8">
                                <input id="dataKey" name="dataKey" class="form-control" type="text" value="${dataDictionary.dataKey}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">数据值：</label>
                            <div class="col-sm-8">
                                <input id="dataValue" name="dataValue" class="form-control" type="text" value="${dataDictionary.dataValue}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">描述：</label>
                            <div class="col-sm-8">
                                <input id="description" name="description" class="form-control" type="text" value="${dataDictionary.description}" />
                            </div>
                        </div>
                    </div>
                    <div class="box-footer">
                        <button type="button" class="btn btn-default btn-back">返回</button>
                        <button type="button" class="btn btn-info pull-right btn-submit">提交</button>
                    </div>
                </form>
            </div>
            <!-- /.box -->
        </div>
    </div>
</section>
<!-- /.content -->
</@layout>

