本文整理汇总了PHP中HtmlForm::genInputTextField方法的典型用法代码示例。如果您正苦于以下问题:PHP HtmlForm::genInputTextField方法的具体用法?PHP HtmlForm::genInputTextField怎么用?PHP HtmlForm::genInputTextField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HtmlForm
的用法示例。
在下文中一共展示了HtmlForm::genInputTextField方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: output
function output()
{
global $application;
$settings = modApiFunc('Product_Files', 'getSettings');
$template_contents = array('HLTLField' => HtmlForm::genInputTextField('25', 'pf_sets[HL_TL]', '5', $settings['HL_TL']), 'HLMaxTryField' => HtmlForm::genInputTextField('25', 'pf_sets[HL_MAX_TRY]', '5', $settings['HL_MAX_TRY']), "ResultMessage" => $this->outputResultMessage());
$this->_Template_Contents = $template_contents;
$application->registerAttributes($this->_Template_Contents);
$this->mTmplFiller =& $application->getInstance('TmplFiller');
return $this->mTmplFiller->fill("product_files/settings/", "container.tpl.html", array());
}
示例2: output
function output()
{
global $application;
$settings = modApiFunc('Quick_Books', 'getSettings');
$op_as_inv_select = array("select_name" => "qbs[OP_AS_INV]", "selected_value" => $settings['OP_AS_INV'], 'class' => 'form-control input-sm input-xsmall', "values" => array(array('value' => 'Y', 'contents' => getMsg('QB', 'LBL_YES')), array('value' => 'N', 'contents' => getMsg('QB', 'LBL_NO'))));
$template_contents = array("TrnsClassField" => HtmlForm::genInputTextField('255', 'qbs[TRNS_CLASS]', '70', $settings['TRNS_CLASS']), "AccTaxField" => HtmlForm::genInputTextField('255', 'qbs[ACC_TAX]', '70', $settings['ACC_TAX']), "AccProductField" => HtmlForm::genInputTextField('255', 'qbs[ACC_PRODUCT]', '70', $settings['ACC_PRODUCT']), "AccShippingField" => HtmlForm::genInputTextField('255', 'qbs[ACC_SHIPPING]', '70', $settings['ACC_SHIPPING']), "AccInventoryField" => HtmlForm::genInputTextField('255', 'qbs[ACC_INVENTORY]', '70', $settings['ACC_INVENTORY']), "AccGlobalDiscountField" => HtmlForm::genInputTextField('255', 'qbs[ACC_GLOBAL_DISCOUNT]', '70', $settings['ACC_GLOBAL_DISCOUNT']), "AccPromoCodeDiscountField" => HtmlForm::genInputTextField('255', 'qbs[ACC_PROMOCODE_DISCOUNT]', '70', $settings['ACC_PROMOCODE_DISCOUNT']), "AccQuantityDiscountField" => HtmlForm::genInputTextField('255', 'qbs[ACC_QUANTITY_DISCOUNT]', '70', $settings['ACC_QUANTITY_DISCOUNT']), "OpAsInvField" => HtmlForm::genDropdownSingleChoice($op_as_inv_select), "MinQISField" => HtmlForm::genInputTextField('255', 'qbs[MIN_QIS]', '70', $settings['MIN_QIS']), "AccCOGSField" => HtmlForm::genInputTextField('255', 'qbs[ACC_COGS]', '70', $settings['ACC_COGS']), "OrdersPrefixField" => HtmlForm::genInputTextField('255', 'qbs[QB_ORDERS_PREFIX]', '70', $settings['QB_ORDERS_PREFIX']), "ResultMessage" => $this->outputResultMessage());
$this->_Template_Contents = $template_contents;
$application->registerAttributes($this->_Template_Contents);
$this->mTmplFiller =& $application->getInstance('TmplFiller');
return $this->mTmplFiller->fill("quick_books/settings/", "container.tpl.html", array());
}
示例3: output
function output()
{
global $application;
$settings = modApiFunc('Manufacturers', 'getSettings');
$ag_select = array("select_name" => "pi_sets[AUTO_GEN_MAIN_SMALL_IMAGE]", "selected_value" => $settings['AUTO_GEN_MAIN_SMALL_IMAGE'], "values" => array(array('value' => 'Y', 'contents' => getMsg('MNF', 'LBL_YES')), array('value' => 'N', 'contents' => getMsg('MNF', 'LBL_NO'))));
$ag_param = '';
if (!function_exists('gd_info')) {
$ag_select["selected_value"] = "N";
$ag_param = 'disabled';
}
$template_contents = array('TSField' => HtmlForm::genInputTextField('25', 'pi_sets[THUMB_SIDE]', '5', $settings['THUMB_SIDE']), 'TPLField' => HtmlForm::genInputTextField('25', 'pi_sets[THUMBS_PER_LINE]', '5', $settings['THUMBS_PER_LINE']), 'AGField' => HtmlForm::genDropdownSingleChoice($ag_select, $ag_param), 'MISField' => HtmlForm::genInputTextField('25', 'pi_sets[MAIN_IMAGE_SIDE]', '5', $settings['MAIN_IMAGE_SIDE'], $ag_param), "ResultMessage" => $this->outputResultMessage());
$this->_Template_Contents = $template_contents;
$application->registerAttributes($this->_Template_Contents);
$this->mTmplFiller =& $application->getInstance('TmplFiller');
return $this->mTmplFiller->fill("manufacturers/settings/", "container.tpl.html", array());
}
示例4: outputField
/**
* Outputs the form field for the given params
*/
function outputField($field_type, $field_name, $def_value, $onchange = '', $id = '')
{
$return_value = '';
switch ($field_type) {
case 'hidden':
$return_value = '<input type="hidden"' . HtmlForm::genHiddenField($field_name, $def_value) . ' id="' . $field_name . '" />';
break;
case 'rate':
$return_value = '<input type="text"' . HtmlForm::genInputTextField('255', $field_name, '70', $def_value, $onchange . 'style="width: 98%;" class="form-control input-sm input-large"') . ' />';
break;
case 'visible':
$return_value = HtmlForm::genDropdownSingleChoice(array("select_name" => $field_name, "selected_value" => $def_value, "onChange" => $onchange, "values" => array(array('value' => 'Y', 'contents' => getMsg('CR', 'CR_SHOW')), array('value' => 'N', 'contents' => getMsg('CR', 'CR_HIDE')))));
break;
case 'checkbox':
$return_value = HtmlForm::genCheckbox(array("value" => $def_value, "name" => $field_name, "onclick" => $onchange, "id" => $id, "is_checked" => ''));
break;
}
return $return_value;
}
示例5: output
function output()
{
global $application;
$settings = modApiFunc('Product_Images', 'getSettings');
$detailedFullImageResizeSelect = array("select_name" => "pi_sets[RESIZE_DETAILED_LARGE_IMAGE]", "selected_value" => $settings['RESIZE_DETAILED_LARGE_IMAGE'], "values" => array(array('value' => 'Y', 'contents' => getMsg('PI', 'LBL_YES')), array('value' => 'N', 'contents' => getMsg('PI', 'LBL_NO'))));
$fullImageResizeSelect = array("select_name" => "pi_sets[RESIZE_LARGE_IMAGE]", "selected_value" => $settings['RESIZE_LARGE_IMAGE'], "values" => array(array('value' => 'Y', 'contents' => getMsg('PI', 'LBL_YES')), array('value' => 'N', 'contents' => getMsg('PI', 'LBL_NO'))));
$ag_select = array("select_name" => "pi_sets[AUTO_GEN_MAIN_SMALL_IMAGE]", "selected_value" => $settings['AUTO_GEN_MAIN_SMALL_IMAGE'], "values" => array(array('value' => 'Y', 'contents' => getMsg('PI', 'LBL_YES')), array('value' => 'N', 'contents' => getMsg('PI', 'LBL_NO'))));
$ag_param = '';
if (!function_exists('gd_info')) {
$ag_select["selected_value"] = "N";
$ag_param = 'disabled';
}
$cat_ag_select = array("select_name" => "pi_sets[AUTO_GEN_CAT_SMALL_IMAGE]", "selected_value" => $settings['AUTO_GEN_CAT_SMALL_IMAGE'], "values" => array(array('value' => 'Y', 'contents' => getMsg('PI', 'LBL_YES')), array('value' => 'N', 'contents' => getMsg('PI', 'LBL_NO'))));
$cat_ag_param = '';
if (!function_exists('gd_info')) {
$cat_ag_select["selected_value"] = "N";
$cat_ag_param = 'disabled';
}
$template_contents = array('TSField' => HtmlForm::genInputTextField('25', 'pi_sets[THUMB_SIDE]', '5', $settings['THUMB_SIDE']), 'TPLField' => HtmlForm::genInputTextField('25', 'pi_sets[THUMBS_PER_LINE]', '5', $settings['THUMBS_PER_LINE']), 'TPLSetting' => $application->getAppIni('PRODUCT_LIST_DISABLE_TR_TD'), 'AGField' => HtmlForm::genDropdownSingleChoice($ag_select, $ag_param), 'CatAGField' => HtmlForm::genDropdownSingleChoice($cat_ag_select, $cat_ag_param), 'fullImageResizeField' => HtmlForm::genDropdownSingleChoice($fullImageResizeSelect, $ag_param), 'detailedFullImageResizeField' => HtmlForm::genDropdownSingleChoice($detailedFullImageResizeSelect, $ag_param), 'MISField' => HtmlForm::genInputTextField('25', 'pi_sets[MAIN_IMAGE_SIDE]', '5', $settings['MAIN_IMAGE_SIDE'], $ag_param), 'CatMISField' => HtmlForm::genInputTextField('25', 'pi_sets[CAT_IMAGE_SIDE]', '5', $settings['CAT_IMAGE_SIDE'], $cat_ag_param), 'firField' => HtmlForm::genInputTextField('25', 'pi_sets[LARGE_IMAGE_SIZE]', '5', $settings['LARGE_IMAGE_SIZE'], $ag_param), 'dfirField' => HtmlForm::genInputTextField('25', 'pi_sets[DETAILED_LARGE_IMAGE_SIZE]', '5', $settings['DETAILED_LARGE_IMAGE_SIZE'], $ag_param), "ResultMessage" => $this->outputResultMessage());
$this->_Template_Contents = $template_contents;
$application->registerAttributes($this->_Template_Contents);
$this->mTmplFiller =& $application->getInstance('TmplFiller');
return $this->mTmplFiller->fill("product_images/settings/", "container.tpl.html", array());
}
示例6: output
/**
*
*/
function output()
{
global $application;
if ($this->ViewState["hasCloseScript"] == "true") {
modApiFunc("application", "closeChild_UpdateParent");
return;
}
loadCoreFile('html_form.php');
$HtmlForm = new HtmlForm();
$formAction = $this->outputFormAction();
$template_contents = array("FORM" => $HtmlForm->genForm($formAction, "POST", ""), "FormAction" => $this->outputFormActionJS(), "HiddenArrayViewState" => $this->outputViewState(), "PageTitle" => $this->outputPageTitle(), "FirstName" => $HtmlForm->genInputTextField("128", "FirstName", "25", prepareHTMLDisplay($this->POST["FirstName"])), "LastName" => $HtmlForm->genInputTextField("128", "LastName", "25", prepareHTMLDisplay($this->POST["LastName"])), "Email" => $HtmlForm->genInputTextField("128", "Email", "25", $this->POST["Email"]), "PasswordFields" => $this->outputPasswordFields(), "PasswordRequirements" => $this->outputPasswordRequirements(), "PermissionsList" => $this->outputPermissionsList(), "Errors" => $this->outputErrors(), "PSWUPD_000" => $this->MessageResources->getMessage(new ActionMessage("PSWUPD_000")), "PSWUPD_009" => $this->MessageResources->getMessage(new ActionMessage("PSWUPD_009")), "PSWUPD_002" => $this->MessageResources->getMessage(new ActionMessage("PSWUPD_002")), "PSWUPD_004" => $this->MessageResources->getMessage(new ActionMessage("PSWUPD_004")), "PSWUPD_005" => $this->MessageResources->getMessage(new ActionMessage("PSWUPD_005")), "PSWUPD_007" => $this->MessageResources->getMessage(new ActionMessage("PSWUPD_007")), "PSWUPD_011" => $this->MessageResources->getMessage(new ActionMessage("PSWUPD_011")));
$this->_Template_Contents = $template_contents;
$application->registerAttributes($this->_Template_Contents);
return modApiFunc('TmplFiller', 'fill', "users/admin_member_add/", "admin_member_add.tpl.html", array());
}
示例7: output
function output()
{
global $application;
if ($this->ViewState["hasCloseScript"] == "true") {
modApiFunc("application", "closeChild_UpdateParent");
return;
}
if (isset($this->test_results)) {
foreach ($this->test_results as $api_name => $api_res) {
if (!empty($api_res['methods'])) {
$per_item_shipping_cost_sum = $api_res['methods'][0]['shipping_cost']['PerItemShippingCostSum'];
$per_item_handling_cost_sum = $api_res['methods'][0]['shipping_cost']['PerItemHandlingCostSum'];
$total_handling_charge = $api_res['methods'][0]['shipping_cost']['TotalHandlingCharge'];
break;
}
}
}
$GSS = modApiFunc("Shipping_Cost_Calculator", "getSettings");
$template_contents = array("HiddenArrayViewState" => $this->outputViewState(), "OrigAddress" => $this->MessageResources->getMessage("LABEL_ORIG_ADDRESS"), "OrigCity" => modApiFunc("Configuration", "getTagValue", "StoreOwnerCity"), "OrigCountry" => modApiFunc("Configuration", "getTagValue", "StoreOwnerCountry"), "OrigState" => modApiFunc("Configuration", "getTagValue", "StoreOwnerState"), "OrigZip" => modApiFunc("Configuration", "getTagValue", "StoreOwnerPostcode"), "DstAddress" => $this->MessageResources->getMessage("LABEL_DEST_ADDRESS"), "JavascriptCountriesAndStates" => $this->out_JS_CS(), "DstCity" => HtmlForm::genInputTextField("125", "DstCity", "55", $this->POST["DstCity"]), "DstCountry" => $this->outCountrySelect(), "DstState" => $this->outStatesSelect(), "DstZip" => HtmlForm::genInputTextField("125", "DstZip", "55", $this->POST["DstZip"]), "LBL_ShoppingCart" => $this->MessageResources->getMessage('LABEL_CART'), "LBL_Product" => $this->MessageResources->getMessage('LABEL_PRODUCT'), "LBL_Qty" => $this->MessageResources->getMessage('LABEL_QTY'), "LBL_Weight" => $this->MessageResources->getMessage('LABEL_WEIGHT'), "LBL_Cost" => $this->MessageResources->getMessage('LABEL_COST'), "LBL_Shipping_Charge" => $this->MessageResources->getMessage('LABEL_SHIPPING_CHARGE'), "LBL_Handling_Charge" => $this->MessageResources->getMessage('LABEL_HANDLING_CHARGE'), "LBL_Free_Shipping" => $this->MessageResources->getMessage('LABEL_FREE_SHIPPING'), "LBL_Subtotal" => $this->MessageResources->getMessage('LABEL_SUBTOTAL'), "LBL_TotalWeight" => $this->MessageResources->getMessage('LABEL_TOTAL_WEIGHT'), "LBL_EmptyCart" => $this->MessageResources->getMessage('LABEL_EMPTY_CART'), "LBL_FHFOO" => $this->MessageResources->getMessage('FREE_HANDLING'), "LBL_FSFOO" => $this->MessageResources->getMessage('FREE_SHIPPING'), "LBL_MinSC" => $this->MessageResources->getMessage('MINIMUM_SHIPPING_COST'), "LBL_PerISCS" => $this->MessageResources->getMessage('PER_ITEM_SHIPPING_COST_SUM'), "LBL_PerOSF" => $this->MessageResources->getMessage('PER_ORDER_SHIPPING_COST'), "LBL_PerIHCS" => $this->MessageResources->getMessage('PER_ITEM_HANDLING_COST_SUM'), "LBL_PerOHF" => $this->MessageResources->getMessage('PER_ORDER_HANDLING_COST'), "LBL_TotalHC" => $this->MessageResources->getMessage('TOTAL_HANDLING_CHARGE'), "GSS_FHFOO" => $GSS["FH_OO"] != "" ? modApiFunc("Localization", "currency_format", $GSS["FH_OO"]) : $this->MessageResources->getMessage('LBL_NA'), "GSS_FSFOO" => $GSS["FS_OO"] != "" ? modApiFunc("Localization", "currency_format", $GSS["FS_OO"]) : $this->MessageResources->getMessage('LBL_NA'), "GSS_MinSC" => modApiFunc("Localization", "currency_format", $GSS["MIN_SC"]), "Cart_PerISCS" => isset($per_item_shipping_cost_sum) ? modApiFunc("Localization", "currency_format", $per_item_shipping_cost_sum) : $this->MessageResources->getMessage('LBL_NA'), "GSS_PerOSF" => $GSS["PO_SC_TYPE"] == "A" ? modApiFunc("Localization", "currency_format", $GSS["PO_SC"]) : $GSS["PO_SC"] . "%", "Cart_PerIHCS" => isset($per_item_handling_cost_sum) ? modApiFunc("Localization", "currency_format", $per_item_handling_cost_sum) : $this->MessageResources->getMessage('LBL_NA'), "GSS_PerOHF" => modApiFunc("Localization", "currency_format", $GSS["PO_HC"]), "Cart_TotalHC" => isset($total_handling_charge) ? modApiFunc("Localization", "currency_format", $total_handling_charge) : $this->MessageResources->getMessage('LBL_NA'), "Cart_Subtotal" => modApiFunc("Localization", "currency_format", $this->POST["Cart"]["subtotal"]), "Cart_TotalWeight" => $this->POST["Cart"]["total_weight"], "genJSproducts" => $this->outJSproducts(), "WeightSymbol" => modApiFunc('Localization', 'getUnitTypeValue', 'weight'), "Results" => $this->outResults());
$this->_Template_Contents = $template_contents;
$application->registerAttributes($this->_Template_Contents);
return $this->mTmplFiller->fill("shipping_tester/", "window.tpl.html", array());
}
示例8: output
/**
* Outputs form contents.
*/
function output()
{
global $application;
$retval = '';
loadCoreFile('html_form.php');
$HtmlForm1 = new HtmlForm();
$request = new Request();
$request->setView("AdminSignIn");
$request->setAction("SignIn");
$form_action = $request->getURL();
$request = new Request();
$request->setView("AdminPasswordRecovery");
$PasswordForgottenLink = $request->getURL();
$this->_Template_Content = array("HiddenArrayViewState" => $this->outputViewState(), "FORM" => $HtmlForm1->genForm($form_action, "POST", ""), "Email" => $HtmlForm1->genInputTextField("255", "AdminEmail", "40", $this->POST["AdminEmail"]), "Password" => $HtmlForm1->genInputTextField("255", "Password", "40", ""), "RememberChecked" => $this->POST["RememberEmail"] != '' ? 'CHECKED' : '', "PasswordForgottenLink" => $PasswordForgottenLink, "Errors" => $this->outputErrors(), "Version" => PRODUCT_VERSION_NUMBER . " " . PRODUCT_VERSION_TYPE . ', build ' . PRODUCT_VERSION_BUILD);
$application->registerAttributes($this->_Template_Content);
$retval = modApiFunc('TmplFiller', 'fill', "users/", "signin.tpl.html", array());
return $retval;
}
示例9: output
/**
* 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());
}
示例10: getTag
function getTag($tag)
{
$value = null;
switch ($tag) {
case 'Local_FormActionURL':
$request = new Request();
$request->setAction('register_customer');
$request->setView('Registration');
$value = $request->getURL();
break;
case 'Local_Form':
$value = $this->out_GroupAttributes();
break;
case 'Local_FieldName':
$value = $this->current_attr_info['visible_name'];
break;
case 'Local_Field':
$attr_value = '';
if ($this->customer_info != null and isset($this->customer_info[$this->current_group_name][$this->current_attr_name])) {
$attr_value = $this->customer_info[$this->current_group_name][$this->current_attr_name];
}
switch (_ml_strtolower($this->current_attr_name)) {
case 'country':
$value = $this->out_CountrySelect($attr_value);
break;
case 'state':
$value = $this->out_StatesSelect($attr_value);
break;
default:
$value = '<input class="form-control" type="' . (preg_match("/password/i", $this->current_attr_name) ? 'password' : 'text') . '" ' . HtmlForm::genInputTextField(255, 'customer_info[' . $this->current_group_name . '][' . $this->current_attr_name . ']', 32, prepareHTMLDisplay($attr_value)) . ' />';
break;
}
break;
}
return $value;
}
示例11: outputSearchReviews
/**
* Outputs the search form
*/
function outputSearchReviews()
{
global $application;
$start_year = (int) modApiFunc('Settings', 'getParamValue', 'VISUAL_INTERFACE', 'SEARCH_START_YEAR');
$year_offset = (int) ((int) (date("Y") - $start_year) + modApiFunc('Settings', 'getParamValue', 'VISUAL_INTERFACE', 'SEARCH_YEAR_OFFSET'));
$template_contents = array('LabelPending' => $this->outputLabel('ShowPendingReviews'), 'LabelBad' => $this->outputLabel('ShowBadReviews'), 'LabelGood' => $this->outputLabel('ShowGoodReviews'), 'LabelAll' => $this->outputLabel('ShowAllReviews'), 'LabelDate' => $this->outputLabel('SearchReviews', 'from'), 'LabelAuthor' => $this->outputLabel('SearchReviews', 'author'), 'LabelIPAddress' => $this->outputLabel('SearchReviews', 'ip_address'), 'LabelProduct' => $this->outputLabel('SearchReviews', 'product'), 'LabelRating' => $this->outputLabel('SearchReviews', 'rating'), 'LabelStatus' => $this->outputLabel('SearchReviews', 'status'), 'CountPending' => $this->outputCount('pending'), 'CountBad' => $this->outputCount('bad'), 'CountGood' => $this->outputCount('good'), 'CountAll' => $this->outputCount('all'), 'ActionField' => '<input type="hidden" ' . HtmlForm::genHiddenField('asc_action', 'SearchReviews') . ' />', 'ProductField' => '<input type="hidden" ' . HtmlForm::genHiddenField('product_id', @$this->_search_filter['product']['id']) . ' />', 'SelectFromDay' => HtmlForm::genDropdownDaysList('from_day', @$this->_search_filter['from']['day']), 'SelectFromMonth' => HtmlForm::genDropdownMonthsList('from_month', @$this->_search_filter['from']['month']), 'SelectFromYear' => HtmlForm::genDropdownYearsList('from_year', @$this->_search_filter['from']['year'], $start_year, $year_offset), 'SelectToDay' => HtmlForm::genDropdownDaysList('to_day', @$this->_search_filter['to']['day']), 'SelectToMonth' => HtmlForm::genDropdownMonthsList('to_month', @$this->_search_filter['to']['month']), 'SelectToYear' => HtmlForm::genDropdownYearsList('to_year', @$this->_search_filter['to']['year'], $start_year, $year_offset), 'AuthorField' => '<input class="form-control input-sm input-large" style="float:left;" type="text"' . HtmlForm::genInputTextField('128', 'author_name', 52, prepareHTMLDisplay(@$this->_search_filter['author']['name'])) . ' />', 'AuthorCheckbox' => HtmlForm::genCheckbox(array('value' => 'Y', 'is_checked' => @$this->_search_filter['author']['exactly'] == 'Y' ? 'checked' : '', 'name' => 'author_exactly', 'id' => 'author_exactly')), 'IPAddressField' => '<input class="form-control input-sm input-large" type="text"' . HtmlForm::genInputTextField('15', 'ip_address', 52, prepareHTMLDisplay(@$this->_search_filter['ip_address'])) . ' />', 'ProductNameField' => '<input class="form-control input-sm input-large" style="float:left;" type="text"' . HtmlForm::genInputTextField('128', 'product_name', 52, prepareHTMLDisplay(@$this->_search_filter['product']['name'])) . ' />', 'ProductCheckbox' => HtmlForm::genCheckbox(array('value' => 'Y', 'is_checked' => @$this->_search_filter['product']['exactly'] == 'Y' ? 'checked' : '', 'name' => 'product_exactly', 'id' => 'product_exactly')), 'RatingSelect' => HtmlForm::genDropdownSingleChoice(array('select_name' => 'rate', 'selected_value' => @$this->_search_filter['rating']['rate'], 'id' => 'rate', 'class' => 'input-small rating-margin-btm', 'values' => modApiFunc('Customer_Reviews', 'getRateValues'))), 'RatingAddSelect' => HtmlForm::genDropdownSingleChoice(array('select_name' => 'rate_range', 'selected_value' => @$this->_search_filter['rating']['range'], 'id' => 'rate_range', 'class' => 'input-small', 'values' => array(array('value' => '+', 'contents' => getMsg('CR', 'CR_ABOVE')), array('value' => '=', 'contents' => getMsg('CR', 'CR_EXACTLY')), array('value' => '-', 'contents' => getMsg('CR', 'CR_BELOW'))))), 'StatusSelect' => HtmlForm::genDropdownSingleChoice(array('select_name' => 'status', 'selected_value' => @$this->_search_filter['status'], 'id' => 'status', 'class' => 'input-small', 'values' => array(array('value' => 'All', 'contents' => getMsg('CR', 'CR_STATUS_ALL')), array('value' => 'A', 'contents' => getMsg('CR', 'CR_STATUS_APPROVED')), array('value' => 'P', 'contents' => getMsg('CR', 'CR_STATUS_PENDING')), array('value' => 'N', 'contents' => getMsg('CR', 'CR_STATUS_NOTAPPROVED'))))));
$this->_Template_Contents = $template_contents;
$application->registerAttributes($this->_Template_Contents);
return $this->mTmplFiller->fill('customer_reviews/manage_customer_reviews/', 'search-reviews.tpl.html', array());
}
示例12: output
/**
* Outputs form contents.
*/
function output()
{
global $application;
$obj =& $application->getInstance('MessageResources');
$retval = '';
loadCoreFile('html_form.php');
$HtmlForm1 = new HtmlForm();
$request = new Request();
$request->setView("AdminPasswordUpdate");
$request->setAction("PasswordUpdate");
$form_action = $request->getURL();
$this->_Template_Content = array("HiddenArrayViewState" => $this->outputViewState(), "FORM" => $HtmlForm1->genForm($form_action, "POST", ""), "Email" => $HtmlForm1->genInputTextField("255", "AdminEmail", "40", $this->POST["AdminEmail"]), "Password" => $HtmlForm1->genHiddenField("Password", $this->POST["Password"]), "Old_Password" => $HtmlForm1->genInputTextField("255", "Old_Password", "40", ""), "New_Password" => $HtmlForm1->genInputTextField("255", "New_Password", "40", ""), "Verify_New_Password" => $HtmlForm1->genInputTextField("255", "Verify_New_Password", "40", ""), "Errors" => $this->outputErrors(), "PSWUPD_000" => $obj->getMessage(new ActionMessage("PSWUPD_000")), "PSWUPD_001" => $obj->getMessage(new ActionMessage("PSWUPD_001")), "PSWUPD_002" => $obj->getMessage(new ActionMessage("PSWUPD_002")), "PSWUPD_003" => $obj->getMessage(new ActionMessage("PSWUPD_003")), "PSWUPD_004" => $obj->getMessage(new ActionMessage("PSWUPD_004")), "PSWUPD_005" => $obj->getMessage(new ActionMessage("PSWUPD_005")), "PSWUPD_006" => $obj->getMessage(new ActionMessage("PSWUPD_006")), "PSWUPD_007" => $obj->getMessage(new ActionMessage("PSWUPD_007")));
$application->registerAttributes($this->_Template_Content);
$retval = modApiFunc('TmplFiller', 'fill', "users/", "password_update.tpl.html", array());
return $retval;
}
示例13: output
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());
}
示例14: output
/**
* Return the "PromoCodes -> Add Promo Code" view html code.
*
*/
function output()
{
global $application;
loadCoreFile('html_form.php');
$this->Hints =& $application->getInstance('Hint');
$HtmlForm1 = new HtmlForm();
$this->MessageResources =& $application->getInstance('MessageResources', "promo-codes-messages", "AdminZone");
if ($this->ViewState["hasCloseScript"] == "true") {
modApiFunc("application", "closeChild_UpdateParent");
}
// $promo_code_summary = ;
$promo_code_order_list = $this->outputOrderList();
$this->_Template_Contents = array("OrderList" => $promo_code_order_list);
$application->registerAttributes($this->_Template_Contents);
$template_contents = array("Subtitle" => $this->outputSubtitle(), "Errors" => $this->outputErrors(), "PromoCodeId" => $this->outputPromoCodeId(), "PromoCodeSummary" => $this->outputPromoCodeSummary(), "PromoCodeEffectiveAreaLaconic" => $this->outputEffectiveAreaLaconic(), "OrderList" => $promo_code_order_list, "PromoCodeCampaignNameError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_001']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_001'] : "", "PromoCodeCampaignNameInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_001']) ? "error" : "", "PromoCodeCampaignName" => $HtmlForm1->genInputTextField("128", "PromoCodeCampaignName", "75", prepareHTMLDisplay($this->POST["PromoCodeCampaignNameText"])), "PromoCodeCampaignFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_CAMPAIGN_NAME_NAME', 'promo-codes-messages')), "PromoCodePromoCodeError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_002']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_002'] : "", "PromoCodePromoCodeInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_002']) ? "error" : "", "PromoCodePromoCode" => $HtmlForm1->genInputTextField("128", "PromoCodePromoCode", "75", prepareHTMLDisplay($this->POST["PromoCodePromoCodeText"])), "PromoCodePromoCodeFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_PROMO_CODE_NAME', 'promo-codes-messages')), "PromoCodeStatusError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_004']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_004'] : "", "PromoCodeStatusInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_004']) ? "error" : "", "PromoCodeStatus" => $this->outputStatus(), "PromoCodeStatusFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_STATUS_NAME', 'promo-codes-messages')), "PromoCodeMinSubtotalError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_005']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_005'] : "", "PromoCodeMinSubtotalInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_005']) ? "error" : "", "PromoCodeMinSubtotal" => $HtmlForm1->genInputTextField("10", "PromoCodeMinSubtotal", "10", prepareHTMLDisplay($this->POST["PromoCodeMinSubtotalText"])), "PromoCodeMinSubtotalFormat" => modApiFunc("Localization", "format_settings_for_js", "currency"), "PromoCodeMinSubtotalSign" => modApiFunc("Localization", "getCurrencySign"), "PromoCodeMinSubtotalFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_MIN_SUBTOTAL_NAME', 'promo-codes-messages')), "PromoCodeDiscountCostError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_006']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_006'] : "", "PromoCodeDiscountCostInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_006']) ? "error" : "", "PromoCodeDiscountCost" => $HtmlForm1->genInputTextField("10", "PromoCodeDiscountCost", "10", prepareHTMLDisplay($this->POST["PromoCodeDiscountCostText"])), "PromoCodeDiscountCostFormat" => modApiFunc("Localization", "format_settings_for_js", "currency"), "PromoCodeDiscountCostFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_DISCOUNT_COST_NAME', 'promo-codes-messages')), "PromoCodeDiscountCostTypeIDError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_007']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_007'] : "", "PromoCodeDiscountCostTypeIDInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_007']) ? "error" : "", "PromoCodeDiscountCostTypeID" => $this->outputDiscountCostTypeID(), "PromoCodeStartDateFYearError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_008']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_008'] : "", "PromoCodeStartDateFYearInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_008']) ? "error" : "", "PromoCodeStartDateFYear" => $this->outputFYear("StartDate"), "PromoCodeStartDateFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_START_DATE_NAME', 'promo-codes-messages')), "PromoCodeStartDateMonthError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_009']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_009'] : "", "PromoCodeStartDateMonthInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_009']) ? "error" : "", "PromoCodeStartDateMonth" => $this->outputMonth("StartDate"), "PromoCodeStartDateDayError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_010']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_010'] : "", "PromoCodeStartDateDayInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_010']) ? "error" : "", "PromoCodeStartDateDay" => $this->outputDay("StartDate"), "PromoCodeEndDateFYearError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_011']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_011'] : "", "PromoCodeEndDateFYearInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_011']) ? "error" : "", "PromoCodeEndDateFYear" => $this->outputFYear("EndDate"), "PromoCodeEndDateFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_END_DATE_NAME', 'promo-codes-messages')), "PromoCodeEndDateMonthError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_012']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_012'] : "", "PromoCodeEndDateMonthInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_012']) ? "error" : "", "PromoCodeEndDateMonth" => $this->outputMonth("EndDate"), "PromoCodeEndDateDayError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_013']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_013'] : "", "PromoCodeEndDateDayInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_013']) ? "error" : "", "PromoCodeEndDateDay" => $this->outputDay("EndDate"), "PromoCodeTimesToUseError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_014']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_014'] : "", "PromoCodeTimesToUseInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_014']) ? "error" : "", "PromoCodeTimesToUse" => $HtmlForm1->genInputTextField("10", "PromoCodeTimesToUse", "10", prepareHTMLDisplay($this->POST["PromoCodeTimesToUseText"])), "PromoCodeTimesToUseFormat" => modApiFunc("Localization", "format_settings_for_js", "item"), "PromoCodeTimesToUseFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_TIMES_TO_USE_NAME', 'promo-codes-messages')), "PromoCodeBIgnoreOtherDiscountsError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_003']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_003'] : "", "PromoCodeBIgnoreOtherDiscountsInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_003']) ? "error" : "", "PromoCodeBIgnoreOtherDiscounts" => $this->outputBIgnoreOtherDiscounts(), "PromoCodeBIgnoreOtherDiscountsFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_B_IGNORE_OTHER_DISCOUNTS_NAME', 'promo-codes-messages')), "PromoCodeOffersFreeShippingFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_OFFERS_FREE_SHIPPING_NAME', 'promo-codes-messages')), "PromoCodeOffersFreeShippingOptions" => $this->outputFreeShippingOptions(), "PromoCodeOffersFreeHandlingFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_OFFERS_FREE_HANDLING_NAME', 'promo-codes-messages')), "PromoCodeOffersFreeHandlingOptions" => $this->outputFreeHandlingOptions(), "PromoCodeStrictCartFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_STRICT_CART_NAME', 'promo-codes-messages')), "PromoCodeStrictCartOptions" => $this->outputStrictCartOptions(), "AddPromoCodeForm" => $HtmlForm1->genForm(modApiFunc("application", "getPagenameByViewname", "PromoCodesNavigationBar", -1, -1, 'AdminZone'), "POST", "AddPromoCodeForm"), "HiddenFormSubmitValue" => $HtmlForm1->genHiddenField("FormSubmitValue", "Save"), "HiddenArrayViewStateConstants" => $this->outputViewStateConstants(), "HiddenArrayViewState" => $this->outputViewState(), "SubmitSaveScript" => $HtmlForm1->genSubmitScript("AddPromoCodeForm"));
$this->_Template_Contents = $template_contents;
$application->registerAttributes($this->_Template_Contents);
$SpecMessageResources =& $application->getInstance('MessageResources');
//: correct error codes
$output = modApiFunc('TmplFiller', 'fill', './../../js/', 'validate.msgs.js.tpl', array("STRING1024" => $SpecMessageResources->getMessage(new ActionMessage(array('CATADD_001'))), "STRING128" => $SpecMessageResources->getMessage(new ActionMessage(array('CATADD_002'))), "STRING256" => $SpecMessageResources->getMessage(new ActionMessage(array('CATADD_003'))), "STRING512" => $SpecMessageResources->getMessage(new ActionMessage(array('CATADD_004'))), "INTEGER" => $SpecMessageResources->getMessage(new ActionMessage(array('PRDADD_001'))), "FLOAT" => $SpecMessageResources->getMessage(new ActionMessage(array('PRDADD_002'))), "CURRENCY" => addslashes($SpecMessageResources->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($SpecMessageResources->getMessage(new ActionMessage(array('WEIGHT_FIELD', modApiFunc("Localization", "FloatToFormatStr", 23.325, "weight"), modApiFunc("Localization", "FloatToFormatStr", 34, "weight"), modApiFunc("Localization", "FloatToFormatStr", 99.2, "weight"))))), "ITEM" => $SpecMessageResources->getMessage(new ActionMessage(array('ITEM_FIELD')))));
return $output . $this->mTmplFiller->fill("promo_codes/add_promo_code/", "list.tpl.html", array());
}
示例15: output
/**
* Outputs form contents.
*/
function output()
{
global $application;
$retval = '';
if ($this->outputErrors() == "" && $this->POST["AdminEmail"] != "") {
$request = new Request();
$request->setView("");
$this->_Template_Content = array("Email" => $this->POST["AdminEmail"], "ContinueLink" => $request->getURL());
$application->registerAttributes($this->_Template_Content);
$retval = modApiFunc('TmplFiller', 'fill', "users/", "password_recovery_success.tpl.html", array());
} else {
loadCoreFile('html_form.php');
$HtmlForm1 = new HtmlForm();
$request = new Request();
$request->setView("AdminPasswordRecovery");
$request->setAction("PasswordRecovery");
$form_action = $request->getURL();
$this->_Template_Content = array("HiddenArrayViewState" => $this->outputViewState(), "FORM" => $HtmlForm1->genForm($form_action, "POST", "PasswordRecoveryForm"), "Email" => $HtmlForm1->genInputTextField("255", "AdminEmail", "40", $this->POST["AdminEmail"]), "Errors" => $this->outputErrors());
$application->registerAttributes($this->_Template_Content);
$retval = modApiFunc('TmplFiller', 'fill', "users/", "password_recovery.tpl.html", array());
}
return $retval;
}