<div class="row"> <div class="col-xs-12 col-md-6"> <?php if(session()->has('user_updated')): ?> <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> <strong><?php echo e(session('user_updated')); ?></strong> </div> <?php endif; ?> <?php echo $__env->make('includes.form_errors', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?> <?php echo Form::model($user, ['method'=>'patch', 'action'=>['ManageCustomersController@update', $user->id], 'files'=>true, 'onsubmit'=>'submit_button.disabled = true; submit_button.value = "' . __('Please Wait...') . '"; return true;']); ?> <?php if($user->photo): ?> <div class="form-group"> <div class="has-error"> <div class="checkbox"> <label> <?php echo Form::checkbox('remove_photo'); ?> <strong><?php echo app('translator')->getFromJson('Remove Photo'); ?></strong> </label> </div> </div> </div> <?php endif; ?> <div class="form-group<?php echo e($errors->has('name') ? ' has-error' : ''); ?>"> <?php echo Form::label('name', __('Name:')); ?> <?php echo Form::text('name', null, ['class'=>'form-control', 'placeholder'=>__('Enter name'), 'required']); ?> </div> <div class="form-group<?php echo e($errors->has('username') ? ' has-error' : ''); ?>"> <?php echo Form::label('username', __('Username:')); ?> <?php echo Form::text('username', null, ['class'=>'form-control', 'placeholder'=>__('Enter username'), 'required']); ?> </div> <?php if(config('settings.phone_otp_verification')): ?> <div class="form-group<?php echo e($errors->has('phone') ? ' has-error' : ''); ?>"> <?php echo Form::label('phone-number',__('Phone:')); ?> <?php if($user->mobile): ?> <?php if($user->mobile->verified): ?> <strong class="text-success"><?php echo app('translator')->getFromJson('verified'); ?></strong> <?php else: ?> <strong class="text-danger"><?php echo app('translator')->getFromJson('unverified'); ?></strong> <?php endif; ?> <?php endif; ?> <?php echo Form::text('phone-number', $user->mobile ? $user->mobile->number : null, ['class'=>'form-control', 'placeholder'=>__('Enter phone number')]); ?> </div> <div class="checkbox"> <label><?php echo Form::checkbox('phone_verified', 1, ($user->mobile && $user->mobile->verified) ? $user->mobile->verified : false, ['id'=>'phone_verified']);; ?> <strong><?php echo app('translator')->getFromJson('Phone Verified?'); ?></strong></label> </div> <?php if($user->mobile): ?> <div class="checkbox"> <label><?php echo Form::checkbox('remove_phone', 1, false, ['id'=>'remove_phone']);; ?> <strong class="text-danger"><?php echo app('translator')->getFromJson('Remove Phone Number?'); ?></strong></label> </div> <?php endif; ?> <hr> <?php endif; ?> <div class="form-group<?php echo e($errors->has('email') ? ' has-error' : ''); ?>"> <?php echo Form::label('email',__('Email:')); ?> <?php echo Form::email('email', null, ['class'=>'form-control', 'placeholder'=>__('Enter email'), 'required']); ?> </div> <?php if($user->id !== 1): ?> <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('update', App\User::class)): ?> <?php if(!$user->location || $user->location->id == Auth::user()->location_id): ?> <?php
                $user_role = \App\Helpers\Helper::get_user_role($user);
            ?> <div class="form-group"> <?php echo Form::label('role', __('Role:')); ?> <?php echo Form::select('role', ['0'=>__('None')] + $roles, $user_role['role_id'], ['class'=>'form-control selectpicker', 'data-style'=>'btn-default']); ?> </div> <?php endif; ?> <?php endif; ?> <div class="form-group"> <?php echo Form::label('verified', __('Email Status:')); ?> <?php echo Form::select('verified', [true=>__('verified'), false=>__('unverified')], $user->verified, ['class'=>'form-control selectpicker', 'data-style'=>'btn-default']); ?> </div> <div class="form-group"> <?php echo Form::label('status', __('Status:')); ?> <?php echo Form::select('status', [0=>__('inactive'), 1=>__('active')], $user->is_active, ['class'=>'form-control selectpicker', 'data-style'=>'btn-default']); ?> </div> <?php endif; ?> <div class="form-group<?php echo e($errors->has('password') ? ' has-error' : ''); ?>"> <?php echo Form::label('password', __('Password:')); ?> <?php echo Form::password('password', ['class'=>'form-control', 'placeholder'=>__('Enter password')]); ?> </div> <div class="form-group<?php echo e($errors->has('password') ? ' has-error' : ''); ?>"> <?php echo Form::label('password_confirmation', __('Confirm Password:')); ?> <?php echo Form::password('password_confirmation', ['class'=>'form-control', 'placeholder'=>__('Enter password again')]); ?> </div> <div class="form-group"> <?php echo Form::label('photo', __('Choose photo'), ['class'=>'btn btn-default btn-file']); ?> <?php echo Form::file('photo',['class'=>'form-control', 'style'=>'display: none;','onchange'=>'$("#upload-file-info").html(files[0].name)']); ?> <span class='label label-info' id="upload-file-info"><?php echo app('translator')->getFromJson('No photo chosen'); ?></span> </div> <div class="form-group"> <?php echo Form::submit(__('Update Customer'), ['class'=>'btn btn-primary btn-block', 'name'=>'submit_button']); ?> </div> <?php echo Form::close(); ?> </div> <div class="col-xs-12 col-md-6"> <h3 class="text-center"><?php echo app('translator')->getFromJson('Shipping Addresses'); ?></h3> <hr> <?php if(session()->has('address_deleted')): ?> <div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> <strong><?php echo e(session('address_deleted')); ?></strong> </div> <?php endif; ?> <?php $__currentLoopData = $customers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $customer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="col-md-12"> <div class="shipping-address"> <h4><?php echo e($key+1); ?>. <?php echo app('translator')->getFromJson('Shipping Address'); ?></h4> <strong><?php echo e($customer->first_name . ' ' . $customer->last_name); ?></strong>,<br> <?php echo e($customer->address); ?><br> <?php echo e($customer->city . ', ' . $customer->state . ' - ' . $customer->zip); ?><br> <?php echo e($customer->country); ?>.<br> <strong><?php echo app('translator')->getFromJson('Phone:'); ?></strong> <?php echo e($customer->phone); ?><br> <strong><?php echo app('translator')->getFromJson('Email:'); ?></strong> <?php echo e($customer->email); ?><br> <div class="btn-area"> <a class="btn btn-primary btn-xs pull-left" href="<?php echo e(route('manage.customer-address.edit', $customer->id)); ?>"><?php echo app('translator')->getFromJson('Edit'); ?></a> <?php echo Form::model($customer, ['method'=>'delete', 'action'=>['ManageAddressesController@destroy', $customer->id], 'id'=> 'delete-form-'.$customer->id, 'style'=>'display: none;']); ?> <?php echo Form::close(); ?> &nbsp;&nbsp; <a href="" class='btn btn-xs btn-danger' onclick=" if(confirm('<?php echo app('translator')->getFromJson('Are you sure you want to delete this?'); ?>')) { event.preventDefault(); $('#delete-form-<?php echo e($customer->id); ?>').submit(); } else { event.preventDefault(); } " ><?php echo app('translator')->getFromJson('Remove'); ?></a> <div class="clearfix"></div> </div> <div class="clearfix"></div> </div> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> </div>