Hide slug button for non-admins

This commit is contained in:
2024-11-25 12:12:01 +00:00
parent 97ded0eb08
commit d2558c5f55

View File

@@ -1,4 +1,4 @@
{% if 'description' not in form.fields.hidden %} {% if 'slug' not in form.fields.hidden %}
{% if col_width %}<div class="{{col_width}}">{% endif %} {% if col_width %}<div class="{{col_width}}">{% endif %}
<div class="form-group"> <div class="form-group">
<label for="input-{{type}}-slug" class="control-label">{{field_name | default(translate('SLUG'))}}</label> <label for="input-{{type}}-slug" class="control-label">{{field_name | default(translate('SLUG'))}}</label>
@@ -15,4 +15,6 @@
</div> </div>
</div> </div>
{% if col_width %}</div>{% endif %} {% if col_width %}</div>{% endif %}
{% else %}
<input type="hidden" id="input-{{type}}-slug" name="slug" value="{{current_value}}">
{% endif %} {% endif %}