mirror of
https://github.com/flarum/core.git
synced 2025-07-30 21:20:24 +02:00
New design for reset password view
This commit is contained in:
106
framework/core/views/layouts/basic.blade.php
Normal file
106
framework/core/views/layouts/basic.blade.php
Normal file
@@ -0,0 +1,106 @@
|
||||
{{-- TODO: Change below to @php when Laravel is upgraded --}}
|
||||
<?php
|
||||
$primaryColor = $settings->get('theme_primary_color', '#000');
|
||||
?>
|
||||
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
{{-- TODO: Change below to @hasSection when Laravel is upgraded --}}
|
||||
<title>@if ($__env->hasSection('title')) @yield('title') - @endif{{ $settings->get('forum_title') }}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
|
||||
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
line-height: 1.5;
|
||||
color: #333;
|
||||
}
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
textarea {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
a {
|
||||
cursor: pointer;
|
||||
color: {{ $primaryColor }};
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.container {
|
||||
margin: 100px auto;
|
||||
max-width: 450px;
|
||||
padding: 0 15px;
|
||||
}
|
||||
.button {
|
||||
display: inline-block;
|
||||
padding: 15px 25px;
|
||||
background: {{ $primaryColor }};
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
font-weight: bold;
|
||||
border: 0;
|
||||
}
|
||||
.button:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.button:active,
|
||||
.button.active {
|
||||
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||
}
|
||||
.form {
|
||||
max-width: 300px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.form .button {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
.form-control {
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
padding: 15px 20px;
|
||||
background-color: #fff;
|
||||
border: 2px solid #eee;
|
||||
border-radius: 4px;
|
||||
transition: border-color .15s;
|
||||
}
|
||||
.form-control:focus,
|
||||
.form-control.focus {
|
||||
border-color: {{ $primaryColor }};
|
||||
outline: none;
|
||||
}
|
||||
.errors {
|
||||
color: #d83e3e;
|
||||
}
|
||||
.errors ul {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
@yield('content')
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
33
framework/core/views/reset-password.blade.php
Normal file
33
framework/core/views/reset-password.blade.php
Normal file
@@ -0,0 +1,33 @@
|
||||
@extends('flarum.forum::layouts.basic')
|
||||
@inject('url', 'Flarum\Forum\UrlGenerator')
|
||||
|
||||
@section('title', $translator->trans('core.views.reset_password.title'))
|
||||
|
||||
@section('content')
|
||||
@if ($errors->any())
|
||||
<div class="errors">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form class="form" method="POST" action="{{ $url->toRoute('savePassword') }}">
|
||||
<input type="hidden" name="csrfToken" value="{{ $csrfToken }}">
|
||||
<input type="hidden" name="passwordToken" value="{{ $passwordToken }}">
|
||||
|
||||
<p class="form-group">
|
||||
<input type="password" class="form-control" name="password" placeholder="{{ $translator->trans('core.views.reset_password.new_password_label') }}">
|
||||
</p>
|
||||
|
||||
<p class="form-group">
|
||||
<input type="password" class="form-control" name="password_confirmation" placeholder="{{ $translator->trans('core.views.reset_password.confirm_password_label') }}">
|
||||
</p>
|
||||
|
||||
<p class="form-group">
|
||||
<button type="submit" class="button">{{ $translator->trans('core.views.reset_password.submit_button') }}</button>
|
||||
</p>
|
||||
</form>
|
||||
@endsection
|
@@ -1,37 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Reset Your Password</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2>{{ $translator->trans('core.views.reset.title') }}</h2>
|
||||
|
||||
@if (! empty($error))
|
||||
<p style="color:red">{{ $error }}</p>
|
||||
@endif
|
||||
|
||||
<form class="form-horizontal" role="form" method="POST" action="{{ app('Flarum\Forum\UrlGenerator')->toRoute('savePassword') }}">
|
||||
<input type="hidden" name="csrfToken" value="{{ $csrfToken }}">
|
||||
<input type="hidden" name="passwordToken" value="{{ $passwordToken }}">
|
||||
|
||||
<p class="form-group">
|
||||
<label class="control-label">{{ $translator->trans('core.views.reset.password_label') }}</label><br>
|
||||
<input type="password" class="form-control" name="password">
|
||||
</p>
|
||||
|
||||
<p class="form-group">
|
||||
<label class="control-label">{{ $translator->trans('core.views.reset.confirm_password_label') }}</label><br>
|
||||
<input type="password" class="form-control" name="password_confirmation">
|
||||
</p>
|
||||
|
||||
<p class="form-group">
|
||||
<button type="submit" class="btn btn-primary">{{ $translator->trans('core.views.reset.submit_button') }}</button>
|
||||
</p>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user