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}
  • -