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

fix: Fix broken add/modify ADs in the secr app #5040

Merged
merged 1 commit into from
Jan 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
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