Skip to content

Conversation

@jefft
Copy link
Contributor

@jefft jefft commented Sep 17, 2025

Fixes #1305.

This PR builds upon / incorporates #1312. I don't know how to make Github show only f24004d, which is the only distinct commit not from #1312.

Jethro needs to detect duplicates in some fields on the general configuration page, namely:

  • Person Status Options
  • Age Bracket
  • Group Membership Status Options
image

This PR prevents submission of duplicates:

Screencast_20250917_220124.webm

In terms of code, I've introduced a required-noduplicates class, which may be applied to the tbody of a set of labels:

<tbody class="required-noduplicates" data-noduplicates-fieldkey="age_bracket">

This follows the pattern of the existing required-checkbox-col class.

Note: duplicated blanks are caught like any other:

image

Users might do this under the mistaken impression that deleting a label will delete the option (it won't - there's a checkbox for that). Perhaps, as a further PR, we could have a required-nonblank class which prints a friendly "Are you trying to delete this field? Try the 'Delete' checkbox!".

@jefft jefft force-pushed the push-1305-errorhandling-catch-duplicate-labels-in-general-config branch from cb6f72c to 0b27ec4 Compare September 26, 2025 05:57
@jefft jefft force-pushed the push-1305-errorhandling-catch-duplicate-labels-in-general-config branch 2 times, most recently from fc960b8 to b63dfa7 Compare October 14, 2025 06:09
@jefft jefft force-pushed the push-1305-errorhandling-catch-duplicate-labels-in-general-config branch from b63dfa7 to 6b872b1 Compare October 17, 2025 02:59
@jefft jefft closed this by deleting the head repository Oct 27, 2025
@jefft
Copy link
Contributor Author

jefft commented Oct 30, 2025

Replaced by #1350

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.

Jethro breaks if Age Bracket or Person Status labels are blank or duplicate

1 participant