@@ -190,70 +190,70 @@ discard block |
||
| 190 | 190 | </div> |
| 191 | 191 | <?php |
| 192 | 192 | break; |
| 193 | - case "core\ProfileRADIUS": |
|
| 194 | - ?> |
|
| 193 | + case "core\ProfileRADIUS": |
|
| 194 | + ?> |
|
| 195 | 195 | <div style='padding-bottom:20px;'> |
| 196 | 196 | <h2 style='overflow:auto; display:inline; padding-bottom: 10px;'><?php printf(_("Profile: %s"), $profile_name); ?></h2> |
| 197 | 197 | <?php |
| 198 | - $profile_name = $profile_list->name; |
|
| 199 | - // see if there are any profile-level overrides |
|
| 200 | - $attribs = $profile_list->getAttributes(); |
|
| 201 | - // write things into a buffer; we need some function calls to determine |
|
| 202 | - // readiness - but want to display it before! |
|
| 203 | - $has_overrides = FALSE; |
|
| 204 | - foreach ($attribs as $attrib) { |
|
| 205 | - if ($attrib['level'] == \core\Options::LEVEL_PROFILE && !preg_match("/^(internal:|profile:name|profile:description|eap:)/", $attrib['name'])) { |
|
| 206 | - $has_overrides = TRUE; |
|
| 198 | + $profile_name = $profile_list->name; |
|
| 199 | + // see if there are any profile-level overrides |
|
| 200 | + $attribs = $profile_list->getAttributes(); |
|
| 201 | + // write things into a buffer; we need some function calls to determine |
|
| 202 | + // readiness - but want to display it before! |
|
| 203 | + $has_overrides = FALSE; |
|
| 204 | + foreach ($attribs as $attrib) { |
|
| 205 | + if ($attrib['level'] == \core\Options::LEVEL_PROFILE && !preg_match("/^(internal:|profile:name|profile:description|eap:)/", $attrib['name'])) { |
|
| 206 | + $has_overrides = TRUE; |
|
| 207 | + } |
|
| 207 | 208 | } |
| 208 | - } |
|
| 209 | - $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>" . _("<strong>EAP Types</strong> (in order of preference):") . "<br/>"; |
|
| 210 | - $typelist = $profile_list->getEapMethodsinOrderOfPreference(); |
|
| 211 | - $allcomplete = TRUE; |
|
| 212 | - foreach ($typelist as $eaptype) { |
|
| 213 | - $buffer_eaptypediv .= $eaptype->getPrintableRep(); |
|
| 214 | - $completeness = $profile_list->isEapTypeDefinitionComplete($eaptype); |
|
| 215 | - if ($completeness === true) { |
|
| 216 | - $buffer_eaptypediv .= " <div class='acceptable'>" . _("OK") . "</div>"; |
|
| 217 | - } else { |
|
| 218 | - $buffer_eaptypediv .= " <div class='notacceptable'>"; |
|
| 219 | - $buffer_eaptypediv .= _("Information needed!"); |
|
| 220 | - if (is_array($completeness)) { |
|
| 221 | - $buffer_eaptypediv .= "<ul style='margin:1px'>"; |
|
| 222 | - foreach ($completeness as $missing_attrib) { |
|
| 223 | - $buffer_eaptypediv .= "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
| 209 | + $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>" . _("<strong>EAP Types</strong> (in order of preference):") . "<br/>"; |
|
| 210 | + $typelist = $profile_list->getEapMethodsinOrderOfPreference(); |
|
| 211 | + $allcomplete = TRUE; |
|
| 212 | + foreach ($typelist as $eaptype) { |
|
| 213 | + $buffer_eaptypediv .= $eaptype->getPrintableRep(); |
|
| 214 | + $completeness = $profile_list->isEapTypeDefinitionComplete($eaptype); |
|
| 215 | + if ($completeness === true) { |
|
| 216 | + $buffer_eaptypediv .= " <div class='acceptable'>" . _("OK") . "</div>"; |
|
| 217 | + } else { |
|
| 218 | + $buffer_eaptypediv .= " <div class='notacceptable'>"; |
|
| 219 | + $buffer_eaptypediv .= _("Information needed!"); |
|
| 220 | + if (is_array($completeness)) { |
|
| 221 | + $buffer_eaptypediv .= "<ul style='margin:1px'>"; |
|
| 222 | + foreach ($completeness as $missing_attrib) { |
|
| 223 | + $buffer_eaptypediv .= "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
| 224 | + } |
|
| 225 | + $buffer_eaptypediv .= "</ul>"; |
|
| 224 | 226 | } |
| 225 | - $buffer_eaptypediv .= "</ul>"; |
|
| 227 | + $buffer_eaptypediv .= "</div>"; |
|
| 228 | + $allcomplete = FALSE; |
|
| 226 | 229 | } |
| 227 | - $buffer_eaptypediv .= "</div>"; |
|
| 228 | - $allcomplete = FALSE; |
|
| 229 | - } |
|
| 230 | - $attribs = $profile_list->getAttributes(); |
|
| 231 | - $justOnce = FALSE; |
|
| 232 | - foreach ($attribs as $attrib) { |
|
| 233 | - if ($attrib['level'] == \core\Options::LEVEL_METHOD && !preg_match("/^internal:/", $attrib['name']) && !$justOnce) { |
|
| 234 | - $justOnce = TRUE; |
|
| 235 | - $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='" . _("Options on EAP Method/Device level are in effect.") . "'>"; |
|
| 230 | + $attribs = $profile_list->getAttributes(); |
|
| 231 | + $justOnce = FALSE; |
|
| 232 | + foreach ($attribs as $attrib) { |
|
| 233 | + if ($attrib['level'] == \core\Options::LEVEL_METHOD && !preg_match("/^internal:/", $attrib['name']) && !$justOnce) { |
|
| 234 | + $justOnce = TRUE; |
|
| 235 | + $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='" . _("Options on EAP Method/Device level are in effect.") . "'>"; |
|
| 236 | + } |
|
| 236 | 237 | } |
| 238 | + $buffer_eaptypediv .= "<br/>"; |
|
| 237 | 239 | } |
| 238 | - $buffer_eaptypediv .= "<br/>"; |
|
| 239 | - } |
|
| 240 | - $buffer_eaptypediv .= "</div>"; |
|
| 240 | + $buffer_eaptypediv .= "</div>"; |
|
| 241 | 241 | |
| 242 | - $buffer_headline = "<span style='float:right;'>"; |
|
| 243 | - $readiness = $profile_list->readinessLevel(); |
|
| 244 | - if ($has_overrides) { |
|
| 245 | - $buffer_headline .= $uiElements->boxRemark("", _("Option override on profile level is in effect."), TRUE); |
|
| 246 | - } |
|
| 247 | - if (!$allcomplete) { |
|
| 248 | - $buffer_headline .= $uiElements->boxError("", _("The information in this profile is incomplete."), TRUE); |
|
| 249 | - } |
|
| 250 | - switch ($readiness) { |
|
| 242 | + $buffer_headline = "<span style='float:right;'>"; |
|
| 243 | + $readiness = $profile_list->readinessLevel(); |
|
| 244 | + if ($has_overrides) { |
|
| 245 | + $buffer_headline .= $uiElements->boxRemark("", _("Option override on profile level is in effect."), TRUE); |
|
| 246 | + } |
|
| 247 | + if (!$allcomplete) { |
|
| 248 | + $buffer_headline .= $uiElements->boxError("", _("The information in this profile is incomplete."), TRUE); |
|
| 249 | + } |
|
| 250 | + switch ($readiness) { |
|
| 251 | 251 | case core\AbstractProfile::READINESS_LEVEL_SHOWTIME: |
| 252 | 252 | $buffer_headline .= $uiElements->boxOkay("", _("This profile is shown on the user download interface."), TRUE); |
| 253 | 253 | break; |
| 254 | 254 | case core\AbstractProfile::READINESS_LEVEL_SUFFICIENTCONFIG: |
| 255 | 255 | $buffer_headline .= $uiElements->boxWarning("", sprintf(_("This profile is NOT shown on the user download interface, even though we have enough information to show. To enable the profile, add the attribute \"%s\" and tick the corresponding box."), $uiElements->displayName("profile:production")), TRUE); |
| 256 | - } |
|
| 256 | + } |
|
| 257 | 257 | |
| 258 | 258 | $buffer_headline .= "</span></div>"; |
| 259 | 259 | |
@@ -336,8 +336,8 @@ discard block |
||
| 336 | 336 | </div> |
| 337 | 337 | <?php |
| 338 | 338 | break; |
| 339 | - default: |
|
| 340 | - throw new Exception("We were asked to operate on something that is neither a RADIUS nor Silverbullet profile!"); |
|
| 339 | + default: |
|
| 340 | + throw new Exception("We were asked to operate on something that is neither a RADIUS nor Silverbullet profile!"); |
|
| 341 | 341 | } |
| 342 | 342 | ?> |
| 343 | 343 | <!-- dummy width to keep a little distance --> |