rework saml addon #1588

Merged
MrPetovan merged 5 commits from jakob/friendica-addons:fix-saml-display-settings into develop 2025-01-23 14:31:50 +01:00
2 changed files with 4 additions and 6 deletions
Showing only changes of commit cbc6dc9caf - Show all commits

View file

@ -1 +0,0 @@
#settings-form > div:first-of-type, #settings-form > h2:first-of-type, #wrapper_mpassword, #wrapper_email { display: none !important; }

View file

@ -75,11 +75,6 @@ function saml_install()
Hook::register('footer', __FILE__, 'saml_footer');
}
function saml_head(string &$body)
{
DI::page()->registerStylesheet(__DIR__ . '/saml.css');
}
function saml_footer(string &$body)
{
$fragment = addslashes(BBCode::convertForUriId(User::getSystemUriId(), DI::config()->get('saml', 'settings_statement')));
@ -87,6 +82,10 @@ function saml_footer(string &$body)
<script>
var target=$("#settings-nickname-desc");
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>
EOL;
}