Mercurial > libervia-templates
comparison default/input/comment.html @ 10:8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 27 Apr 2017 01:07:28 +0200 |
parents | default/input/comments.html@f1c773126f23 |
children | 8cdcbe0d7dee |
comparison
equal
deleted
inserted
replaced
9:7a1626e78d53 | 10:8b5615a1bf3d |
---|---|
1 {% import 'input/form.html' as form %} | |
2 | |
3 {% macro head(service, node) %} | |
4 {# include data needed to identify the node to use for commenting #} | |
5 <input type="hidden" name="type" value="comment"> | |
6 <input type="hidden" name="service" value="{{service}}"> | |
7 <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}}"></textarea> | |
12 {% endmacro %} | |
13 | |
14 {% macro submit() %} | |
15 <input type="submit" value="Send"> | |
16 {% endmacro %} | |
17 | |
18 {% macro comment(service, node, action='') %} | |
19 {% call form.form(action=action) %} | |
20 {{ head(service, node) }} | |
21 {{ body() }} | |
22 {{ submit() }} | |
23 {% endcall %} | |
24 {% endmacro %} |