diff options
Diffstat (limited to 'templates/create.html')
-rw-r--r-- | templates/create.html | 51 |
1 files changed, 11 insertions, 40 deletions
diff --git a/templates/create.html b/templates/create.html index c9c2b95..0b779db 100644 --- a/templates/create.html +++ b/templates/create.html @@ -4,49 +4,20 @@ {% block content %} <h2>{% trans "New poll" %}</h2> -<form action="http://{{root_url}}create" method="post"> +<form action="" method="post"> <table class='new_poll'> - <tr><td colspan='3'>{{form.author_name.errors}}</td></tr> + {% for field in form %} + {% if field.is_hidden %} + {{field}} + {% else %} + <tr><td colspan='3'>{{field.errors}}</td></tr> <tr> - <td><label for='author_name'>{{form.author_name.label}}</label></td> - <td>{{form.author_name}}</td> - <td class='form_description'>{{form.author_name.help_text}}</td> - </tr> - - <tr><td colspan='3'>{{form.name.errors}}</td></tr> - <tr> - <td><label for='name'>{{form.name.label}}</label></td> - <td>{{form.name}}</td> - <td class='form_description'>{{form.name.help_text}}</td> - </tr> - - <tr><td colspan='3'>{{form.description.errors}}</td></tr> - <tr> - <td><label for='description'>{{form.description.label}}</label></td> - <td>{{form.description}}</td> - <td class='form_description'>{{form.description.help_text}}</td> - </tr> -{% if form.category %} - <tr><td colspan='3'>{{form.category.errors}}</td></tr> - <tr> - <td><label for='category'>{{form.category.label}}</label></td> - <td>{{form.category}}</td> - <td class='form_description'>{{form.category.help_text}}</td> - </tr> -{% endif %} - <tr><td colspan='3'>{{form.public.errors}}</td></tr> - <tr> - <td><label for='public'>{{form.public.label}}</label></td> - <td>{{form.public}}</td> - <td class='form_description'>{{form.public.help_text}}</td> - </tr> - - <tr><td colspan='3'>{{form.poll_type.errors}}</td></tr> - <tr> - <td><label for='poll_type'>{{form.poll_type.label}}</label></td> - <td>{{form.poll_type}}</td> - <td class='form_description'>{{form.poll_type.help_text|markdown}}</td> + <td>{{field.label_tag}}</td> + <td>{{field}}</td> + <td class='form_description'>{{field.help_text|markdown}}</td> </tr> + {% endif %} + {% endfor %} <tr> <td></td> <td><input type='submit' value='{% trans "Create" %}' class='submit'/></td> |