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

Allow users to select default odk credentials irrespective of organisation #2142

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

Sujanadh
Copy link
Collaborator

@Sujanadh Sujanadh commented Feb 3, 2025

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation
  • πŸ§‘β€πŸ’» Refactor
  • βœ… Test
  • πŸ€– Build or CI
  • ❓ Other (please specify)

Related Issue

Describe this PR

Whenever users select an organisation without any default ODK credentials, they are suggested to provide credentials input. But if they wish to use default ODK credentials, they should be allowed to use the default from HOTOSM. So there was an issue when they checked the box to use default ODK credentials; the custom ODK fields input was still shown.

So I removed the logic tied with the organisation in order to show custom ODK fields; this PR only checks if the user has checked the box or not. Based on that, the custom fields to provide credentials are shown.

Screenshots

I. When no org is selected:
image

II. When org without default odk creds is selected:
image

III. When user checks to box to use default creds:
image

IV. When org with default odk creds is selected:
check box is auto checked
image

V. When user checks to box to use default creds even though org has its own creds:
image

Checklist before requesting a review

[optional] What gif best describes this PR or how it makes you feel?

@Sujanadh Sujanadh requested a review from spwoodcock February 3, 2025 06:08
@Sujanadh Sujanadh self-assigned this Feb 3, 2025
@github-actions github-actions bot added bug Something isn't working frontend Related to frontend code labels Feb 3, 2025
@spwoodcock spwoodcock merged commit 672e592 into development Feb 3, 2025
6 checks passed
@spwoodcock spwoodcock deleted the fix/default-odk-creds branch February 3, 2025 08:10
@spwoodcock
Copy link
Member

After merging I can't click next / the ODK credentials fields are mandatory (although hidden):

image

@spwoodcock
Copy link
Member

I think that issue existed before this PR somehow - I will fix it πŸ‘

@spwoodcock
Copy link
Member

I fixed the validation problem in the commit above πŸ‘

Personally based on discussion in #2137 (comment), I think this PR should be reverted. But let me know your thoughts there & we will update accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend Related to frontend code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants