summaryrefslogtreecommitdiff
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
parent2d6dde82eb2a5cee8e9676b42d53815dc7fa0be8 (diff)
date is displayed in form and readonly
-rw-r--r--cam.html2
-rw-r--r--js/cctv-control.js18
2 files changed, 19 insertions, 1 deletions
diff --git a/cam.html b/cam.html
index 4fec98b..3196c52 100644
--- a/cam.html
+++ b/cam.html
@@ -16,7 +16,7 @@
<p>Personalkennzeichnung</p>
<input id="formName"><br>
<p>Zeitpunkt</p>
- <input id="formDate"><br>
+ <input id="formDate" readonly><br>
<p>Analyse der Aufnahme</p>
<textarea id="formAnalysis1"></textarea>
<p>Bemerkungen zum Untersuchungsverlauf</p>
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;