mirror of
https://github.com/kevachat/webapp.git
synced 2025-01-08 22:07:53 +00:00
39 lines
1.8 KiB
Twig
39 lines
1.8 KiB
Twig
{% if enabled %}
|
|
<form name="post" action="{{ path('room_post', { mode : mode, namespace : namespace }) }}" method="post">
|
|
{% if error %}
|
|
<output name="error" for="form-post-message">{{ error }}</output>
|
|
{% endif %}
|
|
{% if warning %}
|
|
<output name="warning" for="form-post-message">{{ warning }}</output>
|
|
{% endif %}
|
|
<textarea name="message" id="form-post-message" placeholder="{{ 'enter your message...' | trans }}">{{ message }}</textarea>
|
|
{% if sign == 'anon' or sign == '' %}
|
|
<input type="radio" name="sign" value="anon" id="form-post-sign-anon" checked="checked" />
|
|
{% else %}
|
|
<input type="radio" name="sign" value="anon" id="form-post-sign-anon" />
|
|
{% endif %}
|
|
<label for="form-post-sign-anon">
|
|
{{ 'anon' | trans }}
|
|
</label>
|
|
{% if username %}
|
|
{% if sign == 'username' %}
|
|
<input type="radio" name="sign" value="username" id="form-post-sign-username" checked="checked" />
|
|
{% else %}
|
|
<input type="radio" name="sign" value="username" id="form-post-sign-username" />
|
|
{% endif %}
|
|
<label for="form-post-sign-username">
|
|
@{{ username }}
|
|
</label>
|
|
|
|
|
<a href="{{ path('user_logout') }}">{{ 'logout' | trans }}</a>
|
|
{% else %}
|
|
<input type="radio" name="sign" value="username" id="form-post-sign-username" disabled="disabled" />
|
|
<a href="{{ path('user_login') }}">{{ 'login' | trans }}</a>
|
|
{% endif %}
|
|
<button type="submit">{{ 'send' | trans }}</button>
|
|
{% if cost %}
|
|
<span>{{ 'cost: %s KVA' | format(cost) | trans }}</span>
|
|
{% endif %}
|
|
<input type="hidden" name="token" value="{{ token }}" />
|
|
</form>
|
|
{% endif %} |