Skip to content

Conversation

@jefft
Copy link
Contributor

@jefft jefft commented Oct 30, 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!".

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