Validation messages for the login modal
- [x] Login form validations are working fine for incorrect input fields(testing) Unable to test, redirected to PL stable
Refer #4210
Oorjit's comment
Login modal validations are working fine for incorrect input fields(testing) You're redirected to PL login page Login form validations are working fine for incorrect input fields(testing) You're redirected to unstable PL login page with an error "There is nobody in our system by that name, are you sure you have the right username?"
I can help out here should you need any help... @sidharthbansal
We need the error messages to be displayed on the modal. No redirect to the /login page.
Ohk.. I'll try to look into this then.. seems important
@SidharthBansal this one will require changes at app/views/user_sessions/_new.html.erb?
I hope yes.
@JonathanXu1 and other GCI students if any task is left for reward then please submit it on the GCI platform. If I can approve it, I will approve it immediately.
@okonek @kevinzluo @dinaelhanan @oorjitchowdhary and others
Hi.. 2 are left but one is incorrect.. Can I submit that one
I mean the correct ones.
submit the correct ones now.
Please do it 5 minutes remaining. I am not receiving any emails from you guys.
@oorjitchowdhary you can focus on this before taking new issues.. You claimed this.
Yes.. Is this the line which is to be changed? https://github.com/publiclab/plots2/blob/eeed6645474a356cdd62fdd9e7c8467935faef1f/app/views/user_sessions/_new.html.erb#L5
This is the line to display the error messages on the login page. You need to bring in some clever insight so that the page will not redirect to /login, instead this line is rendered on the modal itself.
Does this makes sense?
Yes.. I get it.. I'm looking into it..
I saw through the code and found that the modal automatically renders the password error but as we're redirected to the login page we are unable to see the error on the modal..

I think we need to change the backend ruby code..
But, I also found out that this linking is only limited to password is not valid error.. if we've a username error.. we are redirected to login page with an error.. but that error doesn't show up on the modal..