diff --git a/saml/lang/C/messages.po b/saml/lang/C/messages.po index 05579568..b4a4c8ce 100644 --- a/saml/lang/C/messages.po +++ b/saml/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-05-18 07:23+0200\n" +"POT-Creation-Date: 2025-01-17 03:23+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,82 +17,82 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: saml.php:231 +#: saml.php:81 +msgid "managed via SAML authentication" +msgstr "" + +#: saml.php:246 msgid "Settings statement" msgstr "" -#: saml.php:232 -msgid "" -"A statement on the settings page explaining where the user should go to " -"change their e-mail and password. BBCode allowed." -msgstr "" - -#: saml.php:237 -msgid "IdP ID" -msgstr "" - -#: saml.php:238 -msgid "" -"Identity provider (IdP) entity URI (e.g., https://example.com/auth/realms/" -"user)." -msgstr "" - -#: saml.php:242 -msgid "Client ID" -msgstr "" - -#: saml.php:243 -msgid "Identifier assigned to client by the identity provider (IdP)." -msgstr "" - #: saml.php:247 -msgid "IdP SSO URL" -msgstr "" - -#: saml.php:248 -msgid "The URL for your identity provider's SSO endpoint." +msgid "A statement on the settings page explaining where the user should go to change their e-mail and password. BBCode allowed." msgstr "" #: saml.php:252 -msgid "IdP SLO request URL" +msgid "IdP ID" msgstr "" #: saml.php:253 -msgid "The URL for your identity provider's SLO request endpoint." +msgid "Identity provider (IdP) entity URI (e.g., https://example.com/auth/realms/user)." msgstr "" #: saml.php:257 -msgid "IdP SLO response URL" +msgid "Client ID" msgstr "" #: saml.php:258 -msgid "The URL for your identity provider's SLO response endpoint." +msgid "Identifier assigned to client by the identity provider (IdP)." msgstr "" #: saml.php:262 -msgid "SP private key" +msgid "IdP SSO URL" msgstr "" #: saml.php:263 -msgid "The private key the addon should use to authenticate." +msgid "The URL for your identity provider's SSO endpoint." msgstr "" #: saml.php:267 -msgid "SP certificate" +msgid "IdP SLO request URL" msgstr "" #: saml.php:268 -msgid "The certficate for the addon's private key." +msgid "The URL for your identity provider's SLO request endpoint." msgstr "" #: saml.php:272 -msgid "IdP certificate" +msgid "IdP SLO response URL" msgstr "" #: saml.php:273 +msgid "The URL for your identity provider's SLO response endpoint." +msgstr "" + +#: saml.php:277 +msgid "SP private key" +msgstr "" + +#: saml.php:278 +msgid "The private key the addon should use to authenticate." +msgstr "" + +#: saml.php:282 +msgid "SP certificate" +msgstr "" + +#: saml.php:283 +msgid "The certficate for the addon's private key." +msgstr "" + +#: saml.php:287 +msgid "IdP certificate" +msgstr "" + +#: saml.php:288 msgid "The x509 certficate for your identity provider." msgstr "" -#: saml.php:276 +#: saml.php:291 msgid "Save Settings" msgstr "" diff --git a/saml/saml.css b/saml/saml.css deleted file mode 100644 index 087633cd..00000000 --- a/saml/saml.css +++ /dev/null @@ -1 +0,0 @@ -#settings-form > div:first-of-type, #settings-form > h2:first-of-type, #wrapper_mpassword, #wrapper_email { display: none !important; } diff --git a/saml/saml.php b/saml/saml.php index 9f065355..81a6bfcc 100755 --- a/saml/saml.php +++ b/saml/saml.php @@ -75,18 +75,36 @@ 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'))); + $samlhint = DI::l10n()->t('managed via SAML authentication'); $body .= << var target=$("#settings-nickname-desc"); if (target.length) { target.append("

$fragment

"); } +document.getElementById('id_email').setAttribute('readonly', 'readonly'); +var saml_hint = document.createElement("span"); +var saml_hint_text = document.createTextNode('$samlhint'); +saml_hint.appendChild(saml_hint_text); +document.getElementById('id_email').parentNode.insertBefore(saml_hint, document.getElementById('id_email').nextSibling); +// Frio theme +if ( document.getElementById('password-settings-collapse') != null ) { + document.getElementById('password-settings-collapse').replaceChildren(saml_hint.cloneNode(true)); +} +if ( document.getElementById('id_mpassword_wrapper') != null ) { + document.getElementById('id_mpassword_wrapper').parentNode.appendChild(saml_hint.cloneNode(true)); + document.getElementById('id_mpassword_wrapper').remove(); + document.getElementById('id_email').nextElementSibling.classList.add('help-block'); +} +// Vier theme +if ( document.getElementById('wrapper_mpassword') != null ) { + document.getElementById('wrapper_mpassword').remove(); + document.getElementById('id_email').nextElementSibling.classList.add('field_help'); +} +if ( document.getElementById('wrapper_password') != null ) { + document.getElementById('wrapper_password').parentNode.replaceChildren(saml_hint.cloneNode(true)); +} EOL; }