Skip to content

Commit

Permalink
feat(glpiselectfield): access to appliances from appliances plugin
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Jan 29, 2020
1 parent 34597ed commit 3f03e52
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inc/fields/glpiselectfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ public function getDesignSpecializationField() {
Entity::class => Entity::getTypeName(2),
Profile::class => Profile::getTypeName(2)],
];
$plugin = new Plugin();
if ($plugin->isActivated('appliance')) {
$optgroup[__("Assets")][PluginAppliancesAppliance::class] = PluginAppliancesAppliance::getTypeName(2);
}
array_unshift($optgroup, '---');
$field = Dropdown::showFromArray('glpi_objects', $optgroup, [
'value' => $this->question->fields['values'],
Expand Down

0 comments on commit 3f03e52

Please sign in to comment.