@@ -217,13 +217,13 @@ |
||
| 217 | 217 | if ($optFlag == "SPECIFIC") { |
| 218 | 218 | $opt = str_replace('device-specific:', '', $l); |
| 219 | 219 | if (!isset($dev->options['device_options']) || !in_array($opt, $dev->options['device_options'])) { |
| 220 | - \core\common\Logging::debug_s(5, $l, "removing option: ", "\n"); |
|
| 220 | + \core\common\Logging::debug_s(5, $l, "removing option: ", "\n"); |
|
| 221 | 221 | unset($list[array_search($l, $list)]); |
| 222 | 222 | } |
| 223 | 223 | } |
| 224 | 224 | } |
| 225 | 225 | } |
| 226 | - break; |
|
| 226 | + break; |
|
| 227 | 227 | default: |
| 228 | 228 | break; |
| 229 | 229 | } |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | */ |
| 118 | 118 | public function prefilledOptionTable(string $attributePrefix, $fed) |
| 119 | 119 | { |
| 120 | - $retval = "<table id='expandable_$attributePrefix" . "_options'>"; |
|
| 120 | + $retval = "<table id='expandable_$attributePrefix"."_options'>"; |
|
| 121 | 121 | |
| 122 | 122 | $prepopulate = []; |
| 123 | 123 | foreach ($this->listOfOptions as $existingAttribute) { |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | $prepopulate[] = $existingAttribute; |
| 126 | 126 | } |
| 127 | 127 | } |
| 128 | - if (is_array($prepopulate) && ( count($prepopulate) > 0 || $attributePrefix == "device-specific" || $attributePrefix == "eap-specific" )) { // editing... fill with values |
|
| 128 | + if (is_array($prepopulate) && (count($prepopulate) > 0 || $attributePrefix == "device-specific" || $attributePrefix == "eap-specific")) { // editing... fill with values |
|
| 129 | 129 | $retval .= $this->addOptionEdit($attributePrefix, $prepopulate); |
| 130 | 130 | } else { |
| 131 | 131 | $retval .= $this->addOptionNew($attributePrefix, $fed); |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | if (preg_match("/^$class:/", $option['name']) && !preg_match("/($blackListOnPrefill)/", $option['name'])) { |
| 160 | 160 | $optiontypearray = $optioninfo->optionType($option['name']); |
| 161 | 161 | $loggerInstance->debug(5, "About to execute optiontext with PREFILL!\n"); |
| 162 | - $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-' . $option['level'] . '-' . $option['row_id'] : $option['value']), $option['lang']); |
|
| 162 | + $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-'.$option['level'].'-'.$option['row_id'] : $option['value']), $option['lang']); |
|
| 163 | 163 | } |
| 164 | 164 | } |
| 165 | 165 | return $retval; |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | * @param string $fed the federation TLD, to determine fed ops preference context |
| 176 | 176 | * @return array the list of options to display |
| 177 | 177 | */ |
| 178 | - public static function enumerateOptionsToDisplay($class, $fed, $device='') |
|
| 178 | + public static function enumerateOptionsToDisplay($class, $fed, $device = '') |
|
| 179 | 179 | { |
| 180 | 180 | $optioninfo = \core\Options::instance(); |
| 181 | 181 | $list = $optioninfo->availableOptions($class); |
@@ -270,18 +270,18 @@ discard block |
||
| 270 | 270 | } |
| 271 | 271 | $descriptions["media:force_proxy"] = sprintf(_("The format of this option is: IPv4|IPv6|hostname:port . Forcing your users through a content filter of your own is a significant invasion of user self-determination. It also has technical issues. Please thoroughly read the discussion at %s before specifying a proxy with this option. This feature is currently experimental and only has an effect in Apple installers."), "https://github.com/GEANT/CAT/issues/96"); |
| 272 | 272 | $descriptions["managedsp:realmforvlan"] = sprintf(_("If you are also using %s, then your own realm is automatically tagged with the VLAN you choose, there is no need to add it here manually."), \core\ProfileSilverbullet::PRODUCTNAME); |
| 273 | - $descriptions["media:openroaming"] = sprintf(_("By opting in to OpenRoaming, you agree to be bound by the %s."), "eduroam Ecosystem Broker OpenRoaming Identity Provider Policy") . |
|
| 274 | - " " . |
|
| 275 | - sprintf(_("Note that your requirement to inform users about the OpenRoaming End User Terms and Conditions is fulfilled when directing your end users to the %s download portal for installer download. Any other means of providing the installers needs to present this information via its own channel."), \config\Master::APPEARANCE['productname']) . |
|
| 276 | - " " . |
|
| 277 | - _("You are also aware that for best technical interoperability, you need to add a DNS entry into the DNS zone of your RADIUS realm.") . |
|
| 278 | - " " . |
|
| 273 | + $descriptions["media:openroaming"] = sprintf(_("By opting in to OpenRoaming, you agree to be bound by the %s."), "eduroam Ecosystem Broker OpenRoaming Identity Provider Policy"). |
|
| 274 | + " ". |
|
| 275 | + sprintf(_("Note that your requirement to inform users about the OpenRoaming End User Terms and Conditions is fulfilled when directing your end users to the %s download portal for installer download. Any other means of providing the installers needs to present this information via its own channel."), \config\Master::APPEARANCE['productname']). |
|
| 276 | + " ". |
|
| 277 | + _("You are also aware that for best technical interoperability, you need to add a DNS entry into the DNS zone of your RADIUS realm."). |
|
| 278 | + " ". |
|
| 279 | 279 | _("Read the instructions in the wiki."); |
| 280 | 280 | \core\common\Entity::outOfThePotatoes(); |
| 281 | 281 | if (!isset($descriptions[$input])) { |
| 282 | 282 | return ""; |
| 283 | 283 | } |
| 284 | - return "<span class='tooltip' id='S$rowid-tooltip-$input' style='display:" . ($isVisible ? "block" : "none") . "' onclick='alert(\"" . $descriptions[$input] . "\")'><img src='../resources/images/icons/question-mark-icon.png" . "'></span>"; |
|
| 284 | + return "<span class='tooltip' id='S$rowid-tooltip-$input' style='display:".($isVisible ? "block" : "none")."' onclick='alert(\"".$descriptions[$input]."\")'><img src='../resources/images/icons/question-mark-icon.png"."'></span>"; |
|
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | /** |
@@ -295,19 +295,19 @@ discard block |
||
| 295 | 295 | private function selectElement($rowid, $list) |
| 296 | 296 | { |
| 297 | 297 | $jsmagic = "onchange=' |
| 298 | - if (/#ML#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) { |
|
| 298 | + if (/#ML#/.test(document.getElementById(\"option-S" . $rowid."-select\").value)) { |
|
| 299 | 299 | document.getElementById(\"S$rowid-input-langselect\").style.display = \"block\"; |
| 300 | 300 | } else { |
| 301 | 301 | document.getElementById(\"S$rowid-input-langselect\").style.display = \"none\"; |
| 302 | 302 | }"; |
| 303 | 303 | foreach (array_keys($this->htmlDatatypeTexts) as $key) { |
| 304 | - $jsmagic .= "if (/#" . $key . "#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) { |
|
| 305 | - document.getElementById(\"S$rowid-input-file\").style.display = \"" . ($key == \core\Options::TYPECODE_FILE ? "block" : "none") . "\"; |
|
| 306 | - document.getElementById(\"S$rowid-input-text\").style.display = \"" . ($key == \core\Options::TYPECODE_TEXT ? "block" : "none") . "\"; |
|
| 307 | - document.getElementById(\"S$rowid-input-string\").style.display = \"" . ($key == \core\Options::TYPECODE_STRING ? "block" : "none") . "\"; |
|
| 308 | - document.getElementById(\"S$rowid-input-enum_openroaming\").style.display = \"" . ($key == \core\Options::TYPECODE_ENUM_OPENROAMING ? "block" : "none") . "\"; |
|
| 309 | - document.getElementById(\"S$rowid-input-boolean\").style.display = \"" . ($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none") . "\"; |
|
| 310 | - document.getElementById(\"S$rowid-input-integer\").style.display = \"" . ($key == \core\Options::TYPECODE_INTEGER ? "block" : "none") . "\"; |
|
| 304 | + $jsmagic .= "if (/#".$key."#/.test(document.getElementById(\"option-S".$rowid."-select\").value)) { |
|
| 305 | + document.getElementById(\"S$rowid-input-file\").style.display = \"".($key == \core\Options::TYPECODE_FILE ? "block" : "none")."\"; |
|
| 306 | + document.getElementById(\"S$rowid-input-text\").style.display = \"".($key == \core\Options::TYPECODE_TEXT ? "block" : "none")."\"; |
|
| 307 | + document.getElementById(\"S$rowid-input-string\").style.display = \"".($key == \core\Options::TYPECODE_STRING ? "block" : "none")."\"; |
|
| 308 | + document.getElementById(\"S$rowid-input-enum_openroaming\").style.display = \"".($key == \core\Options::TYPECODE_ENUM_OPENROAMING ? "block" : "none")."\"; |
|
| 309 | + document.getElementById(\"S$rowid-input-boolean\").style.display = \"".($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none")."\"; |
|
| 310 | + document.getElementById(\"S$rowid-input-integer\").style.display = \"".($key == \core\Options::TYPECODE_INTEGER ? "block" : "none")."\"; |
|
| 311 | 311 | } |
| 312 | 312 | "; |
| 313 | 313 | // hide all tooltips (each is a <span>, and there are no other <span>s) |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | $value = array_shift($list); |
| 339 | 339 | $listtype = $optioninfo->optionType($value); |
| 340 | 340 | $retval .= $uiElements->displayName($value); |
| 341 | - $retval .= "<input type='hidden' name='option[S$rowid]' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#'/>"; |
|
| 341 | + $retval .= "<input type='hidden' name='option[S$rowid]' value='$value#".$listtype["type"]."#".$listtype["flag"]."#'/>"; |
|
| 342 | 342 | $activelisttype = $listtype; |
| 343 | 343 | $tooltips = $this->tooltip($rowid, $value, TRUE); |
| 344 | 344 | break; |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | array_multisort($sortArray, SORT_ASC, $list); |
| 352 | 352 | foreach ($list as $value) { |
| 353 | 353 | $listtype = $optioninfo->optionType($value); |
| 354 | - $retval .= "<option id='option-S$rowid-v-$value' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#' "; |
|
| 354 | + $retval .= "<option id='option-S$rowid-v-$value' value='$value#".$listtype["type"]."#".$listtype["flag"]."#' "; |
|
| 355 | 355 | if ($iterator == $this->optionIterator) { |
| 356 | 356 | $retval .= "selected='selected'"; |
| 357 | 357 | $activelisttype = $listtype; |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | } else { |
| 360 | 360 | $tooltips .= $this->tooltip($rowid, $value, FALSE); |
| 361 | 361 | } |
| 362 | - $retval .= ">" . $uiElements->displayName($value) . "</option>"; |
|
| 362 | + $retval .= ">".$uiElements->displayName($value)."</option>"; |
|
| 363 | 363 | $iterator++; |
| 364 | 364 | } |
| 365 | 365 | |
@@ -385,9 +385,9 @@ discard block |
||
| 385 | 385 | private function selectLanguage($rowid, $makeVisible) |
| 386 | 386 | { |
| 387 | 387 | \core\common\Entity::intoThePotatoes(); |
| 388 | - $retval = "<select style='display:" . ($makeVisible ? "block" : "none") . "' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect'> |
|
| 389 | - <option value='' name='select_language' selected>" . _("select language") . "</option> |
|
| 390 | - <option value='C' name='all_languages'>" . _("default/other languages") . "</option>"; |
|
| 388 | + $retval = "<select style='display:".($makeVisible ? "block" : "none")."' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect'> |
|
| 389 | + <option value='' name='select_language' selected>" . _("select language")."</option> |
|
| 390 | + <option value='C' name='all_languages'>" . _("default/other languages")."</option>"; |
|
| 391 | 391 | foreach (\config\Master::LANGUAGES as $langindex => $possibleLang) { |
| 392 | 392 | $thislang = $possibleLang['display']; |
| 393 | 393 | $retval .= "<option value='$langindex' name='$langindex'>$thislang</option>"; |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | { |
| 409 | 409 | $retval = ""; |
| 410 | 410 | foreach ($this->htmlDatatypeTexts as $key => $type) { |
| 411 | - $retval .= "<" . $type['html'] . " style='display:" . ($activetype['type'] == $key ? "block" : "none") . "' name='value[S$rowid-$key]' id='S" . $rowid . "-input-" . $key . "'" . $type['tail'] . ">"; |
|
| 411 | + $retval .= "<".$type['html']." style='display:".($activetype['type'] == $key ? "block" : "none")."' name='value[S$rowid-$key]' id='S".$rowid."-input-".$key."'".$type['tail'].">"; |
|
| 412 | 412 | } |
| 413 | 413 | return $retval; |
| 414 | 414 | } |
@@ -424,11 +424,11 @@ discard block |
||
| 424 | 424 | { |
| 425 | 425 | // first column: the <select> element with the names of options and their field-toggling JS magic |
| 426 | 426 | $selectorInfo = $this->selectElement($rowid, $list); |
| 427 | - $retval = "<td>" . $selectorInfo["TEXT"] . "</td>"; |
|
| 427 | + $retval = "<td>".$selectorInfo["TEXT"]."</td>"; |
|
| 428 | 428 | // second column: the <select> element for language selection - only visible if the active option is multi-lang |
| 429 | - $retval .= "<td>" . $this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML") . "</td>"; |
|
| 429 | + $retval .= "<td>".$this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML")."</td>"; |
|
| 430 | 430 | // third column: the actual input fields; the data type of the active option is visible, all others hidden |
| 431 | - $retval .= "<td>" . $this->inputFields($rowid, $selectorInfo['ACTIVE']) . "</td>"; |
|
| 431 | + $retval .= "<td>".$this->inputFields($rowid, $selectorInfo['ACTIVE'])."</td>"; |
|
| 432 | 432 | return $retval; |
| 433 | 433 | } |
| 434 | 434 | |
@@ -452,20 +452,20 @@ discard block |
||
| 452 | 452 | $retval .= "<td>"; |
| 453 | 453 | $uiElements = new UIElements(); |
| 454 | 454 | $listtype = $optioninfo->optionType($optionName); |
| 455 | - $retval .= "<span style='display:flex;'>" . $uiElements->displayName($optionName); |
|
| 456 | - $retval .= $this->tooltip($rowid, $optionName, TRUE) . "</span>"; |
|
| 457 | - $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#" . $listtype["type"] . "#" . $listtype["flag"] . "#' ></td>"; |
|
| 455 | + $retval .= "<span style='display:flex;'>".$uiElements->displayName($optionName); |
|
| 456 | + $retval .= $this->tooltip($rowid, $optionName, TRUE)."</span>"; |
|
| 457 | + $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#".$listtype["type"]."#".$listtype["flag"]."#' ></td>"; |
|
| 458 | 458 | |
| 459 | 459 | // language tag if any |
| 460 | 460 | $retval .= "<td>"; |
| 461 | 461 | if ($listtype["flag"] == "ML") { |
| 462 | 462 | |
| 463 | - $language = "(" . strtoupper($optionLang) . ")"; |
|
| 463 | + $language = "(".strtoupper($optionLang).")"; |
|
| 464 | 464 | if ($optionLang == 'C') { |
| 465 | 465 | $language = _("(default/other languages)"); |
| 466 | 466 | } |
| 467 | 467 | $retval .= $language; |
| 468 | - $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect' value='" . $optionLang . "' style='display:block'>"; |
|
| 468 | + $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect' value='".$optionLang."' style='display:block'>"; |
|
| 469 | 469 | } |
| 470 | 470 | $retval .= "</td>"; |
| 471 | 471 | // attribute content |
@@ -475,12 +475,12 @@ discard block |
||
| 475 | 475 | case \core\Options::TYPECODE_COORDINATES: |
| 476 | 476 | $this->allLocationCount = $this->allLocationCount + 1; |
| 477 | 477 | // display of the locations varies by map provider |
| 478 | - $classname = "\web\lib\admin\Map" . \config\ConfAssistant::MAPPROVIDER['PROVIDER']; |
|
| 478 | + $classname = "\web\lib\admin\Map".\config\ConfAssistant::MAPPROVIDER['PROVIDER']; |
|
| 479 | 479 | $link = $classname::optionListDisplayCode($optionValue, $this->allLocationCount); |
| 480 | - $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-" . \core\Options::TYPECODE_TEXT . "]' id='S$rowid-input-text' value='$optionValue'>$link"; |
|
| 480 | + $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-".\core\Options::TYPECODE_TEXT."]' id='S$rowid-input-text' value='$optionValue'>$link"; |
|
| 481 | 481 | break; |
| 482 | 482 | case \core\Options::TYPECODE_FILE: |
| 483 | - $retval .= "<input readonly type='text' name='value[S$rowid-" . \core\Options::TYPECODE_STRING . "]' id='S" . $rowid . "-input-string' style='display:none' value='" . urlencode($optionValue) . "'>"; |
|
| 483 | + $retval .= "<input readonly type='text' name='value[S$rowid-".\core\Options::TYPECODE_STRING."]' id='S".$rowid."-input-string' style='display:none' value='".urlencode($optionValue)."'>"; |
|
| 484 | 484 | $uiElements = new UIElements(); |
| 485 | 485 | switch ($optionName) { |
| 486 | 486 | case "eap:ca_file": |
@@ -502,7 +502,7 @@ discard block |
||
| 502 | 502 | break; |
| 503 | 503 | case \core\Options::TYPECODE_ENUM_OPENROAMING: // is a string after all |
| 504 | 504 | $displayedVariant = $this->enumPrettyPrints[$optionValue]; |
| 505 | - $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-" . $listtype['type'] . "]' id='S" . $rowid . "-input-" . $listtype["type"] . "' value=\"" . htmlspecialchars($optionValue) . "\" style='display:block'>"; |
|
| 505 | + $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-".$listtype['type']."]' id='S".$rowid."-input-".$listtype["type"]."' value=\"".htmlspecialchars($optionValue)."\" style='display:block'>"; |
|
| 506 | 506 | break; |
| 507 | 507 | case \core\Options::TYPECODE_STRING: |
| 508 | 508 | // fall-thorugh is intentional; mostly identical HTML code for the three types |
@@ -510,11 +510,11 @@ discard block |
||
| 510 | 510 | // fall-thorugh is intentional; mostly identical HTML code for the three types |
| 511 | 511 | case \core\Options::TYPECODE_TEXT: |
| 512 | 512 | $displayedVariant = $optionValue; // for all three types, value tag and actual display are identical |
| 513 | - $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-" . $listtype['type'] . "]' id='S" . $rowid . "-input-" . $listtype["type"] . "' value=\"" . htmlspecialchars($optionValue) . "\" style='display:block'>"; |
|
| 513 | + $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-".$listtype['type']."]' id='S".$rowid."-input-".$listtype["type"]."' value=\"".htmlspecialchars($optionValue)."\" style='display:block'>"; |
|
| 514 | 514 | break; |
| 515 | 515 | case \core\Options::TYPECODE_BOOLEAN: |
| 516 | 516 | $displayedVariant = ($optionValue == "on" ? _("on") : _("off")); |
| 517 | - $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-" . $listtype['type'] . "]' id='S" . $rowid . "-input-" . $listtype["type"] . "' value=\"" . htmlspecialchars($optionValue) . "\" style='display:block'>"; |
|
| 517 | + $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-".$listtype['type']."]' id='S".$rowid."-input-".$listtype["type"]."' value=\"".htmlspecialchars($optionValue)."\" style='display:block'>"; |
|
| 518 | 518 | break; |
| 519 | 519 | default: |
| 520 | 520 | // this should never happen! |
@@ -560,10 +560,10 @@ discard block |
||
| 560 | 560 | <td> |
| 561 | 561 | <button type='button' class='delete' onclick='"; |
| 562 | 562 | if ($prefillValue !== NULL && $item == "general:geo_coordinates") { |
| 563 | - $funcname = "Map" . \config\ConfAssistant::MAPPROVIDER['PROVIDER'] . 'DeleteCoord'; |
|
| 564 | - $retval .= 'if (typeof ' . $funcname . ' === "function") { ' . $funcname . '(' . $this->allLocationCount . '); } '; |
|
| 563 | + $funcname = "Map".\config\ConfAssistant::MAPPROVIDER['PROVIDER'].'DeleteCoord'; |
|
| 564 | + $retval .= 'if (typeof '.$funcname.' === "function") { '.$funcname.'('.$this->allLocationCount.'); } '; |
|
| 565 | 565 | } |
| 566 | - $retval .= 'deleteOption("option-S' . $rowid . '")'; |
|
| 566 | + $retval .= 'deleteOption("option-S'.$rowid.'")'; |
|
| 567 | 567 | $retval .= "'>-</button> |
| 568 | 568 | </td> |
| 569 | 569 | </tr>"; |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | ?> |
| 28 | 28 | <?php |
| 29 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
| 29 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
| 30 | 30 | |
| 31 | 31 | $deco = new \web\lib\admin\PageDecoration(); |
| 32 | 32 | $validator = new \web\lib\common\InputValidation(); |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | $detectRealm = $validator->string($_POST['realm_to_detect']); |
| 131 | 131 | $localname = $validator->string($_POST['username_to_detect']); |
| 132 | 132 | $checker = new \core\diag\RADIUSTests($detectRealm, $localname); |
| 133 | - $detectionResult = $checker->autodetectCAWithProbe($localname . "@" . $detectRealm); |
|
| 133 | + $detectionResult = $checker->autodetectCAWithProbe($localname."@".$detectRealm); |
|
| 134 | 134 | $loggerInstance->debug(2, "CA Auto-Detection yields:"); |
| 135 | 135 | $loggerInstance->debug(2, $detectionResult); |
| 136 | 136 | if ($detectionResult['ROOT_CA'] !== NULL) { // we are lucky! |
@@ -175,8 +175,8 @@ discard block |
||
| 175 | 175 | <?php |
| 176 | 176 | echo $uiElements->instLevelInfoBoxes($my_inst); |
| 177 | 177 | |
| 178 | - echo "<form enctype='multipart/form-data' action='edit_profile_result.php?inst_id=$my_inst->identifier" . ($my_profile !== NULL ? "&profile_id=" . $my_profile->identifier : "") . "' method='post' accept-charset='UTF-8'> |
|
| 179 | - <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>"; |
|
| 178 | + echo "<form enctype='multipart/form-data' action='edit_profile_result.php?inst_id=$my_inst->identifier".($my_profile !== NULL ? "&profile_id=".$my_profile->identifier : "")."' method='post' accept-charset='UTF-8'> |
|
| 179 | + <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE."'>"; |
|
| 180 | 180 | $optionDisplay = new \web\lib\admin\OptionDisplay($profile_options, \core\Options::LEVEL_PROFILE, $wizardStyle); |
| 181 | 181 | ?> |
| 182 | 182 | <fieldset class="option_container"> |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | </legend> |
| 186 | 186 | <?php |
| 187 | 187 | if ($wizardStyle) { |
| 188 | - echo "<p>" . _("We will now define a profile for your user group(s). You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.") . "</p>"; |
|
| 188 | + echo "<p>"._("We will now define a profile for your user group(s). You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.")."</p>"; |
|
| 189 | 189 | } |
| 190 | 190 | ?> |
| 191 | 191 | <h3><?php echo _("Profile Name and RADIUS realm"); ?> |
@@ -262,37 +262,37 @@ discard block |
||
| 262 | 262 | <tr> |
| 263 | 263 | <!-- checkbox and input field for anonymity support, available only when realm is known--> |
| 264 | 264 | <td> |
| 265 | - <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
| 265 | + <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
| 266 | 266 | <?php echo _("Enable Anonymous Outer Identity:"); ?> |
| 267 | 267 | </span> |
| 268 | 268 | </td> |
| 269 | 269 | <td> |
| 270 | - <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='anon_support' onclick=' |
|
| 270 | + <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='anon_support' onclick=' |
|
| 271 | 271 | if (this.form.elements["anon_support"].checked !== true) { |
| 272 | 272 | this.form.elements["anon_local"].setAttribute("disabled", "disabled"); |
| 273 | 273 | } else { |
| 274 | 274 | this.form.elements["anon_local"].removeAttribute("disabled"); |
| 275 | 275 | } |
| 276 | 276 | ;'/> |
| 277 | - <input type='text' <?php echo ($useAnon == FALSE ? "disabled" : "" ); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/> |
|
| 277 | + <input type='text' <?php echo ($useAnon == FALSE ? "disabled" : ""); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/> |
|
| 278 | 278 | </td> |
| 279 | 279 | </tr> |
| 280 | 280 | <tr> |
| 281 | 281 | <!-- checkbox and input field for check realm outer id, available only when realm is known--> |
| 282 | 282 | <td> |
| 283 | - <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
| 283 | + <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
| 284 | 284 | <?php echo _("Use special Outer Identity for realm checks:"); ?> |
| 285 | 285 | </span> |
| 286 | 286 | </td> |
| 287 | 287 | <td> |
| 288 | - <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='checkuser_support' onclick=' |
|
| 288 | + <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='checkuser_support' onclick=' |
|
| 289 | 289 | if (this.form.elements["checkuser_support"].checked !== true) { |
| 290 | 290 | this.form.elements["checkuser_local"].setAttribute("disabled", "disabled"); |
| 291 | 291 | } else { |
| 292 | 292 | this.form.elements["checkuser_local"].removeAttribute("disabled"); |
| 293 | 293 | } |
| 294 | 294 | ;'/> |
| 295 | - <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : "" ); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/> |
|
| 295 | + <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : ""); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/> |
|
| 296 | 296 | </td> |
| 297 | 297 | </tr> |
| 298 | 298 | <tr> |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | </td> |
| 308 | 308 | <td> |
| 309 | 309 | <input type='checkbox' <?php |
| 310 | - echo ($verify != FALSE ? "checked" : "" ); |
|
| 310 | + echo ($verify != FALSE ? "checked" : ""); |
|
| 311 | 311 | ?> name='verify_support' onclick=' |
| 312 | 312 | if (this.form.elements["verify_support"].checked !== true || this.form.elements["realm"].value.length == 0) { |
| 313 | 313 | this.form.elements["hint_support"].setAttribute("disabled", "disabled"); |
@@ -319,12 +319,12 @@ discard block |
||
| 319 | 319 | </tr> |
| 320 | 320 | <tr> |
| 321 | 321 | <td> |
| 322 | - <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
| 322 | + <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
| 323 | 323 | <?php echo _("Enforce exact realm in username"); ?> |
| 324 | 324 | </span> |
| 325 | 325 | </td> |
| 326 | 326 | <td> |
| 327 | - <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : "" ); ?> name='hint_support' <?php echo ( $hint != FALSE ? "checked" : "" ); ?> /> |
|
| 327 | + <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : ""); ?> name='hint_support' <?php echo ($hint != FALSE ? "checked" : ""); ?> /> |
|
| 328 | 328 | </td> |
| 329 | 329 | </tr> |
| 330 | 330 | </table> |
@@ -338,14 +338,14 @@ discard block |
||
| 338 | 338 | <p> |
| 339 | 339 | |
| 340 | 340 | <?php |
| 341 | - echo "<span id='redirect_label' style='" . ($realm == "" ? "color:#999999" : "" ) . "'><label for='redirect'>" . _("Redirect end users to own web page:") . "</label></span> |
|
| 342 | - <input type='checkbox' name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked " ) . "onclick=' |
|
| 341 | + echo "<span id='redirect_label' style='".($realm == "" ? "color:#999999" : "")."'><label for='redirect'>"._("Redirect end users to own web page:")."</label></span> |
|
| 342 | + <input type='checkbox' name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked ")."onclick=' |
|
| 343 | 343 | if (this.form.elements[\"redirect\"].checked != true) { |
| 344 | 344 | this.form.elements[\"redirect_target\"].setAttribute(\"disabled\", \"disabled\"); |
| 345 | 345 | } else { |
| 346 | 346 | this.form.elements[\"redirect_target\"].removeAttribute(\"disabled\"); |
| 347 | 347 | };'/> |
| 348 | - <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled" ) . "/>"; |
|
| 348 | + <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled")."/>"; |
|
| 349 | 349 | ?> |
| 350 | 350 | </p> |
| 351 | 351 | |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | <?php |
| 386 | 386 | $D = []; |
| 387 | 387 | foreach ($prefill_methods as $prio => $value) { |
| 388 | - print '<li>' . $value->getPrintableRep() . "</li>\n"; |
|
| 388 | + print '<li>'.$value->getPrintableRep()."</li>\n"; |
|
| 389 | 389 | $D[$value->getPrintableRep()] = $prio; |
| 390 | 390 | } |
| 391 | 391 | ?> |
@@ -411,7 +411,7 @@ discard block |
||
| 411 | 411 | } |
| 412 | 412 | $display = $a->getPrintableRep(); |
| 413 | 413 | if (!isset($D[$display])) { |
| 414 | - print '<li class="eap1">' . $display . "</li>\n"; |
|
| 414 | + print '<li class="eap1">'.$display."</li>\n"; |
|
| 415 | 415 | } |
| 416 | 416 | } |
| 417 | 417 | ?> |
@@ -424,8 +424,8 @@ discard block |
||
| 424 | 424 | foreach ($methods as $a) { |
| 425 | 425 | $display = $a->getPrintableRep(); |
| 426 | 426 | $v = isset($D[$display]) ? $D[$display] : ''; |
| 427 | - print '<input type="hidden" class="eapm" name="' . $display . '" id="EAP-' . $display . '" value="' . $display . '">'; |
|
| 428 | - print '<input type="hidden" class="eapmv" name="' . $display . '-priority" id="EAP-' . $display . '-priority" value="' . $v . '">'; |
|
| 427 | + print '<input type="hidden" class="eapm" name="'.$display.'" id="EAP-'.$display.'" value="'.$display.'">'; |
|
| 428 | + print '<input type="hidden" class="eapmv" name="'.$display.'-priority" id="EAP-'.$display.'-priority" value="'.$v.'">'; |
|
| 429 | 429 | } |
| 430 | 430 | ?> |
| 431 | 431 | <br style="clear:both;" /> |
@@ -445,11 +445,11 @@ discard block |
||
| 445 | 445 | foreach ($optionsAlreadySet as $optionNames) { |
| 446 | 446 | if (preg_match("/^support:/", $optionNames)) { |
| 447 | 447 | $has_support_options[$optionNames] = "SET"; |
| 448 | - $support_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>"; |
|
| 448 | + $support_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>"; |
|
| 449 | 449 | } |
| 450 | 450 | if (preg_match("/^media:/", $optionNames)) { |
| 451 | 451 | $has_media_options[$optionNames] = "SET"; |
| 452 | - $media_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>"; |
|
| 452 | + $media_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>"; |
|
| 453 | 453 | } |
| 454 | 454 | } |
| 455 | 455 | $fields = [ |
@@ -458,12 +458,12 @@ discard block |
||
| 458 | 458 | "media" => _("Media Properties for this profile")]; |
| 459 | 459 | |
| 460 | 460 | foreach ($fields as $name => $description) { |
| 461 | - echo "<fieldset class='option_container' id='" . $name . "_override'> |
|
| 461 | + echo "<fieldset class='option_container' id='".$name."_override'> |
|
| 462 | 462 | <legend><strong>$description</strong></legend> |
| 463 | 463 | <p>"; |
| 464 | 464 | echo $wizard->displayHelp($name); |
| 465 | - if (count(${"has_" . $name . "_options"}) > 0) { |
|
| 466 | - printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count(${"has_" . $name . "_options"})), "<ul>" . ${$name . "_text"} . "</ul>"); |
|
| 465 | + if (count(${"has_".$name."_options"}) > 0) { |
|
| 466 | + printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count(${"has_".$name."_options"})), "<ul>".${$name."_text"}."</ul>"); |
|
| 467 | 467 | } |
| 468 | 468 | echo "</p>"; |
| 469 | 469 | echo $optionDisplay->prefilledOptionTable($name, $my_inst->federation); |
@@ -473,7 +473,7 @@ discard block |
||
| 473 | 473 | echo "</fieldset>"; |
| 474 | 474 | } |
| 475 | 475 | if ($wizardStyle) { |
| 476 | - echo "<p>" . _("When you are sure that everything is correct, please click on 'Save data' and you will be taken to your IdP Dashboard page.") . "</p>"; |
|
| 476 | + echo "<p>"._("When you are sure that everything is correct, please click on 'Save data' and you will be taken to your IdP Dashboard page.")."</p>"; |
|
| 477 | 477 | } |
| 478 | 478 | if ($editMode == 'readonly') { |
| 479 | 479 | $discardLabel = _("Return"); |
@@ -481,6 +481,6 @@ discard block |
||
| 481 | 481 | if ($editMode == 'fullaccess') { |
| 482 | 482 | $discardLabel = _("Discard changes"); |
| 483 | 483 | } |
| 484 | -echo "<p><button type='submit' id='submitbutton' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button><button type='button' class='delete' id=='abortbutton' style='visibility: visible' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>".$discardLabel."</button></p></form>"; |
|
| 484 | +echo "<p><button type='submit' id='submitbutton' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button><button type='button' class='delete' id=='abortbutton' style='visibility: visible' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>".$discardLabel."</button></p></form>"; |
|
| 485 | 485 | echo $deco->footer(); |
| 486 | 486 | |