Skip to content

Commit

Permalink
tweaked some UI issues with passwords
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Adida authored and Ben Adida committed Jun 1, 2009
1 parent 4291b73 commit d1dd1b3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
7 changes: 6 additions & 1 deletion base/mail.py
Expand Up @@ -10,6 +10,7 @@

try:
from google.appengine.api import mail
from google.appengine.runtime import apiproxy_errors
except:
pass

Expand All @@ -29,7 +30,11 @@ def simple_send(recipient_names, recipient_emails, sender_name, sender_email, su
if reply_to:
message.reply_to = reply_to

message.send()
try:
message.send()
except apiproxy_errors.OverQuotaError, message:
logging.info("quota error: %s" % message)
raise Exception("over mail quota %s" % message)

# don't send email if config says not to
if not config.SEND_MAIL:
Expand Down
5 changes: 5 additions & 0 deletions client/emailvoters.py
Expand Up @@ -47,5 +47,10 @@ def open_and_read_file(file_path):
if res == "DONE":
break

if len(res) > 100:
print "PROBLEM!"
print res
break

# increment offset by LIMIT, continue
last_voter_id = res
2 changes: 1 addition & 1 deletion static/templates/booth/login.html
Expand Up @@ -23,7 +23,7 @@ <h3 style="border-bottom: 1px solid black;">Submit Your Encrypted Ballot</h3>
<form onsubmit="BOOTH.send_ballot(); return false;" action="#" id="send_ballot_form" class="prettyform">
<label for="email">Email:</label>
<input type="text" name="email" size="30" />
[<a href="javascript:BOOTH.get_password();">get password</a>]
<span id="get_password_span">[<a href="javascript:BOOTH.get_password();">get password</a>]</span>
<br />
<label for="password">Password:</label>
<input type="password" name="password" size="30" /><br/>
Expand Down
7 changes: 5 additions & 2 deletions templates/election/vote.tmpl
Expand Up @@ -249,7 +249,9 @@ BOOTH.send_ballot = function() {

BOOTH.get_password = function() {
var send_form = document.forms['send_ballot_form'];


\$('#get_password_span').hide();

var data = {
email : send_form.email.value
};
Expand All @@ -259,7 +261,8 @@ BOOTH.get_password = function() {
url: "/elections/$election.election_id/send_password",
data: data,
success: function(result) {
alert('password should be in your inbox');
alert('result of sending password: ' + result);
\$('#get_password_span').show();
}
});
};
Expand Down

0 comments on commit d1dd1b3

Please sign in to comment.