Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completed All Tasks #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion authentication/models.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from django.db import models

from django.contrib.auth.models import User
# Create your models here.
170 changes: 170 additions & 0 deletions authentication/templates/authentication/changePassword.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>


<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"
integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">

<!--Custom styles-->
<style>
@import url('https://fonts.googleapis.com/css?family=Numans');

html,
body {

height: 100%;
font-family: 'Numans', sans-serif;
}

.container {
height: 100%;
align-content: center;
}

.card {
height: 430px;
margin-top: auto;
margin-bottom: auto;
width: 400px;
background-color: rgba(0, 0, 0, 0.5) !important;
}



.card-header h3 {
color: white;
}


.input-group-prepend span {
width: 50px;
background-color: darkturquoise;
color: black;
border: 0 !important;
}

input:focus {
outline: 0 0 0 0 !important;
box-shadow: 0 0 0 0 !important;

}


.login_btn {
color: black;
background-color: darkturquoise;
width: 100px;
}

.login_btn:hover {
color: black;
background-color: white;
}

.links {
color: white;
}

.links a {
margin-left: 4px;
color: darkturquoise;
}

.links a:hover {
color: blue;

}

.alert {
color: yellow;
}
</style>
<title>Change password</title>
</head>

<body>
<div class="container">


<div class="d-flex justify-content-center h-100">
<div class="card">
<div class="card-header">
<h3>Change Password</h3>

</div>
<div class="card-body">
<form method="POST" action="/userAccount/changePassword">
{% csrf_token %}
<div class="input-group form-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-envelope"></i></span>
</div>
<input type="email" name="email" class="form-control" placeholder="Email Address">

</div>
<div class="input-group form-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-lock"></i></span>
</div>
<input type="password" name="newPassword" class="form-control" placeholder="New Password">

</div>
<div class="input-group form-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-lock"></i></span>
</div>
<input type="password" name="confirmNewPassword" class="form-control" placeholder="Confirm new password">
</div>

<div class="form-group">
<input type="submit" value="Submit" class="btn float-right login_btn">
</div>
</form>
</div>

{% if messages %}
{% for message in messages %}
<div class="alert alert-{{message.tags}} m-2 d-flex justify-content-center" id="mssg" role="alert">
{{ message }}
</div>
{% endfor %}
{% endif %}

<div class="card-footer">


<div class="d-flex justify-content-center links">
<a href="/userAccount/">Sign In</a>
</div>



</div>
</div>
</div>
</div>

<script>
setTimeout(function () {
if ($('#mssg').length > 0) {
$('#mssg').remove();
}
}, 3000)
</script>

</script>

</body>


</html>
162 changes: 162 additions & 0 deletions authentication/templates/authentication/login.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"
integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">

<!--Custom styles-->
<style>
@import url('https://fonts.googleapis.com/css?family=Numans');

html,
body {

height: 100%;
font-family: 'Numans', sans-serif;
}

.container {
height: 100%;
align-content: center;
}

.card {
height: 400px;
margin-top: auto;
margin-bottom: auto;
width: 400px;
background-color: rgba(0, 0, 0, 0.5) !important;
}



.card-header h3 {
color: white;
}


.input-group-prepend span {
width: 50px;
background-color: darkturquoise;
color: black;
border: 0 !important;
}

input:focus {
outline: 0 0 0 0 !important;
box-shadow: 0 0 0 0 !important;

}


.login_btn {
color: black;
background-color: darkturquoise;
width: 100px;
}

.login_btn:hover {
color: black;
background-color: white;
}

.links {
color: white;
}

.links a {
margin-left: 4px;
color: darkturquoise;
}

.links a:hover {
color: blue;

}

.alert {
color: yellow;
}
</style>
<title>Login Page</title>
</head>

<body>
<div class="container">


<div class="d-flex justify-content-center h-100">
<div class="card">
<div class="card-header">
<h3>Sign In</h3>

</div>
<div class="card-body">
<form method="POST" action="/userAccount/">
{% csrf_token %}
<div class="input-group form-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-user"></i></span>
</div>
<input type="text" name="username" class="form-control" placeholder="Username">

</div>
<div class="input-group form-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-key"></i></span>
</div>
<input type="password" name="password" class="form-control" placeholder="Password">
</div>

<div class="form-group">
<input type="submit" value="Login" class="btn float-right login_btn">
</div>
</form>
</div>

{% if messages %}
{% for message in messages %}
<div class="alert alert-{{message.tags}} m-2 d-flex justify-content-center" id="mssg" role="alert">
{{ message }}
</div>
{% endfor %}
{% endif %}
<div class="card-footer">

<div class="d-flex justify-content-center links">
Don't have an account?<a href="/userAccount/register">Sign Up</a>
</div>
<div class="d-flex justify-content-center links">
<a href="/userAccount/changePassword">Forgotten password?</a>
</div>


</div>
</div>
</div>
</div>

<script>
setTimeout(function () {
if ($('#mssg').length > 0) {
$('#mssg').remove();
}
}, 3000);
</script>



</body>


</html>
Loading