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

This commit is contained in:
Jennifer Richards 2023-01-27 14:01:22 -04:00 committed by GitHub
parent 0ea04b26d5
commit 23f38e2ebc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

@ -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
@ -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()

View file

@ -27,9 +27,9 @@
<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 %}
@ -45,7 +45,7 @@
{{ 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>