From 101fd8495f06d1a31d920e65c7eb5437aecc2ca5 Mon Sep 17 00:00:00 2001 From: Scott Dale Date: Wed, 28 Mar 2007 07:44:10 +0000 Subject: time is now drop down, various other logic checks --- usr/local/www/firewall_schedule_edit.php | 74 +++++++++++++++++++++++--------- 1 file changed, 54 insertions(+), 20 deletions(-) (limited to 'usr/local/www') diff --git a/usr/local/www/firewall_schedule_edit.php b/usr/local/www/firewall_schedule_edit.php index c5119de..8959dbb 100644 --- a/usr/local/www/firewall_schedule_edit.php +++ b/usr/local/www/firewall_schedule_edit.php @@ -162,7 +162,10 @@ if ($_POST) { //we received input errors, copy data to prevent retype else { - $getSchedule = true; + if (!$_POST['schedule0']) + $getSchedule = false; + else + $getSchedule = true; $pconfig['name'] = $schedule['name']; $pconfig['descr'] = $schedule['descr']; $pconfig['timerange'] = $schedule['timerange']; @@ -318,19 +321,16 @@ function update_month(){ } } -//limit numbers only input for time range input boxes -function checkKeyEntry(incEvent) -{ - //cross browser support - if (incEvent.which) - var code = incEvent.which; - else - var code = event.keyCode; - - if (code > 31 && (code < 48 || code > 57)) +function checkForRanges(){ + if (daysSelected != "") + { + alert("You have not saved the specified time range. Please click 'Add Time' button to save the time range"); return false; + } else + { return true; + } } //check time limits @@ -520,7 +520,7 @@ function addTimeRange(){ //get time specified - starttimehour = document.getElementById("starttimehour").value; + starttimehour = document.getElementById("starttimehour").value starttimemin = document.getElementById("starttimemin").value; stoptimehour = document.getElementById("stoptimehour").value; stoptimemin = document.getElementById("stoptimemin").value; @@ -578,7 +578,7 @@ function insertElements(tempFriendlyTime, starttimehour, starttimemin, stoptimeh tr.appendChild(td); td = d.createElement("td"); - td.innerHTML=td.innerHTML=""; + td.innerHTML=""; tr.appendChild(td); td = d.createElement("td"); @@ -843,18 +843,52 @@ EOD; -  Hr   -  Min +  Hr   +  Min -  Hr   -  Min +  Hr   +  Min
- Enter the time range (in 24 hour format) for the day(s) selected on the Month(s) above. The start and stop minutes can only be in 15 minute increments. I.E. 00, 15, 30, 45 or 59. -
A full day is 0:0-23:59. + Select the time range for the day(s) selected on the Month(s) above. A full day is 0:0-23:59. @@ -1020,7 +1054,7 @@ EOD;   - + -- cgit v1.1