summaryrefslogtreecommitdiff
path: root/papillon/templates/edit.html
blob: 5a33ebdf5a36e6ff895c70009c2cf2f88c7af715 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{% extends "base.html" %}
{% load markup %}
{% load i18n %}

{% block fullscript %}
<script type="text/javascript" src="{% url 'admin_i18n' %}"></script>
<script type="text/javascript" src="{{admin_url}}js/core.js"></script>
<script type="text/javascript" src="{{admin_url}}js/admin/RelatedObjectLookups.js"></script>
{{ form.media }}
{% endblock %}

{% block content %}
 <h2>{% trans "Edit poll" %}</h2>
<form class='new_poll' action="." method="post">
    {% csrf_token %}
    
    <div class="field_label">
        <label id="">{% trans "Poll url" %}</label>
        <span class="help_button" title='{% trans "Copy this address and send it to voters who want to participate to this poll" %}'>?</span>
    </div>
    <input type="text" readonly value='{{ base_url }}'>

    <div class="field_label">
        <label id="">{% trans "Administration url" %}</label>
        <span class="help_button" title='{% trans "Address to modify the current poll" %}'>?</span>
    </div>
    <input type="text" readonly value='{{ edit_url }}'>
   
    <div class="field_label">
        <label id="">{% trans "Choices administration url" %}</label>
        <span class="help_button" title='{% trans "Address to modify choices of the current poll." %}'>?</span>
    </div>
    <input type="text" readonly value='{{choices_url }}'>
    
    {% for field in form %}
          {% if field.is_hidden %}
            {{field}}
          {% else %}
              
            <div class="field_label">
                {{field.label_tag}}
                <span class="help_button" title="{{field.help_text}}">?</span>
            </div>
            <div class="field_errors">
                {% if field.errors %}
                    Error(s) :
                    <ol class="errorlist">
                    {% for error in field.errors %}
                        <li>{{ error|escape }}</li>
                    {% endfor %}
                    </ol>
                {% endif %}
            </div>
            {{field}}
          {% endif %}
    {% endfor %}
  <tr>
   <td></td>
   <td><input type='submit' value='{% trans "Edit" %}' class='submit'/></td>
  </tr>
</table>
</form>

{% endblock %}