Use template layout for authentication

This commit is contained in:
Dane Everitt 2017-01-14 23:17:31 -05:00
parent 457ed28b0b
commit d4adedd4a0
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
5 changed files with 241 additions and 191 deletions

View File

@ -1,72 +1,71 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{ Settings::get('company', 'Pterodactyl') }} - Login</title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
{!! Theme::css('vendor/bootstrap/bootstrap.min.css') !!}
{!! Theme::css('vendor/adminlte/admin.min.css') !!}
{!! Theme::css('css/pterodactyl.css') !!}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
{{-- Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com> --}}
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
{{ Settings::get('company', 'Pterodactyl') }}
</div>
<div class="login-box-body">
@if (count($errors) > 0)
<div class="callout callout-danger">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
{{ trans('auth.auth_error') }}<br><br>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
@foreach (Alert::getMessages() as $type => $messages)
@foreach ($messages as $message)
<div class="callout callout-{{ $type }} alert-dismissable" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
{!! $message !!}
</div>
@endforeach
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
{{-- of this software and associated documentation files (the "Software"), to deal --}}
{{-- in the Software without restriction, including without limitation the rights --}}
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
{{-- copies of the Software, and to permit persons to whom the Software is --}}
{{-- furnished to do so, subject to the following conditions: --}}
{{-- The above copyright notice and this permission notice shall be included in all --}}
{{-- copies or substantial portions of the Software. --}}
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
{{-- SOFTWARE. --}}
@extends('layouts.auth')
@section('title')
Login
@endsection
@section('content')
<div class="login-box-body">
@if (count($errors) > 0)
<div class="callout callout-danger">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
{{ trans('auth.auth_error') }}<br><br>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
<p class="login-box-msg">{{ trans('auth.authentication_required') }}</p>
<form action="{{ route('auth.login') }}" method="POST">
<div class="form-group has-feedback">
<input type="email" name="email" class="form-control" value="{{ old('email') }}" placeholder="{{ trans('strings.email') }}">
<span class="fa fa-envelope form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input type="password" name="password" class="form-control" placeholder="{{ trans('strings.password') }}">
<span class="fa fa-lock form-control-feedback"></span>
</div>
<div class="row">
<div class="col-xs-8">
<div class="form-group has-feedback">
<input type="checkbox" name="remember_me" id="remember_me" /> <label for="remember_me" class="weight-300">{{ trans('auth.remember_me') }}</label>
</div>
</div>
<div class="col-xs-4">
{!! csrf_field() !!}
<button type="submit" class="btn btn-primary btn-block btn-flat">{{ trans('auth.sign_in') }}</button>
</div>
</div>
</form>
<a href="{{ route('auth.password') }}">{{ trans('auth.forgot_password') }}</a><br>
</ul>
</div>
@endif
@foreach (Alert::getMessages() as $type => $messages)
@foreach ($messages as $message)
<div class="callout callout-{{ $type }} alert-dismissable" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
{!! $message !!}
</div>
@endforeach
@endforeach
<p class="login-box-msg">{{ trans('auth.authentication_required') }}</p>
<form action="{{ route('auth.login') }}" method="POST">
<div class="form-group has-feedback">
<input type="email" name="email" class="form-control" value="{{ old('email') }}" placeholder="{{ trans('strings.email') }}">
<span class="fa fa-envelope form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input type="password" name="password" class="form-control" placeholder="{{ trans('strings.password') }}">
<span class="fa fa-lock form-control-feedback"></span>
</div>
<div class="row">
<div class="col-xs-8">
<div class="form-group has-feedback">
<input type="checkbox" name="remember_me" id="remember_me" /> <label for="remember_me" class="weight-300">{{ trans('auth.remember_me') }}</label>
</div>
</div>
<div class="col-xs-4">
{!! csrf_field() !!}
<button type="submit" class="btn btn-primary btn-block btn-flat">{{ trans('auth.sign_in') }}</button>
</div>
</div>
{!! Theme::js('vendor/jquery/jquery.min.js') !!}
{!! Theme::js('vendor/bootstrap/bootstrap.min.js') !!}
</body>
</html>
</form>
<a href="{{ route('auth.password') }}">{{ trans('auth.forgot_password') }}</a><br>
</div>
@endsection

View File

@ -1,56 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{ Settings::get('company', 'Pterodactyl') }} - Forgot Password</title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
{!! Theme::css('vendor/bootstrap/bootstrap.min.css') !!}
{!! Theme::css('vendor/adminlte/admin.min.css') !!}
{!! Theme::css('css/pterodactyl.css') !!}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
{{-- Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com> --}}
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
{{ Settings::get('company', 'Pterodactyl') }}
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
{{-- of this software and associated documentation files (the "Software"), to deal --}}
{{-- in the Software without restriction, including without limitation the rights --}}
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
{{-- copies of the Software, and to permit persons to whom the Software is --}}
{{-- furnished to do so, subject to the following conditions: --}}
{{-- The above copyright notice and this permission notice shall be included in all --}}
{{-- copies or substantial portions of the Software. --}}
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
{{-- SOFTWARE. --}}
@extends('layouts.auth')
@section('title')
Forgot Password
@endsection
@section('content')
<div class="login-box-body">
@if (session('status'))
<div class="callout callout-success">
{{ trans('auth.email_sent') }}
</div>
@endif
<p class="login-box-msg">{{ trans('auth.request_reset_text') }}</p>
<form action="{{ route('auth.password') }}" method="POST">
<div class="form-group has-feedback">
<input type="email" name="email" class="form-control" value="{{ old('email') }}" autofocus placeholder="{{ trans('strings.email') }}">
<span class="fa fa-envelope form-control-feedback"></span>
@if ($errors->has('email'))
<span class="help-block text-red small">
{{ $errors->first('email') }}
</span>
@endif
</div>
<div class="row">
<div class="col-xs-4">
<a href="{{ route('auth.login') }}"><button type="button" class="btn btn-clear btn-block btn-flat">{{ trans('strings.login') }}</button></a>
</div>
<div class="login-box-body">
@if (session('status'))
<div class="callout callout-success">
{{ trans('auth.email_sent') }}
</div>
@endif
<p class="login-box-msg">{{ trans('auth.request_reset_text') }}</p>
<form action="{{ route('auth.password') }}" method="POST">
<div class="form-group has-feedback">
<input type="email" name="email" class="form-control" value="{{ old('email') }}" autofocus placeholder="{{ trans('strings.email') }}">
<span class="fa fa-envelope form-control-feedback"></span>
@if ($errors->has('email'))
<span class="help-block text-red small">
{{ $errors->first('email') }}
</span>
@endif
</div>
<div class="row">
<div class="col-xs-4">
<a href="{{ route('auth.login') }}"><button type="button" class="btn btn-clear btn-block btn-flat">{{ trans('strings.login') }}</button></a>
</div>
<div class="col-xs-8">
{!! csrf_field() !!}
<button type="submit" class="btn btn-primary btn-block btn-flat">{{ trans('auth.request_reset') }}</button>
</div>
</div>
</form>
<div class="col-xs-8">
{!! csrf_field() !!}
<button type="submit" class="btn btn-primary btn-block btn-flat">{{ trans('auth.request_reset') }}</button>
</div>
</div>
{!! Theme::js('vendor/jquery/jquery.min.js') !!}
{!! Theme::js('vendor/bootstrap/bootstrap.min.js') !!}
</body>
</html>
</form>
</div>
@endsection

View File

