Skip to content

Commit

Permalink
style polls plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewschoen committed Jul 23, 2012
1 parent 4e624bf commit 49083c7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
25 changes: 16 additions & 9 deletions demo/polls/templates/polls/plugin.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
<h1>{{ instance.poll.question }}</h1>

<form action="{% url polls.views.vote instance.poll.id %}" method="post">
{% csrf_token %}
{% for choice in instance.poll.choice_set.all %}
<input type="radio" name="choice" id="choice{{ forloop.counter }}" value="{{ choice.id }}" />
<label for="choice{{ forloop.counter }}">{{ choice.choice }}</label><br />
{% endfor %}
<input type="submit" value="Vote" />
<form action="{% url polls.views.vote instance.poll.id %}" method="post" class="form-vertical">
<fieldset>
<legend>{{ instance.poll.question }}</legend>
{% csrf_token %}
{% for choice in instance.poll.choice_set.all %}
<div class="control-group required">
<label class="control-label" for="choice{{ forloop.counter }}">{{ choice.choice }}</label>
<div class="controls">
<input type="radio" name="choice" id="choice{{ forloop.counter }}" value="{{ choice.id }}" />
</div>
</div>
{% endfor %}
</fieldset>
<div class="well">
<input type="submit" value="Vote" />
</div>
</form>
2 changes: 1 addition & 1 deletion demo/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h2>Heading</h2>
{% endplaceholder %}
</div>
<div class="span4">
{% placeholder 'home-colw-3' or %}
{% placeholder 'home-col-3' or %}
<h2>Heading</h2>
<p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
<p><a class="btn" href="#">View details &raquo;</a></p>
Expand Down

0 comments on commit 49083c7

Please sign in to comment.