Implemented users
Changed DB type to MySQL Cried
This commit is contained in:
1 parent
a450e8aea2
commit
22d030edd6
11 files changed
+128
-48
No files matched your search
@@ -1,9 +1,7 @@
|
||||
<div>
|
||||
<form action="/post" method="post">
|
||||
<p style="display: inline">Name: </p>
|
||||
<input class="form-control" style="display: inline" type="text" name="name" value=""><br>
|
||||
<p style="display: inline">Item: </p>
|
||||
<input class="form-control" style="display: inline" type="text" name="item" value=""><br><br>
|
||||
<input class="form-control" id="addbox" style="display: inline" type="text" name="item" value=""><br><br>
|
||||
<div style="text-align: center; padding-bottom: 2px"><input class="btn btn-secondary" type="submit" style="text-align: center" name="addValue" value="Submit"></form>
|
||||
</form>
|
||||
</div>
|
||||
+3
-2
@@ -3,8 +3,9 @@
|
||||
<h1 class="container" style="text-align: center">{{ data["title"] }}</h1>
|
||||
|
||||
<div class="container">
|
||||
<form style="text-align: center" action="/post" method="POST">
|
||||
<input type="password" name="password"/>
|
||||
<form class="loginform" style="text-align: center" action="/post" method="POST">
|
||||
<input id="addbox" type="text" name="username" />
|
||||
<input id="addbox" type="password" name="password"/>
|
||||
<input class="btn btn-secondary" type="submit" name="loginform" value="Login" />
|
||||
</form>
|
||||
|
||||
|
||||
@@ -5,5 +5,6 @@
|
||||
<!-- Latest compiled and minified CSS -->
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
<link rel="stylesheet" content="text/css" href="/static/css/main.css"/>
|
||||
</head>
|
||||
+13
-3
@@ -1,12 +1,22 @@
|
||||
{% include "header.html" %}
|
||||
<body>
|
||||
<h1 class="container" style="text-align: center">{{ data["title"] }}</h1>
|
||||
<aside>
|
||||
<!-- <aside> -->
|
||||
<div id="addForm">
|
||||
{% include "addForm.html" %}
|
||||
</aside>
|
||||
<div class="container" id="memes">
|
||||
</div>
|
||||
</div>
|
||||
<!-- </aside> -->
|
||||
<div class="container" >
|
||||
{% include "list.html" %}
|
||||
</div>
|
||||
<div id="logout">
|
||||
<form action="/post" method="POST">
|
||||
<button type="submit" name="logout" class="btn btn-secondary"><i style="padding-top: 3px;" class="material-icons">
|
||||
exit_to_app
|
||||
</i></button>
|
||||
</form>
|
||||
</div>
|
||||
<!-- jQuery library -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
||||
|
||||
|
||||
+7
-5
@@ -1,5 +1,5 @@
|
||||
<table class="table-striped table">
|
||||
<thead class="thead-dark">
|
||||
<table class="table table-striped table-dark table-hover">
|
||||
<thead class="">
|
||||
<tr>
|
||||
<th scope="col">Item</th>
|
||||
<th scope="col">Requester</th>
|
||||
@@ -7,11 +7,12 @@
|
||||
<th scope="col">Remove</th>
|
||||
</tr>
|
||||
{% for x in data["results"] %}
|
||||
<tr id="row-{{x[0]}}">
|
||||
<tbody>
|
||||
<tr scope="row" id="row-{{x[0]}}">
|
||||
<td>{{x[1]}}</td>
|
||||
<td>{{x[4]}}</td>
|
||||
<td>{{x[3].title()}}</td>
|
||||
|
||||
<td> {% if x[3] == 0 %}
|
||||
<td> {% if x[2] == 0 %}
|
||||
<form><button class="btn btn-secondary" type="submit" formaction="/post" formmethod="POST" name="got" value="{{x[0]}}">No</button></form>
|
||||
{% else %}
|
||||
<form><button class="btn btn-secondary" type="submit" formaction="/post" formmethod="POST" name="ungot" value="{{x[0]}}">Yes</button></form>
|
||||
@@ -22,4 +23,5 @@
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -8,7 +8,13 @@
|
||||
{% include "list.html" %}
|
||||
|
||||
</div>
|
||||
|
||||
<div id="logout">
|
||||
<form action="/post" method="POST">
|
||||
<button type="submit" name="logout" class="btn btn-secondary"><i style="padding-top: 3px;" class="material-icons">
|
||||
exit_to_app
|
||||
</i></button>
|
||||
</form>
|
||||
</div>
|
||||
<!-- jQuery library -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
||||
|
||||
|
||||
Reference in new issue
Block a user