Added list management to admin page

This commit is contained in:
benjamyn committed 2020-02-20 00:17:22 +11:00
1 parent 9d7d26c657
commit 614bbebc46
2 files changed
+71 -4

No files matched your search

+42
View File
@@ -42,6 +42,20 @@
</div>
</div>
</form>
<h1 class="text-center">ADD LIST</h1>
<form class="addList" action="/post" method="POST">
<div class="form-group row">
<label for="addlist" class="col-sm-2 col-form-label" >List</label>
<div class="col-sm-10">
<input type=text class="form-control" id="addlist" type="text" name="addList" />
</div>
</div>
<div class="form-group row">
<div class="form-group" style="padding-top: 10px; padding-left: 10px;">
<input class="btn btn-secondary" id="addlist" type="submit" name="newlist" value="Add new list" />
</div>
</div>
</form>
<div id="logout" style="padding-top: 3px;">
<a href="/">
<button onclick="window.location='admin'" class="btn btn-secondary"><i style="padding-top: 3px;"
@@ -50,6 +64,34 @@
</i></button></a>
</div>
</div>
<h1 class="text-center">Add User To List</h1>
<div class="container">
<table class="table table-striped table-dark table-hover">
<thead>
<tr>
<th scope="col">Username</th>
<th scope="col">User</th>
</tr>
</thead>
<tbody>
{% for x in data["lists"] %}
<tr scope="row">
<td>{{data["lists"][x]}}</td>
<td><form action="/post" method="POST">
<select id="addbox" name="add2list" class="custom-select custom-select-lg mb-3">
{% for userid in data["users"] %}
<option type="submit" value="{{userid[2]}}" id="addbox" name="User2list">{{userid[0].title()}}</option>
{% endfor %}
</select> <button class="btn btn-secondary" type="submit" value="x"> Add User To List </button>
<input name="listID" value={{x}} type="hidden"></form></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% for x in data["lists"] %}
{{data["lists"][x]}}
{% endfor %}
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<!-- Popper JS -->