From 02e5d1fae4e280299d67897236d03f30088af53e Mon Sep 17 00:00:00 2001 From: gaazzopa Date: Fri, 20 Nov 2020 11:05:04 +0100 Subject: [PATCH] Small fixes from merge 95 --- cara/apps/calculator/static/js/form.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cara/apps/calculator/static/js/form.js b/cara/apps/calculator/static/js/form.js index 8c9a9256..db3874a7 100644 --- a/cara/apps/calculator/static/js/form.js +++ b/cara/apps/calculator/static/js/form.js @@ -162,8 +162,9 @@ function require_hepa(option) { function require_input_field(id, option) { $(id).prop('required', option); - if (!option) + if (!option) { removeInvalid(id); + } } function disable_input_field(id, option) { @@ -381,8 +382,8 @@ function parseValToNumber(val) { } function parseTimeToMins(cTime) { - var time = cTime.match(/(\d+)(:(\d+))/); - return parseInt(time[1]*60) + parseInt(time[3]); + var time = cTime.match(/(\d+):(\d+)/); + return parseInt(time[1]*60) + parseInt(time[2]); } /* -------On Load------- */