Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
e329f4ce
Commit
e329f4ce
authored
Oct 04, 2018
by
Robert Lyon
Committed by
Gerrit Code Review
Oct 04, 2018
Browse files
Merge "Bug 1795096:confirmation dialogue when deleting IdP"
parents
c42816cc
9e254365
Changes
4
Hide whitespace changes
Inline
Side-by-side
htdocs/auth/saml/lang/en.utf8/auth.saml.php
View file @
e329f4ce
...
...
@@ -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'
;
...
...
htdocs/auth/saml/lib.php
View file @
e329f4ce
...
...
@@ -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
),
...
...
htdocs/theme/raw/plugintype/auth/saml/templates/idpdelete.tpl
View file @
e329f4ce
{
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
}
...
...
htdocs/theme/raw/plugintype/auth/saml/templates/idptableconfig.tpl
View file @
e329f4ce
...
...
@@ -16,14 +16,15 @@
function
deleteidp
(
el
,
idp
)
{
var
data
=
{
'
idp
'
:
idp
};
var
row
=
$
(
el
).
closest
(
'
tr
'
);
sendjsonrequest
(
config
.
wwwroot
+
'
auth/saml/idpdelete.json.php
'
,
data
,
'
POST
'
,
function
(
data
)
{
if
(
data
.
data
.
error
)
{
alert
(
data
.
data
.
error
);
}
else
{
row
.
hide
();
}
});
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
);
}
else
{
row
.
hide
();
}
});
}
}
</script>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment