Commit 9c0abf24 authored by Zosman's avatar Zosman
Browse files

this commit should be the final draft. once the bugs are worked through i think it will be ready

parent 9a8657b2
Pipeline #439 passed with stage
in 7 minutes and 37 seconds
......@@ -67,7 +67,7 @@ SRCT Go • Administration Panel
<input type="submit" name="_approve" value="Approve" class="btn btn-primary btn-sm">
<input type="submit" name="_deny" value="Deny" class="btn btn-danger btn-sm">
<input type="submit" name="_block" value="Block" class="btn btn-default btn-sm" style="background-color: black; color: white;">
<input type="submit" name="_block" value="Block" class="btn btn-default btn-sm btn-blockUsr" style="background-color: black; color: white;">
</div>
......@@ -178,7 +178,7 @@ SRCT Go &bull; Administration Panel
<!-- <input type="submit" name="_approve" value="Approve" class="btn btn-primary btn-sm"> -->
<input type="submit" name="_remove" value="Remove" class="btn btn-danger btn-sm">
<input type="submit" name="_block" value="Block" class="btn btn-default btn-sm" style="background-color: black; color: white;">
<input type="submit" name="_block" value="Block" class="btn btn-default btn-sm btn-blockUsr" style="background-color: black; color: white;">
<!-- <input type="submit" name="_unblock" value="Un-Block" class="btn btn-default btn-sm"> -->
......
......@@ -2,7 +2,7 @@
{% block title %}
SRCT Go &bull; Account Not Approved
SRCT Go &bull; Account Blocked
{% endblock %}
......@@ -33,7 +33,7 @@ SRCT Go &bull; Account Not Approved
If you belive this is in error please contact Go Admins.
<br />
<br/>
Thank you, And have a nice day!
Thank you, and have a nice day!
</p>
<br/><br/>
</div>
......
......@@ -31,14 +31,15 @@ def index(request):
"""
# If the user is blocked, redirect them to the blocked page.
if request.user.registereduser.blocked:
return render(request, 'blocked.html')
# If the user is not authenticated, show them a public landing page.
elif not request.user.is_authenticated():
return render(request, 'public_landing.html')
if not request.user.is_authenticated():
return render(request, 'public_landing.html')
# If the user isn't approved, don't give them any leeway.
elif not request.user.registereduser.approved:
return render(request, 'not_registered.html')
if request.user.registereduser.blocked:
return render(request, 'blocked.html')
else:
return render(request, 'not_registered.html')
url_form = URLForm(host=request.META.get('HTTP_HOST')) # unbound form
......@@ -350,6 +351,7 @@ def useradmin(request):
# toblock.user.delete()
toblock.blocked = True
toblock.approved = False
toblock.registered = False
toblock.save()
elif '_unblock' in request.POST:
for name in userlist:
......@@ -369,10 +371,10 @@ def useradmin(request):
settings.EMAIL_FROM,
[user_mail]
)
# toblock.user.delete()
toUNblock.blocked = False
toUNblock.approved = True
toUNblock.save()
toUNblock.user.delete()
# toUNblock.blocked = False
# toUNblock.approved = False
# toUNblock.save()
elif '_remove' in request.POST:
for name in userlist:
toremove = RegisteredUser.objects.get(user__username__exact=name)
......
......@@ -34,3 +34,6 @@ body {
.navbar-brand {
padding: 10px 15px;
}
.btn-blockUsr {
font-weight: 600;
}
Markdown is supported
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