Compare commits
No commits in common. "3b97d4a1b6ed0664e6ebbf4b5f647545c4bbb505" and "6c2795d4faed723a58ef3961a7642d0ca9520f06" have entirely different histories.
3b97d4a1b6
...
6c2795d4fa
2 changed files with 1 additions and 11 deletions
|
|
@ -129,8 +129,6 @@ const updateRemoveButtonVisibility = (container) => {
|
|||
})
|
||||
}
|
||||
|
||||
window.updateHiddenInput = updateHiddenInput
|
||||
|
||||
document.addEventListener('DOMContentLoaded', initDynamicArrayWidget)
|
||||
document.addEventListener('htmx:afterSwap', initDynamicArrayWidget)
|
||||
document.addEventListener('htmx:afterSettle', initDynamicArrayWidget)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
const initializeFqdnGeneration = () => {
|
||||
const nameField = document.querySelector('input#id_name');
|
||||
const nameField = document.querySelector('input[name="name"]');
|
||||
const fqdnField = document.querySelector('label[for="id_spec.parameters.service.fqdn"] + div input.array-item-input');
|
||||
|
||||
if (nameField && fqdnField) {
|
||||
|
|
@ -17,10 +17,6 @@ const initializeFqdnGeneration = () => {
|
|||
newNameField.addEventListener('input', function() {
|
||||
if (!newFqdnField.dataset.manuallyEdited) {
|
||||
newFqdnField.value = generateFqdn(this.value);
|
||||
const container = newFqdnField.closest('.dynamic-array-widget');
|
||||
if (container && window.updateHiddenInput) {
|
||||
window.updateHiddenInput(container);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -30,10 +26,6 @@ const initializeFqdnGeneration = () => {
|
|||
|
||||
if (newNameField.value && !newFqdnField.value) {
|
||||
newFqdnField.value = generateFqdn(newNameField.value);
|
||||
const container = newFqdnField.closest('.dynamic-array-widget');
|
||||
if (container && window.updateHiddenInput) {
|
||||
window.updateHiddenInput(container);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue