public function showPersonalData() { $this->psc_obj = new ilPaymentShoppingCart($this->user_obj); if (!count($items = $this->psc_obj->getEntries($this->pm_id))) { $this->tpl->setVariable('HEADER', $this->lng->txt('pay_bmf_your_order')); $this->tpl->touchBlock('stop_floating'); ilUtil::sendInfo($this->lng->txt('pay_shopping_cart_empty')); } else { $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment'); $oForm = new ilPropertyFormGUI(); $oForm->setFormAction($this->ctrl->getFormAction($this, 'getPersonalData')); $oForm->setTitle($this->lng->txt('pay_bmf_personal_data')); $oFirstname = new ilNonEditableValueGUI($this->lng->txt('firstname')); $oFirstname->setValue($this->user_obj->getFirstname()); $oForm->addItem($oFirstname); $oLastname = new ilNonEditableValueGUI($this->lng->txt('lastname')); $oLastname->setValue($this->user_obj->getLastname()); $oForm->addItem($oLastname); $oStreet = new ilTextInputGUI($this->lng->txt('street'), 'street'); $oStreet->setValue($this->error != '' && isset($_POST['street']) ? ilUtil::prepareFormOutput($_POST['street'], true) : ilUtil::prepareFormOutput($_SESSION[$this->session_var]['personal_data']['street'], true)); $oForm->addItem($oStreet); $oHouseNumber = new ilTextInputGUI($this->lng->txt('pay_bmf_house_number'), 'house_number'); $oHouseNumber->setValue($this->error != '' && isset($_POST['house_number']) ? ilUtil::prepareFormOutput($_POST['house_number'], true) : ilUtil::prepareFormOutput($_SESSION[$this->session_var]['personal_data']['house_number'], true)); $oForm->addItem($oHouseNumber); $oPoBox = new ilTextInputGUI($this->lng->txt('pay_bmf_or') . ' ' . $this->lng->txt('pay_bmf_po_box'), 'po_box'); $oPoBox->setValue($this->error != '' && isset($_POST['po_box']) ? ilUtil::prepareFormOutput($_POST['po_box'], true) : ilUtil::prepareFormOutput($_SESSION[$this->session_var]['personal_data']['po_box'], true)); $oForm->addItem($oPoBox); $oZipCode = new ilTextInputGUI($this->lng->txt('zipcode'), 'zipcode'); if ($this->user_obj->getZipCode() && !isset($_POST['zipcode'])) { $oZipCode->setValue($this->user_obj->getZipCode()); } else { $oZipCode->setValue($this->error != '' && isset($_POST['zipcode']) ? ilUtil::prepareFormOutput($_POST['zipcode'], true) : ilUtil::prepareFormOutput($_SESSION[$this->session_var]['personal_data']['zipcode'], true)); } $oForm->addItem($oZipCode); $oCity = new ilTextInputGUI($this->lng->txt('city'), 'city'); if ($this->user_obj->getCity() && !isset($_POST['city'])) { $oCity->setValue($this->user_obj->getCity()); } else { $oCity->setValue($this->error != '' && isset($_POST['city']) ? ilUtil::prepareFormOutput($_POST['city'], true) : ilUtil::prepareFormOutput($_SESSION[$this->session_var]['personal_data']['city'], true)); } $oForm->addItem($oCity); $oCountry = new ilSelectInputGUI($this->lng->txt('country'), 'country'); $oCountry->setOptions($this->__getCountries()); if ($this->user_obj->getSelectedCountry() && !isset($_POST['country'])) { $oCountry->setValue($this->user_obj->getSelectedCountry()); } else { $oCountry->setValue($this->error != '' && isset($_POST['country']) ? $_POST['country'] : $_SESSION[$this->session_var]['personal_data']['country']); } $oForm->addItem($oCountry); $oEmail = new ilNonEditableValueGUI($this->lng->txt('email')); $oEmail->setValue($this->user_obj->getEmail()); $oForm->addItem($oEmail); $oForm->addcommandButton('getPersonalData', ucfirst($this->lng->txt('next'))); $this->tpl->setVariable('FORM', $oForm->getHTML()); } }