From: Iain Patterson Date: Tue, 15 Oct 2013 09:02:07 +0000 (-0400) Subject: Use JQuery date pickers. X-Git-Tag: 2013-10-15~3 X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=28d2c6d84af075263a89025b04df438cdd762658;p=readifood.git 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. --- 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");