Sindbad~EG File Manager

Current Path : /home/numerotech/www/livemt2023.aios-scientificcommittee.org/app/views/auth/
Upload File :
Current File : //home/numerotech/www/livemt2023.aios-scientificcommittee.org/app/views/auth/changepwd.blade.php

     
<script type="text/javascript">           

            var baseUrl = "{{ url('/') }}";
            $(document).ready(function () {

             $("#form_change_pwd").validate({
                rules: {       
                 password: {
                    required: true       ,
                    minlength:6             
                  },                
                  new_password: {
                    required: true        ,            
                    minlength:6
                  },
                  password_confirmation: {
                    required: true,                    
                    minlength:6,
                    equalTo: "#new_password",

                  },   
                  agree: "required"
                },
                messages: {
                    password: {
                        required: "Please provide a password",
                        //  minlength: "Your password must be at least 5 characters long"
                      },
                      new_password: {
                        required: "Please provide a password",
                        //minlength: "Your password must be at least 5 characters long"
                      },
                      password_confirmation: {
                        required: "Please provide a password",
                        //minlength: "Your password must be at least 5 characters long",
                        equalTo: "Please enter the same password as above"
                      },
                      email: "Please enter a valid email address"        
               }

              });
            });


 $(function () {

        $('#form_change_pwd').on('submit', function (e) {

          e.preventDefault();

          $(".alert-success").hide()
          $(".alert-danger").hide()

          if($('#form_change_pwd').valid())
          {

          $.ajax({
                        url: baseUrl + '/password/change',
                        type: 'post',
                        dataType: 'json',
                        data: $('form').serialize(),
                        async: false,
                        })
                    .done(function(data) {                                          
                         if(data['code'] == 1)
                         {
                            $(".alert-success").show()
                            $(".alert-success").html(data['msg']);
                         }
                         else 
                         {
                            $(".alert-danger").show()
                            $(".alert-danger").html(data['msg']);
                         }
                    })
                    .fail(function() {
                        //alert("Internal Server Error");
                        //return false;
                    });     
                    
            }

          

        });

      });

    </script>     


<div id="myModal" class="modal fade" role="dialog">
  <div class="modal-dialog">
  {{ Form::open(array('route' => array('password.change'),'role'=>'form','id'=>'form_change_pwd')) }}
    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
         <h3>Change Password <span class="extra-title muted"></span></h3>
      </div>
      <div class="modal-body">

      <div class="alert alert-success" style="display:none">
        
      </div>
     <div class="alert alert-danger"  style="display:none">                  
     </div>
      @if(Session::has('msg'))
                  <div class="alert alert-success">{{ Session::get('msg')}}</div>
              @endif
              @if(Session::has('msg_err'))
                  <div class="alert alert-danger">                  
                  {{ Session::get('msg_err')}}                  
                  </div>
              @endif
                 
                <div class="form-group">
                  {{ Form::label('password', 'Current Password') }}
                   <input type="password" name="password" class="form-control input-lg req" placeholder="Current Password" required id="password">
                  
                </div>      
                 <div class="form-group">
                  {{ Form::label('password', 'New Password') }}
                   <input type="password" name="new_password" class="form-control input-lg req" placeholder="Password" required id="new_password">
                  
                </div>      
                <div class="form-group">
                  {{ Form::label('password_confirmation', 'Password confirm') }}
                   <input type="password" name="password_confirmation" class="form-control input-lg req" placeholder="Password Confirmation" required id="password_confirmation">
                  
                </div>   
     
      </div>
      <div class="modal-footer">
       <button href="#" class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
        <input type="submit" value="Save changes" id ="btnSubmit" class="btn btn-primary">
      </div>
    </div>
 {{ Form::close() }}
  </div>
</div>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists