source: src/main/webapp/pages/faculty-form.jsp@ 1eb7a55

Last change on this file since 1eb7a55 was 1eb7a55, checked in by Elena Markovska <elena.elenamarkovska@…>, 11 days ago

Initial commit - Scholaris project code

  • Property mode set to 100644
File size: 3.3 KB
RevLine 
[1eb7a55]1<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
2<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
3
4<!DOCTYPE html>
5<html lang="en">
6<head>
7 <meta charset="UTF-8">
8 <meta name="viewport" content="width=device-width, initial-scale=1.0">
9 <title>Faculty Management</title>
10 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" crossorigin="anonymous">
11</head>
12<body>
13
14<header>
15 <nav class="navbar navbar-expand-md navbar-dark" style="background-color: tomato;">
16 <div>
17 <a href="${pageContext.request.contextPath}/faculty/list" class="navbar-brand">Faculty App</a>
18 </div>
19 <ul class="navbar-nav">
20 <li><a href="${pageContext.request.contextPath}/faculty/list" class="nav-link">Faculty List</a></li>
21 </ul>
22 </nav>
23</header>
24
25<br>
26
27<div class="container col-md-5">
28 <div class="card">
29 <div class="card-body">
30 <form action="${pageContext.request.contextPath}/faculty/${faculty != null ? 'update' : 'insert'}" method="post">
31 <h2>${faculty != null ? 'Edit Faculty' : 'Add New Faculty'}</h2>
32 <input type="hidden" name="id" value="${faculty.id}" />
33
34 <fieldset class="form-group">
35 <label for="name">Faculty Name</label>
36 <input type="text" id="name" name="name" class="form-control" value="${faculty != null ? faculty.name : ''}" required>
37 </fieldset>
38
39 <fieldset class="form-group">
40 <label for="location">Faculty Location</label>
41 <input type="text" id="location" name="location" class="form-control" value="${faculty != null ? faculty.location : ''}">
42 </fieldset>
43
44 <fieldset class="form-group">
45 <label for="studyField">Study Field</label>
46 <select id="study_field" name="study_field" class="form-control">
47 <option value="SCIENCE" ${faculty.study_field == 'SCIENCE' ? 'selected' : ''}>Science</option>
48 <option value="ENGINEERING" ${faculty.study_field == 'ENGINEERING' ? 'selected' : ''}>Engineering</option>
49 <option value="ARTS" ${faculty.study_field == 'ARTS' ? 'selected' : ''}>Arts</option>
50 </select>
51 </fieldset>
52
53 <fieldset class="form-group">
54 <label for="university_id">University</label>
55 <select id="university_id" name="university_id" class="form-control" required>
56 <option value="">Select a University</option>
57 <c:forEach var="university" items="${universities}">
58 <option value="${university.id}"
59 ${faculty != null && faculty.universityId != null && university.id != null && university.id.equals(faculty.universityId) ? 'selected' : ''}>
60 ${university.name}
61 </option>
62 </c:forEach>
63 </select>
64 </fieldset>
65
66 <button type="submit" class="btn btn-success">Save</button>
67 </form>
68 </div>
69 </div>
70</div>
71</body>
72</html>
Note: See TracBrowser for help on using the repository browser.