-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added information on server names for which certificate will be issued
- Loading branch information
Showing
1 changed file
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ | |
* This page edits a federation. | ||
* | ||
* @author Stefan Winter <[email protected]> | ||
* @author Maja Górecka-Wolniewicz <[email protected]> | ||
*/ | ||
?> | ||
<?php | ||
|
@@ -62,7 +63,6 @@ | |
$user = new \core\User($_SESSION['user']); | ||
$mgmt = new \core\UserManagement(); | ||
$isFedAdmin = $user->isFederationAdmin(); | ||
|
||
// if not, send the user away | ||
if (!$isFedAdmin) { | ||
echo _("You do not have the necessary privileges to request server certificates."); | ||
|
@@ -212,16 +212,40 @@ | |
} | ||
?> | ||
</select> | ||
|
||
<?php | ||
} | ||
?> | ||
<script> | ||
var instservers = []; | ||
var nroservers = '<?php echo str_replace(",", ", ", array_key_first($serverInfo));?>'; | ||
<?php | ||
$allIdPs = []; | ||
foreach ($allAuthorizedFeds as $oneFed) { | ||
foreach ($externalDb->listExternalTlsServersInstitution($oneFed['value']) as $id => $oneIdP) { | ||
$allIdPs[$id] = '[' . substr($id, 0, 2) . '] ' . $oneIdP["names"][$langObject->getLang()]; | ||
echo "instservers['" . $id . "']='" . str_replace(",", ", ", $oneIdP["servers"]) . "';\n"; | ||
} | ||
} | ||
if (count($allIdPs) > 0) { | ||
?> | ||
$(document).on('change', '#INST-list' , function() { | ||
//alert(instservers[$(this).val()]); | ||
$("#INST").prop('checked', true); | ||
$("#certlevel").html("<?php echo _('organizational level'); ?>"); | ||
$("#serversinfo").html(instservers[$(this).val()]); | ||
//$("input[name=LEVEL][value=INST]").prop('checked', true); | ||
|
||
}); | ||
$(document).on('change', '#NRO' , function() { | ||
$("#INST-list").val("notset"); | ||
$("#certlevel").html("<?php echo _('NRO level'); ?>"); | ||
$("#serversinfo").html(nroservers); | ||
}); | ||
</script> | ||
<?php if (count($allIdPs) > 0) { | ||
?> | ||
|
||
|
||
<br/> | ||
<input type="radio" name="LEVEL" id="INST" value="INST"><?php printf(_("Certificate for %s "), $uiElements->nomenclatureParticipant); ?></input> | ||
<select name="INST-list" id="INST-list"> | ||
|
@@ -232,6 +256,16 @@ | |
} | ||
?> | ||
</select> | ||
</br> | ||
<h3> | ||
<?php | ||
echo _('According to the above settings you will receive') | ||
?> | ||
<span id='certlevel'><?php echo _('NRO level certificate');?></span> | ||
|
||
</span>for server names: | ||
<span id='serversinfo'><?php echo str_replace(",", ", ", array_key_first($serverInfo)); ?></span> | ||
</h3> | ||
<?php | ||
} else { | ||
echo "<div>"; | ||
|