Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added multiple destinations #14

Merged
merged 2 commits into from
Jul 30, 2024
Merged

added multiple destinations #14

merged 2 commits into from
Jul 30, 2024

Conversation

brunoLombardo
Copy link
Collaborator

No description provided.

Comment on lines 13 to 17
for (let i = 0; i < inputs.length; i++) {
inputs[i].setAttribute('name', inputs[i].getAttribute('name').replace('[template]', `[destinations_attributes][${id}]`))
inputs[i].setAttribute('id', inputs[i].getAttribute('id').replace('[template]', `destinations_attributes_${id}`))
inputs[i].value = ''
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's change it to

Suggested change
for (let i = 0; i < inputs.length; i++) {
inputs[i].setAttribute('name', inputs[i].getAttribute('name').replace('[template]', `[destinations_attributes][${id}]`))
inputs[i].setAttribute('id', inputs[i].getAttribute('id').replace('[template]', `destinations_attributes_${id}`))
inputs[i].value = ''
}
inputs.forEach(input => {
input.setAttribute('name', input.getAttribute('name').replace('[template]', `[destinations_attributes][${id}]`))
input.setAttribute('id', input.getAttribute('id').replace('[template]', `destinations_attributes_${id}`))
input.value = ''
});

@JorgeLeites JorgeLeites merged commit b197d66 into main Jul 30, 2024
1 check passed
@JorgeLeites JorgeLeites deleted the multiple_destinations branch July 30, 2024 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants