placeuvote / gaepuv / puv / templates / create.html

{% extends 'base.html' %}

{% block title %}
Create a new poll
{% endblock %}

{% block media %}
<script src="" type="text/javascript"></script> 
<script type="text/javascript" src="/media/jquery.datepick.js"></script>
<link href="/media/jquery.datepick.css" type="text/css" rel="stylesheet" />

{% for js in genjs %}
{{ js|safe }}
{% endfor %}
{% endblock %}

{% block topnav %}
<li><a href="/">Home</a></li>
<li><a href="/create/" class="link-on">Create a poll</a></li>
<li><a href="/vote/">Vote in polls</a></li>
<li><a href="/results/">Polls results</a></li>
{% endblock %}
{% block crumbs %}<a href="/">Home</a>&gt; Create a new poll{% endblock %}

{% block contents %}
<form action="." method="post" id="id_createpoll_form">
{% if pollform.errors %}
<div class="error">{{ pollform.errors }}</div>
{% endif %}
<label id="id_created_by_label">Your name:</label>
<span class="error" id="id_created_by_error"></span>
{{ pollform.created_by }}<br />
<label id="id_email_label">Email:</label>
<span class="error" id="id_email_error"></span>
{{ }}<br />
<label id="id_question_label">Question:</label><br />
<span class="error" id="id_question_error"></span>
{{ pollform.question }}
<input type="hidden" name="locations" id="id_locations" value="{{ locations }}" />
<div id="id_location_inputs">
<span class="error" id="id_locations_error"></span>
{% for form in choiceforms %}
<div id="id_loc_line{{ forloop.counter0}}">
<img src="/media/marker/green{{ forloop.counter }}.png" alt="{{ forloop.counter }}. " />
{{ form.location }}{{ form.address }}{{ form.choice }}
<div class="markerinfo">
    <span id="id_address{{ forloop.counter0 }}"></span>
    <span id="id_info{{ forloop.counter0 }}"></span>
{% endfor %}
<button type="button" onclick="javascript:add_marker();" id="id_add_location"><img src="/media/plus.png" alt="add a marker" class="buttonimg" /></button>  
<button type="button" onclick="javascript:remove_marker();" id="id_remove_location"><img src="/media/minus.png" alt="remove a marker" class="buttonimg" /></button>  
Add or remove a place marker</p>
<div id="id_date_inputs"></div>
<span id="id_dates_label">Enter a list of dates if you wish:</span><br />
<input type="text" id="id_date_text" name="date_text" size="60" />
<div style="display: none;">
<img id="calImg" src="/media/calendar.gif" alt="Toggle calendar popup" class="trigger" />
<p class="markerinfo">
{{ pollform.private }} hide from listings  
{{ pollform.anonymous }} anonymous voting
{{ pollform.onechoice }} only one choice allowed</p> 
<span style="float:right">Create the poll <input type="submit" name="createpoll" id="id_createpoll" value="Submit" /></span> 
<br />
<form method="post" action="" id="id_move_form">
<legend>Click and drag to move marker(s), or move them using an address</legend>
    <label id="id_address_move_label" class="bottomlabel">Address:</label>
	  <input type="text" name="address_move" id="id_address_move" value="" size="50" />
	  <select name="select_move" id="id_select_move">
             <option value="all">all markers</option>
             <option value="0">-- 1 --</option>
             <option value="1">-- 2 --</option>
             <option value="2">-- 3 --</option>
<button type="button" onclick="javascript:showAddress(map, markers);"  id="id_move"><img src="/media/arrow.png" alt="move marker(s)" class="buttonimg" /></button> Move 
<div class="markerinfo">Enter the address or post / zip code and select the marker, to move it</div>

<div id="map_default"></div>

{% endblock %}