annotate default/input/comment.html @ 20:8fa2fd2e928e

default: added i18n support
author Goffi <goffi@goffi.org>
date Sun, 21 May 2017 16:10:44 +0200
parents 8cdcbe0d7dee
children 4bf00291b895
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 7
diff changeset
1 {% import 'input/form.html' as form %}
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 7
diff changeset
2
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 7
diff changeset
3 {% macro head(service, node) %}
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 7
diff changeset
4 {# include data needed to identify the node to use for commenting #}
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 7
diff changeset
5 <input type="hidden" name="type" value="comment">
7
f1c773126f23 input/comments: comments input macros, first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
6 <input type="hidden" name="service" value="{{service}}">
f1c773126f23 input/comments: comments input macros, first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
7 <input type="hidden" name="node" value="{{node}}">
10
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 7
diff changeset
8 {% endmacro %}
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 7
diff changeset
9
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 7
diff changeset
10 {% macro body(rows=10, cols=50) %}
20
8fa2fd2e928e default: added i18n support
Goffi <goffi@goffi.org>
parents: 16
diff changeset
11 <textarea name="body" rows="{{rows}}" cols="{{cols}}" placeholder="{{_("Your comment")}}"></textarea>
10
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 7
diff changeset
12 {% endmacro %}
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 7
diff changeset
13
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 7
diff changeset
14 {% macro submit() %}
20
8fa2fd2e928e default: added i18n support
Goffi <goffi@goffi.org>
parents: 16
diff changeset
15 <input type="submit" value="{{_("Send")}}">
7
f1c773126f23 input/comments: comments input macros, first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
16 {% endmacro %}
10
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 7
diff changeset
17
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 7
diff changeset
18 {% macro comment(service, node, action='') %}
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 7
diff changeset
19 {% call form.form(action=action) %}
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 7
diff changeset
20 {{ head(service, node) }}
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 7
diff changeset
21 {{ body() }}
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 7
diff changeset
22 {{ submit() }}
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 7
diff changeset
23 {% endcall %}
8b5615a1bf3d articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
Goffi <goffi@goffi.org>
parents: 7
diff changeset
24 {% endmacro %}