@extends('layouts.login')

@section('content')
  {!! Form::open(array('url' => 'user/doreset/'.$verCode, 'class'=>'form-horizontal form-material sky-form boxed')) !!}

 <?php
 include 'dbconnection.php';
 $uri = $_SERVER['REQUEST_URI'];
 $Token= basename($uri," ");
 
 $DB = mysqli_query($mysql,"SELECT email FROM tb_users WHERE reminder='$Token'");
 while($row = mysqli_fetch_array($DB)){
 $email = $row ['email'];}

 ?>
 
<div style="text-align:center;margin-top:20px;">
    <h5 class="box-title ">Cambio de Contraseña:</h5>
 </div>   
    
    <ul class="parsley-error-list" >
      @foreach($errors->all() as $error)
        <li>{{ $error }}</li>
      @endforeach
    </ul> 


        <div class="form-group m-t-20" style="margin-top:-10px;">
          <div class="col-xs-12">
            <div class="input-container">
            <i class="las la-key icon fa-2x"></i>
            <div style="margin-left:8px;">
                
            <div style="display:none;">       
            {!! Form::password('password',  array('class'=>'form-control', 'placeholder'=>'Nueva Clave')) !!}
            </div>  
            
            
             <input type="password" id="inputPassword"  name="password" class="input-field" placeholder="Nueva Contraseña" required style="font-size: 16px;">
            </div>
          </div>
        </div>
        </div>
        <div class="form-group " style="margin-top:-40px;">
          <div class="col-xs-12">
          <div class="input-container">
            <i class="las la-key icon fa-2x" style="background: #eba715;"></i> 
            <div style="margin-left:8px;">
           
           <div style="display:none;">   
           {!! Form::password('password_confirmation', array('class'=>'form-control', 'placeholder'=>'Confirmar Contraseña')) !!}
           </div>  
           
           
           
           <input type="password" id="inputPassword"  name="password_confirmation" class="input-field" placeholder="Repetir Contraseña" required style="font-size: 16px;">
           </div>
           </div>
          </div>
        </div>

        <div class="form-group text-center m-t-20">
          <div class="col-xs-12">
            <button onclick="clave()" class="btn btn-info btn-block waves-effect waves-light shadow p-2 mb-5  rounded-4 " style="width: 30%;font-weight: 600;font-size: 13px" type="submit"><i class="las la-save" style="font-size: 18px;vertical-align: middle; margin-top:-3px"></i> Guardar</button>
          </div>
        </div> 
        
        <input type="hidden" id="email" name="email" value="<?php echo $email;?>">
        
        <div class="form-group m-b-0" style="display:none;">
          <div class="col-sm-12 text-center">
            <p>  <a href="{{ url('user/login') }}" class="text-primary m-l-5"><b>{{ Lang::get('core.signin') }} </b></a></p>
          </div>
        </div>               
    </form>
    
    
 <script>

function clave() {
  /*$.post( "/home/tempdpe5/public_html/intelpropertyrd/aplicacionmobile/public/password3.php", { email: "prueba1@intelpropertyrd.com"} );*/
  
  $.get("public/password3.php",function(data){
  alert("Data: " + data);
});
}


</script>   
    

<style>
* {box-sizing: border-box;}

.input-container {
  display: -ms-flexbox; /* IE10 */
  display: flex;
  width: 85%;
  margin-bottom: 20px;
  margin-left:auto;
  margin-right:auto;
  margin-top:20px;
  
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
  
   border-radius: 10px;
   overflow: hidden;
    
  
  
}

.icon {
  padding: 10px;
  background: #4a7cb5;
  color: white;
  min-width: 50px;
  text-align: center;
  
  
}

.input-field{
  width: 100%;
  padding: 10px;
  outline: none !important;
  border:0;
} 

/*.input-field:focus {
  border: 2px solid #4a7cb5;
  border-radius: 0px 10px 10px 0px;
}*/
 

::placeholder { /* Firefox, Chrome, Opera */
    color: #474747;
}
  
:-ms-input-placeholder { /* Internet Explorer 10-11 */
    color: #474747;
}
  
::-ms-input-placeholder { /* Microsoft Edge */
    color: #474747;
}
    
</style>
 

@stop