Commit 56c5d946 authored by Côme Chilliet's avatar Côme Chilliet

Merge branch '6083-improve-objectsattribute' into '1.4-dev'

Resolve "Improve ObjectsAttribute"

See merge request fusiondirectory/fd!764
parents 839e26b5 5ce8aaf7
......@@ -63,6 +63,13 @@ class GenericDialogAttribute extends DialogAttribute
unset($this->value[$row]);
}
function setValue ($value)
{
parent::setValue($value);
$this->displays = [];
$this->getDisplayValues();
}
protected function sortValues ()
{
asort($this->value);
......@@ -113,7 +120,7 @@ class GenericDialogAttribute extends DialogAttribute
if ($this->isTemplate() && ($attrs === NULL)) {
$this->displays[$i] = $this->value[$i];
} elseif (!isset($attrs[$this->display_attr])) {
unset($this->value[$i]);
$this->removeValue($i);
} else {
if ($this->display_attr == 'dn') {
$this->displays[$i] = $attrs['dn'];
......
......@@ -175,6 +175,12 @@ class ObjectsAttribute extends GenericDialogAttribute
return $display;
}
function setValue ($value)
{
$this->types = [];
parent::setValue($value);
}
protected function removeValue ($row)
{
parent::removeValue($row);
......
Markdown is supported
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