-
Notifications
You must be signed in to change notification settings - Fork 2
/
app.js
76 lines (67 loc) · 2.73 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
var userInfo = document.getElementById('userInfo');
var userInfoSubmit = document.getElementById('userInfoSubmit');
var userName = null;
var userStreet = null;
var userCity = null;
var userState = null;
var userZip = null;
var clientInfo = document.getElementById('clientInfo');
var clientInfoSubmit = document.getElementById('clientInfoSubmit');
var clientName = null;
var clientStreet = null;
var clientCity = null;
var clientState = null;
var clientZip = null;
var dateInfo = document.getElementById('dateInfo');
var dateInfoSubmit = document.getElementById('dateInfoSubmit');
var datePicker = null;
var projectNameInfo = document.getElementById('projectNameInfo');
var projectNameSubmit = document.getElementById('projectNameSubmit');
var projectName = null;
var projectDescriptionInfo = document.getElementById('projectDescriptionInfo');
var projectDescriptionSubmit = document.getElementById('projectDescriptionSubmit');
var projectDescription = null;
Date.prototype.toDateInputValue = (function() {
var local = new Date(this);
local.setMinutes(this.getMinutes() - this.getTimezoneOffset());
return local.toJSON().slice(0,10);
});
document.getElementById('datePicker').value = new Date().toDateInputValue();
userInfoSubmit.onclick = function(event) {
event.preventDefault();
userName = document.getElementById('userName').value;
userStreet = document.getElementById('userStreet').value;
userCity = document.getElementById('userCity').value;
userState = document.getElementById('userState').value;
userZip = document.getElementById('userZip').value;
userInfo.classList.add("dn");
clientInfo.classList.remove("dn");
}
clientInfoSubmit.onclick = function(event) {
event.preventDefault();
clientName = document.getElementById('clientName').value;
clientStreet = document.getElementById('clientStreet').value;
clientCity = document.getElementById('clientCity').value;
clientState = document.getElementById('clientState').value;
clientZip = document.getElementById('clientZip').value;
clientInfo.classList.add("dn");
dateInfo.classList.remove("dn");
}
dateInfoSubmit.onclick = function(event) {
event.preventDefault();
datePicker = document.getElementById('datePicker').value;
dateInfo.classList.add("dn");
projectNameInfo.classList.remove("dn");
}
projectNameInfoSubmit.onclick = function(event) {
event.preventDefault();
projectName = document.getElementById('projectName').value;
projectNameInfo.classList.add("dn");
projectDescriptionInfo.classList.remove("dn");
}
projectDescriptionInfoSubmit.onclick = function(event) {
event.preventDefault();
projectDescription = document.getElementById('projectDescription').value;
projectDescriptionInfo.classList.add("dn");
// projectDescriptionInfo.classList.remove("dn");
}