-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add custom views to required access code (#98)
- Loading branch information
Showing
5 changed files
with
109 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,4 +64,7 @@ | |
*/ | ||
'disable_default_route' => false, | ||
|
||
'access_code' => [ | ||
'view' => 'magiclink::ask-for-access-code-form', | ||
] | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Password protected</title> | ||
|
||
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css"> | ||
|
||
<style> | ||
html, body { | ||
height: 100%; | ||
} | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
width: 100%; | ||
display: table; | ||
font-weight: 100; | ||
font-family: 'Lato'; | ||
} | ||
.container { | ||
text-align: center; | ||
display: table-cell; | ||
vertical-align: middle; | ||
} | ||
.content { | ||
text-align: center; | ||
display: inline-block; | ||
} | ||
.title { | ||
font-size: 36px; | ||
} | ||
.form-control { | ||
border: 1px solid #ccc; | ||
padding: 10px 20px; | ||
} | ||
.hidden { | ||
display: none; | ||
} | ||
.text-danger { | ||
color: #d9534f; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="content"> | ||
<div class="title">Enter access code</div> | ||
|
||
<form method="GET"> | ||
{{ csrf_field() }} | ||
|
||
<div class="form-group"> | ||
|
||
<input type="password" name="access-code" placeholder="Please enter access code" class="form-control" tabindex="1" autofocus /> | ||
@if (Request::get('access-code')) | ||
<div class="text-danger">Access code is wrong</div> | ||
@else | ||
<div class="small help-block">And press enter</div> | ||
@endif | ||
</div> | ||
|
||
<input type="submit" class="hidden" /> | ||
|
||
</form> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |