Verified Commit 8e306843 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(supann) Fix handling of cursus annee attribute empty year

SupAnn specifies it’s allowed to put a letter without year in
 supannEtuCursusAnnee, and FD was not allowing it due to errors in
 masks.

issue #6034
Showing with 2 additions and 1 deletion
+2 -1
......@@ -28,7 +28,7 @@ class SupannCursusAnneeAttribute extends SupannPrefixedSelectAttribute
new SelectAttribute('', '', $ldapName.'_prefix', $required),
new SelectAttribute('', '', $ldapName.'_content', FALSE)
];
CompositeAttribute::__construct($description, $ldapName, $attributes, '/^{SUPANN}(.)(\\d+)$/', '{SUPANN}%s%d', $acl, $label);
CompositeAttribute::__construct($description, $ldapName, $attributes, '/^{SUPANN}(.)(\\d*)$/', '{SUPANN}%s%s', $acl, $label);
$this->setLinearRendering(TRUE);
$this->attributes[0]->setChoices(
......@@ -51,6 +51,7 @@ class SupannCursusAnneeAttribute extends SupannPrefixedSelectAttribute
$this->supannUpdateSelect();
$this->setRequired($required);
}
protected function supannUpdateSelect ()
{
$prefix = $this->attributes[0]->getValue();
......
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