@@ -240,7 +240,7 @@ |
||
240 | 240 | $loginLink .= "?response_type=" . URL_RESPONSE_TYPES; |
241 | 241 | if (strpos($url, 'admin') !== false) { |
242 | 242 | $loginLink .= "&redirect_uri=" . urlencode(REDIRECT_URI_ADMIN); |
243 | - } else { |
|
243 | + }else { |
|
244 | 244 | $loginLink .= "&redirect_uri=" . urlencode(REDIRECT_URI); |
245 | 245 | } |
246 | 246 | $loginLink .= "&nonce=" . $nonce; |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | exit; |
60 | 60 | } |
61 | 61 | |
62 | - } else if ($user->getUser_role() === "administrator") { |
|
62 | + }else if ($user->getUser_role() === "administrator") { |
|
63 | 63 | //an administrator has permission if they created the job this application is for |
64 | 64 | |
65 | 65 | $jobPoster = JobPosterController::getJobPosterById($locale, $fullJobApplication->getJob_poster_application()->getApplication_job_poster_id()); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | exit; |
70 | 70 | } |
71 | 71 | |
72 | - } else { |
|
72 | + }else { |
|
73 | 73 | header('HTTP/1.0 401 Unauthorized'); |
74 | 74 | echo json_encode(array("failed" => "This user does not have permissions to view job applications"), JSON_FORCE_OBJECT); |
75 | 75 | exit; |
@@ -77,17 +77,17 @@ discard block |
||
77 | 77 | |
78 | 78 | $json = json_encode($fullJobApplication, JSON_PRETTY_PRINT); |
79 | 79 | echo($json); |
80 | - } else { |
|
80 | + }else { |
|
81 | 81 | header('HTTP/1.0 401 Unauthorized'); |
82 | 82 | echo json_encode(array("failed" => "Invalid token"), JSON_FORCE_OBJECT); |
83 | 83 | exit; |
84 | 84 | } |
85 | - } else { |
|
85 | + }else { |
|
86 | 86 | header('HTTP/1.0 401 Unauthorized'); |
87 | 87 | echo json_encode(array("failed" => 'Invalid token, please reauthorize user'), JSON_FORCE_OBJECT); |
88 | 88 | exit; |
89 | 89 | } |
90 | - } else { |
|
90 | + }else { |
|
91 | 91 | header('HTTP/1.0 401 Unauthorized'); |
92 | 92 | echo json_encode(array("failed" => 'No authorization token provided'), JSON_FORCE_OBJECT); |
93 | 93 | exit; |
@@ -64,22 +64,22 @@ |
||
64 | 64 | $json = json_encode($result, JSON_PRETTY_PRINT); |
65 | 65 | echo($json); |
66 | 66 | |
67 | - } else { |
|
67 | + }else { |
|
68 | 68 | header('HTTP/1.0 401 Unauthorized'); |
69 | 69 | echo json_encode(array("failed" => "Invalid token"), JSON_FORCE_OBJECT); |
70 | 70 | exit; |
71 | 71 | } |
72 | - } else { |
|
72 | + }else { |
|
73 | 73 | header('HTTP/1.0 401 Unauthorized'); |
74 | 74 | echo json_encode(array("failed" => "No user id provided"), JSON_FORCE_OBJECT); |
75 | 75 | exit; |
76 | 76 | } |
77 | - } else { |
|
77 | + }else { |
|
78 | 78 | header('HTTP/1.0 401 Unauthorized'); |
79 | 79 | echo json_encode(array("failed" => 'Invalid arguments provided'), JSON_FORCE_OBJECT); |
80 | 80 | exit; |
81 | 81 | } |
82 | - } else { |
|
82 | + }else { |
|
83 | 83 | header('HTTP/1.0 401 Unauthorized'); |
84 | 84 | echo json_encode(array("failed" => 'No authorization token provided'), JSON_FORCE_OBJECT); |
85 | 85 | exit; |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | $result = MicroReferenceController::getAllMicroReferencesForJobApplication($jobPosterApplicationId, $locale); |
36 | 36 | $json = json_encode($result, JSON_PRETTY_PRINT); |
37 | 37 | echo($json); |
38 | - } else { |
|
38 | + }else { |
|
39 | 39 | $result = array(); |
40 | 40 | $json = json_encode($result, JSON_PRETTY_PRINT); |
41 | 41 | echo($json); |
@@ -59,12 +59,12 @@ discard block |
||
59 | 59 | |
60 | 60 | $json = json_encode($result, JSON_PRETTY_PRINT); |
61 | 61 | echo($json); |
62 | - } else { |
|
62 | + }else { |
|
63 | 63 | header('HTTP/1.0 403 Forbidden'); |
64 | 64 | echo json_encode(array("failed" => "Only Draft applications can be modified."), JSON_FORCE_OBJECT); |
65 | 65 | exit; |
66 | 66 | } |
67 | - } else { |
|
67 | + }else { |
|
68 | 68 | $result = array(); |
69 | 69 | $json = json_encode($result, JSON_PRETTY_PRINT); |
70 | 70 | echo($json); |
@@ -97,12 +97,12 @@ discard block |
||
97 | 97 | |
98 | 98 | $json = json_encode($result, JSON_PRETTY_PRINT); |
99 | 99 | echo($json); |
100 | - } else { |
|
100 | + }else { |
|
101 | 101 | header('HTTP/1.0 403 Forbidden'); |
102 | 102 | echo json_encode(array("failed" => "Only Draft applications can be modified."), JSON_FORCE_OBJECT); |
103 | 103 | exit; |
104 | 104 | } |
105 | - } else { |
|
105 | + }else { |
|
106 | 106 | $result = array(); |
107 | 107 | $json = json_encode($result, JSON_PRETTY_PRINT); |
108 | 108 | echo($json); |
@@ -48,14 +48,14 @@ discard block |
||
48 | 48 | echo json_encode(array("failed" => "Requested job application does not belong to this user"), JSON_FORCE_OBJECT); |
49 | 49 | exit; |
50 | 50 | } |
51 | - } else if ($user->getUser_role() === "administrator") { |
|
51 | + }else if ($user->getUser_role() === "administrator") { |
|
52 | 52 | $jobPoster = JobPosterController::getJobPosterById($locale, $jobPosterId); |
53 | 53 | if ($jobPoster->getManager_user_id() != $user->getUser_id()) { |
54 | 54 | header('HTTP/1.0 401 Unauthorized'); |
55 | 55 | echo json_encode(array("failed" => "This user is not authorized to view applications for this job"), JSON_FORCE_OBJECT); |
56 | 56 | exit; |
57 | 57 | } |
58 | - } else { |
|
58 | + }else { |
|
59 | 59 | header('HTTP/1.0 401 Unauthorized'); |
60 | 60 | echo json_encode(array("failed" => "This user does not have permissions to view job applications"), JSON_FORCE_OBJECT); |
61 | 61 | exit; |
@@ -72,17 +72,17 @@ discard block |
||
72 | 72 | |
73 | 73 | $json = json_encode($fullJobApplication, JSON_PRETTY_PRINT); |
74 | 74 | echo($json); |
75 | - } else { |
|
75 | + }else { |
|
76 | 76 | header('HTTP/1.0 401 Unauthorized'); |
77 | 77 | echo json_encode(array("failed" => "Invalid token"), JSON_FORCE_OBJECT); |
78 | 78 | exit; |
79 | 79 | } |
80 | - } else { |
|
80 | + }else { |
|
81 | 81 | header('HTTP/1.0 401 Unauthorized'); |
82 | 82 | echo json_encode(array("failed" => 'Invalid token, please reauthorize user'), JSON_FORCE_OBJECT); |
83 | 83 | exit; |
84 | 84 | } |
85 | - } else { |
|
85 | + }else { |
|
86 | 86 | header('HTTP/1.0 401 Unauthorized'); |
87 | 87 | echo json_encode(array("failed" => 'No authorization token provided'), JSON_FORCE_OBJECT); |
88 | 88 | exit; |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | $result = WorkSampleController::getAllWorkSamplesForJobApplication($jobPosterApplicationId, $locale); |
36 | 36 | $json = json_encode($result, JSON_PRETTY_PRINT); |
37 | 37 | echo($json); |
38 | - } else { |
|
38 | + }else { |
|
39 | 39 | $result = array(); |
40 | 40 | $json = json_encode($result, JSON_PRETTY_PRINT); |
41 | 41 | echo($json); |
@@ -59,12 +59,12 @@ discard block |
||
59 | 59 | |
60 | 60 | $json = json_encode($result, JSON_PRETTY_PRINT); |
61 | 61 | echo($json); |
62 | - } else { |
|
62 | + }else { |
|
63 | 63 | header('HTTP/1.0 403 Forbidden'); |
64 | 64 | echo json_encode(array("failed" => "Only Draft applications can be modified."), JSON_FORCE_OBJECT); |
65 | 65 | exit; |
66 | 66 | } |
67 | - } else { |
|
67 | + }else { |
|
68 | 68 | $result = array(); |
69 | 69 | $json = json_encode($result, JSON_PRETTY_PRINT); |
70 | 70 | echo($json); |
@@ -95,12 +95,12 @@ discard block |
||
95 | 95 | |
96 | 96 | $json = json_encode($result, JSON_PRETTY_PRINT); |
97 | 97 | echo($json); |
98 | - } else { |
|
98 | + }else { |
|
99 | 99 | header('HTTP/1.0 403 Forbidden'); |
100 | 100 | echo json_encode(array("failed" => "Only Draft applications can be modified."), JSON_FORCE_OBJECT); |
101 | 101 | exit; |
102 | 102 | } |
103 | - } else { |
|
103 | + }else { |
|
104 | 104 | $result = array(); |
105 | 105 | $json = json_encode($result, JSON_PRETTY_PRINT); |
106 | 106 | echo($json); |
@@ -39,7 +39,7 @@ |
||
39 | 39 | $result = ContentController::getContentByLocale($locale); |
40 | 40 | $json = json_encode($result, JSON_PRETTY_PRINT); |
41 | 41 | echo($json); |
42 | - } else { |
|
42 | + }else { |
|
43 | 43 | $result = array(); |
44 | 44 | $json = json_encode($result, JSON_PRETTY_PRINT); |
45 | 45 | echo($json); |
@@ -16,7 +16,7 @@ |
||
16 | 16 | $previousEntry = TeamCultureDAO::getTeamCultureNonLocalizedForManagerProfile($managerProfileId); |
17 | 17 | if ($previousEntry) { |
18 | 18 | $result = TeamCultureDAO::updateTeamCultureForManagerProfile($teamCulture, $managerProfileId); |
19 | - } else { |
|
19 | + }else { |
|
20 | 20 | $result = TeamCultureDAO::createTeamCultureForManagerProfile($teamCulture, $managerProfileId); |
21 | 21 | } |
22 | 22 | return $result; |
@@ -19,23 +19,29 @@ discard block |
||
19 | 19 | <div class="page-hero__navigation-item box med-1of5 lg-1of6" id="navigationHomeLinkWrapper" aria-hidden="false"> |
20 | 20 | <?php if (strpos($url, 'admin') !== false) : ?> |
21 | 21 | <a href="/admin/" id="navigationHomeLink">Home</a> |
22 | - <?php else : ?> |
|
22 | + <?php else { |
|
23 | + : ?> |
|
23 | 24 | <a href="/" id="navigationHomeLink">Home</a> |
24 | - <?php endif; ?> |
|
25 | + <?php endif; |
|
26 | +} |
|
27 | +?> |
|
25 | 28 | </div> |
26 | 29 | |
27 | 30 | <?php /* Checks to see if the page is the admin portal and then displays the admin home link. */ ?> |
28 | 31 | <?php $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; ?> |
29 | 32 | <?php if (strpos($url, 'admin') !== false) : ?> |
30 | 33 | <?php /* No link for you! */ ?> |
31 | - <?php else : ?> |
|
34 | + <?php else { |
|
35 | + : ?> |
|
32 | 36 | <?php /* Browse Jobs */ ?> |
33 | 37 | <div class="page-hero__navigation-item box med-1of5 lg-1of6" id="navigationBrowseLinkWrapper" aria-hidden="false"> |
34 | 38 | <a href="#BrowseJobs" id="navigationBrowseLink" onclick="JobPostAPI.showBrowseJobs();TalentCloudAPI.setNav('navigationBrowseLinkWrapper');"> |
35 | 39 | Browse Jobs |
36 | 40 | </a> |
37 | 41 | </div> |
38 | - <?php endif; ?> |
|
42 | + <?php endif; |
|
43 | +} |
|
44 | +?> |
|
39 | 45 | |
40 | 46 | <?php /* Dashboard */ ?> |
41 | 47 | <div class="page-hero__navigation-item box med-1of5 lg-1of6 hidden" id="navigationDashboardLinkWrapper" aria-hidden="true"> |
@@ -61,11 +67,14 @@ discard block |
||
61 | 67 | <a href="#CreateEditProfile" id="navigationProfileLink" onclick="CreateEditProfileAPI.showCreateEditProfile();TalentCloudAPI.setNav('navigationProfileLinkWrapper');"> |
62 | 68 | My Profile |
63 | 69 | </a> |
64 | - <?php else :?> |
|
70 | + <?php else { |
|
71 | + :?> |
|
65 | 72 | <a href="#MyProfile" id="navigationProfileLink" onclick="JobSeekerAPI.showMyJobSeekerProfile();TalentCloudAPI.setNav('navigationProfileLinkWrapper');"> |
66 | 73 | My Profile |
67 | 74 | </a> |
68 | - <?php endif; ?> |
|
75 | + <?php endif; |
|
76 | +} |
|
77 | +?> |
|
69 | 78 | |
70 | 79 | </div> |
71 | 80 | |
@@ -75,18 +84,24 @@ discard block |
||
75 | 84 | <a href="javascript:void(0)" id="navigationPosterLink" onclick="CreateJobPosterAPI.showCreateJobPosterForm(this);TalentCloudAPI.setNav('navigationPosterLinkWrapper');">Job Poster |
76 | 85 | </a> |
77 | 86 | </div> |
78 | - <?php else : ?> |
|
87 | + <?php else { |
|
88 | + : ?> |
|
79 | 89 | <?php /* No link for you! */ ?> |
80 | - <?php endif; ?> |
|
90 | + <?php endif; |
|
91 | +} |
|
92 | +?> |
|
81 | 93 | |
82 | 94 | <?php /* Register */ |
83 | 95 | if (strpos($url, 'admin') !== false) : ?> |
84 | 96 | <div class="page-hero__navigation-item box med-1of5 lg-1of6 hidden" id="navigationRegisterLinkWrapper" aria-hidden="true"> |
85 | 97 | <?php echo("<a href=\"\" id=\"navigationRegisterLink\">Register</a>"); ?> |
86 | 98 | </div> |
87 | - <?php else : ?> |
|
99 | + <?php else { |
|
100 | + : ?> |
|
88 | 101 | <div class="page-hero__navigation-item box med-1of5 lg-1of6" id="navigationRegisterLinkWrapper" aria-hidden="false"> |
89 | - <?php echo("<a href=\"https://account.gccollab.ca/register?redirect_uri=https%3A%2F%2Ftc.gccollab.ca%2F\" id=\"navigationRegisterLink\">Register</a>"); ?> |
|
102 | + <?php echo("<a href=\"https://account.gccollab.ca/register?redirect_uri=https%3A%2F%2Ftc.gccollab.ca%2F\" id=\"navigationRegisterLink\">Register</a>"); |
|
103 | +} |
|
104 | +?> |
|
90 | 105 | </div> |
91 | 106 | <?php endif; ?> |
92 | 107 | |
@@ -102,9 +117,12 @@ discard block |
||
102 | 117 | |
103 | 118 | <?php if ($hasUser != null) : ?> |
104 | 119 | <div class="page-hero__navigation-item box med-1of5 lg-1of6 hidden" id="navigationLoginLinkWrapper" aria-hidden="true"> |
105 | - <?php else :?> |
|
120 | + <?php else { |
|
121 | + :?> |
|
106 | 122 | <div class="page-hero__navigation-item box med-1of5 lg-1of6" id="navigationLoginLinkWrapper" aria-hidden="false"> |
107 | - <?php endif; ?> |
|
123 | + <?php endif; |
|
124 | +} |
|
125 | +?> |
|
108 | 126 | <?php |
109 | 127 | $loginLink = ""; |
110 | 128 | $loginLink .= OPENID_URI . AUTH_URI; |
@@ -119,13 +137,16 @@ discard block |
||
119 | 137 | ?> |
120 | 138 | </div> |
121 | 139 | |
122 | - <?php else : ?> |
|
140 | + <?php else { |
|
141 | + : ?> |
|
123 | 142 | |
124 | 143 | <?php if ($hasUser != null) : ?> |
125 | 144 | <div class="page-hero__navigation-item box med-1of5 lg-1of6 hidden" id="navigationLoginLinkWrapper"> |
126 | 145 | <?php else :?> |
127 | 146 | <div class="page-hero__navigation-item box med-1of5 lg-1of6" id="navigationLoginLinkWrapper"> |
128 | - <?php endif; ?> |
|
147 | + <?php endif; |
|
148 | +} |
|
149 | +?> |
|
129 | 150 | <?php |
130 | 151 | $loginLink = ""; |
131 | 152 | $loginLink .= OPENID_URI . AUTH_URI; |
@@ -156,9 +177,12 @@ discard block |
||
156 | 177 | <div id="h1"> |
157 | 178 | <?php if (strpos($url, 'admin') !== false) : ?> |
158 | 179 | <h1 class="visuallyHidden">Talent Cloud - Admin Portal</h1> |
159 | - <?php else :?> |
|
180 | + <?php else { |
|
181 | + :?> |
|
160 | 182 | <h1 class="visuallyHidden">Talent Cloud - Applicant Portal</h1> |
161 | - <?php endif; ?> |
|
183 | + <?php endif; |
|
184 | +} |
|
185 | +?> |
|
162 | 186 | </div> |
163 | 187 | |
164 | 188 | <div class="landing-hero" id="landingHero"> |