<form action="<?php echo e(route('batch_data.update_cards',['id'=>$batch_data_card->id])); ?>" method="post" class="mt-2" id="editBatchDataCardForm" novalidate="novalidate">

    <?php echo csrf_field(); ?>
<?php echo method_field('put'); ?>

<div class="row align-items-center justify-content-center">
    <div class="col">
        <div class="form-group">
            <label>Card Number</label>
            <input type="text" value="<?php echo e($batch_data_card->card_number); ?>" name="card_number" class="w-100 p-1 border-primary" required data-rule-required="true" data-msg-required="Card Number Required" >
        </div>
    </div>
    <div class="col">
        <div class="form-group">
            <label>Customer Name</label>
            <input type="text" value="<?php echo e($batch_data_card->customer_name); ?>" name="customer_name" class="w-100 p-1 border-primary" required data-rule-required="true" data-msg-required="Customer Name Required" >
        </div>
    </div>
    <div class="w-100"></div>
    
    <div class="col">
        <div class="form-group">
            <label>Customer Contact</label>
            <input type="text" value="<?php echo e($batch_data_card->customer_contact); ?>" name="customer_contact" class="w-100 p-1 border-primary" required data-rule-required="true" data-msg-required="Customer Contact Required" >
        </div>
    </div>

    <div class="col">
        <div class="form-group">
            <label>Card Category</label>
            <select name="card_category" class="w-100 p-1 border-primary"  required data-rule-required="true" data-msg-required="Card Category Required">
                <?php if($batch_data_card->card_category=='up'): ?>
                    <option value="up" selected>Up</option>
                    <option value="paypak" >Paypak</option>
                <?php else: ?>
                <option value="up" >Up</option>
                <option value="paypak" selected>Paypak</option>
                <?php endif; ?>
            <select>
        </div>
    </div>
    <div class="w-100"></div>
    <div class="col">
        <div class="form-group">
            <label>City</label>
            <input type="text" value="<?php echo e($batch_data_card->city); ?>" name="city" class="w-100 p-1 border-primary" required data-rule-required="true" data-msg-required="City Required" >
        </div>
    </div>
    <div class="w-100"></div>
    <div class="col">
        <div class="form-group">
            <label>Customer Address</label>
            <textarea type="text" name="customer_address" class="w-100 p-1 border-primary" required data-rule-required="true" data-msg-required="City Required" ><?php echo e($batch_data_card->customer_address); ?></textarea>
        </div>
    </div>

    <div class="w-100"></div>

    <div class="col-auto">
        <div class="form-group text-right my-1">
            <button type="submit" name="upload" class="btn btn-dark">Update</button>
        <button type="button" class="btn btn-dark btn-min-width mr-1" data-dismiss="modal">Cancel</button>

        </div>
    </div>
</div>

    


</form>

<script type="text/javascript">
    $(document).ready(function () {
       
        var errors = 0;
       
 
        $( "#editBatchDataCardForm" ).validate({


            errorClass:"danger",
            errorPlacement: function(error, element) {
                error.addClass('w-100').appendTo(element.parents('.form-group'));
            },
            submitHandler: function(form) {
                // $(form).find('button[type=submit]').attr('disabled', 'disabled');

                if(errors === 1){
                    return false;
                }else{
                    $(form).find('button[type=submit]').attr('disabled', 'disabled');
                    swal({
                        title: 'Please Wait!',
                        text: 'Source Data is being updated!',
                        icon: 'info',
                        buttons: false,
                        closeOnClickOutside: false,
                        closeOnEsc: false
                    });

                    form.submit();
                }

            }
        });


    });
</script><?php /**PATH C:\laragon\www\catalyst\resources\views/batch_data/edit_batch_card_form.blade.php ENDPATH**/ ?>