Mercurial > libervia-templates
comparison default/input/comment.html @ 28:4bf00291b895
input/comment: use new textarea field
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 24 Jun 2017 20:24:14 +0200 |
parents | 8fa2fd2e928e |
children | eb9a42fca6c8 |
comparison
equal
deleted
inserted
replaced
27:38328c57f3ef | 28:4bf00291b895 |
---|---|
1 {% import 'input/form.html' as form %} | 1 {% import 'input/form.html' as form %} |
2 {% import 'input/field.html' as field %} | |
2 | 3 |
3 {% macro head(service, node) %} | 4 {% macro head(service, node) %} |
4 {# include data needed to identify the node to use for commenting #} | 5 {# include data needed to identify the node to use for commenting #} |
5 <input type="hidden" name="type" value="comment"> | 6 <input type="hidden" name="type" value="comment"> |
6 <input type="hidden" name="service" value="{{service}}"> | 7 <input type="hidden" name="service" value="{{service}}"> |
7 <input type="hidden" name="node" value="{{node}}"> | 8 <input type="hidden" name="node" value="{{node}}"> |
8 {% endmacro %} | |
9 | |
10 {% macro body(rows=10, cols=50) %} | |
11 <textarea name="body" rows="{{rows}}" cols="{{cols}}" placeholder="{{_("Your comment")}}"></textarea> | |
12 {% endmacro %} | 9 {% endmacro %} |
13 | 10 |
14 {% macro submit() %} | 11 {% macro submit() %} |
15 <input type="submit" value="{{_("Send")}}"> | 12 <input type="submit" value="{{_("Send")}}"> |
16 {% endmacro %} | 13 {% endmacro %} |
17 | 14 |
18 {% macro comment(service, node, action='') %} | 15 {% macro comment(service, node, action='') %} |
19 {% call form.form(action=action) %} | 16 {% call form.form(action=action) %} |
20 {{ head(service, node) }} | 17 {{ head(service, node) }} |
21 {{ body() }} | 18 {{ field.textarea("body", placeholder=_("Your comment")) }} |
22 {{ submit() }} | 19 {{ submit() }} |
23 {% endcall %} | 20 {% endcall %} |
24 {% endmacro %} | 21 {% endmacro %} |