Skip to content

Commit

Permalink
blood bank page changes
Browse files Browse the repository at this point in the history
  • Loading branch information
abhisek2004 committed Sep 19, 2024
1 parent 8bcde9f commit 0a1032a
Show file tree
Hide file tree
Showing 4 changed files with 274 additions and 195 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
92 changes: 50 additions & 42 deletions Government of NCT of Delhi/templates/blood_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

<title> The Online Blood Bank </title>

<link rel="stylesheet" href="w3.css">
<link rel="stylesheet" href="app.css">
<link rel="stylesheet" href="../static/css/blood_w3.css">
<link rel="stylesheet" href="../static/css/blood_app.css">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

Expand Down Expand Up @@ -229,44 +229,25 @@ <h4> Your Gender *</h4>
</div>

<div class="w3-half">
<h4>Choose state * </h4>
<select name="state" class="w3-select w3-border w3-light-grey">
<option value="Andhra Pradesh">Andhra Pradesh</option>
<option value="Andaman and Nicobar Islands">Andaman and Nicobar Islands</option>
<option value="Arunachal Pradesh">Arunachal Pradesh</option>
<option value="Assam">Assam</option>
<option value="Bihar">Bihar</option>
<option value="Chandigarh">Chandigarh</option>
<option value="Chhattisgarh">Chhattisgarh</option>
<option value="Dadar and Nagar Haveli">Dadar and Nagar Haveli</option>
<option value="Daman and Diu">Daman and Diu</option>
<option value="Delhi" selected>Delhi</option>
<option value="Lakshadweep">Lakshadweep</option>
<option value="Puducherry">Puducherry</option>
<option value="Goa">Goa</option>
<option value="Gujarat">Gujarat</option>
<option value="Haryana">Haryana</option>
<option value="Himachal Pradesh">Himachal Pradesh</option>
<option value="Jammu and Kashmir">Jammu and Kashmir</option>
<option value="Jharkhand">Jharkhand</option>
<option value="Karnataka">Karnataka</option>
<option value="Kerala">Kerala</option>
<option value="Madhya Pradesh">Madhya Pradesh</option>
<option value="Maharashtra">Maharashtra</option>
<option value="Manipur">Manipur</option>
<option value="Meghalaya">Meghalaya</option>
<option value="Mizoram">Mizoram</option>
<option value="Nagaland">Nagaland</option>
<option value="Odisha">Odisha</option>
<option value="Punjab">Punjab</option>
<option value="Rajasthan">Rajasthan</option>
<option value="Sikkim">Sikkim</option>
<option value="Tamil Nadu">Tamil Nadu</option>
<option value="Telangana">Telangana</option>
<option value="Tripura">Tripura</option>
<option value="Uttar Pradesh">Uttar Pradesh</option>
<option value="Uttarakhand">Uttarakhand</option>
<option value="West Bengal">West Bengal</option>
<h4>Choose District/City *</h4>
<!-- <label for="district">Select District/City:</label> -->
<select id="district" class="w3-select w3-border w3-light-grey" onchange="populateAreas()"
required>
<option value="">--Select District/City--</option>
<option value="Central Delhi">Central Delhi</option>
<option value="North Delhi">North Delhi</option>
<option value="South Delhi">South Delhi</option>
<option value="East Delhi">East Delhi</option>
<option value="West Delhi">West Delhi</option>
<option value="New Delhi">New Delhi</option>
</select>
</div>

<div class="w3-half">
<h4>Select Area *</h4>
<!-- <label for="area">Select Area:</label> -->
<select id="area" class="w3-select w3-border w3-light-grey" required>
<option value="">--Select Area--</option>
</select>
</div>

Expand All @@ -280,10 +261,10 @@ <h4>City Name *</h4>
<input type="text" name="city" class="w3-input w3-light-grey w3-border">
</div>

<div class="w3-half">
<!-- <div class="w3-half">
<h4>Local Area *</h4>
<input type="text" name="area" class="w3-input w3-light-grey w3-border">
</div>
</div> -->


<div class="w3-half">
Expand Down Expand Up @@ -327,6 +308,33 @@ <h3>
</h3>
</footer> -->

<script>
function populateAreas() {
const district = document.getElementById("district").value;

fetch('/get_areas', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ district: district })
})
.then(response => response.json())
.then(data => {
const areaSelect = document.getElementById("area");
areaSelect.innerHTML = "<option value=''>--Select Area--</option>";

data.forEach(area => {
const option = document.createElement("option");
option.value = area;
option.textContent = area;
areaSelect.appendChild(option);
});
})
.catch(error => console.error('Error fetching areas:', error));
}
</script>

<script async src="app.js"></script>
</body>

Expand Down
75 changes: 0 additions & 75 deletions Government of NCT of Delhi/templates/blood_index1.html

This file was deleted.

Loading

0 comments on commit 0a1032a

Please sign in to comment.