Commit 73557156 authored by Côme Chilliet's avatar Côme Chilliet

Merge branch '5801-add-other-source-capabilities-for-supanntypeentiteaffectation' into '1.3-dev'

Resolve "add other source capabilities for supannTypeEntiteAffectation"

See merge request fusiondirectory/fd-plugins!238
parents 63d4922c e0e4b134
<?php <?php
/* /*
This code is part of FusionDirectory (http://www.fusiondirectory.org/) This code is part of FusionDirectory (http://www.fusiondirectory.org/)
Copyright (C) 2012-2016 FusionDirectory Copyright (C) 2012-2018 FusionDirectory
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -81,9 +81,9 @@ class entite extends simplePlugin ...@@ -81,9 +81,9 @@ class entite extends simplePlugin
'supann' => array( 'supann' => array(
'name' => _('SUPANN information'), 'name' => _('SUPANN information'),
'attrs' => array( 'attrs' => array(
new SelectAttribute( new SupannPrefixedSelectAttribute(
_('Entity type'), _('The best SUPANN type that fits this entity'), _('Entity type'), _('The best SUPANN type that fits this entity'),
'supannTypeEntite', FALSE 'supannTypeEntite', FALSE, 'entite'
), ),
new StringAttribute( new StringAttribute(
_('Entity code'), _('The SUPANN code of this entity'), _('Entity code'), _('The SUPANN code of this entity'),
...@@ -131,12 +131,6 @@ class entite extends simplePlugin ...@@ -131,12 +131,6 @@ class entite extends simplePlugin
} }
$this->attributesAccess['supannCodeEntiteParent']->setChoices($entity_codes, $entity_labels); $this->attributesAccess['supannCodeEntiteParent']->setChoices($entity_codes, $entity_labels);
/* Generate list of entite */
list ($entity_codes, $entity_labels) = supann::get_choices_for('entite');
array_unshift($entity_codes, '');
array_unshift($entity_labels, '');
$this->attributesAccess['supannTypeEntite']->setChoices($entity_codes, $entity_labels);
$this->attributesAccess['ou']->setUnique(TRUE); $this->attributesAccess['ou']->setUnique(TRUE);
$this->attributesAccess['supannCodeEntite']->setUnique(TRUE); $this->attributesAccess['supannCodeEntite']->setUnique(TRUE);
} }
......
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