Skip to content

Commit

Permalink
commit de la fusion
Browse files Browse the repository at this point in the history
  • Loading branch information
abirbenzaamia committed Jan 16, 2022
2 parents e3807a8 + 4de94ef commit 75d2dae
Show file tree
Hide file tree
Showing 16 changed files with 711 additions and 277 deletions.
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/TP_Git-43dbc896db1c9b025084203b9795a954ab344cfa.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 57 additions & 0 deletions WebContent/WEB-INF/jsps/createtrip.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<%@ page language="java" contentType="text/html; charset=US-ASCII"
pageEncoding="US-ASCII"%>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>


<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Create Trip</title>
</head>
<body>

<h2>Create a Bus Trip</h2>

<sf:form method="post"
action="${pageContext.request.contextPath}/createreserve"
commandName="bus">

<table class="formtable">
<tr>
<td class="label">Leave Date:</td>
<td><sf:input class="control" path="dateLeave" name="dateLeave" type="text" /><br />
<div class="error">
<sf:errors path="dateLeave"></sf:errors>
</div></td>
<tr>
<tr>
<td class="label">Return Date:</td>
<td><sf:input class="control" path="dateReturn" name="dateReturn" type="text" /><br />
<div class="error">
<sf:errors path="dateReturn"></sf:errors>
</div></td>
<tr>
<tr>
<td class="label">Leave From:</td>
<td><sf:input class="control" path="leaveFrom" name="leaveFrom" type="text" /><br />
<div class="error">
<sf:errors path="leaveFrom"></sf:errors>
</div></td>
<tr>
<tr>
<td class="label">Going to:</td>
<td><sf:input class="control" path="goingTo" name="goingTo" type="text" /><br />
<div class="error">
<sf:errors path="goingTo"></sf:errors>
</div></td>
<tr>
<td class="label"></td>
<td><input class="control" value="Create Trip" type="submit" /></td>
</tr>
</table>

</sf:form>

</body>
</html>
92 changes: 92 additions & 0 deletions WebContent/WEB-INF/jsps/results.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<%@ page language="java" contentType="text/html; charset=US-ASCII"
pageEncoding="US-ASCII"%>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>


<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Reserve Bus</title>
</head>
<body>

<h2>Reserve Bus</h2>

<sf:form method="get"
action="${pageContext.request.contextPath}/resultsfrom"
commandName="bus">

<table class="formtable">

<tr>
<td class="label">Leave From:</td>
<td><sf:input class="control" path="leaveFrom" name="leaveFrom"
type="text" /><br />
<div class="error">
<sf:errors path="leaveFrom"></sf:errors>
</div></td>
<tr>

<td class="label">Going To:</td>
<td><sf:input class="control" path="goingTo" name="goingTo"
type="text" /><br />
<div class="error">
<sf:errors path="goingTo"></sf:errors>
</div></td>
<tr>
<td class="label">Date Leave (YYYY-MM-DD):</td>

<td><sf:input class="control" path="dateLeave" name="dateLeave"
type="text" /><br />
<div class="error">
<sf:errors path="dateLeave"></sf:errors>
</div></td>
<tr>
<td class="label">Date Return (YYYY-MM-DD):</td>
<td><sf:input class="control" path="dateReturn"
name="dateReturn" type="text" /><br />
<div class="error">
<sf:errors path="dateReturn"></sf:errors>
</div></td>
<tr>
<td class="label"></td>
<td><input class="control" value="Search" type="submit" /></td>
</tr>
</table>

</sf:form>

<c:forEach var="results" items="${results}">
<p>
<c:out value="${results.leaveFrom}"></c:out>
<c:out value="${results.dateLeave}"></c:out>
<p>
<c:out value="${results.goingTo}"></c:out>
<c:out value="${results.dateReturn}"></c:out>
<p>

<c:if test="${results != null}">
<sf:form method="post"
action="${pageContext.request.contextPath}/reservebook"
commandName="bus">

<sf:input type="hidden" name="dateReturn" path="dateReturn" />
<sf:input type="hidden" name="dateLeave" path="dateLeave" />
<sf:input type="hidden" name="leaveFrom" path="leaveFrom" />
<sf:input type="hidden" name="goingTo" path="goingTo" />

<input class="control" value="Book" type="submit" />


</sf:form>
</c:if>
</c:forEach>





</body>
</html>
185 changes: 0 additions & 185 deletions gradlew

This file was deleted.

Loading

0 comments on commit 75d2dae

Please sign in to comment.