Commit e0e4b134 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(supann) Fix entite type field to match the supannAccount one

The field supannTypeEntite was broken since changes for
 supannTypeEntiteAffectation.
This fixes it.

issue #5801
Showing with 3 additions and 9 deletions
+3 -9
<?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);
}
......
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