Add view to edit groups public key.

See #905
 - Legacy-Id: 5071
This commit is contained in:
Emilio Jiménez 2012-11-22 12:08:09 +00:00
parent 8984e888f6
commit 1b976ab6d1
4 changed files with 40 additions and 3 deletions

View file

@ -5,10 +5,10 @@ from ietf.ietfauth import views
urlpatterns = patterns('',
(r'^$', views.index, None, 'account_index'),
(r'^login/$', views.ietf_login),
# (r'^login/$', views.ietf_login),
(r'^loggedin/$', views.ietf_loggedin),
(r'^profile/$', views.profile),
# (r'^login/(?P<user>[a-z0-9.@]+)/(?P<passwd>.+)$', views.url_login),
(r'^login/(?P<user>[a-z0-9.@]+)/(?P<passwd>.+)$', views.url_login),
(r'^testemail/$', views.test_email),
)

View file

@ -57,7 +57,7 @@ def url_login(request, user, passwd):
if user is not None:
if user.is_active:
login(request, user)
return HttpResponseRedirect('/accounts/loggedin/?%s=%s' % (REDIRECT_FIELD_NAME, urlquote(redirect_to)))
return HttpResponseRedirect('/admin')
return HttpResponse("Not authenticated?", status=500)
def ietf_login(request):

View file

@ -0,0 +1,18 @@
{% extends "base.html" %}
{% block title %}Edit {{ state.group.acronym }} public key{% endblock %}
{% block content %}
<h1>Edit {{ state.group.acronym }} public key</h1>
{% if form.errors %}<h3>Please correct the following errors</h3>{% endif %}
<form action="" method="post">{% csrf_token %}
<table>
{{ form }}
</table>
<input type="hidden" name="{{ stage_field }}" value="1" />
<p><input type="submit" value="Preview" /></p>
</form>
{% endblock %}

View file

@ -0,0 +1,19 @@
{% extends "base.html" %}
{% block title %}Edit {{ state.group.acronym }} public key{% endblock %}
{% block content %}
<h1>Edit {{ state.group.acronym }} public key</h1>
<p>Previous data will remain encrypted with the old key. Do you really want to change the public key?. </p
<table>
<form action="" method="post">{% csrf_token %}
{% for field in form %}{{ field.as_hidden }}
{% endfor %}
<input type="hidden" name="{{ stage_field }}" value="2" />
<input type="hidden" name="{{ hash_field }}" value="{{ hash_value }}" />
<p><input type="submit" value="Submit" /></p>
</form>
{% endblock %}