Skip to content

Two layout error in admin panel.[With solution] #10730

@L0veSunshine

Description

@L0veSunshine
  • Gitea version (or commit ref): 1.12.0-dev
  • Git version: 2.11
  • Operating system: Debian
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No I have no permission🤣This question was discovered in admin panel
    • Not relevant
  • Log gist:
    This issues is a front end issues, don't need logs.

Description

  1. When you adding authentication source in the Authentication Source Page. layout errors when selecting the options SSPI, SSPI options will not disappear after you select another option. And the option "Skip TLS Verify" has the same issue. You'd better try it yourself in this page.
  2. When you adding an OAuth2 authentication source and enable the "Use Custom URLs Instead of Default URLs" the content in the input box will not change with the option.

Screenshots

Issue1
Add-Authentication-Source-Gitea_-Git-with-a-cup-of-tea-Google-Chrome-2020-03-15-22-42-58
Issue2
Add-Authentication-Source-Gitea_-Git-with-a-cup-of-tea-Google-Chrome-2020-03-15-22-52-49

Issues causes and solution

Issue1

$('.ldap, .dldap, .smtp, .pam, .oauth2, .has-tls .search-page-size .sspi').hide();

In the above array, the last two items are missing commas. You should add them.
Issue2

gitea/web_src/js/index.js

Lines 1910 to 1922 in 062f351

if ($('#oauth2_use_custom_url').is(':checked')) {
if (!$('#oauth2_token_url').val()) {
$('#oauth2_token_url').val($(`#${provider}_token_url`).val());
}
if (!$('#oauth2_auth_url').val()) {
$('#oauth2_auth_url').val($(`#${provider}_auth_url`).val());
}
if (!$('#oauth2_profile_url').val()) {
$('#oauth2_profile_url').val($(`#${provider}_profile_url`).val());
}
if (!$('#oauth2_email_url').val()) {
$('#oauth2_email_url').val($(`#${provider}_email_url`).val());
}

If the input box is not null there is no action will do. i had try to clear the input box if the input box is not null, it works and the issus was solved.
This is the screenshot:
Add-Authentication-Source-Xgit-Google-Chrome-2020-03-15-23-50-39
I hope some one can fix these two issues. I worry if i pull requests, i can't be approved😭.
By the way I really love this project. hope you can develop better in future❤.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic/uiChange the appearance of the Gitea UItype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions