only show reply form if the user can reply
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<label for="topic">Topic</label>
|
||||
<select name="topic_id" id="topic" autocomplete="off">
|
||||
{%- for topic in topics -%}
|
||||
<option value="{{topic.id}}" {{'selected' if selected_topic == topic.id else ''}} {{'disabled' if not get_active_user().can_post_to_topic(topic) else ''}}>{{topic.name}}{{ ' (locked)' if topic.locked() else ''}}</option>
|
||||
<option value="{{topic.id}}" {{'selected' if selected_topic == topic.id else ''}} {{'disabled' if not get_active_user().can_post_to_thread_or_topic(topic) else ''}}>{{topic.name}}{{ ' (locked)' if topic.locked() else ''}}</option>
|
||||
{%- endfor -%}
|
||||
</select>
|
||||
<label for="title">Title</label>
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
{{- pager(page, page_count) -}}
|
||||
</fieldset>
|
||||
</div>
|
||||
{%- if is_logged_in() -%}
|
||||
{%- if is_logged_in() and get_active_user().can_post_to_thread_or_topic(thread) -%}
|
||||
<form action="{{url_for('threads.reply', thread_id=thread.id)}}" method="POST" class="plank post-edit-form">
|
||||
<h2 class="info">Reply to "{{thread.title}}"</h2>
|
||||
{{- babycode_editor_component() -}}
|
||||
|
||||
Reference in New Issue
Block a user