本文整理汇总了PHP中ilPropertyFormGUI::addcommandButton方法的典型用法代码示例。如果您正苦于以下问题:PHP ilPropertyFormGUI::addcommandButton方法的具体用法?PHP ilPropertyFormGUI::addcommandButton怎么用?PHP ilPropertyFormGUI::addcommandButton使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilPropertyFormGUI
的用法示例。
在下文中一共展示了ilPropertyFormGUI::addcommandButton方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showPersonalData
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());
}
}