Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to override Login page #17046

Open
hishamco opened this issue Nov 22, 2024 · 16 comments
Open

Unable to override Login page #17046

hishamco opened this issue Nov 22, 2024 · 16 comments
Labels

Comments

@hishamco
Copy link
Member

I have an admin theme in Orchard Core Contrib (OCC) that overrides the login previously without any issue https://github.com/OrchardCoreContrib/OrchardCoreContrib.Modules/blob/main/src/OrchardCoreContrib.Themes.Admin/Views/OrchardCore.Users/Account/Login.cshtml after upgrading OC to 2.0.0 the UI is broken, I fixed almost thing but the issue I can't override the login form. I tried to add LoginForm.Edit.cshtml and LoginFormCredentials.cshtml with no luck

/cc @MikeAlhayek

@MikeAlhayek
Copy link
Member

@hishamco what does broken means?

To override the login form you'll need to override the view LoginForm.Edit.cshtml

If you want to override the Username and the Password you'll override the LoginFormCredentials.cshtml view.

@hishamco
Copy link
Member Author

@hishamco what does broken means?

Not displayed properly

I already override it with no luck, I'm unable to change the login button style nor any text in the form

@MikeAlhayek
Copy link
Member

Please share the code you are using to override.

@hishamco
Copy link
Member Author

I just override the views, or did I miss something else?

@MikeAlhayek
Copy link
Member

If you override the views correctly, then it should have worked. If you share the name of the view you overrode and the code you used in each view, I can try to see what you could be doing wrong.

@hishamco
Copy link
Member Author

I refer to the code above and the proposed views too

@MikeAlhayek
Copy link
Member

The view OrchardCoreContrib/OrchardCoreContrib.Modules/blob/main/src/OrchardCoreContrib.Themes.Admin/Views/OrchardCore.Users/Account/Login.cshtml seems to be identical to OC's version. what changes were you looking to do?

@hishamco
Copy link
Member Author

Style the login button for instance

@MikeAlhayek
Copy link
Member

Yes for that you'll need to override the Login.cshtml view. Maybe you're not placing that view in the right path. Is it in a theme? Where is it placed?

@hishamco
Copy link
Member Author

If you look at the link above the login is placed in the theme inside OrchardCore.Users\Account

you'll need to override the Login.cshtml view

The login just a wrapper and the LoginForm.Edit is the shape that need to be overridden, right?

@MikeAlhayek
Copy link
Member

Yes LoginForm.Edit.cshtml is what you need to override if you want to change the form section of the Login.cshtml

@hishamco
Copy link
Member Author

I already mentioned here that I already override it with no luck

@dturska
Copy link

dturska commented Nov 25, 2024

Do you have the [Use site theme for login page - Requires an active site theme.] checked?
image

@hishamco
Copy link
Member Author

It's an admin theme

@ns8482e
Copy link
Contributor

ns8482e commented Nov 25, 2024

@hishamco which version? I have no issue with 2.0.2

@hishamco
Copy link
Member Author

2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants