From 445dac2e511561f83a17ef0e5445eb5852c0b346 Mon Sep 17 00:00:00 2001 From: m Date: Wed, 4 Apr 2018 22:18:53 +0200 Subject: [PATCH] =?UTF-8?q?Ne=20pas=20effacer=20les=20s=C3=A9lections=20ap?= =?UTF-8?q?r=C3=A8s=20l'erreur=20"Vous=20avez=20d=C3=A9j=C3=A0=20vot=C3=A9?= =?UTF-8?q?"=20https://framagit.org/framasoft/framadate/issues/194?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- studs.php | 4 ++++ tpl/part/vote_table_classic.tpl | 18 +++++++++++++----- tpl/part/vote_table_date.tpl | 23 +++++++++++++---------- 3 files changed, 30 insertions(+), 15 deletions(-) diff --git a/studs.php b/studs.php index 6cef3ee..addce34 100644 --- a/studs.php +++ b/studs.php @@ -50,6 +50,8 @@ $resultPubliclyVisible = true; $slots = []; $votes = []; $comments = []; +$selectedNewVotes = []; + /* Services */ /*----------*/ @@ -180,6 +182,7 @@ if ($accessGranted) { } } 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) { @@ -237,5 +240,6 @@ $smarty->assign('accessGranted', $accessGranted); $smarty->assign('resultPubliclyVisible', $resultPubliclyVisible); $smarty->assign('editedVoteUniqueId', $editedVoteUniqueId); $smarty->assign('ValueMax', $poll->ValueMax); +$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 97d3c33..ba473d3 100644 --- a/tpl/part/vote_table_classic.tpl +++ b/tpl/part/vote_table_classic.tpl @@ -180,26 +180,34 @@ diff --git a/tpl/part/vote_table_date.tpl b/tpl/part/vote_table_date.tpl index ddfdeed..cb35ff8 100644 --- a/tpl/part/vote_table_date.tpl +++ b/tpl/part/vote_table_date.tpl @@ -238,40 +238,43 @@ {foreach $slots as $slot} {foreach $slot->moments as $moment} - - - - {$i = $i+1} {/foreach} {/foreach}