KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

new.twig 1.5KB

9 years ago
12345678910111213141516171819202122232425262728293031323334353637
  1. <form id="add_comment" action="{% url "add_comment" %}" method="post" accept-charset="utf-8">
  2. <input type="hidden" name="last_comment" value="$post.latest_comment" id="last_comment" />
  3. {% if visitor.logged_in %}
  4. <p>
  5. <span class="who">
  6. <a class="logout" href="{% url "logout" %}">${ "Log Out &rarr;" | translate }</a>
  7. ${ "Logged in as %s" | translate | format(visitor.full_name | fallback(visitor.login)) }
  8. </span>
  9. </p>
  10. {% else %}
  11. <p>
  12. <label for="author">${ "Your Name" | translate }</label>
  13. <input type="text" name="author" value="" id="author" />
  14. </p>
  15. <p>
  16. <label for="email">${ "Your E-Mail" | translate }</label>
  17. <input type="text" name="email" value="" id="email" />
  18. </p>
  19. <p>
  20. <label for="url">${ "Your Website" | translate }</label>
  21. <input type="text" name="url" value="" id="url" />
  22. </p>
  23. {% endif %}
  24. <p>
  25. <textarea name="body" rows="8" cols="40" class="wide"></textarea>
  26. </p>
  27. <p>
  28. {% if visitor.logged_in %}
  29. <input type="hidden" name="author" value="${ visitor.full_name | fallback(visitor.login) }" id="author" />
  30. <input type="hidden" name="email" value="$visitor.email" id="email" />
  31. <input type="hidden" name="url" value="$visitor.website" id="url" />
  32. {% endif %}
  33. <input type="hidden" name="post_id" value="$post.id" id="post_id" />
  34. <button type="submit">${ "Speak" | translate }</button>
  35. </p>
  36. </form>