-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadd_admin.html
239 lines (201 loc) · 7.13 KB
/
add_admin.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Sahayak</title>
<!-- Bootstrap Core CSS -->
<link rel="stylesheet" href="css/bootstrap-multiselect.css" type="text/css"/>
<!-- Custom CSS -->
<link href="css/homepage.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</head>
</head>
<body>
<!-- Page Content -->
<div class="container">
<div class="row">
<div class="col-md-12">
<div>
<br>
<form class="form-horizontal" id="asdfform" type="post" role="form">
<div class="form-group">
<label class="control-label col-sm-2" for="name">Name</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="name" placeholder="Enter name">
</div>
</div>
<!--
<div class="form-group">
<label class="control-label col-sm-2" for="category">Category</label>
<div class="col-sm-10">
<select id="example-getting-started" multiple="multiple">
<option value="women">women</option>
<option value="children">children</option>
<option value="animals">animals</option>
<option value="disability">disability</option>
<option value="community">community</option>
<option value="environment">environment</option>
<option value="health">health</option>
</select>
</div>
</div>
-->
<div class="form-group">
<label class="control-label col-sm-2" for="category">Category</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="category" placeholder="Enter categories">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="line1">Address Line1</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="line1" placeholder="Address Line1">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="line2">Address Line2</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="line2" placeholder="street">
</div>
</div><div class="form-group">
<label class="control-label col-sm-2" for="area">Area</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="area" placeholder="Area">
</div>
</div><div class="form-group">
<label class="control-label col-sm-2" for="city">City</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="city" placeholder="City">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="state">State</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="state" placeholder="State">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="poc">Point of Contact- Name</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="poc" placeholder="Person Name">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="phone">Phone</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="phone" placeholder="phone">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="email">Email</label>
<div class="col-sm-10">
<input type="email" class="form-control" id="email" placeholder="email@asdf.com">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="phone">Website</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="website-url" placeholder="www.yoururl.com">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="description">Description</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="description" placeholder="Description">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button id="add_suggestion" type="submit" class="btn btn-default">Submit Suggestion For Review</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- /.container -->
<div class="container">
<hr>
<!-- Footer -->
<footer>
<div class="row">
<div class="col-lg-12">
<p>Copyright © Your Website 2014</p>
</div>
</div>
</footer>
</div>
<!-- /.container -->
<!-- jQuery -->
<!-- Bootstrap Core JavaScript -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<script type="text/javascript" src="js/bootstrap-multiselect.js"></script>
<script type="text/javascript">
$( document ).ready(function() {
$("#add_suggestion").click(function(){
var area=$("#area").val();
var city=$("#city").val()+"+"+$("#state").val();
var country="IN";
jQuery.ajax({
url: "http://maps.google.com/maps/api/geocode/json?address="+area+"+"+city+"+"+country,
success: function (result) {
if (result.isOk == false) alert(result.results);
if(result.results && result.results.length>=1){
lat = result.results[0].geometry.location.lat;
lon = result.results[0].geometry.location.lng;
alert("Data: " + lat+","+lon);
var mydata={
"name": $("#name").val(),
"logo": "",
"address": {
"line1": $("#line1").val(),
"line2": $("#line2").val(),
"area": $("#area").val(),
"city": $("#city").val(),
"state": $("#state").val()
},
"location": {
"lat": lat,
"lon": lon
},
"poc": $("#poc").val(),
"phone": $("#phone").val(),
"email": $("#email").val(),
"website": $("#website-url").val(),
"desc": $("#description").val(),
"category":$("#category").val(),
}
console.log(mydata);
myUrl='http://lm-maa-26500421.paypalcorp.com:9200/sahayak/ngodetails'
console.log(myUrl);
$.ajax({
url: myUrl,
type: 'post',
dataType: 'json',
success: function (data) {
alert(data);
},
data: JSON.stringify(mydata)
});
}
},
async: false
});
});
});
</script>
</body>
</html>