{% extends 'obj_form.html' %}
{% load i18n %}
{% load tj_filters %}

{% block css %}
    {{ block.super }}
    #obj_form .datepicker{
        width:100px
    }
    #obj_form select.adm{
        min-width:100px;
        margin-left:5px;
    }
    #product_label{
        min-width:380px;
        margin-left:15px;
        margin-right:7px;
    }
    #obj_form .btn-del{
        float:right;
    }  

    #obj_form .checkbox { 
        padding-left:20px;
    }
{% endblock %}



{% block js %}
    {{ block.super }}

    $('#cat').change(function(){
        $('#id_category').val($(this).val());
    });


    $('.btn-save').click(function(){
        $('.btn').hide();       
        $.SubmitForm('#obj_form form','{{request.path}}');
    });
   
{% endblock %}

 
{% block subtitle-1 %}
    {% trans '企业管理' %}
{% endblock %}
{% block subtitle-2 %}
    {% trans '新建' %}
{% endblock %}   

    


{% block form_content %}
    {{ block.super }}

   
    <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"><select id='cat'>
                <option value=''>---------</option>
                {% for c in cats %}
                    <option value='{{c.0}}'>{{c.1}}</option>
                {% endfor %}                
            </select></div>
    </div>      
   

    
    <div class="form-group ">
        <label class="col-sm-2 control-label">{% trans '管理员帐号:' %}</label>
        <div class="col-sm-2"><input name='user_acc' class='form-control' > </div>
        <label class="col-sm-2 control-label">{% trans '管理员密码:' %}</label>
        <div class="col-sm-2"><input name='user_pwd' type='password' class='form-control' > </div>
        
    </div>


    <div class="form-group ">
        <label class="col-sm-2 control-label">{% trans '企业地址:' %}</label>
        <div class="col-sm-10">{{ form.address }} </div>
    </div> 
    


    <div class="pull-right" style="margin-top:20px;">
       
        
            
        <a type="button" class='btn btn-primary btn-save'>
            <span class='glyphicon glyphicon-floppy-disk' style='padding-right:5px;'></span>{% trans '保存' %}
        </a>
    </div>    

{% endblock %}


