plots2 icon indicating copy to clipboard operation
plots2 copied to clipboard

Validation messages for the login modal

Open SidharthBansal opened this issue 7 years ago • 50 comments

  • [x] Login form validations are working fine for incorrect input fields(testing) Unable to test, redirected to PL stable

SidharthBansal avatar Dec 10 '18 10:12 SidharthBansal

Refer #4210

SidharthBansal avatar Dec 10 '18 10:12 SidharthBansal

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?"

SidharthBansal avatar Dec 10 '18 10:12 SidharthBansal

I can help out here should you need any help... @sidharthbansal

oorjitchowdhary avatar Dec 10 '18 10:12 oorjitchowdhary

We need the error messages to be displayed on the modal. No redirect to the /login page.

SidharthBansal avatar Dec 10 '18 11:12 SidharthBansal

Ohk.. I'll try to look into this then.. seems important

oorjitchowdhary avatar Dec 10 '18 11:12 oorjitchowdhary

@SidharthBansal this one will require changes at app/views/user_sessions/_new.html.erb?

oorjitchowdhary avatar Dec 10 '18 12:12 oorjitchowdhary

I hope yes.

SidharthBansal avatar Dec 10 '18 12:12 SidharthBansal

@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.

SidharthBansal avatar Dec 10 '18 16:12 SidharthBansal

@okonek @kevinzluo @dinaelhanan @oorjitchowdhary and others

SidharthBansal avatar Dec 10 '18 16:12 SidharthBansal

Hi.. 2 are left but one is incorrect.. Can I submit that one

oorjitchowdhary avatar Dec 10 '18 16:12 oorjitchowdhary

I mean the correct ones.

SidharthBansal avatar Dec 10 '18 16:12 SidharthBansal

submit the correct ones now.

SidharthBansal avatar Dec 10 '18 16:12 SidharthBansal

Please do it 5 minutes remaining. I am not receiving any emails from you guys.

SidharthBansal avatar Dec 10 '18 16:12 SidharthBansal

@oorjitchowdhary you can focus on this before taking new issues.. You claimed this.

SidharthBansal avatar Dec 11 '18 16:12 SidharthBansal

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

oorjitchowdhary avatar Dec 11 '18 16:12 oorjitchowdhary

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.

SidharthBansal avatar Dec 11 '18 16:12 SidharthBansal

Does this makes sense?

SidharthBansal avatar Dec 11 '18 16:12 SidharthBansal

Yes.. I get it.. I'm looking into it..

oorjitchowdhary avatar Dec 11 '18 16:12 oorjitchowdhary

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.. screenshot 100 screenshot 101

I think we need to change the backend ruby code..

oorjitchowdhary avatar Dec 11 '18 19:12 oorjitchowdhary

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..

oorjitchowdhary avatar Dec 11 '18 19:12 oorjitchowdhary