Passed
Push — dev ( d62152...d10d14 )
by Salim
03:23
created
src/views/index_view.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
 <head>
22 22
 	<title>Log In</title>
23
-	<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/includes/jsLibrairies.php'; ?>
23
+	<?php include_once $_SERVER['DOCUMENT_ROOT'].'/includes/jsLibrairies.php'; ?>
24 24
 	<script type="text/javascript">
25 25
 		//Send form in Ajax and process JSON answers
26 26
 		$(document).ready(function() {
@@ -50,15 +50,15 @@  discard block
 block discarded – undo
50 50
 									}, 2000);
51 51
 
52 52
 								} else if (data['result'] == "Blocked") {
53
-									$("#error").html("Your account has been blocked. Please contact <?php if(defined('GAELO_CORPORATION')) echo(GAELO_CORPORATION); else echo('GaelO')?> by clicking on “A request? Any questions? “, below this page");
53
+									$("#error").html("Your account has been blocked. Please contact <?php if (defined('GAELO_CORPORATION')) echo(GAELO_CORPORATION); else echo('GaelO')?> by clicking on “A request? Any questions? “, below this page");
54 54
 
55 55
 
56 56
 								} else if (data['result'] == "Deactivated") {
57
-									$("#error").html("Your account has been deactivated. Please contact <?php if(defined('GAELO_CORPORATION')) echo(GAELO_CORPORATION); else echo('GaelO')?> by clicking on “A request? Any questions? “, below this page");
57
+									$("#error").html("Your account has been deactivated. Please contact <?php if (defined('GAELO_CORPORATION')) echo(GAELO_CORPORATION); else echo('GaelO')?> by clicking on “A request? Any questions? “, below this page");
58 58
 
59 59
 
60 60
 								} else if (data['result'] == "unknown") {
61
-									$("#error").html("The username you entered is not recognized by the platform. Please enter your correct username or contact <?php if(defined('GAELO_CORPORATION')) echo(GAELO_CORPORATION); else echo('GaelO')?> by clicking on \"A request? Any questions?\", below this page.");
61
+									$("#error").html("The username you entered is not recognized by the platform. Please enter your correct username or contact <?php if (defined('GAELO_CORPORATION')) echo(GAELO_CORPORATION); else echo('GaelO')?> by clicking on \"A request? Any questions?\", below this page.");
62 62
 
63 63
 
64 64
 								} else if (data['result'] == "NowBlocked") {
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 	<section id="logos">
109 109
 		<img id="logo-gaelo" src="assets/images/gaelo-logo-square.png" alt="GaelO">
110 110
 		<div id="name-div">
111
-			<?php if(defined('GAELO_PLATEFORM_NAME')) echo(GAELO_PLATEFORM_NAME); else echo('GaelO')?>
111
+			<?php if (defined('GAELO_PLATEFORM_NAME')) echo(GAELO_PLATEFORM_NAME); else echo('GaelO')?>
112 112
 		</div>
113 113
 	</section>
114 114
 
Please login to merge, or discard this patch.
Braces   +15 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,15 +50,24 @@  discard block
 block discarded – undo
50 50
 									}, 2000);
51 51
 
