From 54fd8464d9d4f89df278bd7556ccbb66c9bce27b 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 f202c4a..ee8dba9 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 1b57894..9f3193d 100644 --- a/tpl/part/vote_table_classic.tpl +++ b/tpl/part/vote_table_classic.tpl @@ -181,26 +181,34 @@ diff --git a/tpl/part/vote_table_date.tpl b/tpl/part/vote_table_date.tpl index db8cdce..87e3b8e 100644 --- a/tpl/part/vote_table_date.tpl +++ b/tpl/part/vote_table_date.tpl @@ -239,40 +239,43 @@ {foreach $slots as $slot} {foreach $slot->moments as $moment} - - - - {$i = $i+1} {/foreach} {/foreach}