<?php $__env->startSection('footer_js'); ?>

    <script type="text/javascript">
        $(document).ready(function () {
            $('#sidebar li').removeClass('active');
            $('#sidebar a').removeClass('active');
            $('#sidebar').find('#config').addClass('active');
            $('#sidebar').find('#address').addClass('active');

            $('.date-picker').datepicker({format: 'yyyy-mm-dd'});

            $('#pageEditForm').formValidation({
                framework: 'bootstrap',
                excluded: ':disabled',
                icon: {
                    valid: 'glyphicon glyphicon-ok',
                    invalid: 'glyphicon glyphicon-remove',
                    validating: 'glyphicon glyphicon-refresh'
                },
                fields: {
                    title: {
                        validators: {
                            notEmpty: {
                                message: 'This field is required.'
                            }
                        }
                    }
                }
            }).on('blur', '[name="title"]', function (e) {
                $('#pageEditForm').formValidation('revalidateField', 'title');
            })
        });
    </script>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('dynamicdata'); ?>

    <div class="row">
        <div class="col-md-12">

            <div data-collapsed="0" class="panel">
                <header class="panel-heading">
                    Edit Address
                </header>

                <div class="panel-body">

                    <?php echo $__env->make('layout.backend.alert', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

                    <form id="pageEditForm" action="<?php echo e(route('admin.config.address.update', $address->id)); ?>" method="post">
                        <div class="form-group col-md-6 col-xs-11">
                            <label for="title">Title </label>
                            <input id="title" type="text" name="title" value="<?php echo e($address->title); ?>" class="form-control title" placeholder="Enter Title" required="required" />
                        </div>
                        <div class="form-group col-md-6 col-xs-11">
                            <label for="moduleSlug">Address *</label>
                             <textarea class="form-control" name="address" rows="3" placeholder="Enter Address"><?php echo e($address->address); ?></textarea>
                        </div>
                        <div class="clearfix"></div>

                        <div class="form-group col-md-6 col-xs-11">
                            <label for="moduleSlug">Phone </label>
                            <input type="text" name="phone" value="<?php echo e($address->phone); ?>"
                                   class="form-control phone" placeholder="Enter Phone"/>
                        </div>
                        <div class="form-group col-md-6 col-xs-11">
                            <label for="fax">Fax </label>
                            <input type="text" name="fax" id="fax" value="<?php echo $address->fax; ?>"
                                   class="form-control fax" placeholder="Enter Fax"/>
                        </div>
                        <div class="clearfix"></div>

                        <div class="form-group col-md-6 col-xs-11">
                            <label for="moduleSlug">Email </label>
                            <input type="email" name="email" value="<?php echo e($address->email); ?>"
                                   class="form-control email" placeholder="Enter Email"/>
                        </div>
                        <div class="form-group col-md-6 col-xs-11">
                            <label for="moduleSlug">PO Box # </label>
                            <input type="text" name="po_box" value="<?php echo e($address->po_box); ?>"
                                   class="form-control po_box" placeholder="Enter PO Box No."/>
                        </div>
                        <div class="clearfix"></div>
                                              
                        <div class="form-group col-md-6 col-xs-11">
                            <label for="">Status</label>
                            <select name="is_active" class="form-control">
                                <option value="0" <?php echo ($address->is_active == '0')? 'selected="selected"' : ''; ?> >
                                    Unpublished
                                </option>
                                <option value="1" <?php echo ($address->is_active == '1' || $address->is_active == '')? 'selected="selected"' : ''; ?> >
                                    Published
                                </option>
                            </select>
                        </div>
                        <div class="clearfix"></div>

                        <?php echo csrf_field(); ?>

                        <button type="submit" class="btn btn-info">Submit</button>
                        <input type="hidden" name="_method" value="PUT"/>
                    </form>

                </div>

            </div>

        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layout.backend.containerform', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>