BxGroupsFormEntry.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
  4. * CC-BY License - http://creativecommons.org/licenses/by/3.0/
  5. *
  6. * @defgroup Groups Groups
  7. * @ingroup TridentModules
  8. *
  9. * @{
  10. */
  11. /**
  12. * Create/Edit Group Form.
  13. */
  14. class BxGroupsFormEntry extends BxBaseModProfileFormEntry
  15. {
  16. public function __construct($aInfo, $oTemplate = false)
  17. {
  18. $this->MODULE = 'bx_groups';
  19. parent::__construct($aInfo, $oTemplate);
  20. $CNF = &$this->_oModule->_oConfig->CNF;
  21. if (isset($this->aInputs['initial_members']) && !isset($this->aInputs['initial_members']['value'])) {
  22. $this->aInputs['initial_members']['value'] = array(bx_get_logged_profile_id());
  23. }
  24. }
  25. protected function genCustomInputInitialMembers ($aInput)
  26. {
  27. $aInput['ajax_get_suggestions'] = BX_DOL_URL_ROOT . "modules/?r=" . $this->_oModule->_oConfig->getUri() . "/ajax_get_initial_members";
  28. return $this->genCustomInputUsernamesSuggestions($aInput);
  29. }
  30. }
  31. /** @} */