]> BookStack Code Mirror - bookstack/commitdiff
Started social registration
authorDan Brown <redacted>
Sat, 5 Sep 2015 16:42:05 +0000 (17:42 +0100)
committerDan Brown <redacted>
Sat, 5 Sep 2015 16:42:05 +0000 (17:42 +0100)
17 files changed:
app/Http/Controllers/Auth/AuthController.php
app/Http/Controllers/Controller.php
app/Http/Controllers/UserController.php
app/Http/Middleware/Authenticate.php
app/Http/routes.php
app/Role.php
app/Services/SettingService.php
app/Services/SocialAuthService.php
resources/assets/sass/_forms.scss
resources/assets/sass/_grid.scss
resources/views/auth/login.blade.php
resources/views/auth/register.blade.php [new file with mode: 0644]
resources/views/emails/email-confirmation.blade.php [new file with mode: 0644]
resources/views/emails/password.blade.php
resources/views/form/role-select.blade.php
resources/views/public.blade.php
resources/views/settings/index.blade.php

index a65710cde0ee19bd07c84836e4d463c06d83deb4..f290aeabbea5bd914dcb01bbda866b59303da96d 100644 (file)
@@ -37,7 +37,7 @@ class AuthController extends Controller
      */
     public function __construct(SocialAuthService $socialAuthService)
     {
-        $this->middleware('guest', ['only' => ['getLogin', 'postLogin']]);
+        $this->middleware('guest', ['only' => ['getLogin', 'postLogin', 'getRegister']]);
         $this->socialAuthService = $socialAuthService;
     }
 
@@ -71,6 +71,17 @@ class AuthController extends Controller
         ]);
     }
 
