From 28d2c6d84af075263a89025b04df438cdd762658 Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Tue, 15 Oct 2013 05:02:07 -0400 Subject: [PATCH] Use JQuery date pickers. Added the datepicker() function which will show an input field for an ISO8601 date entry. If scripting is enabled, JQuery will be used to show a popup date picker when the user clicks in the field. The date picker can be restricted to showing dates no earlier and/or no later than today, and it can be linked to another picker to form a date range selector. --- lib/forms.php | 38 ++++++++++++++++++++++++++++++++++++++ lib/header.php | 5 +++++ www/index.php | 1 + 3 files changed, 44 insertions(+) diff --git a/lib/forms.php b/lib/forms.php index 7b707d7..ae08607 100644 --- a/lib/forms.php +++ b/lib/forms.php @@ -43,4 +43,42 @@ echo ">$text\n"; } + function datepicker($name, $value = null, $past = true, $past_picker = null, $future = true, $future_picker = null) { + $id = "datepicker_$name"; + echo ""; + echo "(Y-m-d)"; + } + ?> diff --git a/lib/header.php b/lib/header.php index 0582fcb..3c44dd9 100644 --- a/lib/header.php +++ b/lib/header.php @@ -1,6 +1,11 @@ <?php echo "$charity"; if ($module) echo " - $module"; ?> +\n"; + echo "\n"; + echo "\n"; +?> diff --git a/www/index.php b/www/index.php index 84f8717..4468e05 100644 --- a/www/index.php +++ b/www/index.php @@ -28,6 +28,7 @@ else $module = strtolower($module); #echo "request: $request; module: $module; params: " . print_r($parameters, true); + $http = (isset($_SERVER['HTTPS'])) ? "https" : "http"; $username = $_SERVER['REMOTE_USER']; include_once("$lib_root/constants.php"); include_once("$lib_root/functions.php"); -- 2.20.1