Commit 428f26bb authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1715544: hide metadata link when SSPHP is not configured"

parents adae9c58 9c406781
......@@ -14,7 +14,10 @@ defined('INTERNAL') || die();
$string['attributemapfilenotamap'] = 'The attribute map file "%s" didn\'t define an attribute map.';
$string['attributemapfilenotfound'] = 'Could not find attribute map file or it is not writable: %s';
$string['certificate1'] = 'SAML Service Provider signing and encryption certificate';
$string['manage_certificate1'] = 'This is the certificate generated as part of the SAML Service Provider <a href="%s">Metadata</a>.';
$string['spmetadata'] = 'Service Provider metadata';
$string['metadatavewlink'] = '<a href="%s">View metadata</a>';
$string['ssphpnotconfigured'] = 'SimpleSAMLPHP is not configured';
$string['manage_certificate2'] = 'This is the certificate generated as part of the SAML Service Provider';
$string['nullprivatecert'] = "Could not generate or save the private key";
$string['nullpubliccert'] = "Could not generate or save the public certificate";
$string['defaultinstitution'] = 'Default institution';
......
......@@ -514,6 +514,12 @@ class PluginAuthSaml extends PluginAuth {
'defaultvalue' => $spentityid,
'help' => true,
),
'metadata' => array(
'type' => 'html',
'class' => 'htmldescription',
'title' => get_string('spmetadata', 'auth.saml'),
'value' => self::is_usable() ? get_string('metadatavewlink', 'auth.saml', get_config('wwwroot') . 'auth/saml/sp/metadata.php?output=xhtml') : get_string('ssphpnotconfigured', 'auth.saml'),
),
'sigalgo' => array(
'type' => 'select',
'title' => get_string('sigalgo', 'auth.saml'),
......@@ -533,7 +539,7 @@ class PluginAuthSaml extends PluginAuth {
'elements' => array(
'protos_help' => array(
'type' => 'html',
'value' => '<div><p>' . get_string('manage_certificate1', 'auth.saml', get_config('wwwroot') . 'auth/saml/sp/metadata.php?output=xhtml') . '</p></div>',
'value' => '<div><p>' . get_string('manage_certificate2', 'auth.saml') . '</p></div>',
),
'pubkey' => array(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment