protected function renderGiveLink($giverPersonObjid, $cardObjid, $data)
 {
     $ds = $this->getDataSource();
     $appLocale = $this->parentUIObject->getAppLocale();
     $fParam = new OpfFormParam();
     $fParam->appendAllCurrentParameters(0, 1);
     $parentCanvas = $this->getParentCanvas();
     $fParam->appendKeyValueArray($parentCanvas->getWebParametersToMe());
     $fParam->appendKeyValuePair(Action::PARAM_PERSON_OBJID, $giverPersonObjid);
     $fParam->appendKeyValuePair(Action::PARAM_CARD_OBJID, $cardObjid);
     $fParam->appendKeyValuePair(Action::PARAM_PERSON_NAME, implode(' ', $ds->getUserFirstLastName()));
     $fParam->appendActionClass(Action::GIVE_TO_PERSON_ACTION_CLASS);
     $buttonLabel = $appLocale[Localization::SEND_TO_FRIEND];
     $friendUidList = $ds->getFriendList();
     $dialog = new DialogGiveToFriendSelect($this, $appLocale, self::DIALOG_PREFIX_GIVE . $cardObjid, $buttonLabel, self::FORM_PREFIX_GIVE . $cardObjid, $ds->getCurrentPageName(), Action::PARAM_RECEIVING_PERSON_UID, Action::PARAM_RECEIVING_PERSON_UID, $fParam->getKeyValueArray());
     return $dialog->render();
 }
Example #2
0
 protected function forwardHiddenPleaseWaitDiv()
 {
     if (!isset($this->pleaseWaitDiv)) {
         return '';
     }
     $fParam = new OpfFormParam();
     $fParam->appendKeyValuePair($this->responseDivId, $this->pleaseWaitDiv);
     return $fParam->toString();
 }
Example #3
0
 private function renderForm()
 {
     $formHeader = $this->getFormHeader();
     $formHeader['id'] = $this->formName;
     $formParam = $this->getFormParameters();
     $formContents = $this->getFormContents();
     $fParam = new OpfFormParam();
     $fParam->appendAllCurrentParameters();
     $fParam->appendKeyValueArray($formParam);
     if ($this->asyncDialogButtton == 1) {
         $fParam->appendKeyValuePair(OpfConfig::PARAM_MODAL_DIALOG_CALLBACK, 1);
     }
     // if
     $str = '<form';
     if (!empty($formHeader)) {
         foreach ($formHeader as $key => $value) {
             $str .= ' ' . $key . '="' . addslashes($value) . '" ';
         }
         // foreach
     }
     // if
     $str .= '>' . $fParam->toString() . $formContents . '</form>';
     return $str;
 }