Minor changes

This commit is contained in:
RunasSudo 2017-11-28 00:26:13 +11:00
parent c2d3b4ab93
commit b5a21116bb
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
5 changed files with 9 additions and 5 deletions

View File

@ -63,7 +63,7 @@ class EmailUser(User):
def matched_by(self, other): def matched_by(self, other):
if not isinstance(other, EmailUser): if not isinstance(other, EmailUser):
return False 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): def send_email(self, host, port, username, password, from_email, content):
#__pragma__('skip') #__pragma__('skip')

View File

@ -28,4 +28,4 @@ class RedditUser(User):
def matched_by(self, other): def matched_by(self, other):
if not isinstance(other, RedditUser): if not isinstance(other, RedditUser):
return False return False
return other.username == self.username return other.username.lower() == self.username.lower()

View File

@ -266,7 +266,7 @@ def email_authenticate():
for election in Election.get_all(): for election in Election.get_all():
for voter in election.voters: for voter in election.voters:
if isinstance(voter.user, EmailUser): 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']: if voter.user.password == flask.request.form['password']:
user = voter.user user = voter.user
break break

View File

@ -50,7 +50,6 @@
} }
.preferential-choices .dragarea-hint:first-child:last-child { .preferential-choices .dragarea-hint:first-child:last-child {
content: "";
width: calc(100% - 1em); width: calc(100% - 1em);
height: 3em; height: 3em;
box-sizing: border-box; box-sizing: border-box;
@ -77,7 +76,7 @@
margin-top: 0; 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; background-color: #e6f1fc;
} }
@ -85,6 +84,10 @@
border: 1px solid #555; border: 1px solid #555;
} }
#question-choices-remaining .dragarea-hint:first-child:last-child {
background-color: #eee;
}
.preferential-choice .number, .preferential-choice .name { .preferential-choice .number, .preferential-choice .name {
padding: 0.5em 0 0.5em 0.5em; padding: 0.5em 0 0.5em 0.5em;
} }

View File

@ -50,6 +50,7 @@
<div class="ui container" style="margin-top: 1em;"> <div class="ui container" style="margin-top: 1em;">
{% block buttons %}{% endblock %} {% block buttons %}{% endblock %}
<div style="clear: both;"></div>
</div> </div>
{% block after %}{% endblock %} {% block after %}{% endblock %}