Passed
Push — master ( 70896f...e2f1ce )
by Tomasz
03:45
created
web/skins/eduroam2016/accountstatus/accountstatus.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@  discard block
 block discarded – undo
3 3
 $Gui->defaultPagePrelude();
4 4
 ?>
5 5
 <!-- JQuery -->
6
-<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","jquery/jquery.js");?>"></script>
7
-<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","jquery/jquery-migrate-1.2.1.js");?>"></script>
8
-<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","jquery/jquery-ui.js");?>"></script>
6
+<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "jquery/jquery.js"); ?>"></script>
7
+<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "jquery/jquery-migrate-1.2.1.js"); ?>"></script>
8
+<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "jquery/jquery-ui.js"); ?>"></script>
9 9
 <!-- JQuery -->
10 10
 <script type="text/javascript">
11 11
     var recognisedOS = '';
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 var lang = "<?php echo($Gui->langObject->getLang()) ?>";
29 29
 </script>
30 30
 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
31
-<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("CSS","cat-user.css");?>" />
31
+<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("CSS", "cat-user.css"); ?>" />
32 32
 
33 33
 </head>
34 34
 <body>
@@ -38,15 +38,15 @@  discard block
 block discarded – undo
38 38
     <?php echo $divs->div_heading($visibility); ?>
39 39
     <div id="info_overlay"> <!-- device info -->
40 40
         <div id="info_window"></div>
41
-        <img id="info_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES","icons/button_cancel.png")?>" ALT="Close"/>
41
+        <img id="info_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/button_cancel.png")?>" ALT="Close"/>
42 42
     </div>
43 43
     <div id="main_menu_info" style="display:none"> <!-- stuff triggered form main menu -->
44
-          <img id="main_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES","icons/button_cancel.png")?>" ALT="Close"/>
44
+          <img id="main_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/button_cancel.png")?>" ALT="Close"/>
45 45
           <div id="main_menu_content"></div>
46 46
     </div>
47 47
     <div id="main_body">
48 48
         <div id="user_page">
49
-            <?php  echo $divs->div_institution(FALSE);?>
49
+            <?php  echo $divs->div_institution(FALSE); ?>
50 50
             <div id="user_info"></div> <!-- this will be filled with the profile contact information -->
51 51
             <div id="sb_info">
52 52
                 <?php 
@@ -89,18 +89,18 @@  discard block
 block discarded – undo
89 89
                             echo "<h3>" . sprintf(_("Your invitation token is valid for %d more device activations (%d have already been used)."), $statusInfo['tokenstatus']['activations_remaining'], $statusInfo['tokenstatus']['activations_total'] - $statusInfo['tokenstatus']['activations_remaining']) . "</h3>";
90 90
                         }
91 91
                         if (!$statusInfo["OS"]) {
92
-                            echo "<p>"._("Unfortunately, we are unable to determine your device's operating system. If you have made modifications on your device which prevent it from being recognised (e.g. custom 'User Agent' settings), please undo such modifications. You can come back to this page again; the invitation link has not been used up yet.") . "</p>";
92
+                            echo "<p>" . _("Unfortunately, we are unable to determine your device's operating system. If you have made modifications on your device which prevent it from being recognised (e.g. custom 'User Agent' settings), please undo such modifications. You can come back to this page again; the invitation link has not been used up yet.") . "</p>";
93 93
                             break;
94 94
                         }
95 95
 
96 96
                         $dev = new \core\DeviceFactory($statusInfo['OS']['device']);
97 97
                         $dev->device->calculatePreferredEapType([new \core\common\EAP(\core\common\EAP::EAPTYPE_SILVERBULLET)]);
98 98
                         if ($dev->device->selectedEap == []) {
99
-                            echo "<p>".sprintf(_("Unfortunately, the operating system your device uses (%s) is currently not supported for hosted end-user accounts. You can visit this page with a supported operating system later; the invitation link has not been used up yet."), $statusInfo['OS']['display']) . "</p>";
99
+                            echo "<p>" . sprintf(_("Unfortunately, the operating system your device uses (%s) is currently not supported for hosted end-user accounts. You can visit this page with a supported operating system later; the invitation link has not been used up yet."), $statusInfo['OS']['display']) . "</p>";
100 100
                             break;
101 101
                         }
102 102
 
