Mercurial > libervia-templates
changeset 28:4bf00291b895
input/comment: use new textarea field
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 24 Jun 2017 20:24:14 +0200 |
parents | 38328c57f3ef |
children | 494d740aa3d6 |
files | default/input/comment.html |
diffstat | 1 files changed, 2 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/default/input/comment.html Sat Jun 24 20:23:40 2017 +0200 +++ b/default/input/comment.html Sat Jun 24 20:24:14 2017 +0200 @@ -1,4 +1,5 @@ {% import 'input/form.html' as form %} +{% import 'input/field.html' as field %} {% macro head(service, node) %} {# include data needed to identify the node to use for commenting #} @@ -7,10 +8,6 @@ <input type="hidden" name="node" value="{{node}}"> {% endmacro %} -{% macro body(rows=10, cols=50) %} - <textarea name="body" rows="{{rows}}" cols="{{cols}}" placeholder="{{_("Your comment")}}"></textarea> -{% endmacro %} - {% macro submit() %} <input type="submit" value="{{_("Send")}}"> {% endmacro %} @@ -18,7 +15,7 @@ {% macro comment(service, node, action='') %} {% call form.form(action=action) %} {{ head(service, node) }} - {{ body() }} + {{ field.textarea("body", placeholder=_("Your comment")) }} {{ submit() }} {% endcall %} {% endmacro %}