From b5a21116bb7a11a8292e9e7ae0cbdce75748db53 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Tue, 28 Nov 2017 00:26:13 +1100 Subject: [PATCH] Minor changes --- eos/base/election.py | 2 +- eos/redditauth/election.py | 2 +- eosweb/core/main.py | 2 +- eosweb/core/static/css/main.css | 7 +++++-- eosweb/core/static/nunjucks/booth/base.html | 1 + 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/eos/base/election.py b/eos/base/election.py index a530632..ea07bd1 100644 --- a/eos/base/election.py +++ b/eos/base/election.py @@ -63,7 +63,7 @@ class EmailUser(User): def matched_by(self, other): if not isinstance(other, EmailUser): return False - return self.email == other.email and self.password == other.password + return self.email.lower() == other.email.lower() and self.password == other.password def send_email(self, host, port, username, password, from_email, content): #__pragma__('skip') diff --git a/eos/redditauth/election.py b/eos/redditauth/election.py index 4c3790e..ea33dc1 100644 --- a/eos/redditauth/election.py +++ b/eos/redditauth/election.py @@ -28,4 +28,4 @@ class RedditUser(User): def matched_by(self, other): if not isinstance(other, RedditUser): return False - return other.username == self.username + return other.username.lower() == self.username.lower() diff --git a/eosweb/core/main.py b/eosweb/core/main.py index 4ab0cb9..3e0b1c1 100644 --- a/eosweb/core/main.py +++ b/eosweb/core/main.py @@ -266,7 +266,7 @@ def email_authenticate(): for election in Election.get_all(): for voter in election.voters: if isinstance(voter.user, EmailUser): - if voter.user.email == flask.request.form['email']: + if voter.user.email.lower() == flask.request.form['email'].lower(): if voter.user.password == flask.request.form['password']: user = voter.user break diff --git a/eosweb/core/static/css/main.css b/eosweb/core/static/css/main.css index bafefd8..8d5283b 100644 --- a/eosweb/core/static/css/main.css +++ b/eosweb/core/static/css/main.css @@ -50,7 +50,6 @@ } .preferential-choices .dragarea-hint:first-child:last-child { - content: ""; width: calc(100% - 1em); height: 3em; box-sizing: border-box; @@ -77,7 +76,7 @@ margin-top: 0; } -#question-choices-selected .preferential-choice { +#question-choices-selected .preferential-choice, #question-choices-selected .dragarea-hint:first-child:last-child { background-color: #e6f1fc; } @@ -85,6 +84,10 @@ border: 1px solid #555; } +#question-choices-remaining .dragarea-hint:first-child:last-child { + background-color: #eee; +} + .preferential-choice .number, .preferential-choice .name { padding: 0.5em 0 0.5em 0.5em; } diff --git a/eosweb/core/static/nunjucks/booth/base.html b/eosweb/core/static/nunjucks/booth/base.html index 7dcfdf2..57795cd 100644 --- a/eosweb/core/static/nunjucks/booth/base.html +++ b/eosweb/core/static/nunjucks/booth/base.html @@ -50,6 +50,7 @@
{% block buttons %}{% endblock %} +
{% block after %}{% endblock %}