From 801dc150e2a03af45e617bf303bc4227b68b0ef8 Mon Sep 17 00:00:00 2001 From: JosephK Date: Thu, 19 Nov 2015 15:38:27 +0100 Subject: [PATCH] Only one day needed to submit --- js/app/date_poll.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/js/app/date_poll.js b/js/app/date_poll.js index d63684d..6e894d2 100644 --- a/js/app/date_poll.js +++ b/js/app/date_poll.js @@ -23,24 +23,18 @@ $(document).ready(function () { var $selected_days = $('#selected-days'); var $removeaday_and_copyhours = $('#remove-a-day, #copyhours'); - // at least 1 day and 1 hour filled and you can submit + // at least 1 day filled and you can submit var submitDaysAvalaible = function () { var nb_filled_days = 0; - var nb_filled_hours = 0; $selected_days.find('fieldset legend input').each(function () { if ($(this).val() != '') { nb_filled_days++; } }); - $selected_days.find('.hours').each(function () { - if ($(this).val() != '') { - nb_filled_hours++; - } - }); - if (nb_filled_days >= 1 && nb_filled_hours >= 1) { + if (nb_filled_days >= 1) { $('button[name="choixheures"]').removeClass('disabled'); return true; } else {