Mercurial > agora
diff templates/snippet/snippet_form.html @ 42:ab608f27ecd5
Copy preliminary django-paste code for snippets along with mptt. Works clunkily. Still need to adapt it for Agora.
author | Jordi Gutiérrez Hermoso <jordigh@gmail.com> |
---|---|
date | Thu, 29 Jul 2010 00:25:30 -0500 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/snippet/snippet_form.html Thu Jul 29 00:25:30 2010 -0500 @@ -0,0 +1,19 @@ +{% load i18n %} +<form method="post" action="." class="snippetform"> +{% csrf_token %} +<ol> + {% for field in snippet_form %} + <li> + {{ field.errors }} + {{ field.label_tag }} + {{ field }} + {% if request.session.userprefs.display_all_lexer %} + {% ifequal field.name "lexer" %} + <input type="button" value="{% trans "Guess lexer" %}" id="guess_lexer_btn"/> + {% endifequal %} + {% endif %} + </li> + {% endfor %} + <li class="submit"><input type="submit" value="{% trans "Paste it" %}"/></li> +</ol> +</form>