TimePeriods: do not enforce template

This commit is contained in:
Thomas Gelf 2017-07-05 07:03:52 +02:00
parent ed6a77af5d
commit 6aaae3c445
1 changed files with 5 additions and 1 deletions

View File

@ -1075,7 +1075,11 @@ abstract class DirectorObjectForm extends QuickForm
*/
protected function addImportsElement($required = null)
{
$required = $required !== null ? $required : !$this->isTemplate();
if (in_array($this->getObjectShortClassName(), ['TimePeriod'])) {
$required = false;
} else {
$required = $required !== null ? $required : !$this->isTemplate();
}
$enum = $this->enumAllowedTemplates();
if (empty($enum)) {
if ($required) {