Show login first on invitation form

AI-generated summary

The topic concerns the positioning of the “Log me in. I already have an account.” button on the Discourse invitation form. thoka wants to move the login button higher on the form to improve the experience for users who already have accounts, especially when using a patch to add invitees to groups and redirect them to a topic. thoka initially asked if this could be achieved with CSS.

Canapin initially stated that CSS alone wouldn’/t be sufficient, recommending a template override, but noted that the modal form will eventually be replaced with a dedicated registration/login page. JammyDodger shared a link to a related topic about adding a custom login link: [https://meta.discourse.org/t/add-cu stom-login-link-to-invite-acceptance/247024/2](https://meta.discourse.org/t/add-cu stom-login-link-to-invite-acceptance/247024/2).

gassim reported that CSS worked briefly but became unreliable and that subsequent JavaScript attempts also failed. JammyDodger suggested creating a Development topic for assistance with code changes. gassim proposed the top header as an alternative location, questioning its visibility for all users.

I use invitations as a link to a topic, while adding people to the right groups, using a simple patch.

Logged in users will be silently added to the group and redirected to the topic.

Unfortunately non logged in users will be invited to create a new account, since the button “Log me in. I allready have an account.” follows the form.

I would like to move this button up:

Is this possible by adding some css?

Should this be a standard feature of discourse?

1 Like

Hey @thoka :wave:
It wouldn’t be possible with CSS. You’d need to override the modal template.

https://meta.discourse.org/t/beginners-guide-to-developing-discourse-themes/93648#overriding-discourse-templates-23

Also, know that the modal will be removed in the future as we intend to have a dedicated registration/login page instead. :slight_smile:


See below :point_down:

2 Likes

Does this topic help?

3 Likes

Thanks! I don’t know if it worked for @thoka, but the CSS worked for me at the start but then it no longer did. When it didn’t I added a JS but now the JS isn’t working and I’m using CSS but the CSS is far from perfect nor is it positioned exactly where I need it to be.

Ah, some things may have changed in one of the updates to the page.

You may get more attention if you create a Development topic for some advice on what code changes you need to get it working as you’d like again. :+1:

1 Like

Thank you @JammyDodger !

For now I think the top header you see in the screenshot would work. What do you think? Do you think it would be visible to everyone?

Thanks!