new: add `duplicate` button for articles

This commit is contained in:
Valentin Lab
2025-12-14 21:01:17 +01:00
parent fefd6209ac
commit 66c035ef9a
13 changed files with 92 additions and 9 deletions

View File

@@ -94,6 +94,18 @@
@stack('scripts')
@stack('js')
<script>
document.addEventListener('DOMContentLoaded', function() {
document.querySelectorAll('.form-buttons .duplicate').forEach(function(btn) {
btn.addEventListener('click', function() {
var url = this.dataset.url || this.getAttribute('data-url');
if (url) {
window.location = url;
}
});
});
});
</script>
</body>