edit_post.twig 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. {% include 'header.twig' %}
  2. <div class="edit">
  3. {# "shortcut-submit" is a class used exclusively from javascript
  4. # to submit the form when a key (Ctrl+Enter) is pressed.
  5. #}
  6. <form action="" method="post" class="submit shortcut-submit">
  7. <input type="hidden" name="post" value="{{ item.data.hashId }}" />
  8. <h3>Title <em>(required)</em></h3>
  9. <div>
  10. <input type="text" name="title" class="form-control" value="{{ item.data.title }}" />
  11. </div>
  12. <div class="info">
  13. by <a href="{{ ('user/' ~ item.data.username|url_encode)|docroot }}">{{ item.data.username }}</a>
  14. <em>{{ item.data.created|ago }}</em>
  15. </div>
  16. <h3>Link</h3>
  17. <div>
  18. <input type="text" name="link" class="form-control" value="{{ item.data.link }}" />
  19. </div>
  20. <h3>Text</h3>
  21. <div>
  22. <textarea name="text" rows=10 class="form-control">{{ item.data.text }}</textarea>
  23. </div>
  24. <div style="margin: 1em 0 0 0;">
  25. <input type="submit" class="button button_info" value="Save changes" />
  26. </div>
  27. </form>
  28. </div>
  29. {% include 'footer.twig' %}