From 949f22713943f7c50df728bdf5c65b2a4e39a737 Mon Sep 17 00:00:00 2001 From: Christian Klinger Date: Wed, 15 Jun 2016 10:29:59 +0200 Subject: Added date and time pickers. --- modules-available/exams/config.json | 2 +- modules-available/exams/page.inc.php | 4 +-- .../exams/templates/page-add-exam.html | 40 ++++++++++++++++++---- 3 files changed, 37 insertions(+), 9 deletions(-) (limited to 'modules-available/exams') diff --git a/modules-available/exams/config.json b/modules-available/exams/config.json index e109b27b..6590a595 100644 --- a/modules-available/exams/config.json +++ b/modules-available/exams/config.json @@ -1,5 +1,5 @@ { "category":"main.status", - "dependencies": [ "locations" ], + "dependencies": [ "locations", "visjs", "bootstrap_datepicker", "bootstrap_timepicker"], "permission": "0" } diff --git a/modules-available/exams/page.inc.php b/modules-available/exams/page.inc.php index e5129d38..78d5b21c 100644 --- a/modules-available/exams/page.inc.php +++ b/modules-available/exams/page.inc.php @@ -29,8 +29,8 @@ class Page_Exams extends Page if (Request::isPost()) { /* process form-data */ $locationid = Request::post('location'); - $starttime = Request::post('starttime'); - $endtime = Request::post('endtime'); + $starttime = Request::post('starttime_date') . " " . Request::post('starttime_time'); + $endtime = Request::post('endtime_date') . " " . Request::post('endtime_time'); $res = Database::exec("INSERT INTO exams(locationid, starttime, endtime) VALUES(:locationid, :starttime, :endtime);", compact('locationid', 'starttime', 'endtime')); diff --git a/modules-available/exams/templates/page-add-exam.html b/modules-available/exams/templates/page-add-exam.html index b610fcd8..b6a8f6b1 100644 --- a/modules-available/exams/templates/page-add-exam.html +++ b/modules-available/exams/templates/page-add-exam.html @@ -10,16 +10,44 @@ -
- - +
+
+ + +
+
+ + +
-
- - +
+
+ + +
+
+ + +
+ + -- cgit v1.2.3-55-g7522