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
9e254365
Commit
9e254365
authored
Oct 04, 2018
by
Cecilia Vela Gurovic
Committed by
Robert Lyon
Oct 04, 2018
Browse files
Bug 1795096:confirmation dialogue when deleting IdP
behatnotneeded Change-Id: Ice8e039ed2163e42f062c42ea90c335659cc6926
parent
840b1d04
Changes
4
Hide whitespace changes
Inline
Side-by-side
htdocs/auth/saml/lang/en.utf8/auth.saml.php
View file @
9e254365
...
...
@@ -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 @
9e254365
...
...
@@ -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 @
9e254365
{
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 @
9e254365
...
...
@@ -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>
Cecilia Vela Gurovic
@ceciliavg
mentioned in commit
85f84f04
·
Oct 04, 2018
mentioned in commit
85f84f04
mentioned in commit 85f84f0432307d2ed78271ffd6184857f87ef62a
Toggle commit list
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