-
Notifications
You must be signed in to change notification settings - Fork 2
/
editBasicInfo.html
133 lines (127 loc) · 5.63 KB
/
editBasicInfo.html
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="description" content="" />
<meta name="author" content="" />
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<![endif]-->
<title>Schedule Me</title>
<link rel="stylesheet" href="css/editBasicInfoStyle.css">
<!-- BOOTSTRAP CORE STYLE -->
<link href="assets2/css/bootstrap.css" rel="stylesheet" />
<!-- FONT AWESOME STYLE -->
<link href="assets2/css/font-awesome.css" rel="stylesheet" />
<!-- ANIMATE STYLE -->
<link href="assets2/css/animate.css" rel="stylesheet" />
<!-- FLEXSLIDER STYLE -->
<link href="assets2/css/flexslider.css" rel="stylesheet" />
<!-- CUSTOM STYLE -->
<link href="assets2/css/style.css" rel="stylesheet" />
<!-- GOOGLE FONTS -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300' rel='stylesheet' type='text/css' />
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css' />
</head>
<script>
var config = {
apiKey: "AIzaSyAV7G1bMr6mjVCRzcR4cVWaYNL5XEcrDGk",
authDomain: "scheduleme-f5d58.firebaseapp.com",
databaseURL: "https://scheduleme-f5d58.firebaseio.com",
projectId: "scheduleme-f5d58",
storageBucket: "scheduleme-f5d58.appspot.com",
messagingSenderId: "536379458427"
};
firebase.initializeApp(config);
var database = firebase.database();
function update() {
var businessName_ = window.location.hash.substring(1);
var accessKey_ = "";
var calId_ = "";
var fullName_ = document.getElementById("fullName").value.toLowerCase();
var businessEmail = document.getElementById("email").value.toLowerCase();
var adddress_ = document.getElementById("address").value.toLowerCase();
var number = document.getElementById("phone").value.toLowerCase();
var maxLen = document.getElementById("time").value.toLowerCase();
function readData() {
var database = firebase.database();
return database.ref(String(businessName_) + "/").once('value').then(function(snapshot){
var key = snapshot.val().accessKey;
accessKey_ = key;
calId_ = snapshot.val().calendarId;
});
}
readData();
database.ref(String(businessName_) + "/").set({
accessKey: accessKey_,
businessName: businessName_,
userName: fullName_,
emailOfCalendar: businessEmail,
address: address_,
phone: number,
calendarId: calId_,
maxLength: maxLen
});
}
</script>
<body>
<div class="navbar navbar-inverse set-radius-zero" >
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">
<h1 style = "color: #ffffff ;font-size: 44px;text-align: center; font-family: "Roboto", sans-serif">Schedule Me</h1>
<!-- <img src="assets/img/logo.png" /> -->
</a>
</div>
<div class="right-div">
<!-- <strong>Support : </strong> [email protected]
--> </div>
</div>
</div>
<!-- LOGO HEADER END-->
<section class="menu-section">
<div class="container">
<div class="row ">
<div class="col-md-12">
<div class="navbar-collapse collapse ">
<ul id="menu-top" class="nav navbar-nav navbar-right">
<li><a href="index.html" >HOME</a></li>
<li><a href="editBasicInfo.html" class="menu-top-active">EDIT BASIC INFO</a></li>
<li><a href="gallery.html" >EMPLOYEES AND TASKS</a></li>
<li><a href="features.html">LOGOUT</a></li>
</ul>
</div>
</div>
</div>
</div>
</section>
<body>
<div style = "padding: 4% 0 0"></div>
<div style = "padding: 2% 0 0"></div>
<div class = "form2">
<form class = "login-form">
<input type="text" placeholder="Your Name" id="fullName"/>
<input type="text" placeholder="Name of Business" id="bizName"/>
<input type="text" placeholder="Contact Email" id="email"/>
<input type="text" placeholder="Phone Number" id="phone"/>
<input type="text" placeholder="Business Address" id="address"/>
<input type="text" placeholder="Appointment Length (Minutes)" id="time"/>
<!-- <p class="message">Does your business have multiple employees who need to make sepearte appointments?</p> -->
<!-- <div style = "padding: 7% 0 0"></div>
--> <button type="button" style = "float: right" onclick="update()">Update</button>
<div style = "padding: 12% 0 0"></div>
<!-- <button type="button" style = "float: right" onclick="createBizWithEmp()">Next</button>
<div style = "padding: 12% 0 0"></div> -->
</form>
</div>
</div>
</div>
</body>
</html>