Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions rca/people/templates/admin/panels/student_page_inline_panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
{% comment "Always render the formset so the form can be saved" %}{% endcomment %}
{{ self.formset.management_form }}

{% comment "Hide the visibe form fields to non-superusers" %}{% endcomment %}
{% if request.user.is_superuser %}

{% comment %}
Hide the visible form fields to non-superusers. We only want to toggle the visibility since
the fields must still exist in the template so it's part of the POSTed data.
{% endcomment %}
<div {% if not request.user.is_superuser %}style="display: none;"{% endif %}>
<ul class="multiple" id="id_{{ self.formset.prefix }}-FORMS">
{% if self.formset.non_form_errors %}
<li class="error-message">
Expand Down Expand Up @@ -50,5 +52,4 @@
panel.updateAddButtonState();
})();
</script>

{% endif %}
</div>