diff --git a/css/admin.css b/css/admin.css index fe38d77..5c53798 100644 --- a/css/admin.css +++ b/css/admin.css @@ -1,11 +1,30 @@ #user-saml input[type="text"],textarea { + max-width: 600px; width: 100%; } -#user-saml input.required { - background-color: lightgoldenrodyellow; -} - #user-saml input[type="checkbox"] { vertical-align:middle; +} + +#user-saml h4 { + font-size: 14px; + font-weight: 300; + margin: 12px 0; +} + +#user-saml-settings > div { + margin-bottom: 10px; +} + +.indent { + padding-left: 14px; +} + +#user-saml-settings .toggle { + clear: both; + padding: 7px 0; + cursor: pointer; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; + opacity: .5; } \ No newline at end of file diff --git a/js/admin.js b/js/admin.js index d10d5bc..0e561fa 100644 --- a/js/admin.js +++ b/js/admin.js @@ -6,7 +6,6 @@ function setSAMLConfigValue(category, setting, value) { $(function() { // Enable tabs - $('#user-saml-settings').tabs(); $('input:checkbox[value="1"]').attr('checked', true); $('#user-saml-sp input[type="text"], #user-saml-sp textarea').change(function(e) { @@ -70,4 +69,36 @@ $(function() { setSAMLConfigValue('security', key, $(this).val()); }); }); + + $('#user-saml-settings .toggle').on('click', function() { + var el = $(this), + nextSibling = el.parent().next(), + parentSettingId = el.closest('div').attr('id'), + text = ''; + switch(parentSettingId) { + case 'user-saml-security': + if (nextSibling.hasClass('hidden')) { + text = 'Hide security settings ...'; + } else { + text = 'Show security settings ...'; + } + break; + case 'user-saml-idp': + if (nextSibling.hasClass('hidden')) { + text = 'Hide optional Identity Provider settings ...'; + } else { + text = 'Show optional Identity Provider settings ...'; + } + break; + case 'user-saml-sp': + if (nextSibling.hasClass('hidden')) { + text = 'Hide Service Provider settings ...'; + } else { + text = 'Show Service Provider settings ...'; + } + break; + } + el.html(t('user_saml', text)); + nextSibling.toggleClass('hidden'); + }); }); diff --git a/templates/admin.php b/templates/admin.php index 2f751ae..d5282ba 100644 --- a/templates/admin.php +++ b/templates/admin.php @@ -9,51 +9,75 @@ style('user_saml', 'admin');
t('If your Service Provider should use certificates you can optionally specify them here.')) ?>
- $text): ?> - - -t('Configure your IdP settings here, all yellow input fields are required, others optional.')) ?>
- - - - -t('For increased security we recommend enabling the following settings if supported by your environment.')) ?>
- -
+
+
+
+ class="required" placeholder=""/> +
+ t('If your Service Provider should use certificates you can optionally specify them here.')) ?> + t('Show Service Provider settings ...')) ?> +
+ ++ +
+ ++ t('Configure your IdP settings here.')) ?> +
+ + + +t('Show optional Identity Provider settings ...')) ?>
++ t('For increased security we recommend enabling the following settings if supported by your environment.')) ?> + t('Show security settings ...')) ?> +
+ +