{% extends 'obj_form.html' %}

{% block js %}
        {{ block.super }} 
        $('.btn-save').click(function(){
            $.SubmitForm('#obj_form form','{{request.path}}',function (){
                $('.alert').fadeIn();
                setTimeout(function (){
                    $('.alert').fadeOut();
                },3000)
            });
        });  
{% endblock %}
{% block form_content %} 
    <div class="form-group" style="display: none;align-items: center;">
        <label class="col-sm-2 control-label ">汇率</label>
        <div class="col-sm-3">{{ form.exchange_rate }}</div>
        <div class="col-sm-3">积分 = 1元</div>
    </div>
    <div class="form-group ">
        <label class="col-sm-2 control-label ">是否开启</label>
        <div class="col-sm-1">
            <div>
                {{ form.is_open }}
            </div>
        </div>
    </div>
    <div class="alert alert-success col-sm-10 col-sm-offset-2" role="alert" style="display: none">保存成功！</div>
    <div>
        <a class="btn btn-primary btn-save" type="button" style="float:right;">保存</a> 
    </div> 
{% endblock %}