public function __construct($params = array()) { parent::__construct(); OW::getDocument()->addScript(OW::getPluginManager()->getPlugin('mailbox')->getStaticJsUrl() . 'conversation_list.js', 'text/javascript', 3008); $defaultAvatarUrl = BOL_AvatarService::getInstance()->getDefaultAvatarUrl(); $this->assign('defaultAvatarUrl', $defaultAvatarUrl); $js = "var conversationListModel = new MAILBOX_ConversationListModel;\n"; if (!empty($params['conversationId'])) { $js .= "conversationListModel.set('activeConvId', {$params['conversationId']});"; $js .= "conversationListModel.set('pageConvId', {$params['conversationId']});"; } $js .= "OW.Mailbox.conversationListController = new MAILBOX_ConversationListView({model: conversationListModel});"; OW::getDocument()->addOnloadScript($js, 3009); $conversationSearchForm = new Form('conversationSearchForm'); $search = new MAILBOX_CLASS_SearchField('conversation_search'); $search->setHasInvitation(true); $search->setInvitation(OW::getLanguage()->text('mailbox', 'label_invitation_conversation_search')); OW::getLanguage()->addKeyForJs('mailbox', 'label_invitation_conversation_search'); $conversationSearchForm->addElement($search); $this->addForm($conversationSearchForm); $modeList = MAILBOX_BOL_ConversationService::getInstance()->getActiveModeList(); $singleMode = count($modeList) == 1; $this->assign('singleMode', $singleMode); }
public function getUserSettingsForm() { $form = new Form('im_user_settings_form'); $findContact = new MAILBOX_CLASS_SearchField('im_find_contact'); $findContact->setHasInvitation(true); $findContact->setInvitation(OW::getLanguage()->text('mailbox', 'find_contact')); $form->addElement($findContact); $userIdHidden = new HiddenField('user_id'); $form->addElement($userIdHidden); return $form; }