/** * Return the "Manufacturers -> Add Manufacturer" view html code. * */ function output() { global $application; loadCoreFile('html_form.php'); $this->Hints =& $application->getInstance('Hint'); $HtmlForm1 = new HtmlForm(); $this->MessageResources =& $application->getInstance('MessageResources', "manufacturers-messages", "AdminZone"); if ($this->ViewState["hasCloseScript"] == "true") { modApiFunc("application", "closeChild_UpdateParent"); return; } $manufacturer_summary = $this->outputManufacturerSummary(); $this->_Template_Contents = array("ManufacturerSummary" => $manufacturer_summary); $application->registerAttributes($this->_Template_Contents); $template_contents = array("Subtitle" => $this->outputSubtitle(), "Errors" => $this->outputErrors(), "ManufacturerId" => $this->outputManufacturerId(), "ManufacturerSummary" => $manufacturer_summary, "ManufacturerNameError" => isset($this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_001']) ? $this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_001'] : "", "ManufacturerNameInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_001']) ? "error" : "", "ManufacturerName" => $HtmlForm1->genInputTextField("128", "ManufacturerName", "75", prepareHTMLDisplay($this->POST["ManufacturerNameText"])), "ManufacturerIdFieldHint" => $this->Hints->getHintLink(array('MANUFACTURER_ID_NAME', 'manufacturers-messages')), "ManufacturerNameFieldHint" => $this->Hints->getHintLink(array('MNF_NAME_NAME', 'manufacturers-messages')), "ManufacturerImage" => getimage_input_az('mnf_image', $this->POST["ManufacturerImage"]), "ManufacturerImageFieldHint" => $this->Hints->getHintLink(array('MNF_IMAGE_NAME', 'manufacturers-messages')), "ManufacturerUrlError" => isset($this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_004']) ? $this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_004'] : "", "ManufacturerUrlInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_004']) ? "error" : "", "ManufacturerUrl" => $HtmlForm1->genInputTextField("128", "ManufacturerUrl", "75", prepareHTMLDisplay($this->POST["ManufacturerUrlText"] === NULL ? '' : $this->POST["ManufacturerUrlText"])), "ManufacturerUrlFieldHint" => $this->Hints->getHintLink(array('MNF_URL_NAME', 'manufacturers-messages')), "ManufacturerDescError" => isset($this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_002']) ? $this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_002'] : "", "ManufacturerDescInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_002']) ? "error" : "", "ManufacturerDesc" => $HtmlForm1->genInputTextAreaField("77", "ManufacturerDesc", "10"), "ManufacturerDescText" => prepareHTMLDisplay($this->POST["ManufacturerDescText"]), "ManufacturerDescFieldHint" => $this->Hints->getHintLink(array('MNF_DESC_NAME', 'manufacturers-messages')), "ManufacturerStatusError" => isset($this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_003']) ? $this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_003'] : "", "ManufacturerStatusInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_003']) ? "error" : "", "ManufacturerStatus" => $this->outputStatus(), "ManufacturerStatusFieldHint" => $this->Hints->getHintLink(array('MNF_STATUS_NAME', 'manufacturers-messages')), "AddManufacturerForm" => $HtmlForm1->genForm(modApiFunc("application", "getPagenameByViewname", "ManufacturersList", -1, -1, 'AdminZone'), "POST", "AddManufacturer"), "HiddenFormSubmitValue" => $HtmlForm1->genHiddenField("FormSubmitValue", "Save"), "HiddenArrayViewStateConstants" => $this->outputViewStateConstants(), "HiddenArrayViewState" => $this->outputViewState(), "SubmitSaveScript" => $HtmlForm1->genSubmitScript("AddManufacturerForm")); $this->_Template_Contents = $template_contents; $application->registerAttributes($this->_Template_Contents); $SpecMessageResources =& $application->getInstance('MessageResources'); //: correct error codes return $output = $this->mTmplFiller->fill("manufacturers/add_manufacturer/", "list.tpl.html", array()); }
/** * Returns the "Catalog -> Add Category" view html code. * */ function output() { global $application; loadCoreFile('html_form.php'); $HtmlForm1 = new HtmlForm(); $this->MessageResources =& $application->getInstance('MessageResources'); if ($this->ViewState["hasCloseScript"] == "true") { $this->outputFinalScript(); return; } $template_contents_l1 = array("CatImageControls" => $this->outputCatImageControls($this->ViewState)); $template_contents = array(); $template_contents = array("Local_CategoryBookmarks" => getCategoryBookmarks('details', $this->_cat_id, $this->_bms_page_stat), "Subtitle" => $this->outputSubtitle(), "Errors" => $this->outputErrors(), "SubcategoriesError" => isset($this->ErrorMessages['ERR_AZ_CAT_ADDCAT_001']) ? $this->ErrorMessages['ERR_AZ_CAT_ADDCAT_001'] : "", "MetaKeywordsError" => isset($this->ErrorMessages['ERR_AZ_CAT_ADDCAT_003']) ? $this->ErrorMessages['ERR_AZ_CAT_ADDCAT_003'] : "", "MetaDescriptionError" => isset($this->ErrorMessages['ERR_AZ_CAT_ADDCAT_004']) ? $this->ErrorMessages['ERR_AZ_CAT_ADDCAT_004'] : "", "SubcategoriesInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_CAT_ADDCAT_001']) ? "error" : "", "MetaKeywordsInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_CAT_ADDCAT_003']) ? "error" : "", "MetaDescriptionInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_CAT_ADDCAT_004']) ? "error" : "", "AddCatForm" => $HtmlForm1->genForm(modApiFunc("application", "getPagenameByViewname", "NavigationBar", -1, -1, 'AdminZone'), "POST", "AddCatForm"), "HiddenFormSubmitValue" => $HtmlForm1->genHiddenField("FormSubmitValue", "UploadImagesAndSave"), "HiddenArrayViewStateConstants" => $this->outputViewStateConstants(), "HiddenArrayViewState" => $this->outputViewState(), "SubcategoryId" => $this->outputCategoryId(), "Subcategory" => $HtmlForm1->genInputTextField("255", "Subcategory", "75", prepareHTMLDisplay($this->POST["SubcategoryText"])), "CategoryStatus" => $this->outputCategoryStatus(), "CategoryShowProductsRecursivelyStatus" => $this->outputCategoryShowProductsRecursivelyStatus(), "CategoryDescription" => $HtmlForm1->genInputTextAreaField("77", "CategoryDescription", "10"), "DescriptionText" => prepareHTMLDisplay($this->POST["DescriptionText"]), "ImageControls" => $template_contents_l1["CatImageControls"], "PageTitle" => $HtmlForm1->genInputTextField("256", "PageTitle", "76", prepareHTMLDisplay($this->POST["PageTitleText"])), "MetaKeywords" => $HtmlForm1->genInputTextAreaField("75", "MetaKeywords", "5"), "MetaKeywordsText" => prepareHTMLDisplay($this->POST["MetaKeywordsText"]), "MetaDescription" => $HtmlForm1->genInputTextAreaField("75", "MetaDescription", "5"), "MetaDescriptionText" => prepareHTMLDisplay($this->POST["MetaDescriptionText"]), "SEO_URL_prefix" => $HtmlForm1->genInputTextField("256", "SEO_URL_prefix", "76", prepareHTMLDisplay($this->POST["SEO_URL_prefix"])), "SubmitSaveScript" => $HtmlForm1->genSubmitScript("AddCatForm")); $this->_Template_Contents = $template_contents; $application->registerAttributes($this->_Template_Contents); $this->MessageResources =& $application->getInstance('MessageResources'); //: correct error codes $output = modApiFunc('TmplFiller', 'fill', './../../js/', 'validate.msgs.js.tpl', array("STRING1024" => $this->MessageResources->getMessage(new ActionMessage(array('CATADD_001'))), "STRING128" => $this->MessageResources->getMessage(new ActionMessage(array('CATADD_002'))), "STRING256" => $this->MessageResources->getMessage(new ActionMessage(array('CATADD_003'))), "STRING512" => $this->MessageResources->getMessage(new ActionMessage(array('CATADD_004'))))); return $output . $this->mTmplFiller->fill("catalog/add_cat/", "list.tpl.html", array()); }
function output() { global $application; $otype_select = array("select_name" => "Option[OptionType]", "selected_value" => $this->DATA["Option"]["OptionType"], "id" => "Option_OptionType", "onChange" => "javascript: onOptionTypeChanged();", "values" => array()); $template_contents = array(); foreach ($this->_option_types as $otype => $show_types) { $otype_select["values"][] = array("value" => $otype, "contents" => $this->MessageResources->getMessage('OT_' . $otype)); $tmp = array("select_name" => "Option[ShowType][{$otype}]", "selected_value" => $this->DATA["Option"]["ShowType"][$otype], "id" => "Option_ShowType_{$otype}", "onChange" => $otype == "CI" ? "javascript: onShowTypeChanged();" : "", "values" => array()); foreach ($show_types as $shtype) { $tmp["values"][] = array("value" => $shtype, "contents" => $this->MessageResources->getMessage('ST_' . $otype . '_' . $shtype)); } $template_contents["ShowType" . $otype . "Field"] = HtmlForm::genDropdownSingleChoice($tmp, 'style="width: 200px;"'); } $yes_no_values = array(); foreach (array('YES', 'NO') as $lbl) { $yes_no_values[] = array("value" => $lbl, "contents" => $this->MessageResources->getMessage('LBL_' . $lbl)); } $discard_avail_select = array("select_name" => "Option[DiscardAvail]", "selected_value" => $this->DATA["Option"]["DiscardAvail"], "onChange" => "javascript: onDiscardAvailChanged();", "id" => "Option_DiscardAvail", "values" => $yes_no_values); $use_for_it_select = array("select_name" => "Option[UseForIT]", "selected_value" => $this->DATA["Option"]["UseForIT"], "id" => "Option_UseForIT", "values" => $yes_no_values); $request = new Request(); $request->setView('PO_OptionsList'); $request->setKey("parent_entity", $this->option_info["parent_entity"]); $request->setKey("entity_id", $this->option_info["entity_id"]); $template_contents = array_merge($template_contents, array("ActualHeader" => $this->outputActualHeader(), "ResultMessage" => $this->outputResultMessage(), "_option_id" => $this->option_id, "_parent_entity" => $this->option_info["parent_entity"], "_entity_id" => $this->option_info["entity_id"], "OptionNameField" => HtmlForm::genInputTextField('255', 'Option[OptionName]', '65', prepareHTMLDisplay($this->DATA["Option"]["OptionName"])), "DisplayNameField" => HtmlForm::genInputTextField('255', 'Option[DisplayName]', '65', prepareHTMLDisplay($this->DATA["Option"]["DisplayName"])), "OptionDescription" => HtmlForm::genInputTextAreaField("77", "Option[DisplayDescr]", "5"), "DescriptionText" => $this->DATA["Option"]["DisplayDescr"], "OptionTypeField" => HtmlForm::genDropdownSingleChoice($otype_select, 'style="width: 200px;"'), "JS_OnOptionTypeChanged" => $this->output__JS_OnOptionTypeChanged($this->_option_types, "show_type_for_"), "DiscardAvailField" => HtmlForm::genDropdownSingleChoice($discard_avail_select, 'style="width: 200px;"'), "DiscardValueField" => HtmlForm::genInputTextField('255', 'Option[DiscardValue]', '65', prepareHTMLDisplay(@$this->DATA["Option"]["DiscardValue"]), 'id=Option_DiscardValue'), "JS_OnDiscardAvailChanged" => $this->output__JS_OnDiscardAvailChanged('Option_DiscardAvail', 'Option_DiscardValue'), "CheckBoxTextField" => HtmlForm::genInputTextField('255', 'Option[CheckBoxText]', '65', prepareHTMLDisplay($this->DATA["Option"]["CheckBoxText"]), 'id=Option_CheckBoxText'), "UseForITField" => HtmlForm::genDropdownSingleChoice($use_for_it_select, 'style="width: 200px;"'), "JS_OnShowTypeChanged" => $this->output__JS_OnShowTypeChanged(array('CBSI', 'CBTA'), 'Option_CheckBoxText'), "EditValuesForm" => $this->outputEditValuesForm(), "AddNewValueForm" => $this->outputAddNewValueForm(), "CancelLink" => $request->getURL(), "ValuesSortForm" => $this->outputValuesSortForm(), "JSchangeToCIwarning" => $this->outputJSchangeToCIwarning(), "JSchangeINVwarning" => $this->outputJSchangeINVwarning(), "HintLink_OpName" => $this->Hints->getHintLink(array('OPTION_NAME', 'product-options-messages')), "HintLink_DspName" => $this->Hints->getHintLink(array('DISPLAY_NAME', 'product-options-messages')), "HintLink_DspDescr" => $this->Hints->getHintLink(array('DISPLAY_DESCR', 'product-options-messages')), "HintLink_OpType" => $this->Hints->getHintLink(array('OPTION_TYPE', 'product-options-messages')), "HintLink_ShType" => $this->Hints->getHintLink(array('SHOW_TYPE', 'product-options-messages')), "HintLink_DisAvail" => $this->Hints->getHintLink(array('DISCARD_AVAIL', 'product-options-messages')), "HintLink_DisValue" => $this->Hints->getHintLink(array('DISCARD_VALUE', 'product-options-messages')), "HintLink_CBText" => $this->Hints->getHintLink(array('CHECKBOX_TEXT', 'product-options-messages')), "HintLink_UseForIT" => $this->Hints->getHintLink(array('USE_FOR_IT', 'product-options-messages')), "JSforIE6" => $this->outputJSforIE6())); $this->_Template_Contents = $template_contents; $application->registerAttributes($this->_Template_Contents); $this->mTmplFiller =& $application->getInstance('TmplFiller'); return $this->mTmplFiller->fill("product_options/", "edit-option-container.tpl.html", array()); }
/** * */ function output() { global $application; loadCoreFile('html_form.php'); $HtmlForm1 = new HtmlForm(); if ($this->ViewState["hasCloseScript"] == "true") { modApiFunc("application", "closeChild_UpdateParent"); return; } $request = new Request(); $request->setView('CheckoutPaymentModuleSettings'); $request->setAction("update_cod"); $form_action = $request->getURL(); $template_contents = array("EditCodForm" => $HtmlForm1->genForm($form_action, "POST", "EditCodForm"), "HiddenArrayViewState" => $this->outputViewState(), "ModuleType" => $this->MessageResources->getMessage('MODULE_TYPE'), "ModuleName" => $this->MessageResources->getMessage('MODULE_NAME'), "Subtitle" => $this->MessageResources->getMessage('FORM_SUBTITLE'), "Errors" => $this->outputErrors(), "ModuleStatusFieldName" => $this->MessageResources->getMessage('MODULE_STATUS_FIELD_NAME'), "ModuleStatusFieldHint" => $this->Hints->getHintLink(array('MODULE_STATUS_FIELD_NAME', 'payment-module-cod-messages')), "ModuleStatusField" => $this->outputStatus(), "ModuleMethodNameFieldName" => $this->MessageResources->getMessage('MODULE_METHOD_NAME_FIELD_NAME'), "ModuleNameFieldHint" => $this->Hints->getHintLink(array('MODULE_METHOD_NAME_FIELD_NAME', 'payment-module-cod-messages')), "ModuleNameField" => $HtmlForm1->genInputTextField("128", "ModuleName", "75", prepareHTMLDisplay($this->POST["ModuleName"])), "ModulePerOrderShippingFeeFieldName" => $this->MessageResources->getMessage('MODULE_PER_ORDER_SHIPPING_FEE_FIELD_NAME'), "ModulePerOrderShippingFeeFieldHint" => $this->Hints->getHintLink(array('MODULE_PER_ORDER_SHIPPING_FEE_FIELD_NAME', 'payment-module-cod-messages')), "ModulePerOrderShippingFeeField" => $HtmlForm1->genInputTextField("128", "PerOrderShippingFee", "75", prepareHTMLDisplay($this->POST["PerOrderShippingFee"])), "CostFormat" => modApiFunc("Localization", "format_settings_for_js", "currency"), "ModuleDescrFieldName" => $this->MessageResources->getMessage('MODULE_DESCR_FIELD_NAME'), "ModuleDescrFieldHint" => $this->Hints->getHintLink(array('MODULE_DESCR_FIELD_NAME', 'payment-module-cod-messages')), "ModuleDescrField" => $HtmlForm1->genInputTextAreaField("75", "ModuleDescr", "5"), "ModuleDescrFieldValue" => $this->MessageResources->getMessage("MODULE_DESCR"), "Alert_001" => $this->MessageResources->getMessage('ALERT_001'), "Alert_002" => $this->MessageResources->getMessage('ALERT_002'), "Alert_003" => $this->MessageResources->getMessage('ALERT_003')); $this->_Template_Contents = $template_contents; $application->registerAttributes($this->_Template_Contents); $obj =& $application->getInstance('MessageResources'); $output = modApiFunc('TmplFiller', 'fill', './../../js/', 'validate.msgs.js.tpl', array("INTEGER" => $obj->getMessage(new ActionMessage(array('PRDADD_001'))), "FLOAT" => $obj->getMessage(new ActionMessage(array('PRDADD_002'))), "STRING1024" => $obj->getMessage(new ActionMessage(array('PRDADD_007'))), "STRING128" => $obj->getMessage(new ActionMessage(array('PRDADD_008'))), "STRING256" => $obj->getMessage(new ActionMessage(array('PRDADD_009'))), "STRING512" => $obj->getMessage(new ActionMessage(array('PRDADD_010'))), "CURRENCY" => addslashes($obj->getMessage(new ActionMessage(array('CURRENCY_FIELD', modApiFunc("Localization", "FloatToFormatStr", 12.35, "currency"), modApiFunc("Localization", "FloatToFormatStr", 34, "currency"), modApiFunc("Localization", "FloatToFormatStr", 99.0, "currency"))))), "WEIGHT" => addslashes($obj->getMessage(new ActionMessage(array('WEIGHT_FIELD', modApiFunc("Localization", "FloatToFormatStr", 23.325, "weight"), modApiFunc("Localization", "FloatToFormatStr", 34, "weight"), modApiFunc("Localization", "FloatToFormatStr", 99.2, "weight"))))), "ITEM" => $obj->getMessage(new ActionMessage(array('ITEM_FIELD'))))); return $output . $this->mTmplFiller->fill("payment_module_cod/", "list.tpl.html", array()); }