implement addtask and addusers to a task features

This commit is contained in:
2024-01-16 14:44:06 +01:00
parent d81ff0592e
commit 9f2817fcf8
5 changed files with 64 additions and 8 deletions
+20
View File
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Add new task</title>
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
<main>
<form action="/addtask" method="POST">
<label for="taskname">taskname</label>
<input type="text" name="taskname" id="taskname" required>
<label for="taskdesc">taskdesc</label>
<input type="text" name="taskdesc" id="taskdesc" required>
<button> Submit </button>
</form>
</main>
</body>
</html>
+2 -1
View File
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Decentrala</title>
<title>Task manager</title>
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
@@ -15,6 +15,7 @@
<li><a href="/projects/{{task.id}}"> {{task.name}} </a></li>
{% endfor %}
</section>
<p> <a href="/addtask">Add</a> new task <p>
</main>
<footer>
</footer>
+7 -2
View File
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Decentrala</title>
<title>{{task.name}}</title>
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
@@ -13,8 +13,13 @@
<section>
<li>{{task.name}}</li>
<li>{{task.desc}}</li>
<li>{{users}}</li>
</section>
<h1> Users added to this task </h1>
{% for user in users %}
<li>{{user.username}}, {{user.contact}}</li>
{% endfor %}
<h1> Add yourself to task </h1>
<form action="/projects/{{task.id}}" method="POST">
<label for="username">username</label>