Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added check to see if the user all ready has a ridereuest on a diff ride

  • Loading branch information...
commit f8c6525d28e3e3ca7e35b926ec1a04e3068c2751 1 parent 15f9368
wanderer authored
Showing with 8 additions and 3 deletions.
  1. +8 −3 rideshare/templates/ride_info.html
View
11 rideshare/templates/ride_info.html
@@ -72,8 +72,9 @@
{% else %}
<!-- view ride request -->
-
- {% if ride_request %}
+
+ {% if ride_request.ride_id %}
+ {% if ride_request.ride_id = ride.id %}
{% comment %}
{{ form.rendezvous_lat }}
{{ form.rendezvous_lng }}
@@ -95,10 +96,14 @@
{% endif %}
{% endif %}
</div>
+
<br>
- <a id="cancel_ride" href={% url ride_request_delete ride.id %}>cancel ride request</a>
+ <a id="cancel_ride" href={% url ride_request_delete ride_request.ride_id %}>cancel ride request</a>
<br><br>
{#<button type="submit" style="visibility:hidden" id="edit_rendezvous">Update Rendezvous</button>#}
+ {% else %}
+ <div>You have requested a seat on a different ride. <a href={% url ride_info ride_request.ride_id %}>View Here</a></div>
+ {% endif %}
{% else %}
<!-- request a ride -->
<form method="POST" action={% url ride_request_add_update ride.id%}>{%csrf_token%}
Please sign in to comment.
Something went wrong with that request. Please try again.