1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-09 13:05:56 +00:00

Update the _examples/mvc/login example - add a Path property at mvc.Response and add a context.Proceed helper function

Former-commit-id: b898901fe4a324e888a6e09c93530cf7a551cf2a
This commit is contained in:
Gerasimos (Makis) Maropoulos
2017-10-12 16:28:41 +03:00
parent b0f8329768
commit 32d14db46d
33 changed files with 1073 additions and 50 deletions

View File

@@ -0,0 +1,15 @@
<h1>Error.</h1>
<h2>An error occurred while processing your request.</h2>
<h3>{{.Message}}</h3>
<footer>
<h2>Sitemap</h2>
<a href="http://localhost:8080/user/register">/user/register</a><br/>
<a href="http://localhost:8080/user/login">/user/login</a><br/>
<a href="http://localhost:8080/user/logout">/user/logout</a><br/>
<a href="http://localhost:8080/user/me">/user/me</a><br/>
<h3>requires authentication</h3><br/>
<a href="http://localhost:8080/users">/users</a><br/>
<a href="http://localhost:8080/users/1">/users/{id}</a><br/>
</footer>

View File

@@ -0,0 +1,12 @@
<html>
<head>
<title>{{.Title}}</title>
<link rel="stylesheet" type="text/css" href="/public/css/site.css" />
</head>
<body>
{{ yield }}
</body>
</html>

View File

@@ -0,0 +1,11 @@
<form action="/user/login" method="POST">
<div class="container">
<label><b>Username</b></label>
<input type="text" placeholder="Enter Username" name="username" required>
<label><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="password" required>
<button type="submit">Login</button>
</div>
</form>

View File

@@ -0,0 +1,3 @@
<p>
Welcome back <strong>{{.User.Firstname}}</strong>!
</p>

View File

@@ -0,0 +1,14 @@
<form action="/user/register" method="POST">
<div class="container">
<label><b>Firstname</b></label>
<input type="text" placeholder="Enter Firstname" name="firstname" required>
<label><b>Username</b></label>
<input type="text" placeholder="Enter Username" name="username" required>
<label><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="password" required>
<button type="submit">Register</button>
</div>
</form>