Skip to content

Commit d4adedd

Browse files
committed
Use template layout for authentication
1 parent 457ed28 commit d4adedd

File tree

5 files changed

+240
-190
lines changed

5 files changed

+240
-190
lines changed
Lines changed: 67 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,71 @@
1-
<!DOCTYPE html>
2-
<html>
3-
<head>
4-
<meta charset="utf-8">
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<title>{{ Settings::get('company', 'Pterodactyl') }} - Login</title>
7-
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
8-
{!! Theme::css('vendor/bootstrap/bootstrap.min.css') !!}
9-
{!! Theme::css('vendor/adminlte/admin.min.css') !!}
10-
{!! Theme::css('css/pterodactyl.css') !!}
11-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
12-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
1+
{{-- Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com> --}}
132

14-
<!--[if lt IE 9]>
15-
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
16-
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
17-
<![endif]-->
18-
</head>
19-
<body class="hold-transition login-page">
20-
<div class="login-box">
21-
<div class="login-logo">
22-
{{ Settings::get('company', 'Pterodactyl') }}
23-
</div>
24-
<div class="login-box-body">
25-
@if (count($errors) > 0)
26-
<div class="callout callout-danger">
27-
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
28-
{{ trans('auth.auth_error') }}<br><br>
29-
<ul>
30-
@foreach ($errors->all() as $error)
31-
<li>{{ $error }}</li>
32-
@endforeach
33-
</ul>
34-
</div>
35-
@endif
36-
@foreach (Alert::getMessages() as $type => $messages)
37-
@foreach ($messages as $message)
38-
<div class="callout callout-{{ $type }} alert-dismissable" role="alert">
39-
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
40-
{!! $message !!}
41-
</div>
42-
@endforeach
3+
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
4+
{{-- of this software and associated documentation files (the "Software"), to deal --}}
5+
{{-- in the Software without restriction, including without limitation the rights --}}
6+
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
7+
{{-- copies of the Software, and to permit persons to whom the Software is --}}
8+
{{-- furnished to do so, subject to the following conditions: --}}
9+
10+
{{-- The above copyright notice and this permission notice shall be included in all --}}
11+
{{-- copies or substantial portions of the Software. --}}
12+
13+
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
14+
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
15+
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
16+
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
17+
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
18+
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
19+
{{-- SOFTWARE. --}}
20+
@extends('layouts.auth')
21+
22+
@section('title')
23+
Login
24+
@endsection
25+
26+
@section('content')
27+
<div class="login-box-body">
28+
@if (count($errors) > 0)
29+
<div class="callout callout-danger">
30+
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
31+
{{ trans('auth.auth_error') }}<br><br>
32+
<ul>
33+
@foreach ($errors->all() as $error)
34+
<li>{{ $error }}</li>
4335
@endforeach
44-
<p class="login-box-msg">{{ trans('auth.authentication_required') }}</p>
45-
<form action="{{ route('auth.login') }}" method="POST">
46-
<div class="form-group has-feedback">
47-
<input type="email" name="email" class="form-control" value="{{ old('email') }}" placeholder="{{ trans('strings.email') }}">
48-
<span class="fa fa-envelope form-control-feedback"></span>
49-
</div>
50-
<div class="form-group has-feedback">
51-
<input type="password" name="password" class="form-control" placeholder="{{ trans('strings.password') }}">
52-
<span class="fa fa-lock form-control-feedback"></span>
53-
</div>
54-
<div class="row">
55-
<div class="col-xs-8">
56-
<div class="form-group has-feedback">
57-
<input type="checkbox" name="remember_me" id="remember_me" /> <label for="remember_me" class="weight-300">{{ trans('auth.remember_me') }}</label>
58-
</div>
59-
</div>
60-
<div class="col-xs-4">
61-
{!! csrf_field() !!}
62-
<button type="submit" class="btn btn-primary btn-block btn-flat">{{ trans('auth.sign_in') }}</button>
63-
</div>
64-
</div>
65-
</form>
66-
<a href="{{ route('auth.password') }}">{{ trans('auth.forgot_password') }}</a><br>
36+
</ul>
37+
</div>
38+
@endif
39+
@foreach (Alert::getMessages() as $type => $messages)
40+
@foreach ($messages as $message)
41+
<div class="callout callout-{{ $type }} alert-dismissable" role="alert">
42+
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
43+
{!! $message !!}
44+
</div>
45+
@endforeach
46+
@endforeach
47+
<p class="login-box-msg">{{ trans('auth.authentication_required') }}</p>
48+
<form action="{{ route('auth.login') }}" method="POST">
49+
<div class="form-group has-feedback">
50+
<input type="email" name="email" class="form-control" value="{{ old('email') }}" placeholder="{{ trans('strings.email') }}">
51+
<span class="fa fa-envelope form-control-feedback"></span>
52+
</div>
53+
<div class="form-group has-feedback">
54+
<input type="password" name="password" class="form-control" placeholder="{{ trans('strings.password') }}">
55+
<span class="fa fa-lock form-control-feedback"></span>
56+
</div>
57+
<div class="row">
58+
<div class="col-xs-8">
59+
<div class="form-group has-feedback">
60+
<input type="checkbox" name="remember_me" id="remember_me" /> <label for="remember_me" class="weight-300">{{ trans('auth.remember_me') }}</label>
61+
</div>
62+
</div>
63+
<div class="col-xs-4">
64+
{!! csrf_field() !!}
65+
<button type="submit" class="btn btn-primary btn-block btn-flat">{{ trans('auth.sign_in') }}</button>
6766
</div>
6867
</div>
69-
{!! Theme::js('vendor/jquery/jquery.min.js') !!}
70-
{!! Theme::js('vendor/bootstrap/bootstrap.min.js') !!}
71-
</body>
72-
</html>
68+
</form>
69+
<a href="{{ route('auth.password') }}">{{ trans('auth.forgot_password') }}</a><br>
70+
</div>
71+
@endsection
Lines changed: 51 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,55 @@
1-
<!DOCTYPE html>
2-
<html>
3-
<head>
4-
<meta charset="utf-8">
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<title>{{ Settings::get('company', 'Pterodactyl') }} - Forgot Password</title>
7-
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
8-
{!! Theme::css('vendor/bootstrap/bootstrap.min.css') !!}
9-
{!! Theme::css('vendor/adminlte/admin.min.css') !!}
10-
{!! Theme::css('css/pterodactyl.css') !!}
11-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
12-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
1+
{{-- Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com> --}}
132

