BxGroupsFormEntry.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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[$CNF['FIELD_ALLOW_VIEW_TO']])) {
  22. bx_import('Privacy', $this->MODULE);
  23. $this->aInputs[$CNF['FIELD_ALLOW_VIEW_TO']] = BxGroupsPrivacy::getGroupChooser($CNF['OBJECT_PRIVACY_VIEW']);
  24. $this->aInputs[$CNF['FIELD_ALLOW_VIEW_TO']]['db']['pass'] = 'Xss';
  25. }
  26. }
  27. protected function genCustomInputInitialMembers ($aInput)
  28. {
  29. $aInput['ajax_get_suggestions'] = BX_DOL_URL_ROOT . "modules/?r=groups/ajax_get_initial_members";
  30. return $this->genCustomInputUsernamesSuggestions($aInput);
  31. }
  32. }
  33. /** @} */