From 852c2c0d2a3fab668ab2f8a3fdad067ff4a97124 Mon Sep 17 00:00:00 2001 From: m Date: Sun, 8 Apr 2018 10:46:46 +0200 Subject: [PATCH] HTML 5 and fixes --- adminstuds.php | 4 ++++ tpl/part/vote_table_classic.tpl | 8 ++++---- tpl/part/vote_table_date.tpl | 10 +++++----- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/adminstuds.php b/adminstuds.php index ab2cacd..5373b5f 100644 --- a/adminstuds.php +++ b/adminstuds.php @@ -201,6 +201,8 @@ if (!empty($_GET['vote'])) { // Something to save (edit or add) // ------------------------------- +$selectedNewVotes = []; + if (!empty($_POST['save'])) { // Save edition of an old vote $name = $inputService->filterName($_POST['name']); $editedVote = filter_input(INPUT_POST, 'save', FILTER_VALIDATE_INT); @@ -252,6 +254,7 @@ if (!empty($_POST['save'])) { // Save edition of an old vote } } catch (AlreadyExistsException $aee) { $message = new Message('danger', __('Error', 'You already voted')); + $selectedNewVotes = $choices; } catch (ConcurrentEditionException $cee) { $message = new Message('danger', __('Error', 'Poll has been updated before you vote')); } catch (ConcurrentVoteException $cve) { @@ -445,5 +448,6 @@ $smarty->assign('accessGranted', true); $smarty->assign('resultPubliclyVisible', true); $smarty->assign('editedVoteUniqueId', ''); $smarty->assign('default_to_marldown_editor', $config['markdown_editor_by_default']); +$smarty->assign('selectedNewVotes', $selectedNewVotes); $smarty->display('studs.tpl'); diff --git a/tpl/part/vote_table_classic.tpl b/tpl/part/vote_table_classic.tpl index ba473d3..2ebfd4b 100644 --- a/tpl/part/vote_table_classic.tpl +++ b/tpl/part/vote_table_classic.tpl @@ -181,7 +181,7 @@ {if $poll->ValueMax eq NULL || $best_choices['y'][$i] lt $poll->ValueMax}
  • diff --git a/tpl/part/vote_table_date.tpl b/tpl/part/vote_table_date.tpl index cb35ff8..21b0fd3 100644 --- a/tpl/part/vote_table_date.tpl +++ b/tpl/part/vote_table_date.tpl @@ -243,7 +243,7 @@ {if $poll->ValueMax eq NULL || $best_choices['y'][$i] lt $poll->ValueMax}
  • -