Permalink
Browse files

Merge pull request #12 from wanderer/rideshare

added check to see if the user all ready has a riderequest on a different ride
  • Loading branch information...
2 parents d5c0a5c + f8c6525 commit 31de3d1f5e49c1f7f701d43feb943da4455fde76 Justine Alexandra Roberts Tunney committed Sep 3, 2012
Showing with 8 additions and 3 deletions.
  1. +8 −3 rideshare/templates/ride_info.html
@@ -72,8 +72,9 @@ <h3>Request for {{req.seats_wanted}} seat{% if req.seats_wanted != 1 %}s{% endif
{% 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 @@ <h3>Request for {{req.seats_wanted}} seat{% if req.seats_wanted != 1 %}s{% endif
{% 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%}

0 comments on commit 31de3d1

Please sign in to comment.