Forum Discussion

jaread83's avatar
jaread83
Champion
8 years ago

Editting the login modal

Hi,   Is it possible to view the modal login/registration box in Studio? We want to make a small change to the login page and the modal version but can only see the page version in Studio (UserLogi...
  • TariqHussain's avatar
    TariqHussain
    8 years ago

    jaread83- Thanks for providing the details. Yes adding the JS code to header or footer would work. Regarding the login fail state, if there is an error while signing in, a new element is being added to the HTML of login modal.

    <a name="feedback-error" li-common-non-bindable=""> </a>

    You will need to write a JS code to check, if login modal has this element.

  • TariqHussain's avatar
    TariqHussain
    8 years ago

    jaread83-
    Try the updated code.

    $('#lia-body').on('mouseup', '.UserLoginForm', function(e) {
        if (e.target.hasClass('lia-button-Submit-action')) {
            console.log('click submit button');
        }
    });

    Or if you just want to bind the click event to the sign in button, you can use this code.

    $("#lia-body").on("mouseup", ".UserLoginForm .lia-button-Submit-action", function(){
       alert("clicked on submit");
    })