view default/input/comment.html @ 19:422c54e0204a

event: adaptation to changes in backend/Libervia + background_image can now be specified in template data
author Goffi <goffi@goffi.org>
date Fri, 19 May 2017 12:59:43 +0200
parents 8cdcbe0d7dee
children 8fa2fd2e928e
line wrap: on
line source

{% import 'input/form.html' as form %}

{% macro head(service, node) %}
    {# include data needed to identify the node to use for commenting #}
    <input type="hidden" name="type" value="comment">
    <input type="hidden" name="service" value="{{service}}">
    <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 %}

{% macro comment(service, node, action='') %}
{% call form.form(action=action) %}
    {{ head(service, node) }}
    {{ body() }}
    {{ submit() }}
{% endcall %}
{% endmacro %}