Commit 2c4cb527 authored by Martina Reyes's avatar Martina Reyes

Changed the cancel button text color for the link for the forms.

Added an error 404 for past auctions.
Added clean code for each view in views.py.
parent 1e688426
......@@ -582,3 +582,7 @@ nav a {
.help-text {
font-size: 15px;
}
.link-text {
color: white;
}
......@@ -18,7 +18,7 @@
{{ form.as_p }}
</div>
<div class="button-space">
<button type="button" class="btn btn-danger"><a href= "{% url 'storeid' request.user.id %}">Cancel</a></button>
<button type="button" class="btn btn-danger"><a class="link-text" href= "{% url 'storeid' request.user.id %}">Cancel</a></button>
<button type="submit" class="btn btn-dark" name="Add Item"> Add Item </button>
</div>
</form>
......
......@@ -17,7 +17,7 @@
{% csrf_token %}
{{ form.as_p }}
<div class="btn-group">
<button type="button" class="btn btn-danger"><a href= "{% url 'profileid' request.user.id %}">Cancel</a></button>
<button type="button" class="btn btn-danger"><a class="link-text" href= "{% url 'profileid' request.user.id %}">Cancel</a></button>
<button class="btn profile-btn" type="submit" name="Add Item"> Save Changes </button>
</div>
</form>
......
{% extends 'boodlesite\templates\error404\base_error404.html' %}
{% load static %}
{% block title %}{% endblock %}
{% block styles %}
{% endblock %}
{% block content %}
<div class="container">
<div class="error404__icon">
<img src="../../static/media/cashier.png" alt="">
</div>
<div class="error404__message">
<h1>This auction has already passed.</h1>
<a href="/">Back to HomePage</a>
</div>
</div>
{% endblock %}
\ No newline at end of file
......@@ -18,7 +18,7 @@
{{ form.as_p }}
</div>
<div class="button-space">
<button type="button" class="btn btn-danger"><a href= "{% url 'storeid' request.user.id %}">Cancel</a></button>
<button type="button" class="btn btn-danger"><a class="link-text" href= "{% url 'storeid' request.user.id %}">Cancel</a></button>
<button type="submit" class="btn btn-dark" name="savesauction">Save Auction</button>
</div>
</form>
......
......@@ -19,7 +19,7 @@
{{ form.as_p }}
</div>
<div class="button-space">
<button type="button" class="btn btn-danger"><a href= "{% url 'storeid' request.user.id %}">Cancel</a></button>
<button type="button" class="btn btn-danger"><a class="link-text" href= "{% url 'storeid' request.user.id %}">Cancel</a></button>
<button type="submit" class="btn btn-dark" name="Add Item"> Save Changes </button>
</div>
</form>
......
......@@ -7,7 +7,8 @@ urlpatterns = [
path('', homepage, name='index'),
path('auction', auction, name='auction'),
path('auction/<int:pk>/',auction, name='auctionid'),
path('error404', error404, name='error404'),
path('future_auction_error404', future_auction_error404, name='future_auction_error404'),
path('passed_auction_error404', passed_auction_error404, name='passed_auction_error404'),
path('store/<int:pk>', mystore, name='storeid'),
path('additem', addItem, name='additem'),
path('additem/<int:pk>', addItem, name='additemid'),
......
This diff is collapsed.
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