summaryrefslogtreecommitdiff
path: root/templates/createOrEdit.html
diff options
context:
space:
mode:
authoretienne2008-12-17 00:07:14 +0000
committeretienne2008-12-17 00:07:14 +0000
commited2ab8aec512c1dfd6e5f940d7a9e6f73a3964e8 (patch)
tree41f978d6b82947ab7ca1b9b256f45065d478c4d9 /templates/createOrEdit.html
parent7e1a52328266738aaf7887169209bf77a3cf5ba2 (diff)
Corrections for W3C validation
Diffstat (limited to 'templates/createOrEdit.html')
-rw-r--r--templates/createOrEdit.html35
1 files changed, 18 insertions, 17 deletions
diff --git a/templates/createOrEdit.html b/templates/createOrEdit.html
index 2158527..1e52ee1 100644
--- a/templates/createOrEdit.html
+++ b/templates/createOrEdit.html
@@ -7,8 +7,8 @@
{% endif %}
{% if error %}<p class='error'>{{ error }}</p>{% endif %}
<h2>{% if new %}{% trans "New poll" %}{% else %}{% trans "Edit poll" %}{% endif %}</h2>
-<table class='new_poll'>
<form action="{{admin_url}}" method="post">
+<table class='new_poll'>
{% if not new %}<tr>
<td><label>{% trans "Poll url" %}</label></td>
@@ -23,27 +23,27 @@
{% endif %}
<tr>
- <td><label for='author_name'>{% trans "Author name" %}</label></td>
- <td colspan='2'>{% if new %}<input type='text' name='author_name' value='{{poll.author.name}}'/>{% else %}{{poll.author.name}}{% endif %}</td>
+ <td><label{% if new %} for='author_name'{%endif%}>{% trans "Author name" %}</label></td>
+ <td colspan='2'>{% if new %}<input type='text' name='author_name' id='author_name' value='{{poll.author.name}}'/>{% else %}{{poll.author.name}}{% endif %}</td>
<td class='form_description'>{% trans "Name, firstname or nickname of the author" %}</td>
</tr>
<tr>
<td><label for='poll_name'>{% trans "Poll name" %}</label></td>
- <td colspan='2'>{% if new %}<input type='text' name='poll_name' value='{{poll.name}}'/>{% else %}<input type='text' name='poll_name' value='{{poll.name}}'/>{% endif %}</td>
+ <td colspan='2'><input type='text' name='poll_name' id='poll_name' value='{{poll.name}}'/></td>
<td class='form_description'>{% trans "Global name to present the poll" %}</td>
</tr>
<tr>
<td><label for='poll_desc'>{% trans "Poll description" %}</label></td>
- <td colspan='2'>{% if new %}<textarea name='poll_desc'>{{poll.description}}</textarea>{% else %}<textarea name='poll_desc'>{{poll.description}}</textarea>{% endif %}</td>
+ <td colspan='2'><textarea name='poll_desc' id='poll_desc' rows='' cols=''>{{poll.description}}</textarea></td>
<td class='form_description'>{% trans "Precise description of the poll" %}</td>
</tr>
{% if not new %}<tr>
<td><label for='poll_open'>{% trans "Poll status" %}</label></td>
<td colspan='2'>
- <select name='poll_open'>
+ <select name='poll_open' id='poll_open'>
<option value='1'{%if poll.open %} selected='selected'{%endif%}>{%trans "Open"%}</option>
<option value='0'{%if not poll.open %} selected='selected'{%endif%}>{%trans "Closed"%}</option>
</select>
@@ -54,7 +54,7 @@
<tr>
<td><label for='poll_public'>{% trans "Visibility" %}</label></td>
<td colspan='2'>
- <select name='poll_public'>
+ <select name='poll_public' id='poll_public'>
<option value='0'{%if not poll.public %} selected='selected'{%endif%}>{%trans "Private"%}</option>
<option value='1'{%if poll.public %} selected='selected'{%endif%}>{%trans "Public"%}</option>
</select>
@@ -63,9 +63,9 @@
</tr>
{% if categories %}<tr>
- <td><label for='poll_category'>{% trans "Poll category" %}</label></td>
+ <td><label{% if new %} for='poll_category'{%endif%}>{% trans "Poll category" %}</label></td>
<td colspan='2'>{% if new %}
- <select name='poll_category'>
+ <select name='poll_category' id='poll_category'>
<option value=''>---</option>
{% for category in categories %}<option value='{{category.id}}'>{{category.name}}</option>{% endfor %}
</select>{%else%}{{poll.category.name}}
@@ -74,8 +74,8 @@
</tr>{% endif %}
<tr>
- <td><label for='poll_type'>{% trans "Poll type" %}</label></td>
- <td colspan='2'>{% if new %}<select name='poll_type'>
+ <td><label{% if new %} for='poll_type'{%endif%}>{% trans "Poll type" %}</label></td>
+ <td colspan='2'>{% if new %}<select name='poll_type' id='poll_type'>
{% for typ in TYPES %}<option value='{{typ.0}}'{% ifequal poll_type typ.0%} selected='selected'{% endifequal %}>{{typ.1}}</option>{% endfor %}
</select>{% else %}{{type_name}}{% endif %}</td>
<td class='form_description'>{% trans "Type of the poll:" %}
@@ -96,13 +96,12 @@
<input type='submit' value='{% trans "Edit" %}' class='submit'/>
{% endif %}</td>
</tr>
-
- </form>
</table>
+</form>
{% if not new %}
<h2>{% trans "Choices" %}</h2>
+{% if choices %}<form action="{{admin_url}}" method="post">
<table class='new_poll'>
- {% if choices %}<form action="{{admin_url}}" method="post">
<tr>
<th>{% trans "Up/down" %}</th><th>{% trans "Label" %}</th><th>{% trans "Limit" %}</th><th>{% trans "Delete?"%}</th>
</tr>
@@ -114,15 +113,17 @@
<td><input type='hidden' name='edit' value='1'/>
<input type='submit' value='{% trans "Edit" %}' class='submit'/></td>
</tr>
- </form>{% endif %}
+</table>
+</form>{% endif %}
- <form action="{{admin_url}}" method="post">
+<form action="{{admin_url}}" method="post">
+<table class='new_poll'>
<tr><td><label>{% trans "New choice" %}</label></td><td><input type='text' name='new_choice'/></td><td>{%trans "Limited to"%} <input type='text' name='limit' class='limit'/> {%trans "vote(s)"%}</td><td class='form_description'>{% trans "Setting a new choice. Optionally you can set a limit of vote for this choice. This limit is usefull for limited resources allocation." %}</td></tr>
<tr>
<td></td>
<td><input type='hidden' name='add' value='1'/> <input type='submit' value='{% trans "Add" %}' class='submit'/></td>
</tr>
- </form>
</table>
+</form>
{% endif %}
{% endblock %}