Modified pageview buttons to be href buttons rather than form submissions and...

Modified pageview buttons to be href buttons rather than form submissions and fixed spacings in widget_calendar edit and add pages
parent 7dbc4c4f
...@@ -15,11 +15,7 @@ Widget's Announcement Board ...@@ -15,11 +15,7 @@ Widget's Announcement Board
</p> </p>
{% endfor %} {% endfor %}
<br> <br>
<button type="button"><a href="{% url 'announcements:announcement_add' %}"> New Announcement </a></button><br><br>
<form action={% url 'announcements:announcement_add' %}>
<input type="submit" value="New Announcement">
</form>
<a href="{% url 'dashboard:pageview' %}">Dashboard</a><br> <a href="{% url 'dashboard:pageview' %}">Dashboard</a><br>
<a href="{% url 'forum:pageview' %}">Forum</a><br> <a href="{% url 'forum:pageview' %}">Forum</a><br>
<a href="{% url 'assignments:pageview' %}">Assignment</a><br> <a href="{% url 'assignments:pageview' %}">Assignment</a><br>
......
...@@ -7,11 +7,7 @@ ...@@ -7,11 +7,7 @@
<p> <a href="{{ data.get_absolute_url }}">{{ data }}</a></p> <p> <a href="{{ data.get_absolute_url }}">{{ data }}</a></p>
{% endfor %} {% endfor %}
<br> <br>
<button type="button"><a href="{% url 'assignments:assignment-add' %}"> New Assignment </a></button><br><br>
<form action={% url 'assignments:assignment-add' %}>
<input type="submit" value="New Assignment">
</form>
<a href="{% url 'dashboard:pageview' %}">Dashboard</a><br> <a href="{% url 'dashboard:pageview' %}">Dashboard</a><br>
<a href="{% url 'announcements:pageview' %}">Announcements</a><br> <a href="{% url 'announcements:pageview' %}">Announcements</a><br>
<a href="{% url 'forum:pageview' %}">Forum</a><br> <a href="{% url 'forum:pageview' %}">Forum</a><br>
......
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
<a href="{{ user.get_absolute_url }}">{{user.last_name}}, {{user.first_name}}</a><br> <a href="{{ user.get_absolute_url }}">{{user.last_name}}, {{user.first_name}}</a><br>
{% endfor %} {% endfor %}
<br> <br>
<form action={% url 'dashboard:widgetuser-add' %}> <button type="button"><a href="{% url 'dashboard:widgetuser-add' %}"> Add Widget User </a></button><br><br>
<input type="submit" value="Add Widget User"/>
</form>
<a href="{% url 'announcements:pageview' %}">Announcement Board</a><br> <a href="{% url 'announcements:pageview' %}">Announcement Board</a><br>
<a href="{% url 'forum:pageview' %}">Forum</a><br> <a href="{% url 'forum:pageview' %}">Forum</a><br>
<a href="{% url 'assignments:pageview' %}">Assignments</a><br> <a href="{% url 'assignments:pageview' %}">Assignments</a><br>
......
# Generated by Django 4.1.6 on 2023-05-15 14:27
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('widget_calendar', '0004_course_course_title'),
]
operations = [
migrations.AlterField(
model_name='event',
name='activity',
field=models.CharField(max_length=300),
),
]
...@@ -24,7 +24,7 @@ class Course(models.Model): ...@@ -24,7 +24,7 @@ class Course(models.Model):
class Event(models.Model): class Event(models.Model):
target_datetime = models.CharField(max_length=50) target_datetime = models.CharField(max_length=50)
activity = models.TextField(max_length=300) activity = models.CharField(max_length=300)
estimated_hours = models.FloatField() estimated_hours = models.FloatField()
location = models.ForeignKey(Location, on_delete=models.CASCADE) location = models.ForeignKey(Location, on_delete=models.CASCADE)
course = models.ForeignKey(Course, on_delete=models.CASCADE) course = models.ForeignKey(Course, on_delete=models.CASCADE)
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
<form action='' method="POST"> <form action='' method="POST">
{% csrf_token %} {% csrf_token %}
Activity: {{ form.activity }}<br><br> Activity: {{ form.activity }}<br><br>
Target Date/Time: {{ form.target_datetime }} Target Date/Time: {{ form.target_datetime }}<br><br>
Estimated Hours: {{ form.estimated_hours }} Estimated Hours: {{ form.estimated_hours }}<br><br>
Location: {{ form.location }} Location: {{ form.location }}<br><br>
Course: {{ form.course }} Course: {{ form.course }}<br><br>
<input type="submit" value="Save New Activity"> <input type="submit" value="Save New Activity">
</form> </form>
</p> </p>
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
<form action='' method="POST"> <form action='' method="POST">
{% csrf_token %} {% csrf_token %}
Activity: {{ form.activity }}<br><br> Activity: {{ form.activity }}<br><br>
Target Date/Time: {{ form.target_datetime }} Target Date/Time: {{ form.target_datetime }}<br><br>
Estimated Hours: {{ form.estimated_hours }} Estimated Hours: {{ form.estimated_hours }}<br><br>
Location: {{ form.location }} Location: {{ form.location }}<br><br>
Course: {{ form.course }} Course: {{ form.course }}<br><br>
<input type="submit" value="Save New Activity"> <input type="submit" value="Save New Activity">
</form> </form>
</p> </p>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<a href="{{ event.get_absolute_url }}">{{event.activity}}</a><br> <a href="{{ event.get_absolute_url }}">{{event.activity}}</a><br>
{% endfor %} {% endfor %}
<br> <br>
<a href="{% url 'widget_calendar:event-add' %}" class="button"> New Activity </a><br> <button type="button"><a href="{% url 'widget_calendar:event-add' %}"> New Activity </a></button><br><br>
<a href="{% url 'dashboard:pageview' %}">Dashboard</a><br> <a href="{% url 'dashboard:pageview' %}">Dashboard</a><br>
<a href="{% url 'announcements:pageview' %}">Announcements</a><br> <a href="{% url 'announcements:pageview' %}">Announcements</a><br>
<a href="{% url 'forum:pageview' %}">Forum</a><br> <a href="{% url 'forum:pageview' %}">Forum</a><br>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment