Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
protokollsystem
proto3
Commits
481dcd7d
Commit
481dcd7d
authored
Mar 15, 2017
by
Robin Sonnabend
Browse files
Set a useful default textarea height
parent
d76e69bf
Changes
3
Hide whitespace changes
Inline
Side-by-side
templates/macros.html
View file @
481dcd7d
...
...
@@ -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 %}
...
...
templates/top-edit.html
View file @
481dcd7d
...
...
@@ -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 %}
templates/top-new.html
View file @
481dcd7d
...
...
@@ -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>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment