Skip to content

Instantly share code, notes, and snippets.

@abdul-rehman-2050
Created May 10, 2024 14:41
Show Gist options
  • Save abdul-rehman-2050/e0194e4abfb2327b5b1de720454df1ab to your computer and use it in GitHub Desktop.
Save abdul-rehman-2050/e0194e4abfb2327b5b1de720454df1ab to your computer and use it in GitHub Desktop.
I simple bootstrap based model which is working fine for confirmation task
<div class="modal fade" id="exitModal{{ vehicle.id }}" tabindex="-1" role="dialog" aria-labelledby="exitModalLabel{{ vehicle.id }}" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exitModalLabel{{ vehicle.id }}">Exit Vehicle {{ vehicle.vehicle.registration_number }}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
Are you sure you want to exit the vehicle {{ vehicle.vehicle.registration_number }}?
</div>
<div class="modal-footer">
<form action="{% url 'exit_vehicle' %}" method="post">
{% csrf_token %}
<input type="hidden" name="registration_number" value="{{ vehicle.vehicle.registration_number }}">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-danger">Exit</button>
</form>
</div>
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment