Skip to content

Commit

Permalink
Merge pull request #6389 from akatsoulas/question-details
Browse files Browse the repository at this point in the history
Do not edit question details after moderation
  • Loading branch information
akatsoulas authored Dec 4, 2024
2 parents d144a38 + a633b78 commit e1e2dd7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions kitsune/questions/jinja2/questions/question_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ <h3 class="sumo-card-heading">{{ _('Post a Reply') }}</h3>
{% endif %}
</div>
</li>
{% if not question.is_moderated and is_trusted_user(request.user) %}
{% if is_trusted_user(request.user) %}
<li class="mzp-c-details">
<h3 class="sidebar-subheading sidebar-nav--heading-item is-accordion-heading">{{ _('Question Details') }}</h3>
<div id="question-details" class="question-details">
Expand All @@ -435,7 +435,7 @@ <h3 class="sidebar-subheading sidebar-nav--heading-item is-accordion-heading">{{
{% if product %}
<span class="detail">{{ pgettext('DB: products.Product.title', product.title) }}</span>
{% endif %}
{% if user and user.has_perm('questions.change_question') %}
{% if not question.is_moderated and user and user.has_perm('questions.change_question') %}
<select id="details-product" name="product">
{% for p in all_products %}
<option {% if product and p.id == product.id %}selected="selected"{% endif %} value="{{ p.id }}" data-url="{{ url('products.product', p.slug) }}">{{ p.title }}</option>
Expand All @@ -451,7 +451,7 @@ <h3 class="sidebar-subheading sidebar-nav--heading-item is-accordion-heading">{{
{% if topic %}
<span class="detail">{{ pgettext('DB: products.Topic.title', topic.title) }}</span>
{% endif %}
{% if user and user.has_perm('questions.change_question') %}
{% if not question.is_moderated and user and user.has_perm('questions.change_question') %}
<select id="details-topic" name="topic">
{% for t in all_topics %}
<option {% if topic and t.id == topic.id %}selected="selected"{% endif %} value="{{ t.id }}">{{ t.title }}</option>
Expand All @@ -461,7 +461,7 @@ <h3 class="sidebar-subheading sidebar-nav--heading-item is-accordion-heading">{{
</div>
{% endif %}

{% if user and user.has_perm('questions.change_question') %}
{% if not question.is_moderated and user and user.has_perm('questions.change_question') %}
<div class="sidebox tight condensed" id="question-locale">
<span class="title">{{ _('Locale') }}:</span>
<span class="detail">{{ settings.LANGUAGES_DICT[question.locale.lower()] }}</span>
Expand Down Expand Up @@ -520,7 +520,7 @@ <h3 class="sumo-card-heading">{{ _('Installed Plug-ins') }}</h3>
</section>
</div>

{% if user and user.has_perm('questions.change_question') %}
{% if not question.is_moderated and user and user.has_perm('questions.change_question') %}
<div class="sidebox tight">
<a href="#" id="details-edit">{{ _('Edit details') }}</a>
</div>
Expand Down

0 comments on commit e1e2dd7

Please sign in to comment.