source: src/main/webapp/pages/university-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: 2.4 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 <title>University Form</title>
9 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" crossorigin="anonymous">
10</head>
11<body>
12
13<header>
14 <nav class="navbar navbar-expand-md navbar-dark" style="background-color: tomato;">
15 <div>
16 <a href="${pageContext.request.contextPath}/university/list" class="navbar-brand">University App</a>
17 </div>
18 <ul class="navbar-nav">
19 <li><a href="${pageContext.request.contextPath}/university/list" class="nav-link">University List</a></li>
20 </ul>
21 </nav>
22</header>
23
24<br>
25
26<div class="container col-md-5">
27 <div class="card">
28 <div class="card-body">
29 <form action="${pageContext.request.contextPath}/university/${university != null ? 'update' : 'insert'}" method="post">
30 <h2>${university != null ? 'Edit University' : 'Add New University'}</h2>
31 <input type="hidden" name="id" value="${university.id}" />
32
33 <fieldset class="form-group">
34 <label for="name">University Name</label>
35 <input type="text" id="name" name="name" class="form-control" value="${university != null ? university.name : ''}" required>
36 </fieldset>
37
38 <fieldset class="form-group">
39 <label for="location">Location</label>
40 <input type="text" id="location" name="location" class="form-control" value="${university != null ? university.location : ''}" required>
41 </fieldset>
42
43 <fieldset class="form-group">
44 <label for="isPrivate">Is Private</label>
45 <select id="isPrivate" name="isPrivate" class="form-control">
46 <option value="true" ${university != null && university.isPrivate ? 'selected' : ''}>Yes</option>
47 <option value="false" ${university != null && !university.isPrivate ? 'selected' : ''}>No</option>
48 </select>
49 </fieldset>
50
51 <button type="submit" class="btn btn-success">Save</button>
52 </form>
53 </div>
54 </div>
55</div>
56
57</body>
58</html>
Note: See TracBrowser for help on using the repository browser.