This is an automated email from the ASF dual-hosted git repository. gstein pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/steve.git
commit 092338053de2df95d5f5152c7492533c876b8e1f Author: Greg Stein <[email protected]> AuthorDate: Sun Oct 12 23:35:12 2025 -0500 Use the new flash mechanism for action notifications. --- v3/server/pages.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/v3/server/pages.py b/v3/server/pages.py index ab34478..378c0c9 100644 --- a/v3/server/pages.py +++ b/v3/server/pages.py @@ -229,14 +229,17 @@ async def do_open_endpoint(election): ### check authz - _LOGGER.info(f'User[U:{result.uid}] opened election[E:{election.eid}]') - ### should open/keep a PersonDB instance in the APP pdb = steve.persondb.PersonDB(DB_FNAME) # Open the Election. election.open(pdb) + _LOGGER.info(f'User[U:{result.uid}] opened election[E:{election.eid}]') + + _, title, _ = election.get_metadata() + await flash_success(f'Opened election: {title}') + # Return to the management page for this Election. return quart.redirect(f'/manage/{election.eid}') @@ -249,11 +252,14 @@ async def do_close_endpoint(election): ### check authz - _LOGGER.info(f'User[U:{result.uid}] closed election[E:{election.eid}]') - # Close the Election. election.close() + _LOGGER.info(f'User[U:{result.uid}] closed election[E:{election.eid}]') + + _, title, _ = election.get_metadata() + await flash_success(f'Closed election: {title}') + # Return to the management page for this Election. return quart.redirect(f'/manage/{election.eid}')
