Skip to content

Commit

Permalink
#5063 - don't always overwrite census place
Browse files Browse the repository at this point in the history
  • Loading branch information
fisharebest committed Nov 30, 2024
1 parent 0d7b2f7 commit 804510b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ use Fisharebest\Webtrees\I18N;
const form = select.closest('form');

form.querySelector('[id$=CENS-DATE]').value = option.dataset.wtDate;
$(form.querySelector('[id$=CENS-PLAC]')).typeahead('val', option.dataset.wtPlace);

console.log(form.querySelector('[id$=CENS-PLAC]').value);
console.log(option.dataset.wtPlace);
if (!form.querySelector('[id$=CENS-PLAC]').value.includes(option.dataset.wtPlace)) {
$(form.querySelector('[id$=CENS-PLAC]')).typeahead('val', option.dataset.wtPlace);
}
});
});
</script>

0 comments on commit 804510b

Please sign in to comment.