@ -1,74 +1,73 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{ Settings::get('company', 'Pterodactyl') }} - Reset Password</title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
{!! Theme::css('vendor/bootstrap/bootstrap.min.css') !!}
{!! Theme::css('vendor/adminlte/admin.min.css') !!}
{!! Theme::css('css/pterodactyl.css') !!}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
{{-- Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com> --}}
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
{{ Settings::get('company', 'Pterodactyl') }}
</div>
<div class="login-box-body">
<p class="login-box-msg">{{ trans('auth.reset_password_text') }}</p>
<form action="{{ route('auth.reset.post') }}" method="POST">
<div class="form-group">
<label for="email" class="control-label">{{ trans('strings.email') }}</label>
<div>
<input type="text" class="form-control" name="email" id="email" value="{{ $email or old('email') }}" required autofocus placeholder="{{ trans('strings.email') }}" />
@if ($errors->has('email'))
<span class="help-block text-red small">
{{ $errors->first('email') }}
</span>
@endif
</div>
</div>
<div class="form-group">
<label for="password" class="control-label">{{ trans('strings.password') }}</label>
<div>
<input type="password" class="form-control" name="password" id="password" required placeholder="{{ trans('strings.password') }}" />
@if ($errors->has('password'))
<span class="help-block text-red small">
{{ $errors->first('password') }}
</span>
@endif
<p class="text-muted"><small>{{ trans('auth.password_requirements') }}</small></p>
</div>
</div>
<div class="form-group">
<label for="password" class="control-label">{{ trans('strings.confirm_password') }}</label>
<div>
<input type="password" class="form-control" name="password_confirmation" id="password_confirmation" required placeholder="{{ trans('strings.confirm_password') }}" />
@if ($errors->has('password_confirmation'))
<span class="help-block text-red small">
{{ $errors->first('password_confirmation') }}
</span>
@endif
</div>
</div>
<div class="row">
<div class="col-xs-12">
{!! csrf_field() !!}
<input type="hidden" name="token" value="{{ $token }}">
<button type="submit" class="btn btn-primary btn-block btn-flat">{{ trans('auth.reset_password') }}</button>
</div>
</div>
</form>
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
{{-- of this software and associated documentation files (the "Software"), to deal --}}
{{-- in the Software without restriction, including without limitation the rights --}}
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
{{-- copies of the Software, and to permit persons to whom the Software is --}}
{{-- furnished to do so, subject to the following conditions: --}}
{{-- The above copyright notice and this permission notice shall be included in all --}}
{{-- copies or substantial portions of the Software. --}}
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
{{-- SOFTWARE. --}}
@extends('layouts.auth')
@section('title')
Reset Password
@endsection
@section('content')
<div class="login-box-body">
<p class="login-box-msg">{{ trans('auth.reset_password_text') }}</p>
<form action="{{ route('auth.reset.post') }}" method="POST">
<div class="form-group">
<label for="email" class="control-label">{{ trans('strings.email') }}</label>
<div>
<input type="text" class="form-control" name="email" id="email" value="{{ $email or old('email') }}" required autofocus placeholder="{{ trans('strings.email') }}" />
@if ($errors->has('email'))
<span class="help-block text-red small">
{{ $errors->first('email') }}
</span>
@endif
</div>
</div>
{!! Theme::js('vendor/jquery/jquery.min.js') !!}
{!! Theme::js('vendor/bootstrap/bootstrap.min.js') !!}
</body>
</html>
<div class="form-group">
<label for="password" class="control-label">{{ trans('strings.password') }}</label>
<div>
<input type="password" class="form-control" name="password" id="password" required placeholder="{{ trans('strings.password') }}" />
@if ($errors->has('password'))
<span class="help-block text-red small">
{{ $errors->first('password') }}
</span>
@endif
<p class="text-muted"><small>{{ trans('auth.password_requirements') }}</small></p>
</div>
</div>
<div class="form-group">
<label for="password" class="control-label">{{ trans('strings.confirm_password') }}</label>
<div>
<input type="password" class="form-control" name="password_confirmation" id="password_confirmation" required placeholder="{{ trans('strings.confirm_password') }}" />
@if ($errors->has('password_confirmation'))
<span class="help-block text-red small">
{{ $errors->first('password_confirmation') }}
</span>
@endif
</div>
</div>
<div class="row">
<div class="col-xs-12">
{!! csrf_field() !!}
<input type="hidden" name="token" value="{{ $token }}">
<button type="submit" class="btn btn-primary btn-block btn-flat">{{ trans('auth.reset_password') }}</button>
</div>
</div>
</form>
</div>
@endsection

View File

@ -0,0 +1,53 @@
{{-- Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com> --}}
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
{{-- of this software and associated documentation files (the "Software"), to deal --}}
{{-- in the Software without restriction, including without limitation the rights --}}
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
{{-- copies of the Software, and to permit persons to whom the Software is --}}
{{-- furnished to do so, subject to the following conditions: --}}
{{-- The above copyright notice and this permission notice shall be included in all --}}
{{-- copies or substantial portions of the Software. --}}
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
{{-- SOFTWARE. --}}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{ Settings::get('company', 'Pterodactyl') }} - @yield('title')</title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
@section('scripts')
{!! Theme::css('vendor/bootstrap/bootstrap.min.css') !!}
{!! Theme::css('vendor/adminlte/admin.min.css') !!}
{!! Theme::css('css/pterodactyl.css') !!}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
@show
</head>
<body class="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
{{ Settings::get('company', 'Pterodactyl') }}
</div>
@yield('content')
<p class="small text-muted">
Copyright &copy; 2015 - {{ date('Y') }} <a href="https://pterodactyl.io/" target="_blank">Pterodactyl Software &amp; Design</a>.<br />
</p>
</div>
{!! Theme::js('js/vendor/jquery/jquery.min.js') !!}
{!! Theme::js('vendor/bootstrap/bootstrap.min.js') !!}
</body>
</html>