14-
<!--[if lt IE 9]>
15-
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
16-
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
17-
<![endif]-->
18-
</head>
19-
<body class="hold-transition login-page">
20-
<div class="login-box">
21-
<div class="login-logo">
22-
{{ Settings::get('company', 'Pterodactyl') }}
3+
{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}}
4+
{{-- of this software and associated documentation files (the "Software"), to deal --}}
5+
{{-- in the Software without restriction, including without limitation the rights --}}
6+
{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}}
7+
{{-- copies of the Software, and to permit persons to whom the Software is --}}
8+
{{-- furnished to do so, subject to the following conditions: --}}
9+
10+
{{-- The above copyright notice and this permission notice shall be included in all --}}
11+
{{-- copies or substantial portions of the Software. --}}
12+
13+
{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}}
14+
{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}}
15+
{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}}
16+
{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}}
17+
{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}}
18+
{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}}
19+
{{-- SOFTWARE. --}}
20+
@extends('layouts.auth')
21+
22+
@section('title')
23+
Forgot Password
24+
@endsection
25+
26+
@section('content')
27+
<div class="login-box-body">
28+
@if (session('status'))
29+
<div class="callout callout-success">
30+
{{ trans('auth.email_sent') }}
31+
</div>
32+
@endif
33+
<p class="login-box-msg">{{ trans('auth.request_reset_text') }}</p>
34+
<form action="{{ route('auth.password') }}" method="POST">
35+
<div class="form-group has-feedback">
36+
<input type="email" name="email" class="form-control" value="{{ old('email') }}" autofocus placeholder="{{ trans('strings.email') }}">
37+
<span class="fa fa-envelope form-control-feedback"></span>
38+
@if ($errors->has('email'))
39+
<span class="help-block text-red small">
40+
{{ $errors->first('email') }}
41+
</span>
42+
@endif
43+
</div>
44+
<div class="row">
45+
<div class="col-xs-4">
46+
<a href="{{ route('auth.login') }}"><button type="button" class="btn btn-clear btn-block btn-flat">{{ trans('strings.login') }}</button></a>
2347
</div>
24-
<div class="login-box-body">
25-
@if (session('status'))
26-
<div class="callout callout-success">
27-
{{ trans('auth.email_sent') }}
28-
</div>
29-
@endif
30-
<p class="login-box-msg">{{ trans('auth.request_reset_text') }}</p>
31-
<form action="{{ route('auth.password') }}" method="POST">
32-
<div class="form-group has-feedback">
33-
<input type="email" name="email" class="form-control" value="{{ old('email') }}" autofocus placeholder="{{ trans('strings.email') }}">
34-
<span class="fa fa-envelope form-control-feedback"></span>
35-
@if ($errors->has('email'))
36-
<span class="help-block text-red small">
37-
{{ $errors->first('email') }}
38-
</span>
39-
@endif
40-
</div>
41-
<div class="row">
42-
<div class="col-xs-4">
43-
<a href="{{ route('auth.login') }}"><button type="button" class="btn btn-clear btn-block btn-flat">{{ trans('strings.login') }}</button></a>
44-
</div>
45-
<div class="col-xs-8">
46-
{!! csrf_field() !!}
47-
<button type="submit" class="btn btn-primary btn-block btn-flat">{{ trans('auth.request_reset') }}</button>
48-
</div>
49-
</div>
50-
</form>
48+
<div class="col-xs-8">
49+
{!! csrf_field() !!}
50+
<button type="submit" class="btn btn-primary btn-block btn-flat">{{ trans('auth.request_reset') }}</button>
5151
</div>
5252
</div>
53-
{!! Theme::js('vendor/jquery/jquery.min.js') !!}
54-
{!! Theme::js('vendor/bootstrap/bootstrap.min.js') !!}
55-
</body>
56-
</html>
53+
</form>
54+
</div>
55+
@endsection

0 commit comments

Comments
 (0)