@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | $fcontents .= "\n" . '!define USER_GROUP "' . $this->translateString(str_replace('"', '$\\"', $attr['profile:name'][0]), $this->codePage) . '" |
| 233 | 233 | '; |
| 234 | 234 | } |
| 235 | - $fcontents .= ' |
|
| 235 | + $fcontents .= ' |
|
| 236 | 236 | Caption "' . $this->translateString(sprintf(WindowsCommon::sprint_nsi(_("%s installer for %s")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $attr['general:instname'][0]), $this->codePage) . '" |
| 237 | 237 | !define APPLICATION "' . $this->translateString(sprintf(WindowsCommon::sprint_nsi(_("%s installer for %s")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $attr['general:instname'][0]), $this->codePage) . '" |
| 238 | 238 | !define VERSION "' . \core\CAT::VERSION_MAJOR . '.' . \core\CAT::VERSION_MINOR . '" |
@@ -241,8 +241,8 @@ discard block |
||
| 241 | 241 | !define LOCALE "' . preg_replace('/\..*$/', '', CONFIG['LANGUAGES'][$this->languageInstance->getLang()]['locale']) . '" |
| 242 | 242 | ;-------------------------------- |
| 243 | 243 | !define ORGANISATION "' . $this->translateString($attr['general:instname'][0], $this->codePage) . '" |
| 244 | -!define SUPPORT "' . ((isset($attr['support:email'][0]) && $attr['support:email'][0] ) ? $attr['support:email'][0] : $this->translateString($this->support_email_substitute, $this->codePage)) . '" |
|
| 245 | -!define URL "' . ((isset($attr['support:url'][0]) && $attr['support:url'][0] ) ? $attr['support:url'][0] : $this->translateString($this->support_url_substitute, $this->codePage)) . '" |
|
| 244 | +!define SUPPORT "' . ((isset($attr['support:email'][0]) && $attr['support:email'][0]) ? $attr['support:email'][0] : $this->translateString($this->support_email_substitute, $this->codePage)) . '" |
|
| 245 | +!define URL "' . ((isset($attr['support:url'][0]) && $attr['support:url'][0]) ? $attr['support:url'][0] : $this->translateString($this->support_url_substitute, $this->codePage)) . '" |
|
| 246 | 246 | '; |
| 247 | 247 | |
| 248 | 248 | |
@@ -256,11 +256,11 @@ discard block |
||
| 256 | 256 | $fcontents .= '!define REALM "' . $attr['internal:realm'][0] . '" |
| 257 | 257 | '; |
| 258 | 258 | } |
| 259 | - if(!empty($attr['internal:hint_userinput_suffix'][0]) && $attr['internal:hint_userinput_suffix'][0] == 1) { |
|
| 259 | + if (!empty($attr['internal:hint_userinput_suffix'][0]) && $attr['internal:hint_userinput_suffix'][0] == 1) { |
|
| 260 | 260 | $fcontents .= '!define HINT_USER_INPUT "' . $attr['internal:hint_userinput_suffix'][0] . '" |
| 261 | 261 | '; |
| 262 | 262 | } |
| 263 | - if(!empty($attr['internal:verify_userinput_suffix'][0]) && $attr['internal:verify_userinput_suffix'][0] == 1) { |
|
| 263 | + if (!empty($attr['internal:verify_userinput_suffix'][0]) && $attr['internal:verify_userinput_suffix'][0] == 1) { |
|
| 264 | 264 | $fcontents .= '!define VERIFY_USER_REALM_INPUT "' . $attr['internal:verify_userinput_suffix'][0] . '" |
| 265 | 265 | '; |
| 266 | 266 | } |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | <?php |
| 12 | 12 | $cat = new core\CAT(); |
| 13 | 13 | function escaped_echo($s) { |
| 14 | - echo preg_replace('/"/','"',$s); |
|
| 14 | + echo preg_replace('/"/', '"', $s); |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | $langObject = new \core\common\Language(); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | result = j.status; |
| 71 | 71 | if(! result) { |
| 72 | 72 | alert("<?php escaped_echo(_("no matching data found"))?>"); |
| 73 | - document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/').'/'?>'; |
|
| 73 | + document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/'?>'; |
|
| 74 | 74 | } |
| 75 | 75 | j = j.data; |
| 76 | 76 | n = j.length; |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | inst_name = j[0].idp_name; |
| 79 | 79 | logo = j[0].logo; |
| 80 | 80 | $("#inst_name").val(inst_name); |
| 81 | - $("#inst_name_span").html("<?php escaped_echo(sprintf(_("Selected %s:"),$cat->nomenclature_inst))?> <strong>"+inst_name+"</strong>"); |
|
| 81 | + $("#inst_name_span").html("<?php escaped_echo(sprintf(_("Selected %s:"), $cat->nomenclature_inst))?> <strong>"+inst_name+"</strong>"); |
|
| 82 | 82 | $(".inst_name").text(inst_name); |
| 83 | 83 | $("#user_page").show(); |
| 84 | 84 | $("#institution_name").show(); |
@@ -191,8 +191,8 @@ discard block |
||
| 191 | 191 | j1 = $.parseJSON(data); |
| 192 | 192 | result = j1.status; |
| 193 | 193 | if(! result) { |
| 194 | - alert("<?php escaped_echo( _("no matching data found"))?>"); |
|
| 195 | - document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/').'/'?>'; |
|
| 194 | + alert("<?php escaped_echo(_("no matching data found"))?>"); |
|
| 195 | + document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/'?>'; |
|
| 196 | 196 | } |
| 197 | 197 | j = j1.data; |
| 198 | 198 | if(j.description !== undefined && j.description) { |
@@ -203,15 +203,15 @@ discard block |
||
| 203 | 203 | $("#profile_desc").text(''); |
| 204 | 204 | } |
| 205 | 205 | if(j.local_url !== undefined && j.local_url) |
| 206 | - txt = txt+'<tr><td><?php escaped_echo(_("WWW:"));?></td><td><a href="'+j.local_url+'" target="_blank">'+j.local_url+'</a></td></tr>'; |
|
| 206 | + txt = txt+'<tr><td><?php escaped_echo(_("WWW:")); ?></td><td><a href="'+j.local_url+'" target="_blank">'+j.local_url+'</a></td></tr>'; |
|
| 207 | 207 | if(j.local_email !== undefined && j.local_email) |
| 208 | - txt = txt+'<tr><td><?php escaped_echo(_("email:"));?></td><td><a href=mailto:"'+j.local_email+'">'+j.local_email+'</a></td></tr>'; |
|
| 208 | + txt = txt+'<tr><td><?php escaped_echo(_("email:")); ?></td><td><a href=mailto:"'+j.local_email+'">'+j.local_email+'</a></td></tr>'; |
|
| 209 | 209 | if(j.local_phone !== undefined && j.local_phone) |
| 210 | - txt = txt+'<tr><td><?php escaped_echo(_("tel:"));?></td><td>'+j.local_phone+'</td></tr>'; |
|
| 210 | + txt = txt+'<tr><td><?php escaped_echo(_("tel:")); ?></td><td>'+j.local_phone+'</td></tr>'; |
|
| 211 | 211 | if(txt) |
| 212 | - txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems, then you can obtain direct assistance from your %s at:"),$cat->nomenclature_inst)); ?></th></tr>"+txt+'</table>'; |
|
| 212 | + txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems, then you can obtain direct assistance from your %s at:"), $cat->nomenclature_inst)); ?></th></tr>"+txt+'</table>'; |
|
| 213 | 213 | else |
| 214 | - txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems you should ask for help at your %s"),$cat->nomenclature_inst)); ?>.</th></tr></table>"; |
|
| 214 | + txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems you should ask for help at your %s"), $cat->nomenclature_inst)); ?>.</th></tr></table>"; |
|
| 215 | 215 | $("#user_info").html(txt); |
| 216 | 216 | $("#user_info").show(); |
| 217 | 217 | if(j.silverbullet) { |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | $("#g_"+v.id).addClass('alertButton'); |
| 230 | 230 | $("#cross_icon_"+v.id).show(); |
| 231 | 231 | $("#"+v.id).addClass('disabledDevice'); |
| 232 | - $("#download_button_header_"+v.id).html("<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"),$cat->nomenclature_inst))?>"); |
|
| 232 | + $("#download_button_header_"+v.id).html("<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"), $cat->nomenclature_inst))?>"); |
|
| 233 | 233 | $("#info_b_"+v.id+",#g_info_b_"+v.id).hide(); |
| 234 | 234 | } else { |
| 235 | 235 | if(v.status == -1) |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | $("#"+v.id+",#g_"+v.id).addClass('additionalInfo'); |
| 242 | 242 | $("#"+v.id+",#g_"+v.id).click(function(event){ |
| 243 | 243 | i_div = $("#info_"+$(this).attr('id')); |
| 244 | - t = "<?php escaped_echo(_("Your site administrator has specified that this device should be configured with resources located on a local page. When you click <b>Continue</b> this page will be opened in a new window/tab."))?>"+"<br><span class='redirect_link'><a href='"+v.redirect+"' target='_blank'><?php escaped_echo(_("Continue"));?></a></span>"; |
|
| 244 | + t = "<?php escaped_echo(_("Your site administrator has specified that this device should be configured with resources located on a local page. When you click <b>Continue</b> this page will be opened in a new window/tab."))?>"+"<br><span class='redirect_link'><a href='"+v.redirect+"' target='_blank'><?php escaped_echo(_("Continue")); ?></a></span>"; |
|
| 245 | 245 | i_div.html(t); |
| 246 | 246 | $(".redirect_link").click(function(event) { |
| 247 | 247 | i_div.hide(); |
@@ -249,13 +249,13 @@ discard block |
||
| 249 | 249 | |
| 250 | 250 | }); |
| 251 | 251 | } else if(v.device_customtext != '0' || v.eap_customtext != '0' || v.message != '0' || v.status > 0) { |
| 252 | - var continue_text = "<?php escaped_echo(_("Continue"));?>"; |
|
| 252 | + var continue_text = "<?php escaped_echo(_("Continue")); ?>"; |
|
| 253 | 253 | $("#"+v.id+",#g_"+v.id).addClass('additionalInfo'); |
| 254 | 254 | $("#"+v.id+",#g_"+v.id).click(function(event){ |
| 255 | 255 | i_div = $("#info_"+$(this).attr('id')); |
| 256 | 256 | if(v.status > 0) { |
| 257 | - t = "<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"),$cat->nomenclature_inst))?>"; |
|
| 258 | - continue_text = "<?php escaped_echo(_("Close"));?>"; |
|
| 257 | + t = "<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"), $cat->nomenclature_inst))?>"; |
|
| 258 | + continue_text = "<?php escaped_echo(_("Close")); ?>"; |
|
| 259 | 259 | } else { |
| 260 | 260 | t = i_div.html(); |
| 261 | 261 | if(v.message != '0') { |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | } |
| 313 | 313 | |
| 314 | 314 | function infoCAT(k,title) { |
| 315 | - $.post('<?php echo $Gui->skinObject->findResourceUrl("BASE", "user/cat_info.php");?>', {page: k, lang: lang}, function(data) { |
|
| 315 | + $.post('<?php echo $Gui->skinObject->findResourceUrl("BASE", "user/cat_info.php"); ?>', {page: k, lang: lang}, function(data) { |
|
| 316 | 316 | if(data.substring(0,8) == 'no_title') { |
| 317 | 317 | data = data.substring(8,data.length); |
| 318 | 318 | } else { |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | var x = getWindowHCenter() - 16; |
| 331 | 331 | $("#loading_ico").css('left',x+'px'); |
| 332 | 332 | $("#loading_ico").show(); |
| 333 | - window.location.replace("<?php echo $Gui->skinObject->findResourceUrl("BASE","admin/overview_user.php");?>?lang="+lang); |
|
| 333 | + window.location.replace("<?php echo $Gui->skinObject->findResourceUrl("BASE", "admin/overview_user.php"); ?>?lang="+lang); |
|
| 334 | 334 | } |
| 335 | 335 | |
| 336 | 336 | /* Get horizontal center of the Browser Window */ |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | return(Math.round(windowWidth/2)); |
| 352 | 352 | } |
| 353 | 353 | |
| 354 | -<?php if($idpId) { |
|
| 354 | +<?php if ($idpId) { |
|
| 355 | 355 | print "front_page = 0;\n"; |
| 356 | 356 | } ?> |
| 357 | 357 | |
@@ -389,10 +389,10 @@ discard block |
||
| 389 | 389 | $("#download_info a").attr('href',download_link); |
| 390 | 390 | $('#download_info').show(); |
| 391 | 391 | if( generateTimer > 0 ) { |
| 392 | - setTimeout("document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/')?>'+'/'+download_link",generateTimer); |
|
| 392 | + setTimeout("document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/')?>'+'/'+download_link",generateTimer); |
|
| 393 | 393 | } |
| 394 | 394 | else { |
| 395 | - document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/')?>'+'/'+download_link; |
|
| 395 | + document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/')?>'+'/'+download_link; |
|
| 396 | 396 | } |
| 397 | 397 | } |
| 398 | 398 | } |
@@ -510,13 +510,13 @@ discard block |
||
| 510 | 510 | "overlay":true,"cookie":true,"type":false, |
| 511 | 511 | "country":true,"location":true, |
| 512 | 512 | "title":"<?php escaped_echo($cat->nomenclature_inst) ?>", |
| 513 | - "subtitle":"<?php escaped_echo(sprintf(_("Select your <strong>%s<\/strong>"),$cat->nomenclature_inst)) ?>", |
|
| 514 | - "textHelp": "<?php escaped_echo(sprintf(_("Help, my %s is not on the list"),$cat->nomenclature_inst)) ?>", |
|
| 515 | - "textHelpMore": "<?php escaped_echo(sprintf(_("This system relies on information supplied by local %s administrators. If your %s is not on the list, then nag them to add information to the %s database."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $cat->nomenclature_inst, CONFIG['APPEARANCE']['productname'])); ?>", |
|
| 513 | + "subtitle":"<?php escaped_echo(sprintf(_("Select your <strong>%s<\/strong>"), $cat->nomenclature_inst)) ?>", |
|
| 514 | + "textHelp": "<?php escaped_echo(sprintf(_("Help, my %s is not on the list"), $cat->nomenclature_inst)) ?>", |
|
| 515 | + "textHelpMore": "<?php escaped_echo(sprintf(_("This system relies on information supplied by local %s administrators. If your %s is not on the list, then nag them to add information to the %s database."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $cat->nomenclature_inst, CONFIG['APPEARANCE']['productname'])); ?>", |
|
| 516 | 516 | "textLocateMe": "<?php escaped_echo(_("Locate me more accurately using HTML5 Geo-Location")) ?>", |
| 517 | - "textShowProviders": "<?php escaped_echo(sprintf(_("Show %ss in"),$cat->nomenclature_inst)) ?>", |
|
| 517 | + "textShowProviders": "<?php escaped_echo(sprintf(_("Show %ss in"), $cat->nomenclature_inst)) ?>", |
|
| 518 | 518 | "textAllCountries": "<?php escaped_echo(_("all countries")) ?>", |
| 519 | - "textSearch" : "<?php escaped_echo(sprintf(_("or search for an %s, in example Univerity of Oslo"),$cat->nomenclature_inst)) ?>", |
|
| 519 | + "textSearch" : "<?php escaped_echo(sprintf(_("or search for an %s, in example Univerity of Oslo"), $cat->nomenclature_inst)) ?>", |
|
| 520 | 520 | "textShowAllCountries": "<?php escaped_echo(_("show all countries")) ?>", |
| 521 | 521 | "textLimited1" : "<?php escaped_echo(_("Results limited to"))?>", |
| 522 | 522 | "textLimited2" : "<?php escaped_echo(_("entries - show more"))?>", |
@@ -33,9 +33,9 @@ discard block |
||
| 33 | 33 | public function writeInstaller() { |
| 34 | 34 | $installerPath = $this->installerBasename . ".py"; |
| 35 | 35 | $this->copyFile("main.py", $installerPath); |
| 36 | - $installer = fopen($installerPath,"a"); |
|
| 37 | - fwrite($installer,$this->writeMessages()); |
|
| 38 | - fwrite($installer,$this->writeConfigVars()); |
|
| 36 | + $installer = fopen($installerPath, "a"); |
|
| 37 | + fwrite($installer, $this->writeMessages()); |
|
| 38 | + fwrite($installer, $this->writeConfigVars()); |
|
| 39 | 39 | fwrite($installer, "run_installer()\n"); |
| 40 | 40 | return($installerPath); |
| 41 | 41 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | $out .= 'Messages.p12_title = "' . _("personal certificate file (p12 or pfx)") . "\"\n"; |
| 101 | 101 | $out .= 'Messages.save_wpa_conf = "' . _("Network Manager configuration failed, but we may generate a wpa_supplicant configuration file if you wish. Be warned that your connection password will be saved in this file as clear text.") . "\"\n"; |
| 102 | 102 | $out .= 'Messages.save_wpa_confirm = "' . _("Write the file") . "\"\n"; |
| 103 | - $out .= 'Messages.wrongUsernameFormat = "' ._("Error: Your username must be of the form 'xxx@institutionID' e.g. '[email protected]'!") . "\"\n"; |
|
| 103 | + $out .= 'Messages.wrongUsernameFormat = "' . _("Error: Your username must be of the form 'xxx@institutionID' e.g. '[email protected]'!") . "\"\n"; |
|
| 104 | 104 | $out .= 'Messages.wrong_realm = "' . _("Error: your username must be in the form of 'xxx@{}'. Please enter the username in the correct format.") . "\"\n"; |
| 105 | 105 | $out .= 'Messages.wrong_realm_suffix = "' . _("Error: your username must be in the form of 'xxx@institutionID' and end with '{}'. Please enter the username in the correct format.") . "\"\n"; |
| 106 | 106 | |
@@ -129,8 +129,8 @@ discard block |
||
| 129 | 129 | $out .= "Config.use_other_tls_id = False\n"; |
| 130 | 130 | } |
| 131 | 131 | $tou = $this->mkUserConsent(); |
| 132 | - $out .= 'Config.tou = ' . ( $tou ? '"""' . $tou . '"""' : 'None' ) . "\n"; |
|
| 133 | - $out .= 'Config.CA = """' . $this->mkCAfile() . '"""' . "\n"; |
|
| 132 | + $out .= 'Config.tou = ' . ($tou ? '"""' . $tou . '"""' : 'None') . "\n"; |
|
| 133 | + $out .= 'Config.CA = """' . $this->mkCAfile() . '"""' . "\n"; |
|
| 134 | 134 | $out .= "Config.anonymous_identity = '" . $this->determineOuterIdString() . "'\n"; |
| 135 | 135 | $out .= 'Config.init_info = """' . $this->mkIntro() . '"""' . "\n"; |
| 136 | 136 | $out .= 'Config.init_confirmation = "' . $this->mkProfileConfirmation() . "\"\n"; |
@@ -139,10 +139,10 @@ discard block |
||
| 139 | 139 | if (!empty($this->attributes['internal:realm'][0])) { |
| 140 | 140 | $out .= 'Config.user_realm = "' . $this->attributes['internal:realm'][0] . "\"\n"; |
| 141 | 141 | } |
| 142 | - if(!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
|
| 142 | + if (!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
|
| 143 | 143 | $out .= "Config.hint_user_input = True\n"; |
| 144 | 144 | } |
| 145 | - if(!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) { |
|
| 145 | + if (!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) { |
|
| 146 | 146 | $out .= "Config.verify_user_realm_input = True\n"; |
| 147 | 147 | } |
| 148 | 148 | return $out; |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | } |
| 183 | 183 | $out .= "'DNS:$oneServer'"; |
| 184 | 184 | } |
| 185 | - return "[" . $out. "]"; |
|
| 185 | + return "[" . $out . "]"; |
|
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | return '[' . implode(', ', $outArray) . ']'; |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | - private function mkCAfile(){ |
|
| 209 | + private function mkCAfile() { |
|
| 210 | 210 | $out = ''; |
| 211 | 211 | $cAlist = $this->attributes['internal:CAs'][0]; |
| 212 | 212 | foreach ($cAlist as $oneCa) { |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | |
| 95 | 95 | while ($oneAttrib = mysqli_fetch_object($idpWideOptionsQuery)) { |
| 96 | 96 | if (!isset($profiles[$oneAttrib->institution_id])) { |
| 97 | - $idp = new \core\IdP((int)$oneAttrib->institution_id); |
|
| 97 | + $idp = new \core\IdP((int) $oneAttrib->institution_id); |
|
| 98 | 98 | $profiles[$oneAttrib->institution_id] = ['IdP' => $idp, 'Profiles' => $idp->listProfiles()]; |
| 99 | 99 | echo "Debug: IdP " . $idp->identifier . " has profiles "; |
| 100 | 100 | foreach ($profiles[$oneAttrib->institution_id]['Profiles'] as $oneProfileObject) { |
@@ -176,11 +176,11 @@ discard block |
||
| 176 | 176 | public function invitationMailBody($invitationLink) { |
| 177 | 177 | $text = _("Hello!"); |
| 178 | 178 | $text .= "\n\n"; |
| 179 | - $text .= sprintf(_("A new %s access credential has been created for you by your network administrator."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
|
| 179 | + $text .= sprintf(_("A new %s access credential has been created for you by your network administrator."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
|
| 180 | 180 | $text .= " "; |
| 181 | 181 | $text .= sprintf(_("Please follow the following link with the device you want to enable for %s to get a custom %s installation program just for you. You can click on the link, copy and paste it into a browser or scan the attached QR code."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
| 182 | 182 | $text .= "\n\n$invitationLink\n\n"; // gets replaced with the token value by getBody() |
| 183 | - $text .= sprintf(_("Please keep this email or bookmark this link for future use. After picking up your %s installation program, you can use the same link to get status information about your %s account."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
|
| 183 | + $text .= sprintf(_("Please keep this email or bookmark this link for future use. After picking up your %s installation program, you can use the same link to get status information about your %s account."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
|
| 184 | 184 | $text .= "\n\n"; |
| 185 | 185 | $text .= _("Regards,"); |
| 186 | 186 | $text .= "\n\n"; |
@@ -561,7 +561,7 @@ discard block |
||
| 561 | 561 | if (!$invitationsResult || $invitationsResult->num_rows == 0) { |
| 562 | 562 | $loggerInstance->debug(2, "Token $tokenvalue not found in database or database query error!\n"); |
| 563 | 563 | return ["status" => self::SB_TOKENSTATUS_INVALID, |
| 564 | - "cert_status" => [],]; |
|
| 564 | + "cert_status" => [], ]; |
|
| 565 | 565 | } |
| 566 | 566 | // if not returned, we found the token in the DB |
| 567 | 567 | $invitationRow = mysqli_fetch_object($invitationsResult); |
@@ -716,9 +716,9 @@ discard block |
||
| 716 | 716 | $link = $link . $relPath; |
| 717 | 717 | |
| 718 | 718 | if (preg_match('/admin$/', $link)) { |
| 719 | - $link = substr($link, 0, strlen($link)-6); |
|
| 719 | + $link = substr($link, 0, strlen($link) - 6); |
|
| 720 | 720 | } |
| 721 | - $link .= '/accountstatus/accountstatus.php?token='.$token; |
|
| 721 | + $link .= '/accountstatus/accountstatus.php?token=' . $token; |
|
| 722 | 722 | return $link; |
| 723 | 723 | } |
| 724 | 724 | |
@@ -29,6 +29,6 @@ |
||
| 29 | 29 | $link = \core\ProfileSilverbullet::generateTokenLink($cleanToken); |
| 30 | 30 | header("Content-Type:text/html;charset=utf-8"); |
| 31 | 31 | ?> |
| 32 | -<h1 style='text-align:center;'><?php echo _("Invitation Token QR Code");?></h1> |
|
| 33 | -<img style='float:none' src='data:image/png;base64,<?php echo base64_encode($uiElements->pngInjectConsortiumLogo(\QRcode::png($link, FALSE, QR_ECLEVEL_Q, 11), 11));?>'/> |
|
| 34 | -<p>(<a href='<?php echo $link;?>'><?php echo $link;?>)</a></p> |
|
| 35 | 32 | \ No newline at end of file |
| 33 | +<h1 style='text-align:center;'><?php echo _("Invitation Token QR Code"); ?></h1> |
|
| 34 | +<img style='float:none' src='data:image/png;base64,<?php echo base64_encode($uiElements->pngInjectConsortiumLogo(\QRcode::png($link, FALSE, QR_ECLEVEL_Q, 11), 11)); ?>'/> |
|
| 35 | +<p>(<a href='<?php echo $link; ?>'><?php echo $link; ?>)</a></p> |
|
| 36 | 36 | \ No newline at end of file |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | $jsEncodedBody = str_replace('\n', '%0D%0A', str_replace('"', '', json_encode($profile->invitationMailBody($link)))); |
| 389 | 389 | $tokenHtmlBuffer .= "<td> |
| 390 | 390 | |
| 391 | - The invitation token <input type='text' readonly='readonly' color='grey' size='60' value='$link' name='token' class='identifiedtokenarea-".$tokenWithoutCert['db_id']."'>(…)<br/> is ready for sending! Choose how to send it: |
|
| 391 | + The invitation token <input type='text' readonly='readonly' color='grey' size='60' value='$link' name='token' class='identifiedtokenarea-" . $tokenWithoutCert['db_id'] . "'>(…)<br/> is ready for sending! Choose how to send it: |
|
| 392 | 392 | <table> |
| 393 | 393 | <tr><td style='vertical-align:bottom;'>E-Mail:</td><td> |
| 394 | 394 | $formtext |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | </form> |
| 407 | 407 | </td></tr> |
| 408 | 408 | <tr><td style='vertical-align:bottom;'>Manual:</td><td> |
| 409 | - <button type='button' class='clipboardButton' onclick='clipboardCopy(".$tokenWithoutCert['db_id'].");'>" . _("Copy to Clipboard") . "</button> |
|
| 409 | + <button type='button' class='clipboardButton' onclick='clipboardCopy(".$tokenWithoutCert['db_id'] . ");'>" . _("Copy to Clipboard") . "</button> |
|
| 410 | 410 | <form style='display:inline-block;' method='post' action='inc/displayQRcode.inc.php' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
| 411 | 411 | <input type='hidden' value='" . $tokenWithoutCert['value'] . "' name='token'><br/> |
| 412 | 412 | <button type='submit'>" . _("Display QR code") . "</button> |
@@ -437,7 +437,7 @@ discard block |
||
| 437 | 437 | ?> |
| 438 | 438 | |
| 439 | 439 | <td> |
| 440 | - <?php echo $formtext;?> |
|
| 440 | + <?php echo $formtext; ?> |
|
| 441 | 441 | <div class="sb-date-container"> |
| 442 | 442 | <input type="text" maxlength="10" id="sb-date-picker-1" class="sb-date-picker" name="userexpiry" value="<?php echo $profile->getUserExpiryDate($oneUserId); ?>"> |
| 443 | 443 | <button class="sb-date-button" type="button">▼</button> |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | <div class="sb-user-buttons"> |
| 451 | 451 | <?php |
| 452 | 452 | if ($hasOnePendingInvite || count($validCerts) > 0) { |
| 453 | - echo $formtext ." |
|
| 453 | + echo $formtext . " |
|
| 454 | 454 | <input type='hidden' name='userid' value='$oneUserId'/> |
| 455 | 455 | <button type='submit' id='userdel' name='command' value='" . \web\lib\common\FormElements::BUTTON_DEACTIVATEUSER . "' class='delete'>" . _("Deactivate User") . "</button> |
| 456 | 456 | </form>"; |
@@ -488,7 +488,7 @@ discard block |
||
| 488 | 488 | . ' If all accounts shown as active above are indeed still valid, please check the box below and push "Save".' |
| 489 | 489 | . ' If any of the accounts are stale, please deactivate them by pushing the corresponding button before doing this.'), CONFIG_CONFASSISTANT['SILVERBULLET']['gracetime'] ?? core\ProfileSilverbullet::SB_ACKNOWLEDGEMENT_REQUIRED_DAYS); |
| 490 | 490 | |
| 491 | - echo $formtext."<div style='padding-bottom: 20px;'>" |
|
| 491 | + echo $formtext . "<div style='padding-bottom: 20px;'>" |
|
| 492 | 492 | . " |
| 493 | 493 | <p>$acknowledgeText</p> |
| 494 | 494 | <input type='checkbox' name='acknowledge' value='true'> |
@@ -512,7 +512,7 @@ discard block |
||
| 512 | 512 | </ul> |
| 513 | 513 | <!--adding manual --> |
| 514 | 514 | <div id="tabs-1"> |
| 515 | - <?php echo $formtext;?> |
|
| 515 | + <?php echo $formtext; ?> |
|
| 516 | 516 | <div class="sb-add-new-user"> |
| 517 | 517 | <label for="username"><?php echo _("Please enter a username of your choice and user expiry date to create a new user:"); ?></label> |
| 518 | 518 | <div style="margin: 5px 0px 10px 0px;"> |
@@ -529,7 +529,7 @@ discard block |
||
| 529 | 529 | <!--CSV --> |
| 530 | 530 | <div id="tabs-2"> |
| 531 | 531 | <div> |
| 532 | - <?php echo $formtext;?> |
|
| 532 | + <?php echo $formtext; ?> |
|
| 533 | 533 | <div class="sb-add-new-user"> |
| 534 | 534 | <p><?php echo _("Comma separated values should be provided in CSV file: username, expiration date 'yyyy-mm-dd', number of tokens (optional):"); ?></p> |
| 535 | 535 | <div style="margin: 5px 0px 10px 0px;"> |
@@ -557,7 +557,7 @@ discard block |
||
| 557 | 557 | <hr> |
| 558 | 558 | <?php echo $profile->termsAndConditions; ?> |
| 559 | 559 | <hr> |
| 560 | - <?php echo $formtext;?> |
|
| 560 | + <?php echo $formtext; ?> |
|
| 561 | 561 | <div style="position: relative; padding-bottom: 5px;"> |
| 562 | 562 | <input type="checkbox" name="agreement" value="true"> <label><?php echo _("I have read and agree to the terms."); ?></label> |
| 563 | 563 | </div> |
@@ -18,9 +18,9 @@ discard block |
||
| 18 | 18 | ?> |
| 19 | 19 | |
| 20 | 20 | <!-- JQuery --> |
| 21 | -<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","jquery/jquery.js") ?>"></script> |
|
| 22 | -<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","jquery/jquery-migrate.js") ?>"></script> |
|
| 23 | -<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","jquery/jquery-ui.js") ?>"></script> |
|
| 21 | +<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "jquery/jquery.js") ?>"></script> |
|
| 22 | +<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "jquery/jquery-migrate.js") ?>"></script> |
|
| 23 | +<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "jquery/jquery-ui.js") ?>"></script> |
|
| 24 | 24 | <!-- JQuery --> |
| 25 | 25 | |
| 26 | 26 | <script type="text/javascript"> |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | include("user/js/cat_js.php"); |
| 48 | 48 | ?> |
| 49 | 49 | var loading_ico = new Image(); |
| 50 | - loading_ico.src = "<?php echo $Gui->skinObject->findResourceUrl("IMAGES","icons/loading51.gif")?>"; |
|
| 50 | + loading_ico.src = "<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/loading51.gif")?>"; |
|
| 51 | 51 | </script> |
| 52 | 52 | <?php $Gui->langObject->setTextDomain("web_user"); ?> |
| 53 | 53 | <!-- DiscoJuice --> |
@@ -55,9 +55,9 @@ discard block |
||
| 55 | 55 | <script type="text/javascript"> |
| 56 | 56 | var lang = "<?php echo($Gui->langObject->getLang()) ?>"; |
| 57 | 57 | </script> |
| 58 | -<link rel="stylesheet" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","discojuice/css/discojuice.css")?>" /> |
|
| 58 | +<link rel="stylesheet" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "discojuice/css/discojuice.css")?>" /> |
|
| 59 | 59 | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"> |
| 60 | -<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("CSS","cat-user.css");?>" /> |
|
| 60 | +<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("CSS", "cat-user.css"); ?>" /> |
|
| 61 | 61 | </head> |
| 62 | 62 | <body> |
| 63 | 63 | <div id="wrap"> |
@@ -65,14 +65,14 @@ discard block |
||
| 65 | 65 | <?php echo $divs->div_heading($visibility); ?> |
| 66 | 66 | <div id="main_page"> |
| 67 | 67 | <div id="loading_ico"> |
| 68 | - <?php echo _("Authenticating") . "..." ?><br><img src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES","icons/loading51.gif")?>" alt="Authenticating ..."/> |
|
| 68 | + <?php echo _("Authenticating") . "..." ?><br><img src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/loading51.gif")?>" alt="Authenticating ..."/> |
|
| 69 | 69 | </div> |
| 70 | 70 | <div id="info_overlay"> <!-- device info --> |
| 71 | 71 | <div id="info_window"></div> |
| 72 | - <img id="info_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES","icons/button_cancel.png")?>" ALT="Close"/> |
|
| 72 | + <img id="info_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/button_cancel.png")?>" ALT="Close"/> |
|
| 73 | 73 | </div> |
| 74 | 74 | <div id="main_menu_info" style="display:none"> <!-- stuff triggered form main menu --> |
| 75 | - <img id="main_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES","icons/button_cancel.png")?>" ALT="Close"/> |
|
| 75 | + <img id="main_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/button_cancel.png")?>" ALT="Close"/> |
|
| 76 | 76 | <div id="main_menu_content"></div> |
| 77 | 77 | </div> |
| 78 | 78 | <div id="main_body"> |
@@ -3,9 +3,9 @@ discard block |
||
| 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.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.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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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(); |