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

[CP 3.13] Fixes #38223 - host_edit when no inherit button creates error #10454

Merged
merged 1 commit into from
Feb 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions app/assets/javascripts/host_edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ $(document).ready(function() {
});
$(document).on('ContentLoad', function() {
onHostEditLoad();
document
.querySelector('[name=is_overridden_btn]')
.addEventListener('click', function(event) {
const overrideButtons = document.querySelectorAll('[name=is_overridden_btn]');
overrideButtons.forEach(button =>
button.addEventListener('click', function(event) {
const item = event.target;
var formControl = $(item)
.closest('.input-group')
Expand All @@ -26,7 +26,8 @@ $(document).on('ContentLoad', function() {
.trigger('change');
}
}
});
})
);
if (window.location.href.includes('hostgroup')) {
document.querySelector('form').addEventListener('submit', function() {
// making sure inherited compute resource is included in the form
Expand Down
Loading