Skip to content

Commit

Permalink
fix: Fix broken add/modify ADs in the secr app (#5040)
Browse files Browse the repository at this point in the history
  • Loading branch information
jennifer-richards authored Jan 27, 2023
1 parent 0ea04b2 commit 23f38e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion ietf/secr/areas/views.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json

from django.contrib import messages
from django.http import HttpResponse
from django.http import HttpResponse, HttpResponseBadRequest
from django.shortcuts import render, get_object_or_404, redirect

from ietf.group.models import Group, GroupEvent, Role
Expand Down Expand Up @@ -110,6 +110,8 @@ def people(request, name):

messages.success(request, 'New Area Director added successfully!')
return redirect('ietf.secr.areas.views.view', name=name)
else:
return HttpResponseBadRequest('Invalid action')
else:
form = AreaDirectorForm()

Expand Down
6 changes: 3 additions & 3 deletions ietf/secr/templates/areas/people.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ <h2>Area Directors ({{ area.acronym }})</h2>
<td>{% if director.name.slug == "ad" %}
Voting Enabled
{% else %}
<button type="submit" name="submit">Enable Voting</button></td>
<button type="submit" name="submit" value="Enable Voting">Enable Voting</button></td>
{% endif %}
<td><button type="submit" name="submit">Retire</button></td>
<td><button type="submit" name="submit" value="Retire">Retire</button></td>
</tr>
</form>
{% endfor %}
Expand All @@ -45,7 +45,7 @@ <h3><b>Add new Director</b></h3>
{{ form.as_table }}
<tr>
<td></td>
<td><button type="submit" name="submit">Add</button></td>
<td><button type="submit" name="submit" value="Add">Add</button></td>
</tr>
</tbody>
</table>
Expand Down

0 comments on commit 23f38e2

Please sign in to comment.