summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorFlorian <stayawake@lavabit.com>2014-02-16 03:13:55 +0100
committerFlorian <stayawake@lavabit.com>2014-02-16 03:13:55 +0100
commitdd2f70706cbf73715ec87765ef740047f65360f4 (patch)
tree941ed9f5d6f3aa739d9c7aca00b235d26bed10bf /js
parent2d6dde82eb2a5cee8e9676b42d53815dc7fa0be8 (diff)
date is displayed in form and readonly
Diffstat (limited to 'js')
-rw-r--r--js/cctv-control.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/js/cctv-control.js b/js/cctv-control.js
index b4e6fa7..4732b30 100644
--- a/js/cctv-control.js
+++ b/js/cctv-control.js
@@ -131,12 +131,30 @@ function showForm() {
display2 = document.getElementById("formImage"),
stor = localStorage.getItem("snapShot");
+ var d = new Date();
+
+ var date = d.getDay();
+ date += '/';
+ date += d.getMonth();
+ date += '/';
+ date += d.getFullYear();
+
+ var time = d.getHours();
+ time += ':';
+ time += d.getMinutes();
+ time += ':';
+ time += d.getSeconds();
+ time += ' Uhr';
+
//display loaded image
if (stor) {
display1.setAttribute("src", stor);
display2.setAttribute("src", stor);
}
+ //insert date in date-field
+ document.getElementById("formDate").value = date + ' ' + time;
+
//make form visible
document.getElementById("form").style.visibility = 'visible';
formActive = 1;