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

Fix selected-index of Countries drop-down [fd-44144] #15521

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

uberbrady
Copy link
Collaborator

We seemed to be putting selected="selected" for every <option> in the Countries drop-down. Also, the logic to figure out if the selected country was actually in the list was a little off - looking at the name of the country ("Sweden"), rather than the country-code of the country ("SE"). Finally, we were repeating the role="option" attribute unnecessarily.

Copy link

what-the-diff bot commented Sep 18, 2024

PR Summary

  • Correction to Comment Spelling
    A spelling error in one of the code comments was corrected. Instead of "deprecication", now it correctly reads "deprecation".

  • Improved Country Selection Validation
    The validation check has been updated for the selection of countries. The old method checked if the selected country existed in an array. The new method greatly improves this validation by checking if the selected country exists as a key in the array, making the system more accurate.

  • Removal of Redundant Code
    Any redundant attributes for the option elements were removed. These "selected='selected'" attributes were superfluous and removing them has helped in making the code cleaner and easier to understand.

@snipe snipe merged commit 04bb3ee into snipe:develop Sep 18, 2024
9 checks passed
snipe added a commit that referenced this pull request Sep 19, 2024
commit dddbf27
Author: snipe <[email protected]>
Date:   Wed Sep 18 14:18:52 2024 +0100

    Updated language strings

    Signed-off-by: snipe <[email protected]>

commit fcefcc8
Merge: 04bb3ee 3519a82
Author: snipe <[email protected]>
Date:   Wed Sep 18 13:44:44 2024 +0100

    Merge pull request #15512 from marcusmoore/testing/fmcs

    Added tests for delete methods in api

commit 04bb3ee
Merge: 154d5d8 f963b9a
Author: snipe <[email protected]>
Date:   Wed Sep 18 13:41:37 2024 +0100

    Merge pull request #15521 from uberbrady/improve_country_selector

    Fix selected-index of Countries drop-down [fd-44144]

commit f963b9a
Author: Brady Wetherington <[email protected]>
Date:   Wed Sep 18 13:24:26 2024 +0100

    Fix selected-index of Countries drop-down

commit 154d5d8
Merge: 6c996b7 9e5f6d6
Author: snipe <[email protected]>
Date:   Tue Sep 17 23:40:25 2024 +0100

    Merge pull request #15491 from uberbrady/numeric_prefixes_add_multiple_assets

    [Fixes fd-43940] Improve multi-asset create when using numeric prefixes to asset_tags

commit 3519a82
Author: Marcus Moore <[email protected]>
Date:   Mon Sep 16 16:55:20 2024 -0700

    Fix name: TestsFullMultipleCompaniesSupport

commit a629df0
Author: Marcus Moore <[email protected]>
Date:   Mon Sep 16 14:49:08 2024 -0700

    Implement interfaces on existing test classes

commit 9a13fca
Author: Marcus Moore <[email protected]>
Date:   Mon Sep 16 14:38:38 2024 -0700

    Pluralize

commit f5705a1
Author: Marcus Moore <[email protected]>
Date:   Mon Sep 16 14:34:55 2024 -0700

    More unification

commit f325c4a
Author: Marcus Moore <[email protected]>
Date:   Mon Sep 16 14:32:38 2024 -0700

    Unify assertion method

commit 1fddacd
Author: Marcus Moore <[email protected]>
Date:   Mon Sep 16 14:25:11 2024 -0700

    Re-order test methods

commit 4af893d
Author: Marcus Moore <[email protected]>
Date:   Mon Sep 16 14:20:24 2024 -0700

    Improve assertions

commit b8b3f91
Author: Marcus Moore <[email protected]>
Date:   Mon Sep 16 13:55:18 2024 -0700

    Formatting

commit 7f40f55
Author: Marcus Moore <[email protected]>
Date:   Mon Sep 16 13:52:02 2024 -0700

    Add tests for delete supplier endpoint

commit b06e8d4
Author: Marcus Moore <[email protected]>
Date:   Mon Sep 16 13:37:08 2024 -0700

    Add tests for delete status label endpoint