+    /**
+     * Show the application registration form.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function getRegister()
+    {
+        $socialDrivers = $this->socialAuthService->getActiveDrivers();
+        return view('auth.register', ['socialDrivers' => $socialDrivers]);
+    }
+
     /**
      * Show the application login form.
      *
@@ -84,7 +95,6 @@ class AuthController extends Controller
         }
 
         $socialDrivers = $this->socialAuthService->getActiveDrivers();
-
         return view('auth.login', ['socialDrivers' => $socialDrivers]);
     }
 
index 80c4c5526f4a5b37a519345efecc37375462413d..13859fed4281b7addf5f2907470ed89ff8d6c1fb 100644 (file)
@@ -31,12 +31,12 @@ abstract class Controller extends BaseController
     {
         // Get a user instance for the current user
         $user = auth()->user();
-        if (!$user) {
-            $user = User::getDefault();
-        }
+        if (!$user) $user = User::getDefault();
+
         // Share variables with views
         view()->share('signedIn', auth()->check());
         view()->share('currentUser', $user);
+
         // Share variables with controllers
         $this->currentUser = $user;
         $this->signedIn = auth()->check();
@@ -53,7 +53,7 @@ abstract class Controller extends BaseController
         if (!$this->currentUser || !$this->currentUser->can($permissionName)) {
             Session::flash('error', trans('errors.permission'));
             throw new HttpResponseException(
-                redirect()->back()
+                redirect('/')
             );
         }
 
index 306641e71de4caa432206b42459ebeee23f70112..f6a8d13e3c23d7672c8176235242cc68337a7c1a 100644 (file)
@@ -152,6 +152,8 @@ class UserController extends Controller
             return $this->currentUser->id == $id;
         });
         $user = $this->user->findOrFail($id);
+        // Delete social accounts
+        $user->socialAccounts()->delete();
         $user->delete();
         return redirect('/users');
     }
index 58b25ee3fc4cdaf84902dc9faf34e3a42e8734ee..f0b2f7eda82e5752d6b48131c396a75826399c47 100644 (file)
@@ -34,8 +34,7 @@ class Authenticate
      */
     public function handle($request, Closure $next)
     {
-        $sitePublic = Setting::get('app-public', false) === 'true';
-        if ($this->auth->guest() && !$sitePublic) {
+        if ($this->auth->guest() && !Setting::get('app-public')) {
             if ($request->ajax()) {
                 return response('Unauthorized.', 401);
             } else {
index 97908ff4842aab4a6d2bad9253d149ece65a9e18..be7ac8736156d5ef428f5bd413b675f674547b75 100644 (file)
@@ -87,6 +87,7 @@ Route::get('/login/service/{socialDriver}/detach', 'Auth\AuthController@detachSo
 Route::get('/login', 'Auth\AuthController@getLogin');
 Route::post('/login', 'Auth\AuthController@postLogin');
 Route::get('/logout', 'Auth\AuthController@getLogout');
+Route::get('/register', 'Auth\AuthController@getRegister');
 
 // Password reset link request routes...
 Route::get('/password/email', 'Auth\PasswordController@getEmail');
index dd955863e72f3376afb8dad99abd1190f91fa499..d35b349a8d0b56917cdbff55f2f00c005a3f863e 100644 (file)
@@ -6,6 +6,12 @@ use Illuminate\Database\Eloquent\Model;
 
 class Role extends Model
 {
+    /**
+     * Sets the default role name for newly registed users.
+     * @var string
+     */
+    protected static $default = 'viewer';
+
     /**
      * The roles that belong to the role.
      */
@@ -31,4 +37,12 @@ class Role extends Model
         $this->permissions()->attach($permission->id);
     }
 
+    /**
+     * Get an instance of the default role.
+     * @return Role
+     */
+    public static function getDefault()
+    {
+        return static::where('name', '=', static::$default)->first();
+    }
 }
index 46c802a05763999108cc0e2c45656b7d6e58e797..b7215f5241f69832b3106488ca8a4d827bad7227 100644 (file)
@@ -33,7 +33,16 @@ class SettingService
     public function get($key, $default = false)
     {
         $setting = $this->getSettingObjectByKey($key);
-        return $setting === null ? $default : $setting->value;
+        $value = $setting === null ? null : $setting->value;
+
+        // Change string booleans to actual booleans
+        if($value === 'true') $value = true;
+        if($value === 'false') $value = false;
+
+        // Set to default if empty
+        if($value === '') $value = $default;
+
+        return $value === null ? $default : $value;
     }
 
     /**
index fda39819ddb17cc266a49a99dac5df864360de4e..f76a339b4d671bf7673be55900d0599940d8eba3 100644 (file)
@@ -63,8 +63,8 @@ class SocialAuthService
         $isLoggedIn = auth()->check();
         $currentUser = auth()->user();
 
-        // When a user is not logged in but a matching SocialAccount exists,
-        // Log the user found on the SocialAccount into the application.
+        // When a user is not logged in and a matching SocialAccount exists,
+        // Simply log the user into the application.
         if (!$isLoggedIn && $socialAccount !== null) {
             return $this->logUserIn($socialAccount->user);
         }
@@ -87,30 +87,16 @@ class SocialAuthService
         // When a user is logged in, A social account exists but the users do not match.
         // Change the user that the social account is assigned to.
         if ($isLoggedIn && $socialAccount !== null && $socialAccount->user->id != $currentUser->id) {
-            $socialAccount->user_id = $currentUser->id;
-            $socialAccount->save();
-            \Session::flash('success', 'This ' . title_case($socialDriver) . ' account is now attached to your profile.');
+            \Session::flash('success', 'This ' . title_case($socialDriver) . ' account is already used buy another user.');
+            return redirect($currentUser->getEditUrl());
         }
 
-        if ($user === null) {
-            throw new SocialSignInException('A system user with the email ' . $socialUser->getEmail() .
-                ' was not found and this ' . $socialDriver . ' account is not linked to any users.', '/login');
+        // Otherwise let the user know this social account is not used by anyone.
+        $message = 'This ' . $socialDriver . ' account is not linked to any users. Please attach it in your profile settings';
+        if(\Setting::get('registration-enabled')) {
+            $message .= 'or, If you do not yet have an account, You can register an account using the ' . $socialDriver . ' option';
         }
-        return $this->authenticateUserWithNewSocialAccount($user, $socialUser, $socialUser);
-    }
-
-    /**
-     * Logs a user in and creates a new social account entry for future usage.
-     * @param User                              $user
-     * @param string                            $socialDriver
-     * @param \Laravel\Socialite\Contracts\User $socialUser
-     * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
-     */
-    private function authenticateUserWithNewSocialAccount($user, $socialDriver, $socialUser)
-    {
-        $this->fillSocialAccount($socialDriver, $socialUser);
-        $user->socialAccounts()->save($this->socialAccount);
-        return $this->logUserIn($user);
+        throw new SocialSignInException($message . '.', '/login');
     }
 
     private function logUserIn($user)
index 59ce23da98bf86f9326b97feb8c75eb2dd7f6e4f..825793e4891b1146076c76c3d67372e11b6cdfd1 100644 (file)
@@ -29,6 +29,7 @@ label {
   font-weight: 500;
   color: #666;
   padding-bottom: 2px;
+  margin-bottom: 0.2em;
 }
 
 label.radio, label.checkbox {
@@ -38,6 +39,10 @@ label.radio, label.checkbox {
   }
 }
 
+label + p.small {
+  margin-bottom: 0.8em;
+}
+
 input[type="text"], input[type="number"], input[type="email"], input[type="search"], input[type="url"], input[type="password"], select, textarea {
   @extend .input-base;
 }
index 76ee7c59181c1d1f187a65ecb571463436466feb..4532cca6f975de1cb2fa958f0acd56f3fb9bef69 100644 (file)
@@ -42,9 +42,12 @@ div[class^="col-"] img {
 }
 
 .center-box {
-  margin: 15vh auto 0 auto;
+  margin: $-xl auto 0 auto;
   padding: $-m $-xxl $-xl*2 $-xxl;
   max-width: 346px;
+  display: inline-block;
+  text-align: left;
+  vertical-align: top;
   &.login {
     background-color: #EEE;
     box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1);
index ee5164cd70f244a7cc9e380cf99336045c4552c3..2bbf859d66df5adce273365560129e665967c8bb 100644 (file)
@@ -1,38 +1,47 @@
 @extends('public')
 
+@section('header-buttons')
+    @if(Setting::get('registration-enabled'))
+        <a href="/register"><i class="zmdi zmdi-account-add"></i>Sign up</a>
+    @endif
+@stop
+
 @section('content')
 
-    <div class="center-box">
-        <h1>Log In</h1>
-
-        <form action="/login" method="POST">
-            {!! csrf_field() !!}
-
-            <div class="form-group">
-                <label for="email">Email</label>
-                @include('form/text', ['name' => 'email'])
-            </div>
-
-            <div class="form-group">
-                <label for="password">Password</label>
-                @include('form/password', ['name' => 'password'])
-                <span class="block small"><a href="/password/email">Forgot Password?</a></span>
-            </div>
-
-            <div class="from-group">
-                <button class="button block pos">Sign In</button>
-            </div>
-        </form>
-        @if(count($socialDrivers) > 0)
-            <hr class="margin-top">
-            <h3 class="text-muted">Social Login</h3>
-            @if(isset($socialDrivers['google']))
-                <a href="/login/service/google" style="color: #DC4E41;"><i class="zmdi zmdi-google-plus-box zmdi-hc-4x"></i></a>
-            @endif
-            @if(isset($socialDrivers['github']))
-                <a href="/login/service/github" style="color:#444;"><i class="zmdi zmdi-github zmdi-hc-4x"></i></a>
+    <div class="text-center">
+        <div class="center-box">
+            <h1>Log In</h1>
+
+            <form action="/login" method="POST">
+                {!! csrf_field() !!}
+
+                <div class="form-group">
+                    <label for="email">Email</label>
+                    @include('form/text', ['name' => 'email'])
+                </div>
+
+                <div class="form-group">
+                    <label for="password">Password</label>
+                    @include('form/password', ['name' => 'password'])
+                    <span class="block small"><a href="/password/email">Forgot Password?</a></span>
+                </div>
+
+                <div class="from-group">
+                    <button class="button block pos">Sign In</button>
+                </div>
+            </form>
+
+            @if(count($socialDrivers) > 0)
+                <hr class="margin-top">
+                <h3 class="text-muted">Social Login</h3>
+                @if(isset($socialDrivers['google']))
+                    <a href="/login/service/google" style="color: #DC4E41;"><i class="zmdi zmdi-google-plus-box zmdi-hc-4x"></i></a>
+                @endif
+                @if(isset($socialDrivers['github']))
+                    <a href="/login/service/github" style="color:#444;"><i class="zmdi zmdi-github zmdi-hc-4x"></i></a>
+                @endif
             @endif
-        @endif
+        </div>
     </div>
 
 @stop
\ No newline at end of file
diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php
new file mode 100644 (file)
index 0000000..48f8eba
--- /dev/null
@@ -0,0 +1,50 @@
+@extends('public')
+
+@section('header-buttons')
+    <a href="/login"><i class="zmdi zmdi-sign-in"></i>Sign in</a>
+@stop
+
+@section('content')
+
+    <div class="text-center">
+        <div class="center-box">
+            <h1>Register</h1>
+
+            <form action="/login" method="POST">
+                {!! csrf_field() !!}
+
+                <div class="form-group">
+                    <label for="email">Name</label>
+                    @include('form/text', ['name' => 'name'])
+                </div>
+
+                <div class="form-group">
+                    <label for="email">Email</label>
+                    @include('form/text', ['name' => 'email'])
+                </div>
+
+                <div class="form-group">
+                    <label for="password">Password</label>
+                    @include('form/password', ['name' => 'password'])
+                </div>
+
+                <div class="from-group">
+                    <button class="button block pos">Sign In</button>
+                </div>
+            </form>
+
+            @if(count($socialDrivers) > 0)
+                <hr class="margin-top">
+                <h3 class="text-muted">Social Registration</h3>
+                @if(isset($socialDrivers['google']))
+                    <a href="/register/service/google" style="color: #DC4E41;"><i class="zmdi zmdi-google-plus-box zmdi-hc-4x"></i></a>
+                @endif
+                @if(isset($socialDrivers['github']))
+                    <a href="/register/service/github" style="color:#444;"><i class="zmdi zmdi-github zmdi-hc-4x"></i></a>
+                @endif
+            @endif
+        </div>
+    </div>
+
+
+@stop
diff --git a/resources/views/emails/email-confirmation.blade.php b/resources/views/emails/email-confirmation.blade.php
new file mode 100644 (file)
index 0000000..f2c9710
--- /dev/null
@@ -0,0 +1,176 @@
+<!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>Confirm Your Email At {{ 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;">Email Confirmation</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;">Thank's for joining <a href="{{ url('/') }}">{{ Setting::get('app-name')}}</a>. <br />
+    Please confirm your email address by clicking the button below.</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('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>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </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>
index 6d4827272a8ccacb56ed8142f924d17e6aa6e7f4..95fe012ebe2537ab899466603aed0186dfebce90 100644 (file)
@@ -1,186 +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</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 the application found at {{url('/')}}. 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
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r<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;">\r\r<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;">\r    <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;" />\r    <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;" />\r    <title>Password Reset From {{ Setting::get('app-name')}}</title>\r    <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;">\r        * {\r        margin: 0;\r        padding: 0;\r        font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;\r        font-size: 100%;\r        line-height: 1.6;\r        }\r\r        img {\r        max-width: 100%;\r        }\r\r        body {\r        -webkit-font-smoothing: antialiased;\r        -webkit-text-size-adjust: none;\r        width: 100%!important;\r        height: 100%;\r        }\r\r        a {\r        color: #348eda;\r        }\r\r        .btn-primary {\r        text-decoration: none;\r        color: #FFF;\r        background-color: #348eda;\r        border: solid #348eda;\r        border-width: 10px 20px;\r        line-height: 2;\r        font-weight: bold;\r        margin-right: 10px;\r        text-align: center;\r        cursor: pointer;\r        display: inline-block;\r        border-radius: 4px;\r        }\r\r        .btn-secondary {\r        text-decoration: none;\r        color: #FFF;\r        background-color: #aaa;\r        border: solid #aaa;\r        border-width: 10px 20px;\r        line-height: 2;\r        font-weight: bold;\r        margin-right: 10px;\r        text-align: center;\r        cursor: pointer;\r        display: inline-block;\r        border-radius: 25px;\r        }\r\r        .last {\r        margin-bottom: 0;\r        }\r\r        .first {\r        margin-top: 0;\r        }\r\r        .padding {\r        padding: 10px 0;\r        }\r\r        table.body-wrap {\r        width: 100%;\r        padding: 20px;\r        }\r\r        table.body-wrap .container {\r        border: 1px solid #f0f0f0;\r        }\r\r        h1,\r        h2,\r        h3 {\r        font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;\r        color: #444;\r        margin: 10px 0 10px;\r        line-height: 1.2;\r        font-weight: 200;\r        }\r\r        h1 {\r        font-size: 36px;\r        }\r\r        h2 {\r        font-size: 28px;\r        }\r\r        h3 {\r        font-size: 22px;\r        }\r\r        p,\r        ul,\r        ol {\r        margin-bottom: 10px;\r        font-weight: normal;\r        font-size: 14px;\r        color: #888888;\r        }\r\r        ul li,\r        ol li {\r        margin-left: 5px;\r        list-style-position: inside;\r        }\r\r        .container {\r        display: block!important;\r        max-width: 600px!important;\r        margin: 0 auto!important;\r        clear: both!important;\r        }\r\r        .body-wrap .container {\r        padding: 20px;\r        }\r\r        .content {\r        max-width: 600px;\r        margin: 0 auto;\r        display: block;\r        }\r\r        .content table {\r        width: 100%;\r        }\r    </style>\r    </head>\r\r    <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%;">\r    <!-- body -->\r    <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;">\r    <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;">\r    <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>\r                                                                                                                                                                                                                                                  <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;">\r    <!-- content -->\r    <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;">\r    <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%;">\r    <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;">\r    <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;">\r    <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>\r                                                                                                                                                                                                                                                                                                     <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>\r                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             <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%;">\r    <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;">\r    <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;">\r    <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>\r                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </td>\r                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </tr>\r                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          </table>\r                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </td>\r                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              </tr>\r                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </table>\r                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </div>\r    <!-- /content -->\r    </td>\r      <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>\r                                                                                                                                                                                                                                                    </tr>\r                                                                                                                                                                                                                                                      </table>\r    <!-- /body -->\r    </body>\r\r      </html>\r
\ No newline at end of file
index 159487d4c93969be0eae0cf03bade746a1573a0c..036ba7847d98ed8faaedf5e53d2f9c4827bf874b 100644 (file)
@@ -5,7 +5,7 @@
                 @if($errors->has($name)) class="neg" @endif
                 @if(isset($model) || old($name)) @if(old($name) && old($name) === $option->id) selected @elseif(isset($model) && $model->role->id === $option->id) selected @endif @endif
                 >
-            {{ $option->$displayKey }}
+            {{ $option->display_name }}
         </option>
     @endforeach
 </select>
index b11971104726be311a520feb5e63da3ef5a3b862..eaff2c2d8770ffc65f016213bfae74f8384ade31 100644 (file)
     </div>
 @endif
 
+<header id="header">
+    <div class="container">
+        <div class="row">
+            <div class="col-md-6">
+                <a href="/" class="logo">{{ Setting::get('app-name', 'BookStack') }}</a>
+            </div>
+            <div class="col-md-6">
+                <div class="float right">
+                    <div class="links text-center">
+                        @yield('header-buttons')
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</header>
+
 <section class="container">
     @yield('content')
 </section>
index 72d62f73349276ced926ba801d7e17a8393fe669..cc6c6a230b7fd369976d2c05ddb6f70ff2bd160e 100644 (file)
 
     <form action="/settings" method="POST">
         {!! csrf_field() !!}
+
+        <h3>App Settings</h3>
         <div class="form-group">
-            <label for="setting-app-name">Application Name</label>
+            <label for="setting-app-name">Application name</label>
             <input type="text" value="{{ Setting::get('app-name', 'BookStack') }}" name="setting-app-name" id="setting-app-name">
         </div>
         <div class="form-group">
             <label for="setting-app-public">Allow public viewing?</label>
-            <label><input type="radio" name="setting-app-public" @if(Setting::get('app-public') == 'true') checked @endif value="true"> Yes</label>
-            <label><input type="radio" name="setting-app-public" @if(Setting::get('app-public') == 'false') checked @endif value="false"> No</label>
+            <label><input type="radio" name="setting-app-public" @if(Setting::get('app-public')) checked @endif value="true"> Yes</label>
+            <label><input type="radio" name="setting-app-public" @if(!Setting::get('app-public')) checked @endif value="false"> No</label>
+        </div>
+
+        <hr class="margin-top">
+
+        <h3>Registration Settings</h3>
+        <div class="row">
+            <div class="col-md-6">
+                <div class="form-group">
+                    <label for="setting-registration-enabled">Allow registration?</label>
+                    <label><input type="radio" name="setting-registration-enabled" @if(Setting::get('registration-enabled')) checked @endif value="true"> Yes</label>
+                    <label><input type="radio" name="setting-registration-enabled" @if(!Setting::get('registration-enabled')) checked @endif value="false"> No</label>
+                </div>
+                <div class="form-group">
+                    <label for="setting-registration-role">Default user role after registration</label>
+                    <select id="setting-registration-role" name="setting-registration-role" @if($errors->has('setting-registration-role')) class="neg" @endif>
+                        @foreach(\Oxbow\Role::all() as $role)
+                            <option value="{{$role->id}}"
+                                    @if(\Setting::get('registration-role', \Oxbow\Role::getDefault()->id) == $role->id) selected @endif
+                                    >
+                                {{ $role->display_name }}
+                            </option>
+                        @endforeach
+                    </select>
+                </div>
+                <div class="form-group">
+                    <label for="setting-registration-confirmation">Require Email Confirmation?</label>
+                    <p class="small">If domain restriction is used then email confirmation will be required and the below value will be ignored.</p>
+                    <label><input type="radio" name="setting-registration-confirmation" @if(Setting::get('registration-confirmation')) checked @endif value="true"> Yes</label>
+                    <label><input type="radio" name="setting-registration-confirmation" @if(!Setting::get('registration-confirmation')) checked @endif value="false"> No</label>
+                </div>
+            </div>
+            <div class="col-md-6">
+                <div class="form-group">
+                    <label for="setting-registration-restrict">Restrict registration to domain</label>
+                    <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.
+                        <br> Note that users will be able to change their email addresses after successful registration.</p>
+                    <input type="text" id="setting-registration-restrict" name="setting-registration-restrict" placeholder="No restriction set" value="{{ Setting::get('registration-restrict', '') }}">
+                </div>
+            </div>
         </div>
+
+        <hr class="margin-top">
+
         <div class="form-group">
-            <button type="submit" class="button pos">Update Settings</button>
+            <button type="submit" class="button pos">Save Settings</button>
         </div>
     </form>
 
Morty Proxy This is a proxified and sanitized view of the page, visit original site.