fix: Fix broken add/modify ADs in the secr app (#5040)
This commit is contained in:
parent
0ea04b26d5
commit
23f38e2ebc
|
@ -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()
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue