From 151239924b6c34781ee04239a8faa4568fdb7288 Mon Sep 17 00:00:00 2001 From: rgarcia Date: Thu, 21 Jun 2018 15:36:39 +0200 Subject: [PATCH] Display 'validate document' menu item only when applicable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We are trying to avoid Officers from forgetting to click the “Confirm vote” button, which is necessary to keep track of who has voted a Poll To do that, we are not displaying the menu item to go back to the next person that wants to vote, until the Officer clicks the “Confirm Vote” button or the “The user has decided not to vote” button Note: Due to mobile version we have duplicate ids, so using classes for the menu items to hide them without errors Note2: We are only hidding the menu item, if there are votable polls, otherwise the “Confirm vote” button does not appear, and there is no way of going back to help the next person that wants to vote --- app/views/officing/_menu.html.erb | 4 ++- app/views/officing/voters/create.js.erb | 3 +- spec/features/polls/voter_spec.rb | 44 ++++++++++++++++++++++++- 3 files changed, 48 insertions(+), 3 deletions(-) diff --git a/app/views/officing/_menu.html.erb b/app/views/officing/_menu.html.erb index 173c72582..17b57a087 100644 --- a/app/views/officing/_menu.html.erb +++ b/app/views/officing/_menu.html.erb @@ -1,7 +1,9 @@