-
Notifications
You must be signed in to change notification settings - Fork 0
/
CreateProjectForm.php
203 lines (176 loc) · 6.01 KB
/
CreateProjectForm.php
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
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Project Form</title>
<link rel="stylesheet" href="styles.css">
<!-- Add a link to FontAwesome CSS if you plan to use icons -->
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css"> -->
<style>
body {
font-family: Arial, sans-serif;
background: linear-gradient(135deg, #ff8a00, #ff0080);
margin: 0;
padding: 0;
text-align: center;
color: black;
}
header {
color: whitesmoke;
padding: 5px 0;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
transition: background-color 0.3s;
}
header:hover {
background: linear-gradient(135deg, #ff0080, #ff8a00);
}
main {
max-width: 800px;
margin: 0 auto;
padding: 30px;
}
form {
background-color: yellowgreen;
border: 2px solid blue;
border-radius: 10px;
padding: 10px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.form-group {
margin-bottom: 15px;
margin-top: 5px
}
label {
font-weight: bold;
}
#project-type {
width: 104%;
}
input[type="number"],
input[type="text"],
select,
input[type="email"] {
width: 90%;
padding: 10px;
border: 2px solid;
border-radius: 5px;
/* Increased border radius for a rounded look */
font-size: 18px;
/* Increased font size for better readability */
background-color: #f5f5f5;
/* Light gray background color */
color: #333;
/* Dark text color */
transition: border-color 0.3s, box-shadow 0.3s;
}
input[type="number"]:focus,
input[type="text"]:focus,
select:focus,
input[type="email"]:focus {
border-color: #007BFF;
/* Change border color on focus */
outline: none;
box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
/* Add a subtle box shadow on focus */
}
button {
background-color: darkblue;
color: #fff;
padding: 10px 20px;
border: none;
border-radius: 7px;
font-size: 18px;
cursor: pointer;
transition: background-color 0.3s;
}
button:hover {
background-color: #800000;
}
footer {
text-align: center;
background: linear-gradient(135deg, #ff8a00, #ff0080);
color: #fff;
padding: 10px 0;
box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.2);
transition: background-color 0.3s;
}
footer:hover {
background: linear-gradient(135deg, #ff0080, #ff8a00);
}
/* Add this to your existing CSS */
.alert {
padding: 20px;
background-color: red;
color: white;
margin-bottom: 15px;
position: relative;
}
.closebtn {
margin-left: 15px;
color: white;
font-weight: bold;
float: right;
font-size: 22px;
line-height: 20px;
cursor: pointer;
transition: 0.3s;
}
.closebtn:hover {
color: black;
}
</style>
</head>
<body>
<header>
<h1>Create New Project</h1>
</header>
<main>
<form id="project-form" action="createProjectAction.php" method="post">
<div class="form-group">
<?php
if (isset($_SESSION['projectidbooked'])) {
echo '<div class="alert">';
echo '<span class="closebtn" onclick="this.parentElement.style.display=\'none\';">×</span>';
echo $_SESSION['projectidbooked'];
echo '</div>';
unset($_SESSION['projectidbooked']); // Clear the error message
}
?>
<label for="project-Id">Project ID</label>
<input type="number" id="project-Id" name="project-Id" required>
</div>
<div class="form-group">
<label for="project-name">Project Name</label>
<input type="text" id="project-name" name="project-name" required>
</div>
<div class="form-group">
<label for="supervisor-name">Supervisor Name</label>
<input type="text" id="supervisor-name" name="supervisor-name" required>
</div>
<div class="form-group">
<label for="project-description">Project Description</label>
<input type="text" id="project-description" name="project-description" required>
</div>
<div class="form-group">
<label for="project-creator-mail">Supervisor Email</label>
<input type="email" id="project-creator-mail" name="project-creator-mail" required>
</div>
<button type="submit">Create Project</button>
</form>
</main>
<footer>
<p>© 2023 IIT Kanban Board</p>
</footer>
<script>
// Function to close the alert
function closeAlert() {
var alert = document.getElementsByClassName("alert")[0];
alert.style.display = "none";
}
</script>
</body>
</html>