52 52
 								} else if (data['result'] == "Blocked") {
53
-									$("#error").html("Your account has been blocked. Please contact <?php if(defined('GAELO_CORPORATION')) echo(GAELO_CORPORATION); else echo('GaelO')?> by clicking on “A request? Any questions? “, below this page");
53
+									$("#error").html("Your account has been blocked. Please contact <?php if(defined('GAELO_CORPORATION')) {
54
+	echo(GAELO_CORPORATION);
55
+} else {
56
+	echo('GaelO')?> by clicking on “A request? Any questions? “, below this page");
54 57
 
55 58
 
56 59
 								} else if (data['result'] == "Deactivated") {
57
-									$("#error").html("Your account has been deactivated. Please contact <?php if(defined('GAELO_CORPORATION')) echo(GAELO_CORPORATION); else echo('GaelO')?> by clicking on “A request? Any questions? “, below this page");
60
+									$("#error").html("Your account has been deactivated. Please contact <?php if(defined('GAELO_CORPORATION')) echo(GAELO_CORPORATION);
61
+}
62
+else {
63
+	echo('GaelO')?> by clicking on “A request? Any questions? “, below this page");
58 64
 
59 65
 
60 66
 								} else if (data['result'] == "unknown") {
61
-									$("#error").html("The username you entered is not recognized by the platform. Please enter your correct username or contact <?php if(defined('GAELO_CORPORATION')) echo(GAELO_CORPORATION); else echo('GaelO')?> by clicking on \"A request? Any questions?\", below this page.");
67
+									$("#error").html("The username you entered is not recognized by the platform. Please enter your correct username or contact <?php if(defined('GAELO_CORPORATION')) echo(GAELO_CORPORATION);
68
+}
69
+else {
70
+	echo('GaelO')?> by clicking on \"A request? Any questions?\", below this page.");
62 71
 
63 72
 
64 73
 								} else if (data['result'] == "NowBlocked") {
@@ -108,7 +117,9 @@  discard block
 block discarded – undo
108 117
 	<section id="logos">
109 118
 		<img id="logo-gaelo" src="assets/images/gaelo-logo-square.png" alt="GaelO">
110 119
 		<div id="name-div">
111
-			<?php if(defined('GAELO_PLATEFORM_NAME')) echo(GAELO_PLATEFORM_NAME); else echo('GaelO')?>
120
+			<?php if(defined('GAELO_PLATEFORM_NAME')) echo(GAELO_PLATEFORM_NAME);
121
+}
122
+else echo('GaelO')?>
112 123
 		</div>
113 124
 	</section>
114 125
 
Please login to merge, or discard this patch.
src/views/forgot_password_view.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 <head>
20 20
 	<meta charset="utf-8">
21 21
 	<title>Ask New password</title>
22
-    <?php include_once $_SERVER['DOCUMENT_ROOT'].'/includes/jsLibrairies.php';?>
22
+    <?php include_once $_SERVER['DOCUMENT_ROOT'].'/includes/jsLibrairies.php'; ?>
23 23
     
24 24
     <script type="text/javascript">
25 25
      $(document).ready(function () {
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 </head>
63 63
 <body>
64 64
 
65
-	<?php require $_SERVER['DOCUMENT_ROOT'].'/includes/header.php';?>
65
+	<?php require $_SERVER['DOCUMENT_ROOT'].'/includes/header.php'; ?>
66 66
 	
67 67
 	<div class="block block-400">
68 68
 		<div class="block-title">Password assistance</div>
Please login to merge, or discard this patch.
src/views/main_view.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -269,7 +269,7 @@
 block discarded – undo
269 269
 					}
270 270
 					//Add all available studies in the selector
271 271
 					foreach ($availableStudies as $study) {
272
-					    echo '<option value="' . htmlspecialchars($study) . '">' . htmlspecialchars($study) . '</option>';
272
+						echo '<option value="' . htmlspecialchars($study) . '">' . htmlspecialchars($study) . '</option>';
273 273
 					}
274 274
 					?>
275 275
 				</select>
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 <head>
21 21
 	<meta charset="utf-8">
22 22
 
23
-	<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/includes/jsLibrairies_main.php'; ?>
23
+	<?php include_once $_SERVER['DOCUMENT_ROOT'].'/includes/jsLibrairies_main.php'; ?>
24 24
 
25 25
 	<script type="text/javascript">
26 26
 		$(document).ready(function() {
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 </head>
255 255
 
256 256
 <body>
257
-	<?php require $_SERVER['DOCUMENT_ROOT'] . '/includes/header.php'; ?>
257
+	<?php require $_SERVER['DOCUMENT_ROOT'].'/includes/header.php'; ?>
258 258
 
259 259
 	<main class="container">
260 260
 		<div class="block block-content">
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 					}
270 270
 					//Add all available studies in the selector
271 271
 					foreach ($availableStudies as $study) {
272
-					    echo '<option value="' . htmlspecialchars($study) . '">' . htmlspecialchars($study) . '</option>';
272
+					    echo '<option value="'.htmlspecialchars($study).'">'.htmlspecialchars($study).'</option>';
273 273
 					}
274 274
 					?>
275 275
 				</select>
Please login to merge, or discard this patch.
src/views/request_view.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	<meta charset="utf-8">
22 22
 	<title>Send Request</title>
23 23
 
24
-	<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/includes/jsLibrairies.php'; ?>
24
+	<?php include_once $_SERVER['DOCUMENT_ROOT'].'/includes/jsLibrairies.php'; ?>
25 25
 
26 26
 	<script type="text/javascript">
27 27
 		$(document).ready(function() {
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
 <body>
51 51
 
52
-	<?php require $_SERVER['DOCUMENT_ROOT'] . '/includes/header.php'; ?>
52
+	<?php require $_SERVER['DOCUMENT_ROOT'].'/includes/header.php'; ?>
53 53
 
54 54
 	<div id="requestConfirm" class="text-center alert alert-success" style="display: none;"></div>
55 55
 	<div class="block block-400">
Please login to merge, or discard this patch.
src/views/supervisor/download_manager_view.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -310,11 +310,11 @@
 block discarded – undo
310 310
         <input type="hidden" name="json" id="json">
311 311
     	<SELECT name="selectedUsers[]" class="custom-select" size="7" style="width:auto;" multiple >
312 312
     	<?php 
313
-        //on parcourt la BDD res_centre
314
-    	foreach($usersInStudy as $user=>$roles) {
315
-    	    echo ('<option value="'.htmlspecialchars($user).'">'.htmlspecialchars($user).'</option>');
316
-        }
317
-        ?>
313
+		//on parcourt la BDD res_centre
314
+		foreach($usersInStudy as $user=>$roles) {
315
+			echo ('<option value="'.htmlspecialchars($user).'">'.htmlspecialchars($user).'</option>');
316
+		}
317
+		?>
318 318
     	</SELECT>
319 319
     	<button name="accept" id="sendPeer" type="button" class="btn btn-primary">Send</button>
320 320
     </form>
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -311,7 +311,7 @@
 block discarded – undo
311 311
     	<SELECT name="selectedUsers[]" class="custom-select" size="7" style="width:auto;" multiple >
312 312
     	<?php 
313 313
         //on parcourt la BDD res_centre
314
-    	foreach($usersInStudy as $user=>$roles) {
314
+    	foreach ($usersInStudy as $user=>$roles) {
315 315
     	    echo ('<option value="'.htmlspecialchars($user).'">'.htmlspecialchars($user).'</option>');
316 316
         }
317 317
         ?>
Please login to merge, or discard this patch.
src/views/supervisor/change_patient_status_view.php 3 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
         ?>
81 81
             <label class="control-label">Declare patient withdrawal from the study</label>
82 82
 		<?php 
83
-        }else{
83
+        } else{
84 84
         ?>
85 85
             <label class="control-label">Cancel Withdrawal (re-inclusion)</label>
86 86
 		<?php 
Please login to merge, or discard this patch.
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -61,14 +61,14 @@  discard block
 block discarded – undo
61 61
         });	
62 62
     
63 63
         <?php 
64
-        //If patient withdraw set the hidden withdraw value to 0 and hide the date selector
65
-        if($patientObject->patientWithdraw){
66
-        ?>
64
+		//If patient withdraw set the hidden withdraw value to 0 and hide the date selector
65
+		if($patientObject->patientWithdraw){
66
+		?>
67 67
             $("#dateWithdraw").hide();
68 68
             $("#withdraw").val('0');
69 69
        <?php 
70
-        }
71
-        ?>
70
+		}
71
+		?>
72 72
     	
73 73
     });
74 74
 
@@ -76,16 +76,16 @@  discard block
 block discarded – undo
76 76
         	
77 77
 <form id="changePatientStatusForm">
78 78
     	<?php 
79
-        if(!$patientObject->patientWithdraw){
80
-        ?>
79
+		if(!$patientObject->patientWithdraw){
80
+		?>
81 81
             <label class="control-label">Declare patient withdrawal from the study</label>
82 82
 		<?php 
83
-        }else{
84
-        ?>
83
+		}else{
84
+		?>
85 85
             <label class="control-label">Cancel Withdrawal (re-inclusion)</label>
86 86
 		<?php 
87
-        }
88
-        ?>  
87
+		}
88
+		?>  
89 89
         <div id="dateWithdraw">
90 90
         	<div id="datePickerPatient"></div>
91 91
             <input class="form-control" name="withdraw_date" id="withdraw_date" type="hidden" >
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     
63 63
         <?php 
64 64
         //If patient withdraw set the hidden withdraw value to 0 and hide the date selector
65
-        if($patientObject->patientWithdraw){
65
+        if ($patientObject->patientWithdraw) {
66 66
         ?>
67 67
             $("#dateWithdraw").hide();
68 68
             $("#withdraw").val('0');
@@ -76,11 +76,11 @@  discard block
 block discarded – undo
76 76
         	
77 77
 <form id="changePatientStatusForm">
78 78
     	<?php 
79
-        if(!$patientObject->patientWithdraw){
79
+        if (!$patientObject->patientWithdraw) {
80 80
         ?>
81 81
             <label class="control-label">Declare patient withdrawal from the study</label>
82 82
 		<?php 
83
-        }else{
83
+        }else {
84 84
         ?>
85 85
             <label class="control-label">Cancel Withdrawal (re-inclusion)</label>
86 86
 		<?php 
Please login to merge, or discard this patch.
src/views/supervisor/users_details_view.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,15 +48,15 @@
 block discarded – undo
48 48
 		</thead>
49 49
 		<tbody>
50 50
 			<?php
51
-            foreach ($rolesList as $username => $role) {
52
-                ?>
51
+			foreach ($rolesList as $username => $role) {
52
+				?>
53 53
                 <tr>
54 54
                 <th><?=htmlspecialchars($username)?></th>
55 55
                 <th><?=implode(', ', $role)?></th>
56 56
                 </tr>
57 57
                 <?php 
58
-            }
59
-            ?>
58
+			}
59
+			?>
60 60
 		</tbody>
61 61
 	</table>
62 62
 </div>
63 63
\ No newline at end of file
Please login to merge, or discard this patch.
src/views/supervisor/supervisor_root_view.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -418,14 +418,14 @@
 block discarded – undo
418 418
 			<tbody>
419 419
 				<?php
420 420
 				//Get all patients in the current study
421
-				$allPatientsInStudy = $studyObject->getAllPatientsInStudy();
421
+				$allPatientsInStudy=$studyObject->getAllPatientsInStudy();
422 422
 
423 423
 				foreach ($allPatientsInStudy as $patient) {
424 424
 					?>
425 425
 					<tr>
426 426
 						<td><?=$patient->patientCenter?></td>
427
-						<td><?="<a onclick='linkPatientInfos(" . $patient->patientCode . ")' href='javascript:void(0);'>" . $patient->patientCode . "</a>"?></td>
428
-						<td><?=$patient->patientLastName . '' . $patient->patientFirstName?></td>
427
+						<td><?="<a onclick='linkPatientInfos(".$patient->patientCode.")' href='javascript:void(0);'>".$patient->patientCode."</a>"?></td>
428
+						<td><?=$patient->patientLastName.''.$patient->patientFirstName?></td>
429 429
 						<td><?=$patient->patientGender?></td>
430 430
 						<td><?=$patient->patientBirthDate?></td>
431 431
 						<td><?=$patient->patientRegistrationDate?></td>
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -429,8 +429,9 @@
 block discarded – undo
429 429
 						<td><?=$patient->patientGender?></td>
430 430
 						<td><?=$patient->patientBirthDate?></td>
431 431
 						<td><?=$patient->patientRegistrationDate?></td>
432
-						<td><?php if ($patient->patientWithdraw) echo ("Withdrawn");
433
-								else echo ("Included") ?></td>
432
+						<td><?php if ($patient->patientWithdraw) {
433
+	echo ("Withdrawn");
434
+} else echo ("Included") ?></td>
434 435
 						<td><?=$patient->patientWithdrawDateString?></td>
435 436
 						<td><?=htmlspecialchars($patient->patientWithdrawReason)?></td>
436 437
 					</tr>
Please login to merge, or discard this patch.
src/views/supervisor/patient_infos_view.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -217,8 +217,8 @@
 block discarded – undo
217 217
 			} ?>
218 218
 			</tr>
219 219
 		<?php 
220
-	    }
221
-	    ?>
220
+		}
221
+		?>
222 222
 		</table>
223 223
 	</div>
224 224
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 		</tr>
135 135
 		 <tr>
136 136
 			<td>Initials</td>
137
-			<td  class="patientDataEditable" id="initals" ><?=$patientObject->patientLastName,$patientObject->patientFirstName?></td>
137
+			<td  class="patientDataEditable" id="initals" ><?=$patientObject->patientLastName, $patientObject->patientFirstName?></td>
138 138
 		</tr>
139 139
 		<tr>
140 140
 			<td>Gender</td>
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 		</tr>
159 159
 		<tr>
160 160
 			<td>Patient status</td>
161
-			<td><?php if ($patientObject->patientWithdraw) echo("Withdrawn") ; else echo("Included")?></td>
161
+			<td><?php if ($patientObject->patientWithdraw) echo("Withdrawn"); else echo("Included")?></td>
162 162
 			<td>
163 163
 			<button class='btn btn-danger' id='change_patient'>Modify</button>
164 164
 			</td>
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 			<td>Investigator form</td>
196 196
 			<td>Quality control</td>
197 197
 			</tr>
198
-		<?php foreach ( $visitsObjects as $visit){ ?>
198
+		<?php foreach ($visitsObjects as $visit) { ?>
199 199
 			<tr>
200 200
 				<td><?=$visit->visitType?></td>
201 201
 				<td><?=$visit->visitGroupObject->groupModality?></td>
@@ -205,13 +205,13 @@  discard block
 block discarded – undo
205 205
 				<td class="visitDetails" title="quality" ><?=$visit->stateQualityControl?></td>
206 206
 				<td class="visitDetails" title="review_div" ><?=$visit->reviewStatus?></td>
207 207
 			<?php 
208
-			if($visit->deleted){
208
+			if ($visit->deleted) {
209 209
 			?>
210 210
 				<td class="visitDetails">
211 211
 					<input class="btn btn-danger" type="button" value="Reactivate Visit" onclick="reactivateVisit(<?=$visit->id_visit?>)">
212 212
 				</td>
213 213
 			<?php 
214
-			}else{ ?>
214
+			}else { ?>
215 215
 				<td class="visitDetails" title="deleted" >Active</td>
216 216
 			<?php 
217 217
 			} ?>
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -158,7 +158,9 @@  discard block
 block discarded – undo
158 158
 		</tr>
159 159
 		<tr>
160 160
 			<td>Patient status</td>
161
-			<td><?php if ($patientObject->patientWithdraw) echo("Withdrawn") ; else echo("Included")?></td>
161
+			<td><?php if ($patientObject->patientWithdraw) {
162
+	echo("Withdrawn") ;
163
+} else echo("Included")?></td>
162 164
 			<td>
163 165
 			<button class='btn btn-danger' id='change_patient'>Modify</button>
164 166
 			</td>
@@ -211,7 +213,7 @@  discard block
 block discarded – undo
211 213
 					<input class="btn btn-danger" type="button" value="Reactivate Visit" onclick="reactivateVisit(<?=$visit->id_visit?>)">
212 214
 				</td>
213 215
 			<?php 
214
-			}else{ ?>
216
+			} else{ ?>
215 217
 				<td class="visitDetails" title="deleted" >Active</td>
216 218
 			<?php 
217 219
 			} ?>
Please login to merge, or discard this patch.