editor.html 784 B

12345678910111213141516171819202122
  1. {% macro editor(field, submit_button, placeholder=None, rows=4) %}
  2. <div class="editor">
  3. {% if field.errors %}
  4. <div class="editor-error">
  5. {% for error in field.errors %}
  6. <p class="help-block" style="font-weight: bold;">{{ error }}</p>
  7. {% endfor %}
  8. </div>
  9. {% endif %}
  10. <div class="editor-input">
  11. <div>
  12. <textarea name="{{ field.html_name }}" id="{{ field.html_id }}" rows="{{ rows }}"{% if placeholder %} placeholder="{{ placeholder }}"{% endif %}>{% if field.has_value %}{{ field.value }}{% endif %}</textarea>
  13. </div>
  14. </div>
  15. <div class="editor-actions">
  16. <button name="save" type="submit" class="btn btn-primary pull-right">{{ submit_button }}</button>
  17. </div>
  18. </div>
  19. {% endmacro %}
  20. {% macro editor_js() %}
  21. {% endmacro %}