Skip to content

Commit

Permalink
fix: fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
shonenada committed Feb 22, 2019
1 parent d863c50 commit 52820ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions stalls/modules/poll/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def do_poll():
response = process_vote(payload)
if response is None:
logging.getLogger('poll').info('none respond')
return json_response(form.make_msg(_('Operation Failed')))
return json_response(form.make_msg(_('Action Not Found')))
return json_response(response)


Expand Down Expand Up @@ -177,4 +177,4 @@ def show_poll_result():
else:
return json_response(form.make_msg(_('Poll Not Found')))

return json_response(form.make_msg(_('Operation Failed')))
return json_response(form.make_msg(_('Action Not Foudn')))
7 changes: 5 additions & 2 deletions stalls/modules/poll/form/result.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-

import time

from flask import url_for
from flask_babel import gettext as _

Expand Down Expand Up @@ -88,7 +90,7 @@ def show_poll_result(poll):
form.add_actions(
context,

Input(value=poll.visit_key, name='token'),
Input(value=poll.visit_key, name='token', hidden=True),

Section(value=_('Poll Name: %(description)s',
description=poll.description)),
Expand All @@ -112,10 +114,11 @@ def show_poll_result(poll):
image_url = url_for('poll.preview_poll',
poll_id=poll.id,
token=poll.visit_key,
ts=time.time(),
_external=True)

form.add_actions(
Image(title=_('Poll Result'), url=image_url),
Submit(name=submit.REFRESH, label=_('Refresh')))
Submit(name=submit.REFRESH, text=_('Refresh')))

return form.render()

0 comments on commit 52820ff

Please sign in to comment.