
<div class="container-fluid container-fixed-lg bg-white form-group">
    <div class="panel panel-transparent">
        <div class="panel-heading">
            <div id="reorderAlert"></div>
            <div class="panel-title"><?php print CommonLanguage::getMessage($is_actual ? 'reorder_actual_jv' : 'reorder_jv'); ?></div>

            <div class="clearfix"></div>
        </div>

        <div class="panel-body">
            <div class="row m-b-10">
                <div class="input-group  col-md-4 center-margin pull-left " >
                    <label><?php print CommonLanguage::getMessage('From'); ?></label>
                    <input class="from_date full-width form-control" id="from_date" name="from_date" value="<?php echo smc_session()[($is_actual ? 'start_date_act' : 'start_date')] ?>" type="text"  />
                </div>
                <div class="input-group  col-md-4" >
                    <button class=" btn btn-complete btn-cons m-b-10 pull-right " id="submit_reorder" style="padding-top: 10px;top: 20px;min-width:253px;" type="button"><i class="pg-form"></i> <span class="bold"><?php print CommonLanguage::getMessage('reorder_jv'); ?></span></button>
                </div>

            </div>


        </div>

    </div>
</div>


<script>
    var Submitted_Successfully = <?php echo json_encode(CommonLanguage::getMessage('Submitted_Successfully')); ?>,
            Failed_Submit = <?php echo json_encode(CommonLanguage::getMessage('Failed_Submit')); ?>,
            title = <?php echo json_encode(CommonLanguage::getMessage('user_customer_list')); ?>,
            is_actual = <?php echo $is_actual; ?>;

    $(function () {
        $("#from_date").datepicker({autoclose: true});
        $("#submit_reorder").on("click", function () {
            $.ajax({
                type: 'POST',
                url: 'ACCAjax/reorder_jv',
                data: {from_date: $("#from_date").val(), is_actual: is_actual},
                complete: function (data, vv) {
                    if (vv == "success") {
                        if(data.responseText=='OK'){
                            $("#reorderAlert").attr("class","alert alert-success").html(Submitted_Successfully)
                        }else{
                            $("#reorderAlert").attr("class","alert alert-danger").html(Failed_Submit)

                        }
                    }
                }
            })

        })


    });


</script>