commit c269184
Author: Marcus Moore <[email protected]>
Date:   Mon Sep 16 13:29:41 2024 -0700

    Add tests for delete predefined kit endpoint

commit 53c673d
Author: Marcus Moore <[email protected]>
Date:   Mon Sep 16 13:13:12 2024 -0700

    Add tests for delete manufacturer endpoint

commit 50730fc
Author: Marcus Moore <[email protected]>
Date:   Mon Sep 16 12:37:18 2024 -0700

    Add tests for delete location endpoint

commit 60a54ce
Author: Marcus Moore <[email protected]>
Date:   Mon Sep 16 12:33:30 2024 -0700

    Add tests for delete license endpoint

commit 446e962
Author: Marcus Moore <[email protected]>
Date:   Mon Sep 16 10:38:51 2024 -0700

    Add tests for delete group endpoint

commit 79a4bb7
Author: Marcus Moore <[email protected]>
Date:   Mon Sep 16 10:35:44 2024 -0700

    Add tests for delete depreciation endpoint

commit 2f76c1b
Author: Marcus Moore <[email protected]>
Date:   Mon Sep 16 10:33:21 2024 -0700

    Add assertion

commit 38b9f4a
Author: Marcus Moore <[email protected]>
Date:   Mon Sep 16 10:29:20 2024 -0700

    Add tests for delete departments endpoint

commit 3105f53
Author: Marcus Moore <[email protected]>
Date:   Thu Sep 12 16:54:29 2024 -0700

    Add tests for delete custom fieldsets endpoint

commit 2047cfe
Author: Marcus Moore <[email protected]>
Date:   Thu Sep 12 16:20:32 2024 -0700

    Add tests for delete custom fields endpoint

commit e3268d3
Author: Marcus Moore <[email protected]>
Date:   Thu Sep 12 16:00:02 2024 -0700

    Add tests for delete consumable endpoint

commit 6df8b0a
Author: Marcus Moore <[email protected]>
Date:   Thu Sep 12 15:52:07 2024 -0700

    Add tests for delete component endpoint

commit 910f13c
Author: Marcus Moore <[email protected]>
Date:   Thu Sep 12 15:38:30 2024 -0700

    Add tests for delete companies endpoint

commit 8ce2512
Author: Marcus Moore <[email protected]>
Date:   Thu Sep 12 13:54:44 2024 -0700

    Add tests for delete category endpoint

commit 0ec415d
Author: Marcus Moore <[email protected]>
Date:   Thu Sep 12 13:46:22 2024 -0700

    Clean up

commit 2044570
Author: Marcus Moore <[email protected]>
Date:   Thu Sep 12 13:39:36 2024 -0700

    Add tests for delete asset model endpoint

commit b336c62
Author: Marcus Moore <[email protected]>
Date:   Thu Sep 12 13:32:42 2024 -0700

    Pluralize test classes

commit 5299b3e
Author: Marcus Moore <[email protected]>
Date:   Thu Sep 12 13:29:44 2024 -0700

    Remove code handled by CompanyableChildTrait

commit 872b76b
Author: Marcus Moore <[email protected]>
Date:   Thu Sep 12 13:29:10 2024 -0700

    Add tests for delete asset maintenance endpoint

commit 275cf46
Author: Marcus Moore <[email protected]>
Date:   Thu Sep 12 13:16:37 2024 -0700

    Add tests for delete asset endpoint

commit 5c2660b
Author: Marcus Moore <[email protected]>
Date:   Thu Sep 12 13:02:32 2024 -0700

    Introduce interface

commit c7ae9d9
Author: Marcus Moore <[email protected]>
Date:   Thu Sep 12 12:58:47 2024 -0700

    Add tests for delete accessory endpoint

commit 9e5f6d6
Author: Brady Wetherington <[email protected]>
Date:   Wed Sep 11 15:45:01 2024 +0100

    Improve multi-asset create when using numeric prefixes to asset_tags

Signed-off-by: snipe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants