Commit 40d28b1a authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes #3159 OPSI netboot ids must be shown

parent 8b1c823d
......@@ -20,13 +20,10 @@
class SubmittingOPSIProductAttribute extends SelectAttribute
{
private $func;
function __construct ($label, $description, $ldapName, $required = FALSE, $func, $acl = "")
{
$this->func = $func;
parent::__construct($label, $description, $ldapName, $required, array(), "", NULL, $acl);
$this->setSubmitForm(TRUE);
$this->setSubmitForm($func);
}
function check()
......@@ -37,16 +34,6 @@ class SubmittingOPSIProductAttribute extends SelectAttribute
{
return $value;
}
function setValue($value)
{
$v = $this->getValue();
parent::setValue($value);
if (is_object($this->plugin) && ($v != $this->getValue())) {
$func = $this->func;
$this->plugin->$func();
}
}
}
class ProductPropertyAttribute extends CompositeAttribute
......
......@@ -208,7 +208,7 @@ class opsiProfile extends simplePlugin
$choices_labels = array();
foreach ($this->products[$this->fdOpsiServerDN]['netboots'] as $netboot) {
$choices_values[] = $netboot['id'];
$choices_labels[] = $netboot['name'];
$choices_labels[] = sprintf(_('%s (%s)'), $netboot['id'], $netboot['name']);
}
$this->attributesAccess['fdOpsiNetbootProduct']->setChoices($choices_values, $choices_labels);
$this->attributesAccess['fdOpsiSoftwareList']->attribute->setChoices(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment