{% extends 'obj_form.html' %}

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

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

{% endblock %}
{% block form_content %}
<div class="alert alert-success" role="alert" style="display: none">提示：保存成功！</div>
<div class="form-group ">
    <label class="col-sm-2 control-label ">箱</label>
    <div class="col-sm-8">{{ form.level_1 }}</div>
</div>
<div class="form-group product_photo">
    <label class="col-sm-2 control-label ">盒</label>
    <div class="col-sm-8">{{ form.level_2 }}</div>
</div> 
<div class="form-group product_photo">
    <label class="col-sm-2 control-label ">瓶</label>
    <div class="col-sm-8">{{ form.level_3 }}</div>
</div> 
<div class="form-group ">
    <label class="col-sm-2 control-label ">是否可用</label>
    <div class="col-sm-1">
        <div>
            {{ form.is_active }}
        </div>
    </div>
</div>
<div>
    <a class="btn btn-primary btn-save" type="button" style="float:right;">保存</a>
</div>
{% endblock %}