Skip to content
Draft
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [UNRELEASED]

- Fix Composer autoloader collisions with other plugins
- Make the plugin compatible with the Content Security Policy

## [3.0.3] - 2026-08-11

Expand Down
1 change: 1 addition & 0 deletions setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ function plugin_version_genericobject()
'author' => "<a href=\"mailto:[email protected]\">Teclib'</a> & siprossii",
'homepage' => 'https://github.com/pluginsGLPI/genericobject',
'license' => 'GPLv2+',
'csp_compliant' => true,
'requirements' => [
'glpi' => [
'min' => PLUGIN_GENERICOBJECT_MIN_GLPI,
Expand Down
16 changes: 14 additions & 2 deletions templates/migration_status.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
data-counter-target="{{ modal_id }}-counter"
data-warning-target="{{ modal_id }}-length-warning"
data-result-target="{{ modal_id }}-result"
oninput="glpiGenericobjectUpdateCounter(this)"
data-genericobject-update-counter
required
>
<div class="d-flex justify-content-between align-items-center mt-1">
Expand Down Expand Up @@ -331,7 +331,7 @@
<div class="bg-light border border-secondary rounded p-3 position-relative mt-3">
<div class="d-flex align-items-center justify-content-between">
<code id="codeBlock" class="mb-0 flex-grow-1 bg-transparent">php bin/console migration:genericobject_plugin_to_core</code>
<button class="btn btn-sm btn-outline-secondary ms-3 copy-btn" onclick="copyCode()" title="{{ __('Copy command', 'genericobject') }}">
<button class="btn btn-sm btn-outline-secondary ms-3 copy-btn" data-genericobject-copy-code title="{{ __('Copy command', 'genericobject') }}">
<i class="ti ti-clipboard"></i>
{{ __('Copy') }}
</button>
Expand Down Expand Up @@ -505,4 +505,16 @@
copyBtn.classList.add('btn-outline-secondary');
}, 2000);
}

document.addEventListener('input', (e) => {
if (e.target.matches('[data-genericobject-update-counter]')) {
glpiGenericobjectUpdateCounter(e.target);
}
});

document.addEventListener('click', (e) => {
if (e.target.closest('[data-genericobject-copy-code]') !== null) {
copyCode();
}
});
</script>
Loading