{% extends 'obj_form.html' %}

{% block form_content %}

<script>
    $(document).ready(function () {

        var content = $("#id_content").val();
        $('#image-clear_id,#id_image').removeClass('form-control');
         $('#photo-clear_id,#id_photo').removeClass('form-control');
        $('.btn-save').click(function () {
            $.SubmitForm('#obj_form form', '{{request.path}}',function (){
                $('.alert').fadeIn();
                setTimeout(function (){
                    $('.alert').fadeOut();
                },3000)
            });
        });

        $('#obj_form .product_photo a').click(function (event) {
            event.preventDefault();
            var src = $(this).attr('href');
            var i = "<div style='text-align:center;'><img src='" + src + "' style='height:400px;'></img></div>";
            $.OpenCfmDlg($('#id_name').val(), i);
        });



        $('.datepicker').datepicker({dateFormat: 'yy-mm-dd'});

    })


</script>
<style>

    #poster-clear_id{
        display: inline-block;
        width:auto;
        vertical-align: middle;
    }
    #date_from{
        position: relative;
        z-index: 1000002;
    }
</style>

<div class="form-group ">
    <label class="col-sm-1 control-label ">姓名</label>
    <div class="col-sm-8">{{ form.name }}</div>

</div>
    <div class="form-group ">
    <label class="col-sm-1 control-label ">机构名称</label>
    <div class="col-sm-8">{{ form.org_name }}</div>
</div>
    <div class="form-group ">
    <label class="col-sm-1 control-label ">组别名称</label>
    <div class="col-sm-8">{{ form.group_name }}</div>
</div>
<div class="form-group ">
    <label class="col-sm-1 control-label ">照片导图</label>
    <div class="col-sm-11">{{ form.photo }}</div>
</div>

<div class="form-group ">
    <label class="col-sm-1 control-label ">级别</label>
    <div class="col-sm-8">{{ form.level_name }}</div>
</div>
<div class="form-group ">
    <label class="col-sm-1 control-label ">单位</label>
    <div class="col-sm-8">{{ form.company_name }}</div>
</div>
<div class="form-group ">
    <label class="col-sm-1 control-label ">性别</label>
    <div class="col-sm-8">{{ form.sex }}</div>
</div>
    <div class="form-group ">
    <label class="col-sm-1 control-label ">身份证号码</label>
    <div class="col-sm-8">{{ form.id_card_code }}</div>
</div>
    </div>
    <div class="form-group ">
    <label class="col-sm-1 control-label ">出生日期</label>
    <div class="col-sm-8">{{ form.birthday }}</div>
</div>
</div>
    <div class="form-group ">
    <label class="col-sm-1 control-label ">电话号码</label>
    <div class="col-sm-8">{{ form.tel }}</div>
</div>

    <div class="form-group ">
    <label class="col-sm-1 control-label ">编号</label>
    <div class="col-sm-8">{{ form.code }}</div>
</div>
    <div class="form-group ">
    <label class="col-sm-1 control-label ">职位</label>
    <div class="col-sm-8">{{ form.position_name }}</div>
</div>


<div class="alert alert-success" role="alert" style="display: none">保存成功！</div>
<div>
    <a class="btn btn-primary btn-save" type="button" style="float:right;">保存</a>
</div>
<input type="hidden" id="id_content" name="content" value="{{ form.instance.content }}">
{% endblock %}