{% load i18n %}


<script type="text/javascript">
    $(document).ready(function(){
        
          
        $('.btn-confirm').removeAttr("style","");   
        $('.btn-confirm').unbind('click').bind('click',function(){    
            $(this).hide();
            $('form').ajaxSubmit({
                type: 'post',
                url: '{{request.path}}',    
                success: function(html) {
                    $('form').html(html);         
                        
                },
                error: function(XMLHttpRequest, textStatus, errorThrown) {
                    alert('连接服务器失败');                        
                }                    
            });
            return; // 阻止表单自动提交事件  
        });

        {% if is_saved %}   
            $('#confirm-url-modal').modal('hide'); 
           

            
            var url=$('#list-tt').attr('current');
            $.ajax({
                type:'GET',
                processData: false,
                contentType: 'application/json; charset=utf-8',
                url:url,
                success: function (html) { 
                    $('#div-list').html(html);                    
                    return;
                },
                error: function(XMLHttpRequest, textStatus, errorThrown) {
                    alert('连接服务器失败');
                    return;
                }
            });
            
        {% endif %}
       
    });
</script>
<style>
    .ui-autocomplete { z-index: 215000000 !important; }
</style>

   
<div class="row">    
    <form role="form" method='POST' class="form-horizontal"> {% csrf_token %}    
        {% if messages %}
            {% for message in messages %}
                <div class="alert {% if message.tags %} alert-{{ message.tags }}{% endif %}">{{ message|safe }}</div>
            {% endfor %}
        {% endif %}
        {% if form.errors %}
            <div class="alert alert-error">
                <h4>{% trans '数据输入有错误,请先改正以下错误:' %}</h4>
                <ul>
                    {% for field in form %}
                        {% if field.errors %}
                            {% for error in field.errors %}
                                <li class="error">{{ field.label}}: {{ error|escape }}</li>
                            {% endfor %}
                        {% endif %}
                    {% endfor %}
                </ul>
                {% if form.non_field_errors %}
                    {{ form.non_field_errors }}
                {% endif %}
            </div>
        {% endif %}
        {% for hidden_field in form.hidden_fields %}
            {{ hidden_field }}
        {% endfor %}      

        <div class="form-group ">
            <label class="col-sm-2 control-label ">{% trans '岗位职务:' %} </label>
            <div class="col-sm-10">{{ form.name }}</div>
        </div>   
        <div class="form-group ">
            <label class="col-sm-2 control-label ">{% trans '备注说明:' %} </label>
            <div class="col-sm-10">{{form.remark}}</div>
        </div>
        
        
   
    </form>
</div>

