]> git.mxchange.org Git - friendica-addons.git/commitdiff
add condition for selected theme
authorJakobus Schürz <jakobus.schuerz@home.arpa>
Thu, 23 Jan 2025 15:32:22 +0000 (16:32 +0100)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 25 Jan 2025 13:05:32 +0000 (08:05 -0500)
saml/saml.php

index c8824b46b584246aaae0c84f28a965fd3913ccc7..83e4d3fded3447250a9832dc8173202bd0c291be 100755 (executable)
@@ -82,11 +82,13 @@ 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');
 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);
+if ( document.getElementById('id_email') != null ) {
+       document.getElementById('id_email').setAttribute('readonly', 'readonly');
+       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));