BxPersonsFormEntry.php 790 B

123456789101112131415161718192021222324252627282930
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup Persons Persons
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. /**
  12. * Create/Edit Person Form.
  13. */
  14. class BxPersonsFormEntry extends BxBaseModProfileFormEntry
  15. {
  16. public function __construct($aInfo, $oTemplate = false)
  17. {
  18. $this->MODULE = 'bx_persons';
  19. parent::__construct($aInfo, $oTemplate);
  20. if (isset($this->aInputs['birthday'])) {
  21. if (!isset($this->aInputs['birthday']['attrs']) || !is_array($this->aInputs['birthday']['attrs']))
  22. $this->aInputs['birthday']['attrs'] = [];
  23. $this->aInputs['birthday']['attrs']['max'] = date('Y');
  24. }
  25. }
  26. }
  27. /** @} */