Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This a crime reporting interface, i have created a folder called ecrime #1083

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions Public/ecrime/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Crime Reporting Interface</title>
</head>
<body>

<form id="crimeReportForm">
<label for="name">Name:</label>
<input type="text" id="name" name="name" required>

<label for="crimeDescription">Description of the Crime:</label>
<textarea id="crimeDescription" name="crimeDescription" rows="4" required></textarea>

<label for="region">Region:</label>
<select id="region" name="region" required>
<option value="" disabled selected>Select Region</option>
<option value="north">North</option>
<option value="south">South</option>
<option value="east">East</option>
<option value="west">West</option>
</select>

<label for="county">County:</label>
<select id="county" name="county" required>
<option value="" disabled selected>Select County</option>
<!-- Add options for counties based on the selected region -->
</select>

<button type="button" onclick="submitCrimeReport()">Submit Report</button>
</form>

<script src="script.js"></script>
</body>
</html>

19 changes: 19 additions & 0 deletions Public/ecrime/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Function to handle the submission of the crime report
function submitCrimeReport() {
// Fetch values from the form
var name = document.getElementById('name').value;
var crimeDescription = document.getElementById('crimeDescription').value;
var region = document.getElementById('region').value;
var county = document.getElementById('county').value;

// Perform further processing or send the data to a server for storage

// For now, just log the data to the console
console.log("Name: " + name);
console.log("Crime Description: " + crimeDescription);
console.log("Region: " + region);
console.log("County: " + county);

// You can add additional logic here, such as sending the data to a server using AJAX
}

45 changes: 45 additions & 0 deletions Public/ecrime/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}

form {
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
width: 300px;
}

label {
display: block;
margin-bottom: 8px;
}

input,
textarea,
select {
width: 100%;
padding: 8px;
margin-bottom: 16px;
box-sizing: border-box;
}

button {
background-color: #007bff;
color: #fff;
padding: 10px;
border: none;
border-radius: 4px;
cursor: pointer;
}

button:hover {
background-color: #0056b3;
}