-
Notifications
You must be signed in to change notification settings - Fork 0
/
conduct.html
178 lines (152 loc) · 5.6 KB
/
conduct.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Code of Conduct Form</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #f0f4f8;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
overflow: hidden;
}
.container {
width: 100%;
max-width: 700px;
padding: 30px;
background-color: #ffffff;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
position: relative;
animation: fadeIn 1s ease-in-out;
}
.logo {
display: block;
max-width: 150px;
margin: 0 auto 20px;
}
h2 {
color: #333;
margin-bottom: 20px;
text-align: center;
font-size: 28px;
font-weight: 600;
}
label {
display: block;
margin-bottom: 8px;
font-weight: 500;
color: #555;
}
input[type="text"],
input[type="email"],
input[type="date"],
textarea {
width: calc(100% - 24px);
padding: 14px;
margin-bottom: 16px;
border: 1px solid #ccc;
border-radius: 6px;
box-sizing: border-box;
transition: border-color 0.3s ease;
font-size: 16px;
}
input:focus,
textarea:focus {
border-color: #007bff;
outline: none;
}
textarea {
resize: vertical;
}
button[type="submit"] {
width: 100%;
padding: 14px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 16px;
font-weight: 600;
transition: background-color 0.3s ease;
}
button[type="submit"]:hover {
background-color: #0056b3;
}
.copyright {
position: absolute;
bottom: 20px;
width: 100%;
text-align: center;
font-size: 14px;
color: #888;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
</style>
</head>
<body>
<div class="container">
<img src="logo.png" alt="Logo" class="logo"> <!-- Add your logo here -->
<h2>Code of Conduct Form</h2>
<form id="conductForm" action="#" method="post">
<label for="name"><b>Your Name:</b></label>
<input type="text" id="name" name="name" placeholder="Enter your name" required>
<label for="email"><b>Your Email:</b></label>
<input type="email" id="email" name="email" placeholder="Enter your email address" required>
<label for="incident_date"><b>Date of Incident:</b></label>
<input type="date" id="incident_date" name="incident_date" required>
<label for="description"><b>Incident Description:</b></label>
<textarea id="description" name="description" placeholder="Describe the incident" rows="6" required></textarea>
<label for="witnesses"><b>Witnesses (Optional):</b></label>
<input type="text" id="witnesses" name="witnesses" placeholder="Enter names of any witnesses">
<label for="feedback"><b>Feedback or Suggestions:</b></label>
<textarea id="feedback" name="feedback" placeholder="Your feedback or suggestions" rows="6"></textarea>
<button type="submit" id="submit_conduct"><b>Submit</b></button>
</form>
</div>
<div class="copyright">
<p>
©
<script>document.write(new Date().getFullYear())</script> | INTERNATIONAL WRITERS
</p>
</div>
<script>
document.addEventListener("DOMContentLoaded", function() {
document.getElementById("conductForm").addEventListener("submit", function(event) {
event.preventDefault(); // Prevent form submission
var name = document.getElementById("name").value;
var email = document.getElementById("email").value;
var incidentDate = document.getElementById("incident_date").value;
var description = document.getElementById("description").value;
var witnesses = document.getElementById("witnesses").value;
var feedback = document.getElementById("feedback").value;
// Perform validation (example)
if (name === "" || email === "" || incidentDate === "" || description === "") {
alert("Please fill in all required fields.");
return;
}
// Here you can handle the form data (e.g., send it to the server or store it)
console.log("Name:", name);
console.log("Email:", email);
console.log("Incident Date:", incidentDate);
console.log("Description:", description);
console.log("Witnesses:", witnesses);
console.log("Feedback:", feedback);
alert("Your submission has been received successfully.");
// Reset the form after submission
document.getElementById("conductForm").reset();
});
});
</script>
</body>
</html>