Skip to content

Commit

Permalink
Make form inert in sudo mode
Browse files Browse the repository at this point in the history
  • Loading branch information
knabar committed Dec 12, 2023
1 parent 80e14e3 commit c313145
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions omeroweb/webadmin/templates/webadmin/myaccount.html
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,11 @@
</div>


<form class="standard_form settings_form" action="{% url 'wamyaccount' "save" %}" method="POST">{% csrf_token %}
<form class="standard_form settings_form" action="{% url 'wamyaccount' "save" %}" method="POST"
{% if isSudo %} inert {% endif %}
>{% csrf_token %}

<div id="personal_details">
<div id="personal_details" {% if isSudo %} style="opacity: 50%;" {% endif %}>

{% for field in form %}
{% if field.errors %}<div style="clear:both">{{ field.errors }}</div>{% endif %}
Expand All @@ -293,7 +295,7 @@

{% if ldapAuth %}
<div id="password"><label>LDAP: </label>{{ ldapAuth }}</div>
{% elif not isSudo %}
{% else %}

<div id="password">

Expand All @@ -308,9 +310,7 @@
</div>
{% endif %}

{% if not isSudo %}
<input type="submit" value="{% trans 'Save' %}" />
{% endif %}
</div>
<div style="clear:both"></div>
</form>
Expand Down

0 comments on commit c313145

Please sign in to comment.