Skip to content

Instantly share code, notes, and snippets.

@gabrielhurley
Created November 2, 2011 21:44
Show Gist options
  • Save gabrielhurley/1335021 to your computer and use it in GitHub Desktop.
Save gabrielhurley/1335021 to your computer and use it in GitHub Desktop.
Quick bootstrap modal demo
<div id='new_comment' class='fade modal'>
<form class='form-stacked' action="{% comment_form_target %}" method="POST">{% csrf_token %}
<div class='modal-header'>
<a href="#" class="close">x</a>
<h3>Discuss Activity</h3>
</div>
<div class='modal-body'>
<p>Have a question? Need more information? Add a new comment to the discussion using the form below:</p>
{{ comment_form.as_custom }}
<input type='hidden' name='name' value='{{ profile }}'/>
<input type='hidden' name='url' value='{{ profile.get_absolute_url }}'/>
<input type='hidden' name='email' value='{{ profile.user.email }}'/>
<input type="hidden" name="next" value="{{ activity.get_absolute_url }}" />
</div>
<div class='modal-footer'>
<button class='btn cancel'>Cancel</button>
<button class='btn primary' type='submit'>Submit</button>
</div>
</form>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment