<?php $__env->startSection('title', 'Edit User'); ?> <?php $__env->startPush('custom_css'); ?> <link rel="stylesheet" href="<?php echo e(asset('assets/js/loader/waitMe.css')); ?>"> <?php $__env->stopPush(); ?> <?php $__env->startSection('content'); ?> <div class="row"> <div class="col-12"> <div class="page-title-box d-sm-flex align-items-center justify-content-between"> <h4 class="mb-sm-0">Change Password</h4> <div class="page-title-right"> <ol class="breadcrumb m-0"> <li class="breadcrumb-item"><a href="<?php echo e(route('admin.dashboard')); ?>">Dashboard</a></li> <li class="breadcrumb-item active">Change Password</li> </ol> </div> </div> </div> </div> <div class="card"> <div class="card-header align-items-center d-flex"> <h4 class="card-title mb-0 flex-grow-1">Change Password</h4> </div><!-- end card header --> <div class="card-body"> <form id="password_form" data-post-uri="<?php echo e(route('admin.users.change_password')); ?>"> <div id="wrapper"> <div class="row gy-4 align-items-end d-flex mb-3"> <div class="col-md-6"> <div> <label for="placeholderInput" class="form-label">Current Password</label> <input type="password" class="form-control" placeholder="Enter current password" name="current_password"> </div> </div> <div class="col-md-6"> <div> <label for="placeholderInput" class="form-label">New Password</label> <input type="password" class="form-control" placeholder="Enter new password" name="new_password"> </div> </div> </div> <div class="row gy-4 align-items-end d-flex mb-3"> <div class="col-md-12"> <div> <label for="placeholderInput" class="form-label">Confirm New Password</label> <input type="password" class="form-control" placeholder="Confirm new password" name="new_password_confirmation"> </div> </div> </div> </div> <div class="row"> <div class="col-md-12"> <button type="submit" class="btn btn-primary float-end users_btn" id="submit">Submit</button> </div> </div> </form> </div> </div> <?php $__env->stopSection(); ?> <?php $__env->startPush('custom_scripts'); ?> <script src="<?php echo e(asset('assets/js/loader/waitMe.js')); ?>"></script> <script> //handle submit form let form = $('#password_form'), users_btn = $('#submit'); users_btn.on('click', function (e) { e.preventDefault() $('body').waitMe({ effect: 'bounce', text: 'Submitting. Please wait...', color: "#fff", bg: 'rgba(0,0,0,0.5)' }); $.ajax({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, url: form.attr("data-post-uri"), dataType: 'json', type: 'POST', data: form.serializeArray(), success: function (json) { $('body').waitMe("hide"); if (json.status) { toastr.success('Password updated Successfully'); location.href = window.location } else { // console.log(json?.data) if (json?.data?.length > 0) { json.data.forEach((error, index) => { toastr.error(error.error, { CloseButton: true, ProgressBar: true }); }) } Snackbar.show({ text: json.message, pos: 'bottom-center', backgroundColor: '#a3220f', timeout: 3000 }); } }, error: function (json) { Snackbar.show({ text: 'Something went wrong. Please try again later!', pos: 'bottom-center', backgroundColor: '#a3220f' }); $('body').waitMe("hide"); } }); }) </script> <?php $__env->stopPush(); ?> <?php echo $__env->make('admin.layout.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp8\htdocs\radio-kaya\resources\views/admin/auth/change_password.blade.php ENDPATH**/ ?>