本文整理汇总了PHP中Form::display方法的典型用法代码示例。如果您正苦于以下问题:PHP Form::display方法的具体用法?PHP Form::display怎么用?PHP Form::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Form
的用法示例。
在下文中一共展示了Form::display方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAdminInterface
public function getAdminInterface()
{
$st = "select ecomm_product.id as product_id, ecomm_product.name as product_name,\n\t\t\t\tecomm_product.supplier as supplier_id, ecomm_supplier.name as supplier_name, ecomm_product.price as product_price\n\t\t\t\tfrom ecomm_product left join ecomm_supplier on ecomm_product.supplier = ecomm_supplier.id\n\t\t\t\torder by ecomm_supplier.name,ecomm_product.name";
$products = Database::singleton()->query_fetch_all($st);
$formPath = "/admin/EComm§ion=Plugins&page=ChangeProductPrice";
$form = new Form('change_product_prices', 'post', $formPath);
if ($form->validate() && isset($_REQUEST['submit'])) {
foreach ($products as $product) {
$ECommProduct = new Product($product['product_id']);
$ECommProduct->setPrice($_REQUEST['product_' . $product['product_id']]);
$ECommProduct->save();
}
return "Your products' prices have been changed successfully<br/><a href='{$formPath}'>Go back</a>";
}
$oldSupplier = 0;
$currentSupplier = 0;
$defaultValue = array();
foreach ($products as $product) {
$currentSupplier = $product['supplier_id'];
if ($oldSupplier != $currentSupplier) {
$form->addElement('html', '<br/><br/><hr/><h3>Supplier: ' . $product['supplier_name'] . '</h3>');
}
$form->addElement('text', 'product_' . $product['product_id'], $product['product_name']);
$defaultValue['product_' . $product['product_id']] = $product['product_price'];
$oldSupplier = $product['supplier_id'];
}
$form->addElement('submit', 'submit', 'Submit');
$form->setDefaults($defaultValue);
return $form->display();
}
示例2: display
/**
* Display the form.
*/
function display()
{
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign('paperId', $this->paperId);
$templateMgr->assign('submitStep', $this->step);
switch ($this->step) {
case 3:
$helpTopicId = 'submission.indexingMetadata';
break;
case 4:
$helpTopicId = 'submission.supplementaryFiles';
break;
default:
$helpTopicId = 'submission.index';
}
$templateMgr->assign('helpTopicId', $helpTopicId);
$schedConf =& Request::getSchedConf();
$settingsDao =& DAORegistry::getDAO('SchedConfSettingsDAO');
// Determine which submission steps should be shown
$progress = isset($this->paper) ? $this->paper->getCurrentStage() : REVIEW_STAGE_ABSTRACT;
$reviewMode = isset($this->paper) ? $this->paper->getReviewMode() : $schedConf->getSetting('reviewMode');
$showAbstractSteps = $progress == REVIEW_STAGE_ABSTRACT || $reviewMode != REVIEW_MODE_BOTH_SEQUENTIAL;
$showPaperSteps = $progress == REVIEW_STAGE_PRESENTATION || $reviewMode == REVIEW_MODE_BOTH_SIMULTANEOUS || $reviewMode == REVIEW_MODE_PRESENTATIONS_ALONE;
$templateMgr->assign('showAbstractSteps', $showAbstractSteps);
$templateMgr->assign('showPaperSteps', $showPaperSteps);
$templateMgr->assign('addSuppFileMessage', $schedConf->getLocalizedSetting("addSuppFileMessage"));
$templateMgr->assign('stepFinalMessage', $schedConf->getLocalizedSetting("stepFinalMessage"));
$templateMgr->assign('uploadInstructions', $schedConf->getLocalizedSetting("uploadInstructions"));
if (isset($this->paper)) {
$templateMgr->assign('submissionProgress', $this->paper->getSubmissionProgress());
}
parent::display();
}
示例3: display
/**
* Display the form.
*/
function display()
{
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign_by_ref('group', $this->group);
$templateMgr->assign('helpTopicId', 'conference.currentConferences.organizingTeam');
parent::display();
}
示例4: display
/**
* Display the form.
*/
function display()
{
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign('validDueWeeks', $this->validDueWeeks);
$templateMgr->assign('validNumDays', $this->validNumDays);
parent::display();
}
示例5: display
/**
* Display the form.
*/
function display()
{
$templateMgr =& TemplateManager::getManager();
$site =& Request::getSite();
$templateMgr->assign('minPasswordLength', $site->getMinPasswordLength());
parent::display();
}
示例6: display
/**
* @see Form::display()
*/
function display()
{
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign('terms_of_use', unserialize($this->_plugin->getSetting($this->_journalId, 'terms_of_use')));
$templateMgr->assign('terms_of_use_agreement', $this->getData('terms_of_use_agreement'));
parent::display();
}
示例7: display
/**
* Display the form.
*/
function display()
{
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign('reviewFormId', $this->reviewFormId);
$templateMgr->assign('helpTopicId', 'conference.managementPages.reviewForms');
parent::display();
}
示例8: display
/**
* Display the form.
*/
function display()
{
$journal =& Request::getJournal();
$reviewFormDao =& DAORegistry::getDAO('ReviewFormDAO');
$reviewForm =& $reviewFormDao->getReviewForm($this->reviewFormId, ASSOC_TYPE_JOURNAL, $journal->getId());
$reviewFormElementDao =& DAORegistry::getDAO('ReviewFormElementDAO');
$reviewFormElements =& $reviewFormElementDao->getReviewFormElements($this->reviewFormId);
$reviewFormResponseDao =& DAORegistry::getDAO('ReviewFormResponseDAO');
$reviewFormResponses =& $reviewFormResponseDao->getReviewReviewFormResponseValues($this->reviewId);
$reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
$reviewAssignment = $reviewAssignmentDao->getById($this->reviewId);
$sectionDecisionDao =& DAORegistry::getDAO('SectionDecisionDAO');
$sectionDecision =& $sectionDecisionDao->getSectionDecision($reviewAssignment->getDecisionId());
$editorPreview = Request::getRequestedPage() != 'reviewer';
if (!$editorPreview) {
ReviewerHandler::setupTemplate(true, 0, $sectionDecision->getArticleId());
}
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign('pageTitle', 'submission.reviewFormResponse');
$templateMgr->assign_by_ref('reviewForm', $reviewForm);
$templateMgr->assign('reviewFormElements', $reviewFormElements);
$templateMgr->assign('reviewFormResponses', $reviewFormResponses);
$templateMgr->assign('reviewId', $this->reviewId);
$templateMgr->assign('articleId', $sectionDecision->getArticleId());
$templateMgr->assign('isLocked', isset($reviewAssignment) && $reviewAssignment->getDateCompleted() != null);
$templateMgr->assign('editorPreview', $editorPreview);
parent::display();
}
示例9: display
function display()
{
$journal = Request::getJournal();
$countryDao =& DAORegistry::getDAO('CountryDAO');
$extraFieldDao =& DAORegistry::getDAO('ExtraFieldDAO');
$institutionDao =& DAORegistry::getDAO('InstitutionDAO');
$currencyDao =& DAORegistry::getDAO('CurrencyDAO');
$sectionDao =& DAORegistry::getDAO('SectionDAO');
$sectionOptions = array('0' => Locale::translate('editor.reports.anyCommittee')) + $sectionDao->getSectionTitles($journal->getId());
$decisionTypes = array(INITIAL_REVIEW => 'submission.initialReview', PROGRESS_REPORT => 'submission.progressReport', PROTOCOL_AMENDMENT => 'submission.protocolAmendment', SERIOUS_ADVERSE_EVENT => 'submission.seriousAdverseEvents', FINAL_REPORT => 'submission.finalReport');
$decisionOptions = array(98 => 'editor.reports.aDecisionsIUR', 99 => 'editor.reports.aDecisionsEUR', SUBMISSION_SECTION_DECISION_APPROVED => 'editor.article.decision.approved', SUBMISSION_SECTION_DECISION_RESUBMIT => 'editor.article.decision.resubmit', SUBMISSION_SECTION_DECISION_DECLINED => 'editor.article.decision.declined');
$budgetOptions = array(">=" => 'editor.reports.budgetSuperiorTo', "<=" => 'editor.reports.budgetInferiorTo');
$sourceCurrencyId = $journal->getSetting('sourceCurrency');
$reportTypeOptions = array(0 => 'editor.reports.type.spreadsheet', 1 => 'editor.reports.type.pieChart', 2 => 'editor.reports.type.barChart');
$measurementOptions = array(0 => 'editor.reports.measurement.proposalNmbre', 1 => 'editor.reports.measurement.cumulatedBudget');
$chartOptions = array();
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign('sectionOptions', $sectionOptions);
$templateMgr->assign('decisionTypes', $decisionTypes);
$templateMgr->assign('decisionOptions', $decisionOptions);
$templateMgr->assign('institutionsList', $institutionDao->getInstitutionsList());
$templateMgr->assign('reportTypeOptions', $reportTypeOptions);
$templateMgr->assign('measurementOptions', $measurementOptions);
$templateMgr->assign('chartOptions', $chartOptions);
parent::display();
}
示例10: display
/**
* Display the form.
*/
function display(&$request)
{
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign('new', true);
if ($this->captchaEnabled && $this->recaptchaEnabled) {
import('lib.pkp.lib.recaptcha.recaptchalib');
$publicKey = Config::getVar('captcha', 'recaptcha_public_key');
$useSSL = Config::getVar('security', 'force_ssl') ? true : false;
$reCaptchaHtml = recaptcha_get_html($publicKey, null, $useSSL);
$templateMgr->assign('reCaptchaHtml', $reCaptchaHtml);
$templateMgr->assign('captchaEnabled', true);
} elseif ($this->captchaEnabled) {
import('lib.pkp.classes.captcha.CaptchaManager');
$captchaManager = new CaptchaManager();
$captcha =& $captchaManager->createCaptcha();
if ($captcha) {
$templateMgr->assign('captchaEnabled', $this->captchaEnabled);
$this->setData('captchaId', $captcha->getId());
}
}
$context =& $request->getContext();
if ($context) {
$templateMgr->assign('allowRegReviewer', $context->getSetting('allowRegReviewer'));
$templateMgr->assign('allowRegAuthor', $context->getSetting('allowRegAuthor'));
}
return parent::display();
}
示例11: display
function display()
{
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign('message', $this->message);
$templateMgr->assign('paymentIsRegistration', $this->isRegistration);
parent::display();
}
示例12: display
/**
* Display the form.
*/
function display()
{
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign('articleId', $this->articleId);
$templateMgr->assign('submitStep', $this->step);
if (isset($this->article)) {
$templateMgr->assign('submissionProgress', $this->article->getSubmissionProgress());
}
switch ($this->step) {
case 3:
$helpTopicId = 'submission.indexingAndMetadata';
break;
case 4:
$helpTopicId = 'submission.supplementaryFiles';
break;
default:
$helpTopicId = 'submission.index';
}
$templateMgr->assign('helpTopicId', $helpTopicId);
$journal =& Request::getJournal();
$settingsDao =& DAORegistry::getDAO('JournalSettingsDAO');
if ($this->article) {
$lastSectionDecision = $this->article->getLastSectionDecision();
if ($lastSectionDecision->getReviewType() == REVIEW_TYPE_AMENDMENT) {
$protocolAmendmentGuidelines = $journal->getLocalizedSetting('protocolAmendmentGuidelines');
} else {
$protocolAmendmentGuidelines = (string) '';
}
$templateMgr->assign('protocolAmendmentGuidelines', $protocolAmendmentGuidelines);
}
$templateMgr->assign_by_ref('journalSettings', $settingsDao->getJournalSettings($journal->getId()));
parent::display();
}
示例13: display
/**
* Display the form.
*/
function display()
{
$templateMgr =& TemplateManager::getManager();
$extraFieldDao =& DAORegistry::getDAO('ExtraFieldDAO');
$institutionDao =& DAORegistry::getDAO('InstitutionDAO');
$sectionDao =& DAORegistry::getDAO('SectionDAO');
// Get the list of extra fields for the replacement and remove from it the one to delete
$extraFieldsList = $extraFieldDao->getExtraFieldsList($this->typeConst);
unset($extraFieldsList[$this->extraFieldId]);
// Get the extra Field to delete
$extraFieldToDelete =& $extraFieldDao->getExtraField($this->extraFieldId);
if ($this->typeConst == EXTRA_FIELD_GEO_AREA) {
$replacementMessage = 'manager.extraFields.geoAreas.replacement.message';
$replacementWarning = 'manager.extraFields.geoAreas.replacement.warning';
} elseif ($this->typeConst == EXTRA_FIELD_THERAPEUTIC_AREA) {
$replacementMessage = 'manager.extraFields.therapeuticAreas.replacement.message';
$replacementWarning = 'manager.extraFields.therapeuticAreas.replacement.warning';
} elseif ($this->typeConst == EXTRA_FIELD_LEVEL3_ERC) {
$replacementMessage = 'manager.extraFields.level3erc.replacement.message';
$replacementWarning = 'manager.extraFields.level3erc.replacement.warning';
} else {
$replacementMessage = 'manager.extraFields.replacement.message';
$replacementWarning = 'manager.extraFields.replacement.warning';
}
$templateMgr->assign('type', $this->type);
$templateMgr->assign('extraFieldId', $this->extraFieldId);
$templateMgr->assign('extraFieldToDelete', $extraFieldToDelete);
$templateMgr->assign('extraFieldsList', $extraFieldsList);
$templateMgr->assign('countInstitutions', count($institutionDao->getGeoAreas($this->extraFieldId)));
$templateMgr->assign('countCommittees', count($sectionDao->getGeoAreas($this->extraFieldId)));
$templateMgr->assign('pageTitle', 'manager.extraFields.' . $this->type . '.delete');
$templateMgr->assign('replacementMessage', $replacementMessage);
$templateMgr->assign('replacementWarning', $replacementWarning);
parent::display();
}
示例14: display
/**
* Display the form.
*/
function display()
{
$templateMgr =& TemplateManager::getManager();
$institutionDao =& DAORegistry::getDAO('InstitutionDAO');
$sectionDao =& DAORegistry::getDAO('SectionDAO');
$countInstitutions = count($institutionDao->getGeoAreas($this->extraFieldId));
$countCommittees = count($sectionDao->getGeoAreas($this->extraFieldId));
if ($this->typeConst == EXTRA_FIELD_GEO_AREA) {
if ($this->extraFieldId && ($countInstitutions > 0 || $countCommittees > 0)) {
$warning = 'manager.extraFields.geoAreas.modify.warning';
} else {
$warning = null;
}
} else {
if ($this->extraFieldId) {
$warning = 'manager.extraFields.modify.warning';
} else {
$warning = null;
}
}
$templateMgr->assign('warning', $warning);
$templateMgr->assign('yesNoArray', array(EXTRA_FIELD_ACTIVE => Locale::translate('common.yes'), EXTRA_FIELD_NOT_ACTIVE => Locale::translate('common.no')));
$templateMgr->assign('pageTitle', 'manager.extraFields.' . $this->type . '.edit');
$templateMgr->assign('extraFieldId', $this->extraFieldId);
$templateMgr->assign('type', $this->type);
$journal = Request::getJournal();
$templateMgr->assign_by_ref('locales', $journal->getSupportedLocaleNames());
parent::display();
}
示例15: display
/**
* Display the form.
*/
function display()
{
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign('validDuration', $this->validDuration);
$templateMgr->assign('validWeeks', array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8));
parent::display();
}