diff --git a/css/admin.css b/css/admin.css
index e2cd0b2..f0ca800 100644
--- a/css/admin.css
+++ b/css/admin.css
@@ -53,4 +53,8 @@
#user-saml .account-list li.active a {
border-bottom: 1px solid #333;
font-weight: bold;
-}
\ No newline at end of file
+}
+
+#user-saml-reset-settings {
+ float: right;
+}
diff --git a/js/admin.js b/js/admin.js
index f8014cf..94083c1 100644
--- a/js/admin.js
+++ b/js/admin.js
@@ -41,6 +41,16 @@
OCP.AppConfig.setValue('user_saml', 'type', 'saml', {success: function() {location.reload();}});
},
+ resetSettings: function() {
+ if (OC.PasswordConfirmation.requiresPasswordConfirmation()) {
+ OC.PasswordConfirmation.requirePasswordConfirmation(_.bind(this.resetSettings, this));
+ return;
+ }
+
+ OCP.AppConfig.setValue('user_saml', 'type', '', {success: function() {location.reload();}});
+ },
+
+
getConfigIdentifier: function() {
if (this.currentConfig === '1') {
return '';
@@ -155,6 +165,11 @@ $(function() {
}
});
+ $('#user-saml-reset-settings').click(function(e) {
+ e.preventDefault();
+ OCA.User_SAML.Admin.resetSettings();
+ });
+
var switchProvider = function(providerId) {
$('.account-list li').removeClass('active');
$('.account-list li[data-id="' + providerId + '"]').addClass('active');
diff --git a/templates/admin.php b/templates/admin.php
index da6d1dc..bda06e2 100644
--- a/templates/admin.php
+++ b/templates/admin.php
@@ -166,6 +166,10 @@ style('user_saml', 'admin');
href="getURLGenerator()->linkToRoute('user_saml.SAML.getMetadata', ['idp' => $_['providers'][0]['id']])) ?>" class="button">
t('Download metadata XML')) ?>
+
+
+
+
t('Metadata invalid')) ?>
t('Metadata valid')) ?>