Skip to content
Snippets Groups Projects
Commit 5620a070 authored by Ben Adida's avatar Ben Adida
Browse files

tweaked fb auth and some details

parent d908e853
No related branches found
No related tags found
No related merge requests found
...@@ -12,3 +12,4 @@ bad voter ID or password, please try again. ...@@ -12,3 +12,4 @@ bad voter ID or password, please try again.
{% endif %} {% endif %}
<input type="submit" value="check credentials" /> <input type="submit" value="check credentials" />
</form> </form>
...@@ -35,7 +35,7 @@ You must freeze the ballot before you can contact voters. ...@@ -35,7 +35,7 @@ You must freeze the ballot before you can contact voters.
<form method="post" action=""> <form method="post" action="">
<input type="hidden" name="csrf_token" value="{{csrf_token}}" /> <input type="hidden" name="csrf_token" value="{{csrf_token}}" />
<input class="pretty" type="submit" value="Freeze the ballot" /> <input class="button" type="submit" value="Freeze the ballot" />
<button onclick="document.location='./view'; return false;">never mind</button> <button onclick="document.location='./view'; return false;">never mind</button>
</form> </form>
{% endif %} {% endif %}
......
...@@ -57,7 +57,7 @@ def get_user_info_after_auth(request): ...@@ -57,7 +57,7 @@ def get_user_info_after_auth(request):
info = utils.from_json(facebook_get('/me', {'access_token':access_token})) info = utils.from_json(facebook_get('/me', {'access_token':access_token}))
return {'type': 'facebook', 'user_id' : info['id'], 'name': info['name'], 'email': info['email'], 'info': info, 'token': {'access_token': access_token}} return {'type': 'facebook', 'user_id' : info['id'], 'name': info.get('name'), 'email': info.get('email'), 'info': info, 'token': {'access_token': access_token}}
def update_status(user_id, user_info, token, message): def update_status(user_id, user_info, token, message):
""" """
......
...@@ -99,7 +99,6 @@ ...@@ -99,7 +99,6 @@
</div> </div>
</div> </div>
</body>
<script> <script>
document.write('<script src=' + document.write('<script src=' +
('__proto__' in {} ? '/static/foundation/js/vendor/zepto' : '/static/foundation/js/vendor/jquery') + ('__proto__' in {} ? '/static/foundation/js/vendor/zepto' : '/static/foundation/js/vendor/jquery') +
...@@ -111,4 +110,5 @@ ...@@ -111,4 +110,5 @@
$(document).foundation(); $(document).foundation();
</script> </script>
</body>
</html> </html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment