mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-04 06:06:19 +01:00
added user login and registration
This commit is contained in:
@@ -32,7 +32,11 @@
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="#">Logout</a></li>
|
||||
{% if user.is_authenticated %}
|
||||
<li><a href="/logoutuser/">Logout</a></li>
|
||||
{% else %}
|
||||
<li><a href="/loginuser/">Login</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -40,6 +44,8 @@
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
<div class="col-sm-3 col-md-2 sidebar">
|
||||
<ul class="nav nav-sidebar">
|
||||
<li class="active"><a href="#">Overview</a></li>
|
||||
@@ -49,10 +55,10 @@
|
||||
<li><a href="#">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
{% endif %}
|
||||
|
||||
{% block content %}
|
||||
{% endblock content %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Bootstrap core JavaScript
|
||||
|
||||
@@ -5,5 +5,8 @@
|
||||
{% block page_title %}Something something here{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
<p> WELCOME THIS IS THE INDEX PAGE</p>
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
|
||||
<h1 class="page-header">Dashboard</h1>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
||||
22
templates/public/login.html
Normal file
22
templates/public/login.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{% extends "public/base.html" %}
|
||||
|
||||
{% block title %}Alliance Auth{% endblock %}
|
||||
|
||||
{% block page_title %}Login Page{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="row-fluid">
|
||||
<div class="center-block" style="center">
|
||||
<p>
|
||||
<form class="form-signin" role="form" action="/loginuser/" method="POST">
|
||||
{% csrf_token %}
|
||||
<h2 class="form-signin-heading">Please sign in</h2>
|
||||
{{form.as_p}}
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
|
||||
</form>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
34
templates/public/register.html
Normal file
34
templates/public/register.html
Normal file
@@ -0,0 +1,34 @@
|
||||
{% extends "public/base.html" %}
|
||||
|
||||
{% block title %}Alliance Auth{% endblock %}
|
||||
|
||||
{% block page_title %}Register Page{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="row-fluid">
|
||||
<div class="center-block" style="center">
|
||||
<p>
|
||||
<form action="/register/" method="POST">
|
||||
{% csrf_token %}
|
||||
<h2 class="form-signin-heading">Register Account</h2>
|
||||
<p>
|
||||
Username:<br/>
|
||||
{{form.username.errors}}
|
||||
{{form.username}}<br/> Email:<br/>
|
||||
{{form.email.errors}}
|
||||
{{form.email}}<br/> Password:<br/>
|
||||
{{form.password.errors}}
|
||||
{{form.password}}<br/>Api ID: <br/>
|
||||
{{form.api_id.errors}}
|
||||
{{form.api_id}}<br/>Api Key: <br/>
|
||||
{{form.api_key.errors}}
|
||||
{{form.api_key}}<br/>
|
||||
</p>
|
||||
<input type="submit" value="submit" />
|
||||
</form>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
Reference in New Issue
Block a user