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
/*
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
it under the terms of the GNU General Public License as published by
......@@ -81,9 +81,9 @@ class entite extends simplePlugin
'supann' => array(
'name' => _('SUPANN information'),
'attrs' => array(
new SelectAttribute(
new SupannPrefixedSelectAttribute(
_('Entity type'), _('The best SUPANN type that fits this entity'),
'supannTypeEntite', FALSE
'supannTypeEntite', FALSE, 'entite'
),
new StringAttribute(
_('Entity code'), _('The SUPANN code of this entity'),
......@@ -131,12 +131,6 @@ class entite extends simplePlugin
}
$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['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