Skip to content

Commit 09fbdcd

Browse files
authored
Get search on dynamic groups working (temp hack) (#90)
* Get search on dynamic groups working (temp hack) * adapt changelog * fix CS * fix
1 parent 96ee484 commit 09fbdcd

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## [UNRELEASED]
9+
10+
### Fixed
11+
12+
- Fix dynamic group submit bouton
13+
814
## [1.1.1] - 2025-11-13
915

1016
### Fixed

inc/computergroupdynamic.class.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
* -------------------------------------------------------------------------
2929
*/
3030

31+
use function Safe\ob_start;
32+
use function Safe\ob_get_clean;
3133
use function Safe\preg_match;
3234
use function Safe\preg_replace;
3335
use function Safe\preg_split;
@@ -228,7 +230,12 @@ private static function showForItem(PluginDatabaseinventoryComputerGroup $comput
228230
$p['actionname'] = 'save';
229231
$p['actionvalue'] = _sx('button', 'Save');
230232
$p['showbookmark'] = false;
233+
234+
//hack because submit button is not a submit... See https://github.com/glpi-project/glpi/pull/20731
235+
ob_start();
231236
Search::showGenericSearch(Computer::getType(), $p);
237+
$generic_search = ob_get_clean();
238+
echo preg_replace('/type="button" name="save"/', 'type="submit" name="save"', $generic_search);
232239

233240
//display result from search
234241
if (!$firsttime) {

0 commit comments

Comments
 (0)