Skip to content

Commit

Permalink
Lock name/email fields for guests when a topic is locked, and don't d…
Browse files Browse the repository at this point in the history
…isplay the replay field to begin with
  • Loading branch information
msikma committed Jan 6, 2024
1 parent fac93fe commit d7af573
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/components/post/thread_quick_reply.twig
Expand Up @@ -12,7 +12,7 @@

{% set is_locked_due_to_age = context.oldTopicError or is_age_locked %}

{% if context.is_locked != 1 %}
{% if context.is_locked != 1 and not context.user.is_guest %}
<a id="quickreply"></a>

<div class="object_form new_post_form quick_reply object_list spaced_top">
Expand All @@ -38,13 +38,13 @@
<tr class="object_row">
<th class="minimal">{{ txt.name }}:</th>
<td>
<input type="text" name="guestname" value="{{ context.name }}" size="25" tabindex="{{ tabindex() }}" />
<input type="text" name="guestname" value="{{ context.name }}" size="25" tabindex="{{ tabindex() }}" {{ is_locked_due_to_age ? 'disabled="disabled"' }} />
</td>
</tr>
<tr class="object_row">
<th class="minimal">{{ txt.email }}:</th>
<td>
<input type="text" name="email" value="{{ context.email }}" size="25" tabindex="{{ tabindex() }}" />
<input type="text" name="email" value="{{ context.email }}" size="25" tabindex="{{ tabindex() }}" {{ is_locked_due_to_age ? 'disabled="disabled"' }} />
</td>
</tr>
{% endif %}
Expand Down

0 comments on commit d7af573

Please sign in to comment.