<!DOCTYPE html>
<html lang="ES-es">
	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta http-equiv="cache-control" content="no-cache" />
		<meta http-equiv="expires" content="0" />
		<meta http-equiv="pragma" content="no-cache" />
		<title>Recuperar Contraseña | Seven</title>
		<meta name="description" content="Sistema de Ventas, Almacén y Facturación Electronica - Seven">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<link rel="shortcut icon" href="{{ asset('ico/favicon.ico') }}" type="image/x-icon">
		<link rel="stylesheet" href="{{ asset('css/semantic.css') }}">
		<link rel="stylesheet" href="{{ asset('css/login.css') }}">
	</head>
	<body cz-shortcut-listen="true">
		<!-- Start Login Page -->
	@if ($data)	
		<section id="wrap">
			<div class="container">
				<span><img src="{{ asset('img/isologo.png') }}" alt="Seven"/></span>
				<h1>Seven</h1>
				<hr class="slideRight">
			</div>
			<div class="ui hidden divider"></div>	
			<div class="ui middle aligned center aligned grid">
			  <div class="column">

			    <form class="ui form" method="POST" action="{{ route('passwordme') }}" autocomplete="off">
					
					<input type="hidden" name="id_usuario" value="{{ $data->id_usuario }}">
					<input type="hidden" name="codigo" value="{{ $data->remember_token }}">

			      <div class="ui piled segment">
			      	{{  csrf_field() }}
			        <div class="field">
			          <div class="ui large left icon input">
			            <i class="lock icon"></i>
			            <input type="password" name="password" placeholder="Ingrese nueva contraseña" value="{{ old('password') }}"  maxlength="50" required>
			          </div>
			        </div>
			        <br>
			        <button class="fluid ui primary button large " id="btn_login" type="submit">
			        	<i class="share icon"></i> Resetear mi contraseña
			        </button>
			        
			      </div>
			    </form>
				@if ($errors->any())
				    <div class="ui error message" style="text-align: left;">
						<ul>
							@foreach ($errors->all() as $error)
						    	<li>{{ $error }}</li>
						    @endforeach
						</ul>    	
				    </div>
			    @endif
				@if (Session::has('flash_error'))
				    <div class="ui error message">
						<i class="exclamation triangle icon"></i>{{ Session::get('flash_error') }}
				    </div>
			    @endif
			    {{-- @if (Session::has('success'))
				    <div class="ui success message">
						<i class="exclamation triangle icon"></i>{{session('success')}}
				    </div>
			    @endif --}}
			  </div>
			</div>


			<footer>
				<div id="copy">© Seven &nbsp;|&nbsp; <?php echo date("Y"); ?></div>
			</footer>
		</section>
    @else
        <div  style="text-align: center">
            <div class="ui segment">
                <h3 class="ui header black centered">No se puede acceder a esta opcion</h3>
                <a href="{{ route('login') }}" style="text-decoration: none"><i class="long arrow alternate left icon"></i>Regresar</a>
            </div>
        </div>    
    @endif		
		<!-- End Login Page -->

		<script src="{{ asset('js/jquery-3.3.1.min.js') }}"></script>
		<script src="{{ asset('js/semantic.min.js') }}"></script>
	</body>
</html>