submit.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. {% extends 'layout.html' %}
  2. {# Set variables for base layour #}
  3. {% set active_page = 'submit' %}
  4. {% set title = 'Submit' %}
  5. {% block content %}
  6. {% if flash %}
  7. <div class="alert bg-red">
  8. {{ flash }}
  9. </div>
  10. {% endif %}
  11. {# "shortcut-submit" is a class used exclusively from javascript
  12. # to submit the form when a key (Ctrl+Enter) is pressed.
  13. #}
  14. <form action="" method="post" class="submit shortcut-submit">
  15. <h3>Title</h3>
  16. <div>
  17. <input type="text" name="title" class="form-control" required='required' autofocus />
  18. </div>
  19. <h3>Link</h3>
  20. <div>
  21. <input type="text" name="link" class="form-control" />
  22. </div>
  23. {% if settings ('defaults', 'topics_per_post') > 0 %}
  24. <h3>Topics</h3>
  25. <div>
  26. <input type="text" name="topics" value="{{ request.query.topic }}" class="form-control" />
  27. </div>
  28. <div>
  29. Max {{ settings ('defaults', 'topics_per_post') }}
  30. (eg. FreeSoftware OpenData ...)
  31. </div>
  32. {% endif %}
  33. <h3>Text</h3>
  34. <div>
  35. <textarea name="text" rows=10 class="form-control"></textarea>
  36. </div>
  37. <div style="margin: 1em 0 0 0;">
  38. <input type="submit" class="button button_info" value="Submit post" />
  39. </div>
  40. </form>
  41. {% endblock %}