|
551 | 551 | echo "<h1>Iniciar Sessão no ClassLink</h1>"; |
552 | 552 | echo "<p class=\"small\">Para aceder à plataforma, deve autenticar-se com a sua conta institucional.</p>"; |
553 | 553 | echo "<a href=\"/login?redirecttoflow=1\" class=\"login-btn\">"; |
554 | | - echo "<svg class=\"ms-logo\" width=\"21\" height=\"21\" viewBox=\"0 0 21 21\" xmlns=\"http://www.w3.org/2000/svg\" style=\"vertical-align: middle; margin-right: 8px;\">"; |
555 | | - echo "<rect class=\"ms-rect1\" x=\"1\" y=\"1\" width=\"9\" height=\"9\" fill=\"white\"/>"; |
556 | | - echo "<rect class=\"ms-rect2\" x=\"11\" y=\"1\" width=\"9\" height=\"9\" fill=\"white\"/>"; |
557 | | - echo "<rect class=\"ms-rect3\" x=\"1\" y=\"11\" width=\"9\" height=\"9\" fill=\"white\"/>"; |
558 | | - echo "<rect class=\"ms-rect4\" x=\"11\" y=\"11\" width=\"9\" height=\"9\" fill=\"white\"/>"; |
559 | | - echo "</svg>"; |
560 | | - echo "Login com Microsoft"; |
| 554 | + if (isset($authProvider) && $authProvider === 'Microsoft') { |
| 555 | + echo "<svg class=\"ms-logo\" width=\"21\" height=\"21\" viewBox=\"0 0 21 21\" xmlns=\"http://www.w3.org/2000/svg\" style=\"vertical-align: middle; margin-right: 8px;\">"; |
| 556 | + echo "<rect class=\"ms-rect1\" x=\"1\" y=\"1\" width=\"9\" height=\"9\" fill=\"white\"/>"; |
| 557 | + echo "<rect class=\"ms-rect2\" x=\"11\" y=\"1\" width=\"9\" height=\"9\" fill=\"white\"/>"; |
| 558 | + echo "<rect class=\"ms-rect3\" x=\"1\" y=\"11\" width=\"9\" height=\"9\" fill=\"white\"/>"; |
| 559 | + echo "<rect class=\"ms-rect4\" x=\"11\" y=\"11\" width=\"9\" height=\"9\" fill=\"white\"/>"; |
| 560 | + echo "</svg>"; |
| 561 | + echo "Iniciar Sessão com Microsoft"; |
| 562 | + } else { |
| 563 | + $providerName = isset($authProvider) ? htmlspecialchars($authProvider, ENT_QUOTES, 'UTF-8') : 'OAuth'; |
| 564 | + echo "Iniciar Sessão com Fornecedor de Identidade " . $providerName; |
| 565 | + } |
561 | 566 | echo "</a>"; |
562 | | - echo "<style>"; |
563 | | - echo ".login-btn:hover .ms-rect1 { fill: #f25022; }"; |
564 | | - echo ".login-btn:hover .ms-rect2 { fill: #7fba00; }"; |
565 | | - echo ".login-btn:hover .ms-rect3 { fill: #00a4ef; }"; |
566 | | - echo ".login-btn:hover .ms-rect4 { fill: #ffb900; }"; |
567 | | - echo "</style></a>"; |
| 567 | + if (isset($authProvider) && $authProvider === 'Microsoft') { |
| 568 | + echo "<style>"; |
| 569 | + echo ".login-btn:hover .ms-rect1 { fill: #f25022; }"; |
| 570 | + echo ".login-btn:hover .ms-rect2 { fill: #7fba00; }"; |
| 571 | + echo ".login-btn:hover .ms-rect3 { fill: #00a4ef; }"; |
| 572 | + echo ".login-btn:hover .ms-rect4 { fill: #ffb900; }"; |
| 573 | + echo "</style>"; |
| 574 | + } |
568 | 575 | echo "</div>"; |
569 | 576 | echo ""; |
570 | 577 | echo "<div class=\"notice\">"; |
|
0 commit comments