Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

render_share_password_question()

Parameters

ColumnTypeDefaultDescription
$blank true

Location

include/render_functions.php lines 5561 to 5609

Definition

 
function render_share_password_question($blank=true)
    {
    global 
$lang;
    
?>
    <div class="Question">
    <label for="sharepassword"> echo escape($lang["share-set-password"]) ?></label>
    <input type="password" id="sharepassword" name="sharepassword" autocomplete="new-password" maxlength="40" class="stdwidth" value=" echo $blank "" $lang["password_unchanged"]; ?>">
    <span class="fa fa-fw fa-eye infield-icon" onclick="togglePassword('sharepassword');"></span>
    <script>

    function togglePassword(pwdelement)
        {
        input = jQuery('#' + pwdelement);
        if (input.attr("type") == "password")
            {
            input.attr("type", "text");
            }
        else
            {
            input.attr("type", "password");
            }
        }
    var passInput="";
    var passState="(unchanged)";
    var passHistory="";
    function pclick(id) 
        {
        // Set to password mode
        document.getElementById(id).type="password";
        document.getElementById(id).value=passState;
        document.getElementById(id).select();
        }
    function pblur(id) 
        {
        // Copy keyed input other than bracketed placeholders to hidden password
        passInput = document.getElementById(id).value;
        if(passInput!="(unchanged)" && passInput!="(changed)") 
            {
            document.getElementById("sharepassword").value=passInput; 
            passState="(changed)";
            }
        // Return to text mode showing the appropriate bracketed placeholder
        document.getElementById(id).value=passState;
        document.getElementById(id).type="text";
        }
    </script>
    </div>
    
    
}

This article was last updated 19th March 2024 09:05 Europe/London time based on the source file dated 15th March 2024 17:00 Europe/London time.