Commit 481dcd7d authored by Robin Sonnabend's avatar Robin Sonnabend

Set a useful default textarea height

parent d76e69bf
......@@ -87,7 +87,7 @@ to not render a label for the CRSFTokenField -->
action_text - text of submit button
class_ - sets a class for form
#}
{% macro render_form(form, action_url='', action_text='Submit', class_='', btn_class='btn btn-default', enctype=None, labels_visible=True, method="POST") -%}
{% macro render_form(form, action_url='', action_text='Submit', class_='', btn_class='btn btn-default', enctype=None, labels_visible=True, method="POST", textarea_rows=5) -%}
<form method="{{method}}" action="{{ action_url }}" role="form" class="{{ class_ }}"{% if enctype is not none %}enctype="{{enctype}}"{% endif %}>
{#{{ form.hidden_tag() if form.hidden_tag }}#}
......@@ -99,6 +99,8 @@ to not render a label for the CRSFTokenField -->
{{ render_checkbox_field(f) }}
{% elif f.type == 'RadioField' %}
{{ render_radio_field(f) }}
{% elif f.type == 'TextAreaField' %}
{{ render_field(f, label_visible=labels_visible, rows=textarea_rows) }}
{% else %}
{{ render_field(f, label_visible=labels_visible) }}
{% endif %}
......
......@@ -4,6 +4,6 @@
{% block content %}
<div class="container">
{{render_form(form, action_url=url_for("edit_top", top_id=top.id, next=request.args.get("next") or url_for("show_protocol", protocol_id=top.protocol.id)), action_text="Ändern")}}
{{render_form(form, action_url=url_for("edit_top", top_id=top.id, next=request.args.get("next") or url_for("show_protocol", protocol_id=top.protocol.id)), action_text="Ändern", textarea_rows=5)}}
</div>
{% endblock %}
......@@ -18,7 +18,7 @@
</div>
<div id="right-column" class="col-lg-6">
<h3>TOP hinzufügen</h3>
{{render_form(form, action_url=url_for("new_top", protocol_id=protocol.id, next=url_for("show_protocol", protocol_id=protocol.id)), action_text="Anlegen")}}
{{render_form(form, action_url=url_for("new_top", protocol_id=protocol.id, next=url_for("show_protocol", protocol_id=protocol.id)), action_text="Anlegen", textarea_rows=5)}}
</div>
</div>
</div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment