-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merged with branch 44 | added invitations
- Loading branch information
1 parent
48395f4
commit fbfb818
Showing
3 changed files
with
108 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package controller; | ||
|
||
import model.service.condition.ConditionManager; | ||
import model.service.registration.Registration; | ||
|
||
import javax.servlet.annotation.WebServlet; | ||
import javax.servlet.http.HttpServlet; | ||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
import javax.servlet.http.HttpSession; | ||
import java.io.IOException; | ||
|
||
|
||
@WebServlet("/invitePatient") | ||
public class InvitePatient extends HttpServlet { | ||
|
||
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException { | ||
HttpSession session = request.getSession(); | ||
model.service.registration.Registration registration=new Registration(); | ||
registration.invitePatient((Integer) session.getAttribute("id"),(String) request.getParameter("email"),(String) request.getParameter("nome"),(String) request.getParameter("cognome")); | ||
response.sendRedirect("JSP/homeTherapist.jsp"); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!DOCTYPE html> | ||
<html lang="it"> | ||
<head> | ||
<title>Invita Paziente</title> | ||
</head> | ||
<body> | ||
<% | ||
if(session.getAttribute("type")!=null && session.getAttribute("type").equals("therapist")){ | ||
%> | ||
<div id="InvitePage"> | ||
<div id="InviteTitle"> | ||
<p>Invita Paziente</p> | ||
</div> | ||
<br> | ||
<form id="InviteForm" action="../invitePatient" method="post"> | ||
<div class="inputDiv"> | ||
<div class="icon iconLeft"> | ||
<img class="img" src="../images/registration/icon-email.svg" /> | ||
</div> | ||
<input class="formInput" type="email" name="email" placeholder="La sua email" required> | ||
</div> | ||
<br> | ||
<div class="inputDiv"> | ||
<div class="icon iconLeft"> | ||
<img class="img" src="../images/registration/icon-user-outline.svg" /> | ||
</div> | ||
<input class="formInput" type="text" name="nome" placeholder="Nome" required> | ||
</div> | ||
<br> | ||
<div class="inputDiv"> | ||
<div class="icon iconLeft"> | ||
<img class="img" src="../images/registration/icon-user-outline.svg" /> | ||
</div> | ||
<input class="formInput" type="text" name="cognome" placeholder="Cognome" required> | ||
</div> | ||
<br> | ||
<br> | ||
<button type="submit" value="Invite" id="InviteButton">Invita</button> | ||
<a id="return" href="homeTherapist.jsp"> < Torna alla home</a> | ||
</form> | ||
</div> | ||
<link rel="stylesheet" href="../CSS/invitePatient.css"> | ||
<% | ||
}else { | ||
response.sendRedirect("../errorPage/403.html"); | ||
} | ||
%> | ||
</body> | ||
</html> |