Commit 85f84f04 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Robert Lyon
Browse files

Bug 1795096:confirmation dialogue when deleting IdP

behatnotneeded

Change-Id: Ice8e039ed2163e42f062c42ea90c335659cc6926
(cherry picked from commit 9e254365)
parent dc64a0fe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ 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['confirmdeleteidp'] = 'Are you sure you want to delete this identity provider?';
$string['spmetadata'] = 'Service Provider metadata';
$string['metadatavewlink'] = '<a href="%s">View metadata</a>';
$string['ssphpnotconfigured'] = 'SimpleSAMLPHP is not configured.';
@@ -21,7 +22,6 @@ $string['manage_certificate2'] = 'This is the certificate generated as part of t
$string['nullprivatecert'] = "Could not generate or save the private key";
$string['nullpubliccert'] = "Could not generate or save the public certificate";
$string['defaultinstitution'] = 'Default institution';
$string['deleteidp'] = 'Delete IdP';
$string['description'] = 'Authenticate against a SAML 2.0 Identity Provider service';
$string['disco'] = 'Identity Provider discovery';
$string['errorbadinstitution'] = 'Institution for connecting user not resolved';
+0 −1
Original line number Diff line number Diff line
@@ -757,7 +757,6 @@ class PluginAuthSaml extends PluginAuth {
                'sort' => false
            ),
            'delete' => array(
                'name' => get_string('deleteidp', 'auth.saml'),
                'template' => 'auth:saml:idpdelete.tpl',
                'sort' => false
            ),
+1 −1
Original line number Diff line number Diff line
{if $r.delete}
    <button type="button" onclick="deleteidp(this, '{$r.idpentityid}')" name="delete" value="{$r.idpentityid}" class="btn-link btn btn-xs pull-right" alt='{str tag=deletespecific section=mahara arg1=$r.name}'>
    <button type="button" onclick="deleteidp(this, '{$r.idpentityid}')" name="delete" value="{$r.idpentityid}" class="deletebutton btn btn-default btn-xs" alt='{str tag=deletespecific section=mahara arg1=$r.name}'>
        <span class="icon icon-trash text-danger icon-lg" role="presentation" aria-hidden="true"></span>
        <span class="sr-only">
            {str tag=delete section=mahara}
+10 −9
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@
function deleteidp(el, idp) {
    var data = { 'idp' : idp };
    var row = $(el).closest('tr');

    if (confirm("{get_string('confirmdeleteidp', 'auth.saml')}")) {
        sendjsonrequest(config.wwwroot + 'auth/saml/idpdelete.json.php', data, 'POST', function(data) {
            if (data.data.error) {
                alert(data.data.error);
@@ -26,4 +26,5 @@ function deleteidp(el, idp) {
            }
        });
    }
}
</script>