webapp/templates/default/module/post.html.twig

32 lines
1.5 KiB
Twig
Raw Normal View History

2023-12-05 04:15:41 +02:00
{% if enabled %}
<form name="post" action="{{ path('room_post', { mode : mode, namespace : namespace }) }}" method="post">
2023-12-06 00:44:38 +02:00
{% if error %}
<output name="error" for="form-post-message">{{ error }}</output>
{% endif %}
<textarea name="message" id="form-post-message" placeholder="{{ 'enter your message...' | trans }}">{{ message }}</textarea>
2023-12-18 06:42:46 +02:00
{% if sign == 'anon' or sign == '' %}
2023-12-06 11:30:08 +02:00
<input type="radio" name="sign" value="anon" id="form-post-sign-anon" checked="checked" />
2023-12-05 04:15:41 +02:00
{% else %}
2023-12-06 11:30:08 +02:00
<input type="radio" name="sign" value="anon" id="form-post-sign-anon" />
2023-12-05 04:15:41 +02:00
{% endif %}
2023-12-06 11:30:08 +02:00
<label for="form-post-sign-anon">
2023-12-06 04:21:27 +02:00
{{ 'anon' | trans }}
2023-12-05 04:15:41 +02:00
</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>
2023-12-05 04:15:41 +02:00
{% else %}
<input type="radio" name="sign" value="username" id="form-post-sign-username" disabled="disabled" />
<a href="{{ path('user_login') }}">{{ 'login' | trans }}</a>
2023-12-05 04:15:41 +02:00
{% endif %}
<button type="submit">{{ 'send' | trans }}</button>
</form>
{% endif %}