rework saml addon
fix #1587 remove css-side hiding of elements, which was broken. remove them or make them readonly via javascriptpull/1595/head
parent
69e75ef88b
commit
2b5764c132
|
@ -1 +0,0 @@
|
||||||
#settings-form > div:first-of-type, #settings-form > h2:first-of-type, #wrapper_mpassword, #wrapper_email { display: none !important; }
|
|
|
@ -75,11 +75,6 @@ function saml_install()
|
||||||
Hook::register('footer', __FILE__, 'saml_footer');
|
Hook::register('footer', __FILE__, 'saml_footer');
|
||||||
}
|
}
|
||||||
|
|
||||||
function saml_head(string &$body)
|
|
||||||
{
|
|
||||||
DI::page()->registerStylesheet(__DIR__ . '/saml.css');
|
|
||||||
}
|
|
||||||
|
|
||||||
function saml_footer(string &$body)
|
function saml_footer(string &$body)
|
||||||
{
|
{
|
||||||
$fragment = addslashes(BBCode::convertForUriId(User::getSystemUriId(), DI::config()->get('saml', 'settings_statement')));
|
$fragment = addslashes(BBCode::convertForUriId(User::getSystemUriId(), DI::config()->get('saml', 'settings_statement')));
|
||||||
|
@ -87,6 +82,10 @@ function saml_footer(string &$body)
|
||||||
<script>
|
<script>
|
||||||
var target=$("#settings-nickname-desc");
|
var target=$("#settings-nickname-desc");
|
||||||
if (target.length) { target.append("<p>$fragment</p>"); }
|
if (target.length) { target.append("<p>$fragment</p>"); }
|
||||||
|
document.getElementById('id_email').setAttribute('readonly', 'readonly');
|
||||||
|
document.getElementById('password-settings').remove();
|
||||||
|
document.getElementById('password-settings-collapse').remove();
|
||||||
|
document.getElementById('id_mpassword_wrapper').remove();
|
||||||
</script>
|
</script>
|
||||||
EOL;
|
EOL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue