File tree Expand file tree Collapse file tree 4 files changed +12
-0
lines changed Expand file tree Collapse file tree 4 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ private function requestMembership(string $gid_or_mail)
1010 http_post (__DIR__ . "/../../webroot/panel/groups.php " , [
1111 "form_type " => "addPIform " ,
1212 "pi " => $ gid_or_mail ,
13+ "tos " => "agree " ,
1314 ]);
1415 }
1516
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ private function requestJoinPI(string $gid)
3434 http_post (__DIR__ . "/../../webroot/panel/groups.php " , [
3535 "form_type " => "addPIform " ,
3636 "pi " => $ gid ,
37+ "tos " => "agree " ,
3738 ]);
3839 }
3940
Original file line number Diff line number Diff line change 2626
2727 switch ($ _POST ["form_type " ]) {
2828 case "addPIform " :
29+ if (!isset ($ _POST ["tos " ]) || $ _POST ["tos " ] != "agree " ) {
30+ UnityHTTPD::badRequest ("user did not agree to terms of service " );
31+ }
2932 if ($ pi_account ->exists ()) {
3033 if ($ pi_account ->requestExists ($ USER )) {
3134 array_push ($ modalErrors , "You've already requested this " );
Original file line number Diff line number Diff line change 1313 <input type="text" id="pi_search" name="pi" placeholder="Search PI by NetID" required>
1414 <div class="searchWrapper" style="display: none;"></div>
1515 </div>
16+ <label>
17+ <input type='checkbox' name='tos' value='agree' required>
18+ I have read and accept the
19+ <a href='<?php echo CONFIG ["site " ]["terms_of_service_url " ]; ?> ' target='_blank'>
20+ Terms of Service
21+ </a>.
22+ </label>
1623 <input type="submit" value="Send Request">
1724</form>
1825
You can’t perform that action at this time.
0 commit comments