Skip to content

Commit

Permalink
Fix add button enable/disable logic for enumerator questions
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffpw-goog committed Apr 29, 2024
1 parent 3cd3631 commit 461539e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions server/app/assets/javascripts/enumerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ function removeExistingEnumeratorField(event: Event) {
enumeratorFieldDiv.querySelector('input'),
)
enumeratorInput.classList.add('hidden')
enumeratorInput.removeAttribute('data-entity-input')

// Create a copy of the hidden deleted entity template. Set the value to this
// button's ID, and set disabled to false so the data is submitted with the form.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ private static DivTag enumeratorField(
localizedEntityType)
+ indexString)
.addReferenceClass(ReferenceClasses.ENTITY_NAME_INPUT);
if (!isDisabled) {
entityNameInputField.setAttribute("data-entity-input");
}
if (elementId.isPresent()) {
entityNameInputField.setId(elementId.get());
}
Expand Down

0 comments on commit 461539e

Please sign in to comment.