-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjobpost.html
110 lines (101 loc) · 4.48 KB
/
jobpost.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Submit to Google Form</title>
<!-- Bootstrap CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<!-- Leaflet CSS -->
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<style>
#map {
height: 300px;
width: 100%;
}
</style>
</head>
<body>
<div class="container mt-4">
<div id="map"></div>
<form action="https://docs.google.com/forms/d/e/1FAIpQLSc-eI8W0yABluXJaxh1eOutqoq-IMPozUsf8LXCcfA4kCE3sg/formResponse" method="POST">
<!-- Hidden fields for latitude and longitude -->
<input type="hidden" id="lat" name="entry.762797833">
<input type="hidden" id="long" name="entry.1749073491">
<div class="form-group">
<label for="title">name</label>
<input type="text" class="form-control" id="title" name="entry.1822183594" placeholder="Enter name" required>
</div>
<div class="form-group">
<label for="description">Description</label>
<textarea class="form-control" id="description" name="entry.1462572732" placeholder="Enter Description" required></textarea>
</div>
<div class="form-group">
<label for="category">Category</label>
<select class="form-control" id="category" name="entry.2123662913" required>
<option value="">Select Category</option>
<option value="Feeds">Feeds</option>
<option value="Explore">Explore</option>
<option value="Party">Party</option>
<option value="Show">Show</option>
<option value="Sports">Sports</option>
<option value="Sales">Sales</option>
<option value="Job">Job</option>
<option value="Parade">Parade</option>
</select>
</div>
<div class="form-group">
<label for="url">work charges</label>
<input type="number" class="form-control" id="url" name="entry.1453898494" placeholder="Enter amount" required>
</div>
<div class="form-group">
<label for="url">contact number</label>
<input type="number" class="form-control" id="url" name="entry.1453898494" placeholder="Enter number" required>
</div>
<button type="submit" class="btn btn-primary mt-3">Submit</button>
</form>
</div>
<!-- Bootstrap JS and dependencies -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<!-- Leaflet JS -->
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<script>
// Initialize the map
const map = L.map('map').setView([51.505, -0.09], 13);
// Add a tile layer
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
// Get current location and set map view
function onLocationFound(e) {
const lat = e.latitude;
const lng = e.longitude;
document.getElementById('lat').value = lat;
document.getElementById('long').value = lng;
map.setView([lat, lng], 13);
L.marker([lat, lng]).addTo(map)
.bindPopup('You are here')
.openPopup();
}
function onLocationError(e) {
alert(e.message);
}
// Try to get the user's location
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(
(position) => {
onLocationFound({
latitude: position.coords.latitude,
longitude: position.coords.longitude
});
},
onLocationError
);
} else {
alert('Geolocation is not supported by this browser.');
}
</script>
</body>
</html></html>