Add band and venue follows with concert diary
This commit is contained in:
@@ -170,6 +170,13 @@
|
||||
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="band-names">Bands / Line-up <small>(eine Band pro Zeile)</small><br>
|
||||
<textarea id="band-names" name="band_names" rows="3" maxlength="4000" placeholder="dArtagnan Supportband"></textarea>
|
||||
</label>
|
||||
<small>Der Veranstaltungstitel bleibt frei. Diese Namen werden einzeln für „Band folgen“ verwendet.</small>
|
||||
</p>
|
||||
|
||||
<!-- ================================================= -->
|
||||
<!-- Veranstaltungsort -->
|
||||
<!-- ================================================= -->
|
||||
@@ -895,6 +902,7 @@ flyerInput.addEventListener(
|
||||
// Originaldateien verarbeiten.
|
||||
const concertForm = flyerInput.form;
|
||||
const artistInput = document.getElementById("artist");
|
||||
const bandNamesInput = document.getElementById("band-names");
|
||||
const startDatetimeInput = document.getElementById("start-datetime");
|
||||
const duplicateWarning = document.getElementById("duplicate-warning");
|
||||
const duplicateConfirmed = document.getElementById("duplicate-confirmed");
|
||||
@@ -934,7 +942,7 @@ async function checkForDuplicates(showWarning = true) {
|
||||
if (duplicateRequestController) duplicateRequestController.abort();
|
||||
duplicateRequestController = new AbortController();
|
||||
try {
|
||||
const params = new URLSearchParams({artist, start_date: startDate});
|
||||
const params = new URLSearchParams({artist, start_date: startDate, band_names: bandNamesInput.value});
|
||||
const response = await fetch(`/api/concerts/duplicates?${params}`, {
|
||||
signal: duplicateRequestController.signal
|
||||
});
|
||||
@@ -948,7 +956,7 @@ async function checkForDuplicates(showWarning = true) {
|
||||
}
|
||||
}
|
||||
|
||||
[artistInput, startDatetimeInput].forEach(input => input.addEventListener("input", () => {
|
||||
[artistInput, bandNamesInput, startDatetimeInput].forEach(input => input.addEventListener("input", () => {
|
||||
duplicateConfirmed.value = "false";
|
||||
concertForm.dataset.readyToSubmit = "false";
|
||||
clearTimeout(duplicateTimeout);
|
||||
|
||||
Reference in New Issue
Block a user