Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2490 - SPIKE: Research students unable to submit updates/content to their profiles #933

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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>