Skip to content

Commit

Permalink
Add close button in taxonomy change popup form (#4165)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimasciput committed Aug 19, 2024
1 parent d68e3ef commit a2aaab5
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions bims/templates/admin/taxonomy_changeform.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,26 @@
}, 1000);
});
}

// Add a close button
const closeButton = document.createElement('a');
closeButton.textContent = 'Close';
closeButton.className = 'grp-button grp-default';
closeButton.style.marginLeft = '10px';

closeButton.style.backgroundColor = '#6e6e6e';
closeButton.style.backgroundImage = 'none';
closeButton.style.color = '#fff';
closeButton.style.borderColor = '#515151';

closeButton.addEventListener('click', function() {
window.close();
});

// Insert the close button into the button container
if (saveButton) {
saveButton.insertAdjacentElement('afterend', closeButton);
}
}
});

Expand Down

0 comments on commit a2aaab5

Please sign in to comment.