103
-                        echo "<div id='sb_download_message'><p>".sprintf(_("You can now download a personalised  %s installation program."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
103
+                        echo "<div id='sb_download_message'><p>" . sprintf(_("You can now download a personalised  %s installation program."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
104 104
  //                       echo sprintf(_("The installation program is <span class='emph'>strictly personal</span>, to be used <span class='emph'>only on this device (%s)</span>, and it is <span class='emph'>not permitted to share</span> this information with anyone."), $statusInfo['OS']['display']);
105 105
                         echo sprintf(_("The installation program is <span class='emph'>strictly personal</span>, to be used <span class='emph'>only on this device (%s)</span>, and it is <span class='emph'>not permitted to share</span> this information with anyone."), $statusInfo['OS']['display']);
106 106
                         echo "<p style='color:red;'>" . _("When the system detects abuse such as sharing login data with others, all access rights for you will be revoked and you may be sanctioned by your local eduroam administrator.") . "</p>";
@@ -152,9 +152,9 @@  discard block
 block discarded – undo
152 152
             $supportInfo .= '<tr><td>' . ("tel:") . '</td><td><a href="' . $attributes['local_phone'] . '" target="_blank">' . $attributes['local_phone'] . '</a></td></tr>';
153 153
         }
154 154
         if ($supportInfo != '') {
155
-            $supportInfo = "<table><tr><th colspan='2'>" . sprintf(_("If you encounter problems, then you can obtain direct assistance from your %s at:"),$cat->nomenclature_inst) . "</th></tr>$supportInfo</table>";
155
+            $supportInfo = "<table><tr><th colspan='2'>" . sprintf(_("If you encounter problems, then you can obtain direct assistance from your %s at:"), $cat->nomenclature_inst) . "</th></tr>$supportInfo</table>";
156 156
         } else {
157
-            $supportInfo = "<table><tr><th colspan='2'>" . sprintf(_("If you encounter problems you should ask for help at your %s"),$cat->nomenclature_inst) . "</th></tr></table>";
157
+            $supportInfo = "<table><tr><th colspan='2'>" . sprintf(_("If you encounter problems you should ask for help at your %s"), $cat->nomenclature_inst) . "</th></tr></table>";
158 158
         }
159 159
 ?>
160 160
     <script>
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     $("#inst_name").val(idpName);
166 166
     $("#inst_name_span").html(idpName);
167 167
     $(".inst_name").text(idpName);
168
-    $("#inst_extra_text").html("<?php escaped_echo(sprintf(_("Your personal %s account status page"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']));?>");
168
+    $("#inst_extra_text").html("<?php escaped_echo(sprintf(_("Your personal %s account status page"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])); ?>");
169 169
         if(logo) {
170 170
     $("#idp_logo").attr("src","<?php echo $skinObject->findResourceUrl("BASE", "user/API.php"); ?>?action=sendLogo&api_version=2&idp="+idpId);
171 171
     $("#idp_logo").show();
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         
181 181
         $("#user_button_sb").click(function(event){
182 182
             event.preventDefault();
183
-            $("#cat_form").attr('action','<?php echo $Gui->skinObject->findResourceUrl("BASE","user/sb_download.php");?>');
183
+            $("#cat_form").attr('action','<?php echo $Gui->skinObject->findResourceUrl("BASE", "user/sb_download.php"); ?>');
184 184
             $("#cat_form").submit();
185 185
         });
186 186
         
@@ -193,10 +193,10 @@  discard block
 block discarded – undo
193 193
                 var allArray = new Array();
194 194
                 var statusCount = new Array();
195 195
                 
196
-                allArray[<?php echo \core\ProfileSilverbullet::SB_CERTSTATUS_VALID;?>] = {color: "#000000", categoryText: "<?php escaped_echo(_("Current login tokens")) ?>", rows: validCerts};
197
-                allArray[<?php echo \core\ProfileSilverbullet::SB_CERTSTATUS_EXPIRED;?>] = {color: "#999999", categoryText: "<?php escaped_echo(_("Previous login tokens")) ?>", rows: expiredCerts};
198
-                allArray[<?php echo \core\ProfileSilverbullet::SB_CERTSTATUS_REVOKED;?>] = {color: "#ff0000", categoryText: "<?php escaped_echo(_("Revoked login tokens")) ?>", rows: revokedCerts};
199
-                var headerLine = "<tr><th><?php escaped_echo(_("Pseudonym"));?></th><th><?php escaped_echo(_("Device Type"));?></th><th><?php escaped_echo(_("Serial Number"));?></th><th><?php escaped_echo(_("Issue Date"));?></th><th><?php escaped_echo(_("Expiry Date"));?></th></tr>";
196
+                allArray[<?php echo \core\ProfileSilverbullet::SB_CERTSTATUS_VALID; ?>] = {color: "#000000", categoryText: "<?php escaped_echo(_("Current login tokens")) ?>", rows: validCerts};
197
+                allArray[<?php echo \core\ProfileSilverbullet::SB_CERTSTATUS_EXPIRED; ?>] = {color: "#999999", categoryText: "<?php escaped_echo(_("Previous login tokens")) ?>", rows: expiredCerts};
198
+                allArray[<?php echo \core\ProfileSilverbullet::SB_CERTSTATUS_REVOKED; ?>] = {color: "#ff0000", categoryText: "<?php escaped_echo(_("Revoked login tokens")) ?>", rows: revokedCerts};
199
+                var headerLine = "<tr><th><?php escaped_echo(_("Pseudonym")); ?></th><th><?php escaped_echo(_("Device Type")); ?></th><th><?php escaped_echo(_("Serial Number")); ?></th><th><?php escaped_echo(_("Issue Date")); ?></th><th><?php escaped_echo(_("Expiry Date")); ?></th></tr>";
200 200
                 $.each(allArray, function(index, value) {
201 201
                     if(value !== undefined) {
202 202
                         value.rows.push('<tr style="color:' + value.color + ';"><th class="th1" colspan="5">' + value.categoryText + '</th></tr>');
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
                    if (value !== undefined && value.rows.length > 2) {
218 218
                         $.each(value.rows, function(i,line){
219 219
                             if (i > 1) {
220
-                                if (index === <?php echo \core\ProfileSilverbullet::SB_CERTSTATUS_VALID;?>)
220
+                                if (index === <?php echo \core\ProfileSilverbullet::SB_CERTSTATUS_VALID; ?>)
221 221
                                     line = line + '<td class="revoke"><a href="" TITLE="revoke certificate">revoke</a></td></tr>';
222 222
                                 else
223 223
                                     line = line + '</tr>';
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 
236 236
         $("#cert_details").on("click", "td.revoke>a", function(event) {
237 237
             event.preventDefault();
238
-            if (confirm("<?php escaped_echo(_("really revoke this certificate?"));?>"))
238
+            if (confirm("<?php escaped_echo(_("really revoke this certificate?")); ?>"))
239 239
                 alert("deleting - not yet implemented");
240 240
         })
241 241
         loadIdpData();
Please login to merge, or discard this patch.