diff options
author | Adrien Dorsaz <adrien@adorsaz.ch> | 2013-08-08 23:27:42 +0200 |
---|---|---|
committer | Adrien Dorsaz <adrien@adorsaz.ch> | 2013-08-08 23:27:42 +0200 |
commit | 1cf61b611eaff0e42588cd311c6baa3df02055ab (patch) | |
tree | 4bb516986dc317e144c3acb5d811f6a58f16b80c | |
parent | f07d083cfdbd3e41c87754699893ab59e65b84a6 (diff) | |
download | Papillon-1cf61b611eaff0e42588cd311c6baa3df02055ab.tar.bz2 Papillon-1cf61b611eaff0e42588cd311c6baa3df02055ab.zip |
Remove table, indent code and update to new design
-rw-r--r-- | papillon/templates/create.html | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/papillon/templates/create.html b/papillon/templates/create.html index 224ae78..163ad17 100644 --- a/papillon/templates/create.html +++ b/papillon/templates/create.html @@ -8,26 +8,32 @@ {% block content %} - <h2>{% trans "New poll" %}</h2> -<form action="." method="post"> -<table class='new_poll'> - {% for field in form %} - {% if field.is_hidden %} - {{field}} - {% else %} - <tr><td colspan='3'>{{field.errors}}</td></tr> - <tr> - <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> - </tr> -</table> +<h2>{% trans "New poll" %}</h2> + +<form class="new_poll" action="." method="post"> + {% csrf_token %} + {% 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 %} + <input style="clear:both;margin:auto;float:none;width:100%;" type='submit' value='{% trans "Create" %}' class='submit'/> </form> {% endblock %} |