Edit File: forget.blade.php
@extends('layouts.store_dashboard_un_authed_layout') @section('title') {{Session::has('lang')&&Session::get('lang')=='en'?'Forget password ':' نسيت كلمة المرور '}} @endsection @section('content') <!-- start page content --> <div class="page-content"> <div class="mt-4 mb-3 text-center"> <h5 class="bold">{{trans('stores_dashboard.restore')}}</h5> <p class="m-3">{{trans('stores_dashboard.forget_rule')}}</p> </div> <div class="w-md-50 m-auto round10 p-3 form-cont" > <form id="forgotForm" class="container "> {{csrf_field()}} <h6 class="bold border-bottom pt-3 pb-3 mb-4">{{trans('stores_dashboard.restore')}}</h6> <div class="form-group"> <label class="bold font14" for="exampleInputEmail1"> {{trans('stores_dashboard.phone')}}</label> <div class="row"> <div class="col pt-1 pb-1 pl-0 pr-1"> <input name="phone" type="text" class="form-control" aria-describedby="emailHelp" placeholder="{{trans('stores_dashboard.phone')}}"> </div> </div> </div> <button type="submit" class="forgotBtn button1 w-100 mt-3 material-button" > {{trans('stores_dashboard.confirm')}} </button> </form> </div> </div> @endsection @section('scripts') <script> $(".forgotBtn").on('click',function(e){ e.preventDefault(); var form = $('#forgotForm').get(0); var formData = new FormData(form); var oldText = $(this).text(); $(this).prop('disabled', true).css({ opacity:'0.5' }).text("{{trans('stores_dashboard.loading')}}"); $.ajax({ url:"{{route('stores_dashboard.post_forget_password')}}", type:"POST", data: formData, dataType: "json", processData: false, contentType: false, cache: false, success:function(data){ $('.forgotBtn').removeAttr("disabled").css({ opacity:'1' }).text(oldText); if(data.key =='success'){ Swal.fire({ title: data.msg, position:'top', timer: 15000, type:'success', showCloseButton: false, showConfirmButton:false, animation: true }) location.assign(data.url); }else{ Swal.fire({ title: data.msg, position:'top', timer: 3000, type:'error', showCloseButton: false, showConfirmButton:false, animation: true }) } } }); }); </script> @endsection
Back to File Manager