From 677b7bce0b9c1aa5e72422a36bc2f083e3d5ff0a Mon Sep 17 00:00:00 2001
From: xuechen5 <xuechen5@illinois.edu>
Date: Sat, 21 Nov 2020 07:13:47 -0600
Subject: [PATCH] GUI: Add invoked function to update database users role

---
 iTrust/WebRoot/auth/hcp-uap/activatePatient.jsp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/iTrust/WebRoot/auth/hcp-uap/activatePatient.jsp b/iTrust/WebRoot/auth/hcp-uap/activatePatient.jsp
index 65f3aa5..f6bcd32 100644
--- a/iTrust/WebRoot/auth/hcp-uap/activatePatient.jsp
+++ b/iTrust/WebRoot/auth/hcp-uap/activatePatient.jsp
@@ -40,11 +40,10 @@
             request.getParameter("understand") != null && request.getParameter("understand").equals("I UNDERSTAND")) {
         try {
             action.activate();
+            long patientMID = action.getPatient().getMID();
             
             ActivateAndDeactivatePreRegi activate = new ActivateAndDeactivatePreRegi(prodDAO, loggedInMID.longValue(), pidString);
-
-            long patientMID = action.getPatient().getMID();
-
+            activate.activate();
             loggingAction.logEvent(TransactionType.PATIENT_ACTIVATE, loggedInMID.longValue(), 
                     Long.valueOf((String)session.getAttribute("pid")).longValue(), "");
 %>
@@ -57,7 +56,9 @@
     
     <div align=center>
         <span class="iTrustMessage">Patient Successfully Activated! You can </span>
-        <a href="editPHR.jsp">Edit Patient</a>
+         <a href="editPHR.jsp" style="text-decoration: none;">
+        <input type=button value="Edit Patient" onClick="location='editPHR.jsp';">
+    </a>
     </div>
     <br /><br /><br /><br /><br />
 <%
-- 
GitLab