Showing
17 changed files
with
394 additions
and
254 deletions
| ... | @@ -37,7 +37,7 @@ class AuthController extends Controller | ... | @@ -37,7 +37,7 @@ class AuthController extends Controller |
| 37 | */ | 37 | */ |
| 38 | public function __construct(SocialAuthService $socialAuthService) | 38 | public function __construct(SocialAuthService $socialAuthService) |
| 39 | { | 39 | { |
| 40 | - $this->middleware('guest', ['only' => ['getLogin', 'postLogin']]); | 40 | + $this->middleware('guest', ['only' => ['getLogin', 'postLogin', 'getRegister']]); |
| 41 | $this->socialAuthService = $socialAuthService; | 41 | $this->socialAuthService = $socialAuthService; |
| 42 | } | 42 | } |
| 43 | 43 | ||
| ... | @@ -72,6 +72,17 @@ class AuthController extends Controller | ... | @@ -72,6 +72,17 @@ class AuthController extends Controller |
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | /** | 74 | /** |
| 75 | + * Show the application registration form. | ||
| 76 | + * | ||
| 77 | + * @return \Illuminate\Http\Response | ||
| 78 | + */ | ||
| 79 | + public function getRegister() | ||
| 80 | + { | ||
| 81 | + $socialDrivers = $this->socialAuthService->getActiveDrivers(); | ||
| 82 | + return view('auth.register', ['socialDrivers' => $socialDrivers]); | ||
| 83 | + } | ||
| 84 | + | ||
| 85 | + /** | ||
| 75 | * Show the application login form. | 86 | * Show the application login form. |
| 76 | * | 87 | * |
| 77 | * @return \Illuminate\Http\Response | 88 | * @return \Illuminate\Http\Response |
| ... | @@ -84,7 +95,6 @@ class AuthController extends Controller | ... | @@ -84,7 +95,6 @@ class AuthController extends Controller |
| 84 | } | 95 | } |
| 85 | 96 | ||
| 86 | $socialDrivers = $this->socialAuthService->getActiveDrivers(); | 97 | $socialDrivers = $this->socialAuthService->getActiveDrivers(); |
| 87 | - | ||
| 88 | return view('auth.login', ['socialDrivers' => $socialDrivers]); | 98 | return view('auth.login', ['socialDrivers' => $socialDrivers]); |
| 89 | } | 99 | } |
| 90 | 100 | ... | ... |
| ... | @@ -31,12 +31,12 @@ abstract class Controller extends BaseController | ... | @@ -31,12 +31,12 @@ abstract class Controller extends BaseController |
| 31 | { | 31 | { |
| 32 | // Get a user instance for the current user | 32 | // Get a user instance for the current user |
| 33 | $user = auth()->user(); | 33 | $user = auth()->user(); |
| 34 | - if (!$user) { | 34 | + if (!$user) $user = User::getDefault(); |
| 35 | - $user = User::getDefault(); | 35 | + |
| 36 | - } | ||
| 37 | // Share variables with views | 36 | // Share variables with views |
| 38 | view()->share('signedIn', auth()->check()); | 37 | view()->share('signedIn', auth()->check()); |
| 39 | view()->share('currentUser', $user); | 38 | view()->share('currentUser', $user); |
| 39 | + | ||
| 40 | // Share variables with controllers | 40 | // Share variables with controllers |
| 41 | $this->currentUser = $user; | 41 | $this->currentUser = $user; |
| 42 | $this->signedIn = auth()->check(); | 42 | $this->signedIn = auth()->check(); |
| ... | @@ -53,7 +53,7 @@ abstract class Controller extends BaseController | ... | @@ -53,7 +53,7 @@ abstract class Controller extends BaseController |
| 53 | if (!$this->currentUser || !$this->currentUser->can($permissionName)) { | 53 | if (!$this->currentUser || !$this->currentUser->can($permissionName)) { |
| 54 | Session::flash('error', trans('errors.permission')); | 54 | Session::flash('error', trans('errors.permission')); |
| 55 | throw new HttpResponseException( | 55 | throw new HttpResponseException( |
| 56 | - redirect()->back() | 56 | + redirect('/') |
| 57 | ); | 57 | ); |
| 58 | } | 58 | } |
| 59 | 59 | ... | ... |
| ... | @@ -152,6 +152,8 @@ class UserController extends Controller | ... | @@ -152,6 +152,8 @@ class UserController extends Controller |
| 152 | return $this->currentUser->id == $id; | 152 | return $this->currentUser->id == $id; |
| 153 | }); | 153 | }); |
| 154 | $user = $this->user->findOrFail($id); | 154 | $user = $this->user->findOrFail($id); |
| 155 | + // Delete social accounts | ||
| 156 | + $user->socialAccounts()->delete(); | ||
| 155 | $user->delete(); | 157 | $user->delete(); |
| 156 | return redirect('/users'); | 158 | return redirect('/users'); |
| 157 | } | 159 | } | ... | ... |
| ... | @@ -34,8 +34,7 @@ class Authenticate | ... | @@ -34,8 +34,7 @@ class Authenticate |
| 34 | */ | 34 | */ |
| 35 | public function handle($request, Closure $next) | 35 | public function handle($request, Closure $next) |
| 36 | { | 36 | { |
| 37 | - $sitePublic = Setting::get('app-public', false) === 'true'; | 37 | + if ($this->auth->guest() && !Setting::get('app-public')) { |
| 38 | - if ($this->auth->guest() && !$sitePublic) { | ||
| 39 | if ($request->ajax()) { | 38 | if ($request->ajax()) { |
| 40 | return response('Unauthorized.', 401); | 39 | return response('Unauthorized.', 401); |
| 41 | } else { | 40 | } else { | ... | ... |
| ... | @@ -87,6 +87,7 @@ Route::get('/login/service/{socialDriver}/detach', 'Auth\AuthController@detachSo | ... | @@ -87,6 +87,7 @@ Route::get('/login/service/{socialDriver}/detach', 'Auth\AuthController@detachSo |
| 87 | Route::get('/login', 'Auth\AuthController@getLogin'); | 87 | Route::get('/login', 'Auth\AuthController@getLogin'); |
| 88 | Route::post('/login', 'Auth\AuthController@postLogin'); | 88 | Route::post('/login', 'Auth\AuthController@postLogin'); |
| 89 | Route::get('/logout', 'Auth\AuthController@getLogout'); | 89 | Route::get('/logout', 'Auth\AuthController@getLogout'); |
| 90 | +Route::get('/register', 'Auth\AuthController@getRegister'); | ||
| 90 | 91 | ||
| 91 | // Password reset link request routes... | 92 | // Password reset link request routes... |
| 92 | Route::get('/password/email', 'Auth\PasswordController@getEmail'); | 93 | Route::get('/password/email', 'Auth\PasswordController@getEmail'); | ... | ... |
| ... | @@ -7,6 +7,12 @@ use Illuminate\Database\Eloquent\Model; | ... | @@ -7,6 +7,12 @@ use Illuminate\Database\Eloquent\Model; |
| 7 | class Role extends Model | 7 | class Role extends Model |
| 8 | { | 8 | { |
| 9 | /** | 9 | /** |
| 10 | + * Sets the default role name for newly registed users. | ||
| 11 | + * @var string | ||
| 12 | + */ | ||
| 13 | + protected static $default = 'viewer'; | ||
| 14 | + | ||
| 15 | + /** | ||
| 10 | * The roles that belong to the role. | 16 | * The roles that belong to the role. |
| 11 | */ | 17 | */ |
| 12 | public function users() | 18 | public function users() |
| ... | @@ -31,4 +37,12 @@ class Role extends Model | ... | @@ -31,4 +37,12 @@ class Role extends Model |
| 31 | $this->permissions()->attach($permission->id); | 37 | $this->permissions()->attach($permission->id); |
| 32 | } | 38 | } |
| 33 | 39 | ||
| 40 | + /** | ||
| 41 | + * Get an instance of the default role. | ||
| 42 | + * @return Role | ||
| 43 | + */ | ||
| 44 | + public static function getDefault() | ||
| 45 | + { | ||
| 46 | + return static::where('name', '=', static::$default)->first(); | ||
| 47 | + } | ||
| 34 | } | 48 | } | ... | ... |
| ... | @@ -33,7 +33,16 @@ class SettingService | ... | @@ -33,7 +33,16 @@ class SettingService |
| 33 | public function get($key, $default = false) | 33 | public function get($key, $default = false) |
| 34 | { | 34 | { |
| 35 | $setting = $this->getSettingObjectByKey($key); | 35 | $setting = $this->getSettingObjectByKey($key); |
| 36 | - return $setting === null ? $default : $setting->value; | 36 | + $value = $setting === null ? null : $setting->value; |
| 37 | + | ||
| 38 | + // Change string booleans to actual booleans | ||
| 39 | + if($value === 'true') $value = true; | ||
| 40 | + if($value === 'false') $value = false; | ||
| 41 | + | ||
| 42 | + // Set to default if empty | ||
| 43 | + if($value === '') $value = $default; | ||
| 44 | + | ||
| 45 | + return $value === null ? $default : $value; | ||
| 37 | } | 46 | } |
| 38 | 47 | ||
| 39 | /** | 48 | /** | ... | ... |
| ... | @@ -63,8 +63,8 @@ class SocialAuthService | ... | @@ -63,8 +63,8 @@ class SocialAuthService |
| 63 | $isLoggedIn = auth()->check(); | 63 | $isLoggedIn = auth()->check(); |
| 64 | $currentUser = auth()->user(); | 64 | $currentUser = auth()->user(); |
| 65 | 65 | ||
| 66 | - // When a user is not logged in but a matching SocialAccount exists, | 66 | + // When a user is not logged in and a matching SocialAccount exists, |
| 67 | - // Log the user found on the SocialAccount into the application. | 67 | + // Simply log the user into the application. |
| 68 | if (!$isLoggedIn && $socialAccount !== null) { | 68 | if (!$isLoggedIn && $socialAccount !== null) { |
| 69 | return $this->logUserIn($socialAccount->user); | 69 | return $this->logUserIn($socialAccount->user); |
| 70 | } | 70 | } |
| ... | @@ -87,30 +87,16 @@ class SocialAuthService | ... | @@ -87,30 +87,16 @@ class SocialAuthService |
| 87 | // When a user is logged in, A social account exists but the users do not match. | 87 | // When a user is logged in, A social account exists but the users do not match. |
| 88 | // Change the user that the social account is assigned to. | 88 | // Change the user that the social account is assigned to. |
| 89 | if ($isLoggedIn && $socialAccount !== null && $socialAccount->user->id != $currentUser->id) { | 89 | if ($isLoggedIn && $socialAccount !== null && $socialAccount->user->id != $currentUser->id) { |
| 90 | - $socialAccount->user_id = $currentUser->id; | 90 | + \Session::flash('success', 'This ' . title_case($socialDriver) . ' account is already used buy another user.'); |
| 91 | - $socialAccount->save(); | 91 | + return redirect($currentUser->getEditUrl()); |
| 92 | - \Session::flash('success', 'This ' . title_case($socialDriver) . ' account is now attached to your profile.'); | ||
| 93 | } | 92 | } |
| 94 | 93 | ||
| 95 | - if ($user === null) { | 94 | + // Otherwise let the user know this social account is not used by anyone. |
| 96 | - throw new SocialSignInException('A system user with the email ' . $socialUser->getEmail() . | 95 | + $message = 'This ' . $socialDriver . ' account is not linked to any users. Please attach it in your profile settings'; |
| 97 | - ' was not found and this ' . $socialDriver . ' account is not linked to any users.', '/login'); | 96 | + if(\Setting::get('registration-enabled')) { |
| 97 | + $message .= 'or, If you do not yet have an account, You can register an account using the ' . $socialDriver . ' option'; | ||
| 98 | } | 98 | } |
| 99 | - return $this->authenticateUserWithNewSocialAccount($user, $socialUser, $socialUser); | 99 | + throw new SocialSignInException($message . '.', '/login'); |
| 100 | - } | ||
| 101 | - | ||
| 102 | - /** | ||
| 103 | - * Logs a user in and creates a new social account entry for future usage. | ||
| 104 | - * @param User $user | ||
| 105 | - * @param string $socialDriver | ||
| 106 | - * @param \Laravel\Socialite\Contracts\User $socialUser | ||
| 107 | - * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector | ||
| 108 | - */ | ||
| 109 | - private function authenticateUserWithNewSocialAccount($user, $socialDriver, $socialUser) | ||
| 110 | - { | ||
| 111 | - $this->fillSocialAccount($socialDriver, $socialUser); | ||
| 112 | - $user->socialAccounts()->save($this->socialAccount); | ||
| 113 | - return $this->logUserIn($user); | ||
| 114 | } | 100 | } |
| 115 | 101 | ||
| 116 | private function logUserIn($user) | 102 | private function logUserIn($user) | ... | ... |
| ... | @@ -29,6 +29,7 @@ label { | ... | @@ -29,6 +29,7 @@ label { |
| 29 | font-weight: 500; | 29 | font-weight: 500; |
| 30 | color: #666; | 30 | color: #666; |
| 31 | padding-bottom: 2px; | 31 | padding-bottom: 2px; |
| 32 | + margin-bottom: 0.2em; | ||
| 32 | } | 33 | } |
| 33 | 34 | ||
| 34 | label.radio, label.checkbox { | 35 | label.radio, label.checkbox { |
| ... | @@ -38,6 +39,10 @@ label.radio, label.checkbox { | ... | @@ -38,6 +39,10 @@ label.radio, label.checkbox { |
| 38 | } | 39 | } |
| 39 | } | 40 | } |
| 40 | 41 | ||
| 42 | +label + p.small { | ||
| 43 | + margin-bottom: 0.8em; | ||
| 44 | +} | ||
| 45 | + | ||
| 41 | input[type="text"], input[type="number"], input[type="email"], input[type="search"], input[type="url"], input[type="password"], select, textarea { | 46 | input[type="text"], input[type="number"], input[type="email"], input[type="search"], input[type="url"], input[type="password"], select, textarea { |
| 42 | @extend .input-base; | 47 | @extend .input-base; |
| 43 | } | 48 | } | ... | ... |
| ... | @@ -42,9 +42,12 @@ div[class^="col-"] img { | ... | @@ -42,9 +42,12 @@ div[class^="col-"] img { |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | .center-box { | 44 | .center-box { |
| 45 | - margin: 15vh auto 0 auto; | 45 | + margin: $-xl auto 0 auto; |
| 46 | padding: $-m $-xxl $-xl*2 $-xxl; | 46 | padding: $-m $-xxl $-xl*2 $-xxl; |
| 47 | max-width: 346px; | 47 | max-width: 346px; |
| 48 | + display: inline-block; | ||
| 49 | + text-align: left; | ||
| 50 | + vertical-align: top; | ||
| 48 | &.login { | 51 | &.login { |
| 49 | background-color: #EEE; | 52 | background-color: #EEE; |
| 50 | box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1); | 53 | box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1); | ... | ... |
| 1 | @extends('public') | 1 | @extends('public') |
| 2 | 2 | ||
| 3 | +@section('header-buttons') | ||
| 4 | + @if(Setting::get('registration-enabled')) | ||
| 5 | + <a href="/register"><i class="zmdi zmdi-account-add"></i>Sign up</a> | ||
| 6 | + @endif | ||
| 7 | +@stop | ||
| 8 | + | ||
| 3 | @section('content') | 9 | @section('content') |
| 4 | 10 | ||
| 5 | - <div class="center-box"> | 11 | + <div class="text-center"> |
| 6 | - <h1>Log In</h1> | 12 | + <div class="center-box"> |
| 7 | - | 13 | + <h1>Log In</h1> |
| 8 | - <form action="/login" method="POST"> | 14 | + |
| 9 | - {!! csrf_field() !!} | 15 | + <form action="/login" method="POST"> |
| 10 | - | 16 | + {!! csrf_field() !!} |
| 11 | - <div class="form-group"> | 17 | + |
| 12 | - <label for="email">Email</label> | 18 | + <div class="form-group"> |
| 13 | - @include('form/text', ['name' => 'email']) | 19 | + <label for="email">Email</label> |
| 14 | - </div> | 20 | + @include('form/text', ['name' => 'email']) |
| 15 | - | 21 | + </div> |
| 16 | - <div class="form-group"> | 22 | + |
| 17 | - <label for="password">Password</label> | 23 | + <div class="form-group"> |
| 18 | - @include('form/password', ['name' => 'password']) | 24 | + <label for="password">Password</label> |
| 19 | - <span class="block small"><a href="/password/email">Forgot Password?</a></span> | 25 | + @include('form/password', ['name' => 'password']) |
| 20 | - </div> | 26 | + <span class="block small"><a href="/password/email">Forgot Password?</a></span> |
| 21 | - | 27 | + </div> |
| 22 | - <div class="from-group"> | 28 | + |
| 23 | - <button class="button block pos">Sign In</button> | 29 | + <div class="from-group"> |
| 24 | - </div> | 30 | + <button class="button block pos">Sign In</button> |
| 25 | - </form> | 31 | + </div> |
| 26 | - @if(count($socialDrivers) > 0) | 32 | + </form> |
| 27 | - <hr class="margin-top"> | 33 | + |
| 28 | - <h3 class="text-muted">Social Login</h3> | 34 | + @if(count($socialDrivers) > 0) |
| 29 | - @if(isset($socialDrivers['google'])) | 35 | + <hr class="margin-top"> |
| 30 | - <a href="/login/service/google" style="color: #DC4E41;"><i class="zmdi zmdi-google-plus-box zmdi-hc-4x"></i></a> | 36 | + <h3 class="text-muted">Social Login</h3> |
| 31 | - @endif | 37 | + @if(isset($socialDrivers['google'])) |
| 32 | - @if(isset($socialDrivers['github'])) | 38 | + <a href="/login/service/google" style="color: #DC4E41;"><i class="zmdi zmdi-google-plus-box zmdi-hc-4x"></i></a> |
| 33 | - <a href="/login/service/github" style="color:#444;"><i class="zmdi zmdi-github zmdi-hc-4x"></i></a> | 39 | + @endif |
| 40 | + @if(isset($socialDrivers['github'])) | ||
| 41 | + <a href="/login/service/github" style="color:#444;"><i class="zmdi zmdi-github zmdi-hc-4x"></i></a> | ||
| 42 | + @endif | ||
| 34 | @endif | 43 | @endif |
| 35 | - @endif | 44 | + </div> |
| 36 | </div> | 45 | </div> |
| 37 | 46 | ||
| 38 | @stop | 47 | @stop |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
resources/views/auth/register.blade.php
0 → 100644
| 1 | +@extends('public') | ||
| 2 | + | ||
| 3 | +@section('header-buttons') | ||
| 4 | + <a href="/login"><i class="zmdi zmdi-sign-in"></i>Sign in</a> | ||
| 5 | +@stop | ||
| 6 | + | ||
| 7 | +@section('content') | ||
| 8 | + | ||
| 9 | + <div class="text-center"> | ||
| 10 | + <div class="center-box"> | ||
| 11 | + <h1>Register</h1> | ||
| 12 | + | ||
| 13 | + <form action="/login" method="POST"> | ||
| 14 | + {!! csrf_field() !!} | ||
| 15 | + | ||
| 16 | + <div class="form-group"> | ||
| 17 | + <label for="email">Name</label> | ||
| 18 | + @include('form/text', ['name' => 'name']) | ||
| 19 | + </div> | ||
| 20 | + | ||
| 21 | + <div class="form-group"> | ||
| 22 | + <label for="email">Email</label> | ||
| 23 | + @include('form/text', ['name' => 'email']) | ||
| 24 | + </div> | ||
| 25 | + | ||
| 26 | + <div class="form-group"> | ||
| 27 | + <label for="password">Password</label> | ||
| 28 | + @include('form/password', ['name' => 'password']) | ||
| 29 | + </div> | ||
| 30 | + | ||
| 31 | + <div class="from-group"> | ||
| 32 | + <button class="button block pos">Sign In</button> | ||
| 33 | + </div> | ||
| 34 | + </form> | ||
| 35 | + | ||
| 36 | + @if(count($socialDrivers) > 0) | ||
| 37 | + <hr class="margin-top"> | ||
| 38 | + <h3 class="text-muted">Social Registration</h3> | ||
| 39 | + @if(isset($socialDrivers['google'])) | ||
| 40 | + <a href="/register/service/google" style="color: #DC4E41;"><i class="zmdi zmdi-google-plus-box zmdi-hc-4x"></i></a> | ||
| 41 | + @endif | ||
| 42 | + @if(isset($socialDrivers['github'])) | ||
| 43 | + <a href="/register/service/github" style="color:#444;"><i class="zmdi zmdi-github zmdi-hc-4x"></i></a> | ||
| 44 | + @endif | ||
| 45 | + @endif | ||
| 46 | + </div> | ||
| 47 | + </div> | ||
| 48 | + | ||
| 49 | + | ||
| 50 | +@stop |
| 1 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
| 2 | +<html xmlns="http://www.w3.org/1999/xhtml" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> | ||
| 3 | + | ||
| 4 | +<head style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> | ||
| 5 | + <meta name="viewport" content="width=device-width" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;" /> | ||
| 6 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;" /> | ||
| 7 | + <title>Confirm Your Email At {{ Setting::get('app-name')}}</title> | ||
| 8 | + <style style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> | ||
| 9 | + * { | ||
| 10 | + margin: 0; | ||
| 11 | + padding: 0; | ||
| 12 | + font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; | ||
| 13 | + font-size: 100%; | ||
| 14 | + line-height: 1.6; | ||
| 15 | + } | ||
| 16 | + | ||
| 17 | + img { | ||
| 18 | + max-width: 100%; | ||
| 19 | + } | ||
| 20 | + | ||
| 21 | + body { | ||
| 22 | + -webkit-font-smoothing: antialiased; | ||
| 23 | + -webkit-text-size-adjust: none; | ||
| 24 | + width: 100%!important; | ||
| 25 | + height: 100%; | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + a { | ||
| 29 | + color: #348eda; | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + .btn-primary { | ||
| 33 | + text-decoration: none; | ||
| 34 | + color: #FFF; | ||
| 35 | + background-color: #348eda; | ||
| 36 | + border: solid #348eda; | ||
| 37 | + border-width: 10px 20px; | ||
| 38 | + line-height: 2; | ||
| 39 | + font-weight: bold; | ||
| 40 | + margin-right: 10px; | ||
| 41 | + text-align: center; | ||
| 42 | + cursor: pointer; | ||
| 43 | + display: inline-block; | ||
| 44 | + border-radius: 4px; | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + .btn-secondary { | ||
| 48 | + text-decoration: none; | ||
| 49 | + color: #FFF; | ||
| 50 | + background-color: #aaa; | ||
| 51 | + border: solid #aaa; | ||
| 52 | + border-width: 10px 20px; | ||
| 53 | + line-height: 2; | ||
| 54 | + font-weight: bold; | ||
| 55 | + margin-right: 10px; | ||
| 56 | + text-align: center; | ||
| 57 | + cursor: pointer; | ||
| 58 | + display: inline-block; | ||
| 59 | + border-radius: 25px; | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + .last { | ||
| 63 | + margin-bottom: 0; | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + .first { | ||
| 67 | + margin-top: 0; | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + .padding { | ||
| 71 | + padding: 10px 0; | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + table.body-wrap { | ||
| 75 | + width: 100%; | ||
| 76 | + padding: 20px; | ||
| 77 | + } | ||
| 78 | + | ||
| 79 | + table.body-wrap .container { | ||
| 80 | + border: 1px solid #f0f0f0; | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + h1, | ||
| 84 | + h2, | ||
| 85 | + h3 { | ||
| 86 | + font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; | ||
| 87 | + color: #444; | ||
| 88 | + margin: 10px 0 10px; | ||
| 89 | + line-height: 1.2; | ||
| 90 | + font-weight: 200; | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + h1 { | ||
| 94 | + font-size: 36px; | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + h2 { | ||
| 98 | + font-size: 28px; | ||
| 99 | + } | ||
| 100 | + | ||
| 101 | + h3 { | ||
| 102 | + font-size: 22px; | ||
| 103 | + } | ||
| 104 | + | ||
| 105 | + p, | ||
| 106 | + ul, | ||
| 107 | + ol { | ||
| 108 | + margin-bottom: 10px; | ||
| 109 | + font-weight: normal; | ||
| 110 | + font-size: 14px; | ||
| 111 | + color: #888888; | ||
| 112 | + } | ||
| 113 | + | ||
| 114 | + ul li, | ||
| 115 | + ol li { | ||
| 116 | + margin-left: 5px; | ||
| 117 | + list-style-position: inside; | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + .container { | ||
| 121 | + display: block!important; | ||
| 122 | + max-width: 600px!important; | ||
| 123 | + margin: 0 auto!important; | ||
| 124 | + clear: both!important; | ||
| 125 | + } | ||
| 126 | + | ||
| 127 | + .body-wrap .container { | ||
| 128 | + padding: 20px; | ||
| 129 | + } | ||
| 130 | + | ||
| 131 | + .content { | ||
| 132 | + max-width: 600px; | ||
| 133 | + margin: 0 auto; | ||
| 134 | + display: block; | ||
| 135 | + } | ||
| 136 | + | ||
| 137 | + .content table { | ||
| 138 | + width: 100%; | ||
| 139 | + } | ||
| 140 | + </style> | ||
| 141 | + </head> | ||
| 142 | + | ||
| 143 | + <body bgcolor="#f6f6f6" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:none;width:100%!important;height:100%;"> | ||
| 144 | + <!-- body --> | ||
| 145 | + <table class="body-wrap" bgcolor="#f6f6f6" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;width:100%;padding-top:20px;padding-bottom:20px;padding-right:20px;padding-left:20px;"> | ||
| 146 | + <tr style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> | ||
| 147 | + <td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"></td> | ||
| 148 | + <td class="container" bgcolor="#FFFFFF" style="font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;display:block!important;max-width:600px!important;margin-top:0 !important;margin-bottom:0 !important;margin-right:auto !important;margin-left:auto !important;clear:both!important;padding-top:20px;padding-bottom:20px;padding-right:20px;padding-left:20px;border-width:1px;border-style:solid;border-color:#f0f0f0;"> | ||
| 149 | + <!-- content --> | ||
| 150 | + <div class="content" style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;max-width:600px;margin-top:0;margin-bottom:0;margin-right:auto;margin-left:auto;display:block;"> | ||
| 151 | + <table style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;width:100%;"> | ||
| 152 | + <tr style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> | ||
| 153 | + <td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> | ||
| 154 | + <h1 style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;color:#444;margin-top:10px;margin-bottom:10px;margin-right:0;margin-left:0;line-height:1.2;font-weight:200;font-size:36px;">Email Confirmation</h1> | ||
| 155 | + <p style="margin-top:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;line-height:1.6;margin-bottom:10px;font-weight:normal;font-size:14px;color:#888888;">Thank's for joining <a href="{{ url('/') }}">{{ Setting::get('app-name')}}</a>. <br /> | ||
| 156 | + Please confirm your email address by clicking the button below.</p> | ||
| 157 | + <table style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;width:100%;"> | ||
| 158 | + <tr style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> | ||
| 159 | + <td class="padding" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;padding-top:10px;padding-bottom:10px;padding-right:0;padding-left:0;"> | ||
| 160 | + <p style="margin-top:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;line-height:1.6;margin-bottom:10px;font-weight:normal;font-size:14px;color:#888888;"><a class="btn-primary" href="{{ url('user/confirm/'.$token) }}" style="margin-top:0;margin-bottom:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;text-decoration:none;color:#FFF;background-color:#348eda;border-style:solid;border-color:#348eda;border-width:10px 20px;line-height:2;font-weight:bold;margin-right:10px;text-align:center;cursor:pointer;display:inline-block;border-radius:4px;">Confirm Email</a></p> | ||
| 161 | + </td> | ||
| 162 | + </tr> | ||
| 163 | + </table> | ||
| 164 | + </td> | ||
| 165 | + </tr> | ||
| 166 | + </table> | ||
| 167 | + </div> | ||
| 168 | + <!-- /content --> | ||
| 169 | + </td> | ||
| 170 | + <td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"></td> | ||
| 171 | + </tr> | ||
| 172 | + </table> | ||
| 173 | + <!-- /body --> | ||
| 174 | + </body> | ||
| 175 | + | ||
| 176 | + </html> |
| 1 | -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
| 2 | -<html xmlns="http://www.w3.org/1999/xhtml" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;" > | ||
| 3 | -<head style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;" > | ||
| 4 | - <meta name="viewport" content="width=device-width" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;" /> | ||
| 5 | - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;" /> | ||
| 6 | - <title>Password Reset</title> | ||
| 7 | - <style style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;" > | ||
| 8 | - | ||
| 9 | - * { | ||
| 10 | - margin: 0; | ||
| 11 | - padding: 0; | ||
| 12 | - font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; | ||
| 13 | - font-size: 100%; | ||
| 14 | - line-height: 1.6; | ||
| 15 | - } | ||
| 16 | - | ||
| 17 | - img { | ||
| 18 | - max-width: 100%; | ||
| 19 | - } | ||
| 20 | - | ||
| 21 | - body { | ||
| 22 | - -webkit-font-smoothing: antialiased; | ||
| 23 | - -webkit-text-size-adjust: none; | ||
| 24 | - width: 100%!important; | ||
| 25 | - height: 100%; | ||
| 26 | - } | ||
| 27 | - | ||
| 28 | - | ||
| 29 | - | ||
| 30 | - a { | ||
| 31 | - color: #348eda; | ||
| 32 | - } | ||
| 33 | - | ||
| 34 | - .btn-primary { | ||
| 35 | - text-decoration: none; | ||
| 36 | - color: #FFF; | ||
| 37 | - background-color: #348eda; | ||
| 38 | - border: solid #348eda; | ||
| 39 | - border-width: 10px 20px; | ||
| 40 | - line-height: 2; | ||
| 41 | - font-weight: bold; | ||
| 42 | - margin-right: 10px; | ||
| 43 | - text-align: center; | ||
| 44 | - cursor: pointer; | ||
| 45 | - display: inline-block; | ||
| 46 | - border-radius: 4px; | ||
| 47 | - } | ||
| 48 | - | ||
| 49 | - .btn-secondary { | ||
| 50 | - text-decoration: none; | ||
| 51 | - color: #FFF; | ||
| 52 | - background-color: #aaa; | ||
| 53 | - border: solid #aaa; | ||
| 54 | - border-width: 10px 20px; | ||
| 55 | - line-height: 2; | ||
| 56 | - font-weight: bold; | ||
| 57 | - margin-right: 10px; | ||
| 58 | - text-align: center; | ||
| 59 | - cursor: pointer; | ||
| 60 | - display: inline-block; | ||
| 61 | - border-radius: 25px; | ||
| 62 | - } | ||
| 63 | - | ||
| 64 | - .last { | ||
| 65 | - margin-bottom: 0; | ||
| 66 | - } | ||
| 67 | - | ||
| 68 | - .first { | ||
| 69 | - margin-top: 0; | ||
| 70 | - } | ||
| 71 | - | ||
| 72 | - .padding { | ||
| 73 | - padding: 10px 0; | ||
| 74 | - } | ||
| 75 | - | ||
| 76 | - | ||
| 77 | - | ||
| 78 | - table.body-wrap { | ||
| 79 | - width: 100%; | ||
| 80 | - padding: 20px; | ||
| 81 | - } | ||
| 82 | - | ||
| 83 | - table.body-wrap .container { | ||
| 84 | - border: 1px solid #f0f0f0; | ||
| 85 | - } | ||
| 86 | - | ||
| 87 | - | ||
| 88 | - | ||
| 89 | - | ||
| 90 | - h1, h2, h3 { | ||
| 91 | - font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; | ||
| 92 | - color: #444; | ||
| 93 | - margin: 10px 0 10px; | ||
| 94 | - line-height: 1.2; | ||
| 95 | - font-weight: 200; | ||
| 96 | - } | ||
| 97 | - | ||
| 98 | - h1 { | ||
| 99 | - font-size: 36px; | ||
| 100 | - } | ||
| 101 | - h2 { | ||
| 102 | - font-size: 28px; | ||
| 103 | - } | ||
| 104 | - h3 { | ||
| 105 | - font-size: 22px; | ||
| 106 | - } | ||
| 107 | - | ||
| 108 | - p, ul, ol { | ||
| 109 | - margin-bottom: 10px; | ||
| 110 | - font-weight: normal; | ||
| 111 | - font-size: 14px; | ||
| 112 | - color: #888888; | ||
| 113 | - } | ||
| 114 | - | ||
| 115 | - ul li, ol li { | ||
| 116 | - margin-left: 5px; | ||
| 117 | - list-style-position: inside; | ||
| 118 | - } | ||
| 119 | - | ||
| 120 | - | ||
| 121 | - | ||
| 122 | - | ||
| 123 | - .container { | ||
| 124 | - display: block!important; | ||
| 125 | - max-width: 600px!important; | ||
| 126 | - margin: 0 auto!important; | ||
| 127 | - clear: both!important; | ||
| 128 | - } | ||
| 129 | - | ||
| 130 | - | ||
| 131 | - .body-wrap .container { | ||
| 132 | - padding: 20px; | ||
| 133 | - } | ||
| 134 | - | ||
| 135 | - | ||
| 136 | - .content { | ||
| 137 | - max-width: 600px; | ||
| 138 | - margin: 0 auto; | ||
| 139 | - display: block; | ||
| 140 | - } | ||
| 141 | - | ||
| 142 | - | ||
| 143 | - .content table { | ||
| 144 | - width: 100%; | ||
| 145 | - } | ||
| 146 | - | ||
| 147 | - </style> | ||
| 148 | - </head> | ||
| 149 | - | ||
| 150 | - <body bgcolor="#f6f6f6" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:none;width:100%!important;height:100%;" > | ||
| 151 | - | ||
| 152 | - <!-- body --> | ||
| 153 | - <table class="body-wrap" bgcolor="#f6f6f6" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;width:100%;padding-top:20px;padding-bottom:20px;padding-right:20px;padding-left:20px;" > | ||
| 154 | - <tr style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;" > | ||
| 155 | - <td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;" ></td> | ||
| 156 | - <td class="container" bgcolor="#FFFFFF" style="font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;display:block!important;max-width:600px!important;margin-top:0 !important;margin-bottom:0 !important;margin-right:auto !important;margin-left:auto !important;clear:both!important;padding-top:20px;padding-bottom:20px;padding-right:20px;padding-left:20px;border-width:1px;border-style:solid;border-color:#f0f0f0;" > | ||
| 157 | - | ||
| 158 | - <!-- content --> | ||
| 159 | - <div class="content" style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;max-width:600px;margin-top:0;margin-bottom:0;margin-right:auto;margin-left:auto;display:block;" > | ||
| 160 | - <table style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;width:100%;" > | ||
| 161 | - <tr style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;" > | ||
| 162 | - <td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;" > | ||
| 163 | - <h1 style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;color:#444;margin-top:10px;margin-bottom:10px;margin-right:0;margin-left:0;line-height:1.2;font-weight:200;font-size:36px;" >Password Reset</h1> | ||
| 164 | - <p style="margin-top:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;line-height:1.6;margin-bottom:10px;font-weight:normal;font-size:14px;color:#888888;" >A password reset was requested for this email address on the application found at {{url('/')}}. If you did not request a password change please ignore this email.</p> | ||
| 165 | - <table style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;width:100%;" > | ||
| 166 | - <tr style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;" > | ||
| 167 | - <td class="padding" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;padding-top:10px;padding-bottom:10px;padding-right:0;padding-left:0;" > | ||
| 168 | - <p style="margin-top:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;line-height:1.6;margin-bottom:10px;font-weight:normal;font-size:14px;color:#888888;" ><a class="btn-primary" href="{{ url('password/reset/'.$token) }}" style="margin-top:0;margin-bottom:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;text-decoration:none;color:#FFF;background-color:#348eda;border-style:solid;border-color:#348eda;border-width:10px 20px;line-height:2;font-weight:bold;margin-right:10px;text-align:center;cursor:pointer;display:inline-block;border-radius:4px;" >Click here to reset your password</a></p> | ||
| 169 | - </td> | ||
| 170 | - </tr> | ||
| 171 | - </table> | ||
| 172 | - </td> | ||
| 173 | - </tr> | ||
| 174 | - </table> | ||
| 175 | - </div> | ||
| 176 | - <!-- /content --> | ||
| 177 | - | ||
| 178 | - </td> | ||
| 179 | - <td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;" ></td> | ||
| 180 | - </tr> | ||
| 181 | - </table> | ||
| 182 | - <!-- /body --> | ||
| 183 | - | ||
| 184 | - | ||
| 185 | - </body> | ||
| 186 | - </html> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> <head style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> <meta name="viewport" content="width=device-width" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;" /> <title>Password Reset From {{ Setting::get('app-name')}}</title> <style style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> * { margin: 0; padding: 0; font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; font-size: 100%; line-height: 1.6; } img { max-width: 100%; } body { -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100%!important; height: 100%; } a { color: #348eda; } .btn-primary { text-decoration: none; color: #FFF; background-color: #348eda; border: solid #348eda; border-width: 10px 20px; line-height: 2; font-weight: bold; margin-right: 10px; text-align: center; cursor: pointer; display: inline-block; border-radius: 4px; } .btn-secondary { text-decoration: none; color: #FFF; background-color: #aaa; border: solid #aaa; border-width: 10px 20px; line-height: 2; font-weight: bold; margin-right: 10px; text-align: center; cursor: pointer; display: inline-block; border-radius: 25px; } .last { margin-bottom: 0; } .first { margin-top: 0; } .padding { padding: 10px 0; } table.body-wrap { width: 100%; padding: 20px; } table.body-wrap .container { border: 1px solid #f0f0f0; } h1, h2, h3 { font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; color: #444; margin: 10px 0 10px; line-height: 1.2; font-weight: 200; } h1 { font-size: 36px; } h2 { font-size: 28px; } h3 { font-size: 22px; } p, ul, ol { margin-bottom: 10px; font-weight: normal; font-size: 14px; color: #888888; } ul li, ol li { margin-left: 5px; list-style-position: inside; } .container { display: block!important; max-width: 600px!important; margin: 0 auto!important; clear: both!important; } .body-wrap .container { padding: 20px; } .content { max-width: 600px; margin: 0 auto; display: block; } .content table { width: 100%; } </style> </head> <body bgcolor="#f6f6f6" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:none;width:100%!important;height:100%;"> <!-- body --> <table class="body-wrap" bgcolor="#f6f6f6" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;width:100%;padding-top:20px;padding-bottom:20px;padding-right:20px;padding-left:20px;"> <tr style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> <td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"></td> <td class="container" bgcolor="#FFFFFF" style="font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;display:block!important;max-width:600px!important;margin-top:0 !important;margin-bottom:0 !important;margin-right:auto !important;margin-left:auto !important;clear:both!important;padding-top:20px;padding-bottom:20px;padding-right:20px;padding-left:20px;border-width:1px;border-style:solid;border-color:#f0f0f0;"> <!-- content --> <div class="content" style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;max-width:600px;margin-top:0;margin-bottom:0;margin-right:auto;margin-left:auto;display:block;"> <table style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;width:100%;"> <tr style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> <td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> <h1 style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;color:#444;margin-top:10px;margin-bottom:10px;margin-right:0;margin-left:0;line-height:1.2;font-weight:200;font-size:36px;">Password Reset</h1> <p style="margin-top:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;line-height:1.6;margin-bottom:10px;font-weight:normal;font-size:14px;color:#888888;">A password reset was requested for this email address on <a href="{{ url('/') }}">{{ Setting::get('app-name')}}</a>. If you did not request a password change please ignore this email.</p> <table style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;width:100%;"> <tr style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"> <td class="padding" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;padding-top:10px;padding-bottom:10px;padding-right:0;padding-left:0;"> <p style="margin-top:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;line-height:1.6;margin-bottom:10px;font-weight:normal;font-size:14px;color:#888888;"><a class="btn-primary" href="{{ url('password/reset/'.$token) }}" style="margin-top:0;margin-bottom:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;text-decoration:none;color:#FFF;background-color:#348eda;border-style:solid;border-color:#348eda;border-width:10px 20px;line-height:2;font-weight:bold;margin-right:10px;text-align:center;cursor:pointer;display:inline-block;border-radius:4px;">Click here to reset your password</a></p> </td> </tr> </table> </td> </tr> </table> </div> <!-- /content --> </td> <td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-size:100%;line-height:1.6;"></td> </tr> </table> <!-- /body --> </body> </html> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -5,7 +5,7 @@ | ... | @@ -5,7 +5,7 @@ |
| 5 | @if($errors->has($name)) class="neg" @endif | 5 | @if($errors->has($name)) class="neg" @endif |
| 6 | @if(isset($model) || old($name)) @if(old($name) && old($name) === $option->id) selected @elseif(isset($model) && $model->role->id === $option->id) selected @endif @endif | 6 | @if(isset($model) || old($name)) @if(old($name) && old($name) === $option->id) selected @elseif(isset($model) && $model->role->id === $option->id) selected @endif @endif |
| 7 | > | 7 | > |
| 8 | - {{ $option->$displayKey }} | 8 | + {{ $option->display_name }} |
| 9 | </option> | 9 | </option> |
| 10 | @endforeach | 10 | @endforeach |
| 11 | </select> | 11 | </select> | ... | ... |
| ... | @@ -26,6 +26,23 @@ | ... | @@ -26,6 +26,23 @@ |
| 26 | </div> | 26 | </div> |
| 27 | @endif | 27 | @endif |
| 28 | 28 | ||
| 29 | +<header id="header"> | ||
| 30 | + <div class="container"> | ||
| 31 | + <div class="row"> | ||
| 32 | + <div class="col-md-6"> | ||
| 33 | + <a href="/" class="logo">{{ Setting::get('app-name', 'BookStack') }}</a> | ||
| 34 | + </div> | ||
| 35 | + <div class="col-md-6"> | ||
| 36 | + <div class="float right"> | ||
| 37 | + <div class="links text-center"> | ||
| 38 | + @yield('header-buttons') | ||
| 39 | + </div> | ||
| 40 | + </div> | ||
| 41 | + </div> | ||
| 42 | + </div> | ||
| 43 | + </div> | ||
| 44 | +</header> | ||
| 45 | + | ||
| 29 | <section class="container"> | 46 | <section class="container"> |
| 30 | @yield('content') | 47 | @yield('content') |
| 31 | </section> | 48 | </section> | ... | ... |
| ... | @@ -10,17 +10,61 @@ | ... | @@ -10,17 +10,61 @@ |
| 10 | 10 | ||
| 11 | <form action="/settings" method="POST"> | 11 | <form action="/settings" method="POST"> |
| 12 | {!! csrf_field() !!} | 12 | {!! csrf_field() !!} |
| 13 | + | ||
| 14 | + <h3>App Settings</h3> | ||
| 13 | <div class="form-group"> | 15 | <div class="form-group"> |
| 14 | - <label for="setting-app-name">Application Name</label> | 16 | + <label for="setting-app-name">Application name</label> |
| 15 | <input type="text" value="{{ Setting::get('app-name', 'BookStack') }}" name="setting-app-name" id="setting-app-name"> | 17 | <input type="text" value="{{ Setting::get('app-name', 'BookStack') }}" name="setting-app-name" id="setting-app-name"> |
| 16 | </div> | 18 | </div> |
| 17 | <div class="form-group"> | 19 | <div class="form-group"> |
| 18 | <label for="setting-app-public">Allow public viewing?</label> | 20 | <label for="setting-app-public">Allow public viewing?</label> |
| 19 | - <label><input type="radio" name="setting-app-public" @if(Setting::get('app-public') == 'true') checked @endif value="true"> Yes</label> | 21 | + <label><input type="radio" name="setting-app-public" @if(Setting::get('app-public')) checked @endif value="true"> Yes</label> |
| 20 | - <label><input type="radio" name="setting-app-public" @if(Setting::get('app-public') == 'false') checked @endif value="false"> No</label> | 22 | + <label><input type="radio" name="setting-app-public" @if(!Setting::get('app-public')) checked @endif value="false"> No</label> |
| 23 | + </div> | ||
| 24 | + | ||
| 25 | + <hr class="margin-top"> | ||
| 26 | + | ||
| 27 | + <h3>Registration Settings</h3> | ||
| 28 | + <div class="row"> | ||
| 29 | + <div class="col-md-6"> | ||
| 30 | + <div class="form-group"> | ||
| 31 | + <label for="setting-registration-enabled">Allow registration?</label> | ||
| 32 | + <label><input type="radio" name="setting-registration-enabled" @if(Setting::get('registration-enabled')) checked @endif value="true"> Yes</label> | ||
| 33 | + <label><input type="radio" name="setting-registration-enabled" @if(!Setting::get('registration-enabled')) checked @endif value="false"> No</label> | ||
| 34 | + </div> | ||
| 35 | + <div class="form-group"> | ||
| 36 | + <label for="setting-registration-role">Default user role after registration</label> | ||
| 37 | + <select id="setting-registration-role" name="setting-registration-role" @if($errors->has('setting-registration-role')) class="neg" @endif> | ||
| 38 | + @foreach(\Oxbow\Role::all() as $role) | ||
| 39 | + <option value="{{$role->id}}" | ||
| 40 | + @if(\Setting::get('registration-role', \Oxbow\Role::getDefault()->id) == $role->id) selected @endif | ||
| 41 | + > | ||
| 42 | + {{ $role->display_name }} | ||
| 43 | + </option> | ||
| 44 | + @endforeach | ||
| 45 | + </select> | ||
| 46 | + </div> | ||
| 47 | + <div class="form-group"> | ||
| 48 | + <label for="setting-registration-confirmation">Require Email Confirmation?</label> | ||
| 49 | + <p class="small">If domain restriction is used then email confirmation will be required and the below value will be ignored.</p> | ||
| 50 | + <label><input type="radio" name="setting-registration-confirmation" @if(Setting::get('registration-confirmation')) checked @endif value="true"> Yes</label> | ||
| 51 | + <label><input type="radio" name="setting-registration-confirmation" @if(!Setting::get('registration-confirmation')) checked @endif value="false"> No</label> | ||
| 52 | + </div> | ||
| 53 | + </div> | ||
| 54 | + <div class="col-md-6"> | ||
| 55 | + <div class="form-group"> | ||
| 56 | + <label for="setting-registration-restrict">Restrict registration to domain</label> | ||
| 57 | + <p class="small">Enter a comma separated list of email domains you would like to restrict registration to. Users will be sent an email to confirm their address before being allowed to interact with the application. | ||
| 58 | + <br> Note that users will be able to change their email addresses after successful registration.</p> | ||
| 59 | + <input type="text" id="setting-registration-restrict" name="setting-registration-restrict" placeholder="No restriction set" value="{{ Setting::get('registration-restrict', '') }}"> | ||
| 60 | + </div> | ||
| 61 | + </div> | ||
| 21 | </div> | 62 | </div> |
| 63 | + | ||
| 64 | + <hr class="margin-top"> | ||
| 65 | + | ||
| 22 | <div class="form-group"> | 66 | <div class="form-group"> |
| 23 | - <button type="submit" class="button pos">Update Settings</button> | 67 | + <button type="submit" class="button pos">Save Settings</button> |
| 24 | </div> | 68 | </div> |
| 25 | </form> | 69 | </form> |
| 26 | 70 | ... | ... |
-
Please register or sign in to post a comment