Commit 80c3b72c authored by Zack Wong's avatar Zack Wong
Browse files

admin signups redirect to approval page

parent 5b8a7224
......@@ -126,7 +126,10 @@ class RegisterView(MyUpdateView):
# don't set the member session info - user can click on the link
#self.request.session['member_id'] = m.id
return thanks_view(self.request, m, ms)
if self.request.user.is_staff:
return HttpResponseRedirect(reverse("admin:membership-approve",args=[ms.pk]))
else:
return thanks_view(self.request, m, ms)
def thanks_view(request, member, ms):
""" display a thankyou page after registration is completed """
......@@ -165,4 +168,7 @@ class RenewView(LoginRequiredMixin, MyUpdateView):
def form_valid(self, form):
m, ms = form.save()
messages.success(self.request, 'Your membership renewal has been submitted.')
return HttpResponseRedirect(reverse("memberdb:home"))
if self.request.user.is_staff:
return HttpResponseRedirect(reverse("admin:membership-approve",args=[ms.pk]))
else:
return HttpResponseRedirect(reverse("memberdb:home"))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment