本文整理匯總了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());
}
}