invoiceninja/resources/views/auth/passwords/reset.blade.php

90 lines
2.5 KiB
PHP
Raw Permalink Normal View History

2017-02-15 17:47:37 -05:00
@extends('login')
2015-03-17 07:45:25 +10:00
2017-02-15 17:47:37 -05:00
@section('form')
2015-03-17 07:45:25 +10:00
<div class="container">
2018-04-10 18:07:10 +03:00
{!! Former::open($url)
2017-11-15 09:51:49 +02:00
->addClass('form-signin')
->autocomplete('off')
->rules(array(
2018-04-10 18:07:10 +03:00
'email' => 'required|email',
2015-03-30 18:20:53 +03:00
'password' => 'required',
2016-08-22 16:45:34 +03:00
'password_confirmation' => 'required',
2015-03-30 18:20:53 +03:00
)) !!}
2015-03-17 07:45:25 +10:00
2017-11-15 09:51:49 +02:00
@include('partials.autocomplete_fix')
2017-02-15 17:47:37 -05:00
<h2 class="form-signin-heading">{{ trans('texts.set_password') }}</h2>
<hr class="green">
2015-03-30 18:20:53 +03:00
@if (count($errors->all()))
<div class="alert alert-danger">
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</div>
@endif
2015-03-17 07:45:25 +10:00
<!-- if there are login errors, show them here -->
@if (Session::has('warning'))
2017-02-15 17:47:37 -05:00
<div class="alert alert-warning">{{ Session::get('warning') }}</div>
2015-03-17 07:45:25 +10:00
@endif
@if (Session::has('message'))
2017-02-15 17:47:37 -05:00
<div class="alert alert-info">{{ Session::get('message') }}</div>
2015-03-17 07:45:25 +10:00
@endif
@if (Session::has('error'))
2017-02-15 17:47:37 -05:00
<div class="alert alert-danger">{{ Session::get('error') }}</div>
2015-03-17 07:45:25 +10:00
@endif
2017-02-15 17:47:37 -05:00
<input type="hidden" name="token" value="{{{ $token }}}">
2015-03-17 07:45:25 +10:00
2018-04-10 18:07:10 +03:00
<div onkeyup="validateForm()" onclick="validateForm()" onkeydown="validateForm(event)">
2018-01-10 15:10:49 +02:00
{!! Former::text('email')->placeholder(trans('texts.email'))->raw() !!}
2017-11-15 09:51:49 +02:00
{!! Former::password('password')->placeholder(trans('texts.password'))->autocomplete('new-password')->raw() !!}
{!! Former::password('password_confirmation')->placeholder(trans('texts.confirm_password'))->autocomplete('new-password')->raw() !!}
2017-02-15 17:47:37 -05:00
</div>
2018-04-10 18:07:10 +03:00
<div id="passwordStrength" style="font-weight:normal;padding:16px">
&nbsp;
</div>
<p>{!! Button::success(trans('texts.save'))->large()->submit()->withAttributes(['class' => 'green', 'id' => 'saveButton', 'disabled' => true])->block() !!}</p>
2015-03-17 07:45:25 +10:00
2017-02-15 17:47:37 -05:00
{!! Former::close() !!}
</div>
2015-05-09 21:25:16 +03:00
<script type="text/javascript">
$(function() {
2017-11-15 11:25:41 +02:00
$('#password').focus();
2018-04-10 18:07:10 +03:00
validateForm();
2015-05-09 21:25:16 +03:00
})
2018-04-10 18:07:10 +03:00
function validateForm() {
var isValid = true;
if (! $('#email').val()) {
isValid = false;
}
var password = $('#password').val();
var confirm = $('#password_confirmation').val();
if (! password || password != confirm || password.length < 8) {
isValid = false;
}
var score = scorePassword(password);
if (score < 50) {
isValid = false;
}
showPasswordStrength(password, score);
$('#saveButton').prop('disabled', ! isValid);
}
2015-05-09 21:25:16 +03:00
</script>
2017-02-15 17:47:37 -05:00
@endsection