Skip to content

Commit

Permalink
fix(forms): wrong cases submit disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
azarz committed Jan 13, 2025
1 parent 3d5d27e commit 1d3ce3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/js/compare-landmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ class compareLandmark {
this.dom.title.value = this.data.title;
this.dom.description.value = this.data.description;
Array.from(this.dom.radioColors).filter((el) => el.value == data.color)[0].checked = true;
this.dom.submitButton.classList.remove("disabled");
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/js/directions/directions.js
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ class Directions {
});
self.dom.buttonCompute.classList.remove("disabled");
} else if (self.previewPoints.length === 1) {
if (self.dom.inputArrival.value == "Ma position" || self.dom.inputDeparture.value == "Ma position") {
if (self.dom.inputArrival.value && self.dom.inputDeparture.value) {
self.dom.buttonCompute.classList.remove("disabled");
}
}
Expand Down

0 comments on commit 1d3ce3c

Please sign in to comment.