Skip to content

Fix: Hide navbar login form on login page to avoid duplicate UI#5760

Open
Akritiiiiiiii wants to merge 1 commit into
learning-unlimited:mainfrom
Akritiiiiiiii:patch-10
Open

Fix: Hide navbar login form on login page to avoid duplicate UI#5760
Akritiiiiiiii wants to merge 1 commit into
learning-unlimited:mainfrom
Akritiiiiiiii:patch-10

Conversation

@Akritiiiiiiii

Copy link
Copy Markdown

This PR fixes the issue where two login interfaces were displayed simultaneously on the login page.

Description

Added conditional rendering to hide the navbar login form when the user is on the /accounts/login/ page. This prevents duplicate login interfaces and improves the overall user experience.

Related Issue

Closes #

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactor / cleanup
  • CI/CD or build change

Testing

  • Existing tests pass
  • New tests added (not required for this fix)
  • Manually verified

Tested locally:

  • /accounts/login/ → only main login form is visible
  • Other pages → navbar login form is displayed correctly

AI Disclosure

Used AI assistance to help understand the issue and structure the fix, but the implementation and testing were done manually.

Checklist

This PR fixes the issue where two login interfaces were displayed simultaneously on the login page.
@Akritiiiiiiii

Copy link
Copy Markdown
Author

Ready for review. Please let me know if any improvements are needed!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the duplicate login UI on /accounts/login/ by conditionally hiding the navbar-embedded login form when the current request is for the login page.

Changes:

  • Added a template conditional in the global navbar to suppress rendering of users/loginbox_content.html on the login page.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread esp/templates/navbar.html
<ul class="nav pull-right">
<li>
{% include "users/loginbox_content.html" %}
{% if "/accounts/login" not in request.path %}
Comment thread esp/templates/navbar.html
Comment on lines +19 to +20
{% include "users/loginbox_content.html" %}
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Hide duplicate login form in navbar on login page

2 participants