Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F726921
in-commerce
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Jan 6, 3:22 AM
Size
163 KB
Mime Type
text/x-diff
Expires
Wed, Jan 8, 3:22 AM (2 d, 1 h ago)
Engine
blob
Format
Raw Data
Handle
537006
Attached To
rMINC Modules.In-Commerce
in-commerce
View Options
Index: branches/5.3.x/units/products/products_tag_processor.php
===================================================================
--- branches/5.3.x/units/products/products_tag_processor.php (revision 15970)
+++ branches/5.3.x/units/products/products_tag_processor.php (revision 15971)
@@ -1,861 +1,861 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
class ProductsTagProcessor extends kCatDBTagProcessor {
function Rating($params)
{
$object = $this->getObject($params);
$rating = round($object->GetDBField('CachedRating') );
$o = '';
for ($i = 0; $i < $rating; $i++) {
$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'star_on_render_as,block_star_on')) );
}
for ($i = 0; $i < 5 - $rating; $i++) {
$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'star_off_render_as,block_star_off')) );
}
return $o;
}
function NewMark($params)
{
$object = $this->getObject($params);
$o = '';
if($object->GetDBField('IsNew'))
{
$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'render_as,block')) );
}
return $o;
}
function HotMark($params)
{
$object = $this->getObject($params);
$o = '';
if($object->GetDBField('IsHot'))
{
$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'render_as,block')) );
}
return $o;
}
function TopSellerMark($params)
{
return $this->HotMark($params);
}
function PopMark($params)
{
$object = $this->getObject($params);
$o = '';
if($object->GetDBField('IsPop'))
{
$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'render_as,block')) );
}
return $o;
}
function EdPickMark($params)
{
$object = $this->getObject($params);
$o = '';
if($object->GetDBField('EditorsPick'))
{
$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'render_as,block')) );
}
return $o;
}
/**
* Parses block only if item is favorite
*
* @param Array $params
* @return string
* @deprecated used only in default,onlinestore
*/
function FavoriteMark($params)
{
if ($this->IsFavorite($params)) {
return $this->Application->ParseBlock( Array( 'name' => $this->SelectParam($params, 'render_as,block') ) );
}
return '';
}
function CurrentCategory($params)
{
$sql = "SELECT Name
FROM " . TABLE_PREFIX . "Categories
WHERE CategoryId=" . $this->Application->GetVar("m_cat_id");
return $this->Conn->GetOne($sql);
}
function RateForm($params)
{
$params['name'] = $this->SelectParam($params, 'render_as,block');
$labels = explode(',', $params['labels']);
$o = '';
$star_block = $this->SelectParam($params, 'star_render_as,star_block');
for($i = 5; $i >= 0; $i--)
{
$params['rating'] = $i;
$params['label'] = $this->Application->Phrase($labels[5 - $i]);
$params['stars'] = '';
for($j = $i; $j > 0; $j--)
{
$params['stars'] .= $this->Application->ParseBlock(Array('name' => $star_block));
}
$o .= $this->Application->ParseBlock($params);
}
return $o;
}
/**
* Parses block for changing favorite status
*
* @param Array $params
* @return string
* @deprecated used only in default,onlinestore
*/
function FavoriteToggle($params)
{
$block_params = Array ();
$block_names = $this->IsFavorite($params) ? 'remove_favorite_render_as,block_remove_favorite' : 'add_favorite_render_as,block_add_favorite';
$block_params['name'] = $this->SelectParam($params, $block_names);
$params['template'] = $params[$this->IsFavorite($params) ? 'template_on_remove' : 'template_on_add'];
$remove_params = Array (
'remove_favorite_render_as', 'block_remove_favorite', 'add_to_wish_list_render_as', 'block_add_to_wish_list',
'add_favorite_render_as', 'block_add_favorite', 'remove_from_wish_list_render_as', 'block_remove_from_wish_list',
'template_on_remove', 'template_on_add'
);
foreach ($params as $param_name => $param_value) {
if (in_array($param_name, $remove_params)) {
unset($params[$param_name]);
}
}
$block_params['wish_list_toggle_link'] = $this->FavoriteToggleLink($params);
return $this->Application->ParseBlock($block_params);
}
function WishListToggleLink($params)
{
$params['block_add_favorite'] = $this->SelectParam($params, 'add_to_wish_list_render_as,block_add_to_wish_list');
$params['block_remove_favorite'] = $this->SelectParam($params, 'remove_from_wish_list_render_as,block_remove_from_wish_list');
return $this->FavoriteToggle($params);
}
function AddReviewLink($params)
{
$o = $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'render_as,block')) );
return $o;
}
function ListProducts($params)
{
return $this->PrintList2($params);
}
function ListRelatedProducts($params)
{
// $related = $this->Application->recallObject('rel');
return $this->PrintList2($params);
}
function BuildListSpecial($params)
{
if ($this->Special != '') return $this->Special;
if ( isset($params['parent_cat_id']) ) {
$parent_cat_id = $params['parent_cat_id'];
}
else {
$parent_cat_id = $this->Application->GetVar('c_id');
if (!$parent_cat_id) {
$parent_cat_id = $this->Application->GetVar('m_cat_id');
}
}
if ( isset($params['manufacturer']) ) {
$manufacturer = $params['manufacturer'];
}
else {
$manufacturer = $this->Application->GetVar('manuf_id');
}
$recursive = isset($params['recursive']);
$list_unique_key = $this->getUniqueListKey($params).$recursive;
if ($list_unique_key == '') {
return parent::BuildListSpecial($params);
}
return crc32($parent_cat_id.$list_unique_key.$manufacturer);
}
function ProductList($params)
{
if($params['shortlist'])
{
$params['per_page'] = $this->Application->ConfigValue('Comm_Perpage_Products_Short');
}
$object = $this->Application->recallObject( $this->getPrefixSpecial() , $this->Prefix.'_List', $params );
switch($params['ListType'])
{
case 'favorites':
return $this->PrintList($params);
break;
case 'search':
default:
if(isset($params['block']))
{
return $this->PrintList($params);
}
else
{
$params['block'] = $params['block_main'];
$params['row_start_block'] = $params['block_row_start'];
$params['row_end_block'] = $params['block_row_end'];
return $this->PrintList2($params);
}
}
}
/**
* Adds product to recently viewed list (only in case, when not already there)
*
* @param Array $params
*/
function AddToRecent($params)
{
$recent_products = $this->Application->RecallVar('recent_products');
if (!$recent_products) {
$recent_products = Array();
}
else {
$recent_products = unserialize($recent_products);
}
$product_id = $this->Application->GetVar('p_id');
if (!in_array($product_id, $recent_products)) {
array_push($recent_products, $product_id);
$this->Application->StoreVar('recent_products', serialize($recent_products));
}
}
function SearchMoreLink($params)
{
$object =& $this->GetList($params);
$o = '';
if($object->GetPerPage() < $this->SearchResultsCount())
{
$o = $this->Application->ParseBlock( Array('name' => $params['block']) );
}
return $o;
}
function AddToCartLink($params)
{
$object = $this->getObject($params);
if ($object->GetDBField('HasRequiredOptions')) {
$t = $params['product_template'];
if (!$t) {
$theme = $this->Application->recallObject('theme.current');
if ($theme->GetDBField('Name') == 'onlinestore') {
$t = 'in-commerce/product/details';
}
elseif ($theme->GetDBField('Name') == 'default') {
$t = 'in-commerce/product';
}
}
$link_params = Array('m_cat_id' => $object->GetDBField('CategoryId'), 'pass' => 'm,p');
}
else {
$t = $params['template'];
$link_params = Array('m_cat_id' => $object->GetDBField('CategoryId'), 'pass' => 'm,p,ord', 'ord_event' => 'OnAddToCart');
}
$this->Application->SetVar('p_id', $this->Application->GetVar($this->getPrefixSpecial().'_id'));
return $this->Application->HREF($t, '', $link_params);
}
function SearchResultsCount($params)
{
$search_results_table = TABLE_PREFIX.'ses_'.$this->Application->GetSID().'_'.TABLE_PREFIX.'Search';
$sql = ' SELECT COUNT(ResourceId)
FROM '.$search_results_table.'
WHERE ItemType=11';
return $this->Conn->GetOne($sql);
}
function DetailsLink($params)
{
$this->Application->SetVar( $this->Prefix.'_id', $this->Application->GetVar($this->getPrefixSpecial().'_id') );
$ret = $this->Application->HREF('in-commerce/details', '', Array('pass' => 'all,p'));
return $ret;
}
function ProductLink($params)
{
return $this->ItemLink($params, 'product');
}
function ProductFileLink($params)
{
// 'p_id'=>'0', ??
$params = array_merge($params, Array('pass'=>'all,m,p,file.downl'));
$product_id = getArrayValue($params,'product_id');
if (!$product_id) {
$product_id = $this->Application->GetVar($this->Prefix.'_id');
}
$params['p_id'] = $product_id;
$product = $this->Application->recallObject($this->getPrefixSpecial());
$params['m_cat_id'] = $product->GetDBField('CategoryId');
$main_processor = $this->Application->recallObject('m_TagProcessor');
return $main_processor->T($params);
}
function GetMarkedVal($params)
{
$list =& $this->GetList($params);
return $this->Application->RecallVar($list->getPrefixSpecial().$params['name']);
}
function SortingOptions($params)
{
$list =& $this->GetList($params);
$sorting_field_selected = $this->Application->RecallVar($list->getPrefixSpecial() . $params['sorting_select_name']);
if ( !$sorting_field_selected ) {
$sorting_field_selected = $this->Application->ConfigValue('product_OrderProductsBy');
}
$sql = 'SELECT ValueList
FROM ' . TABLE_PREFIX . 'SystemSettings
WHERE VariableName = "product_OrderProductsBy"';
$field_list_plain = $this->Conn->GetOne($sql);
$field_list = explode(',', $field_list_plain);
$o = '';
$option_params = $this->prepareTagParams($params);
foreach ($field_list as $field) {
list($fieldname, $fieldlabel) = explode('=', $field);
$option_params['fieldname'] = $fieldname;
$option_params['fieldlabel'] = $this->Application->Phrase($fieldlabel);
$option_params['name'] = $params['block_options'];
$option_params['selected'] = $fieldname == $sorting_field_selected ? 'selected' : '';
$o .= $this->Application->ParseBlock($option_params);
}
return $o;
}
function SortingDirectionOptions($params)
{
$list =& $this->GetList($params);
$sorting_dir_selected = $this->Application->RecallVar($list->getPrefixSpecial() . $params['sorting_select_name']);
if ( !$sorting_dir_selected ) {
$sorting_dir_selected = $this->Application->ConfigValue('product_OrderProductsByDir');
}
$o = '';
$field_list = array ('asc' => 'lu_Ascending', 'desc' => 'lu_Descending');
$option_params = $this->prepareTagParams($params);
foreach ($field_list as $fieldname => $fieldlabel) {
$option_params['fieldname'] = $fieldname;
$option_params['fieldlabel'] = $this->Application->Phrase($fieldlabel);
$option_params['name'] = $params['block_options'];
$option_params['selected'] = $fieldname == $sorting_dir_selected ? 'selected' : '';
$o .= $this->Application->ParseBlock($option_params);
}
return $o;
}
function ErrorMessage($params)
{
if( $this->Application->GetVar('keywords_too_short') )
{
$ret = $this->Application->ParseBlock(Array('name' => $this->SelectParam($params, 'keywords_too_short_render_as,block_keywords_too_short')));
}
elseif( $this->Application->GetVar('adv_search_error') )
{
$ret = $this->Application->ParseBlock(Array('name' => $this->SelectParam($params, 'adv_search_error_render_as,block_adv_search_error')));
}
else
{
$ret = $this->Application->ParseBlock(Array('name' => $this->SelectParam($params, 'no_found_render_as,block_no_found')));
}
return $ret;
}
function ListReviews($params)
{
$review_tag_processor = $this->Application->recallObject('rev.product_TagProcessor');
return $review_tag_processor->PrintList($params);
}
function ReviewCount($params)
{
$review_tag_processor = $this->Application->recallObject('rev.product_TagProcessor');
return $review_tag_processor->TotalRecords($params);
}
function InitList($params){
$passed_manuf_id = $this->Application->GetVar('manuf_id');
if ($passed_manuf_id && !isset($params['manufacturer'])){
$params['manufacturer'] = $passed_manuf_id;
}
parent::InitList($params);
}
/**
* Builds link to manufacturer page
*
* @param Array $params
* @return string
*/
function ManufacturerLink($params)
{
if ( array_key_exists('manufacturer_id', $params) ) {
// use direct manufacturer from tag
$params['manuf_id'] = $params['manufacturer_id'];
unset($params['manufacturer_id']);
}
else {
// use product's manufacturer
$object = $this->getObject($params);
$item_manufacturer_id = $object->GetDBField('ManufacturerId');
if ($item_manufacturer_id){
$params['manuf_id'] = $item_manufacturer_id;
}
}
$params['pass'] = 'm,manuf';
$params['m_cat_id'] = 0;
return $this->Application->ProcessParsedTag('m', 'Link', $params);
}
function AlreadyReviewed($params)
{
$rev_tag_processor = $this->Application->recallObject('rev_TagProcessor');
return $rev_tag_processor->AlreadyReviewed($params);
}
function PrepareSearchResults($params)
{
$names_mapping = $this->Application->GetVar('NamesToSpecialMapping', Array ());
if($this->Application->GetVar('search_type') == 'advanced' || !getArrayValue($names_mapping, $this->Prefix, 'search_results'))
{
$params = Array('list_name' => 'search_results',
'types' => 'search',
'parent_cat_id' => 'any',
'recursive' => 'true',
'per_page' => 'short_list'
);
$this->InitList($params);
}
return '';
}
function Available($params)
{
$object = $this->getObject($params);
/* @var $object kDBItem */
if ( !$object->GetDBField('InventoryStatus') ) {
return true;
}
$backordering = $this->Application->ConfigValue('Comm_Enable_Backordering');
if ( $object->GetDBField('InventoryStatus') == 2 ) {
$poc_table = $this->Application->getUnitConfig('poc')->getTableName();
$sql = 'SELECT SUM(IF(QtyInStock > ' . $object->GetDBField('QtyInStockMin') . ', 1, 0))
FROM ' . $poc_table . '
WHERE (ProductId = ' . $object->GetID() . ') AND (Availability = 1)';
$stock_available = $this->Conn->GetOne($sql) > 0; // at least one option combination present
}
else {
$stock_available = $object->GetDBField('QtyInStock') > $object->GetDBField('QtyInStockMin');
}
$prod_backordering = $object->GetDBField('BackOrder');
if ( $stock_available ) {
return true;
}
// stock is NOT available:
if ( !$backordering || $prod_backordering == 0 ) {
// if backordering is generaly disabled or disabled for product (Never)
return false;
}
// backordering enabled; (auto or always mode)
return true;
}
function IsSubscription($params)
{
$object = $this->getObject($params);
/* @var $object kDBItem */
return ($object->GetDBField('Type') == 2);
}
function IsTangible($params)
{
$object = $this->getObject($params);
/* @var $object kDBItem */
return ($object->GetDBField('Type') == 1);
}
function HasFiles($params)
{
$sql = 'SELECT COUNT(FileId)
FROM '.$this->Application->getUnitConfig('file')->getTableName().'
WHERE ProductId = '.$this->Application->GetVar('p_id').' AND Status = 1';
return $this->Conn->GetOne($sql) ? 1 : 0;
}
function UniqueFileName($params)
{
$file_object = $this->Application->recallObject('file.downl');
return ($file_object->GetDBField('Name') &&
$file_object->GetDBField('Name') != $file_object->GetDBField('FilePath'))
? 1 : 0;
}
function FileDownload($params)
{
$file_id = $this->Application->GetVar('file.downl_id');
$product_id = $file_id ? $this->Conn->GetOne('SELECT ProductId
FROM '.$this->Application->getUnitConfig('file')->getTableName().'
WHERE FileId = '.$file_id) :
$this->Application->GetVar($this->getPrefixSpecial().'_id');
$download_helper_class = $this->getUnitConfig()->getDownloadHelperClass('DownloadHelper');
$download_helper = $this->Application->recallObject($download_helper_class);
if (!$download_helper->CheckAccess($file_id, $product_id)) {
$this->Application->ApplicationDie('File Access permission check failed!');
}
$file_info = $download_helper->SendFile($file_id, $product_id);
$download_helper->LogDownload($product_id, $file_info);
define('DBG_SKIP_REPORTING', 1);
$this->Application->ApplicationDie();
}
function PictureLink($params)
{
if (getArrayValue($params, 'picture_list')) {
$params['img_id'] = $this->Application->GetVar('img_id');
$params['pass'] = 'all,p,img';
unset($params['picture_list']);
}
else {
$params['pass'] = 'all,p';
}
return $this->Application->ProcessParsedTag('m', 'Link', $params);
}
function ShouldListOptions($params)
{
$object = $this->getObject($params);
$req_filter = '';
if (getArrayValue($params, 'required_only')) {
$req_filter = ' AND Required = 1';
}
$query = 'SELECT COUNT(*) FROM '.TABLE_PREFIX.'ProductOptions WHERE ProductId = '.$object->GetID().$req_filter;
$res = $this->Conn->GetOne($query);
return $res > 0;
}
function CountOptions($params)
{
$object = $this->getObject($params);
$query = 'SELECT COUNT(*) FROM '.TABLE_PREFIX.'ProductOptions WHERE ProductId = '.$object->GetID();
$res = $this->Conn->GetOne($query);
$max = $this->SelectParam($params, 'greater');
if (!$max) $max = 0;
return $res > $max;
}
function OptionsUpdateMode($params)
{
return $this->Application->GetVar('orditems_id') !== false;
}
function OptionsHaveError($params)
{
return $this->Application->GetVar('opt_error') > 0;
}
function OptionsError($params)
{
switch ($this->Application->GetVar('opt_error')) {
case 1:
return $this->Application->Phrase($params['required']);
case 2:
return $this->Application->Phrase($params['not_available']);
}
}
function ListShippingTypes($params)
{
$quote_engine_collector = $this->Application->recallObject('ShippingQuoteCollector');
/* @var $quote_engine_collector ShippingQuoteCollector */
$types = $quote_engine_collector->GetAvailableShippingTypes();
$object = $this->getObject($params);
$selected = $object->GetDBField('ShippingLimitation');
$selected = explode('|', substr($selected, 1, -1));
$o = '';
foreach ($types as $a_type)
{
$is_selected = in_array($a_type['_Id'], $selected);
$continue = $params['mode'] == 'selected' ? !$is_selected : $is_selected;
if ($continue) continue;
$block_params = $a_type;
$block_params['name'] = $params['render_as'];
$o .= $this->Application->ParseBlock($block_params);
}
return $o;
}
function PageLink($params)
{
$manufacturer_id = $this->Application->GetVar('manuf_id');
if ($manufacturer_id) {
$params['pass'] = 'm,'.$this->getPrefixSpecial().',manuf';
}
return parent::PageLink($params);
}
/**
* Calculate savings based on price & market price relationship
*
* @param Array $params
* @return int
*/
function Savings($params)
{
$object = $this->getObject($params);
/* @var $object kDBItem */
$price = $object->GetDBField('Price');
$msrp = $object->GetDBField('MSRP');
$value = 0;
if (isset($params['type']) && ($params['type'] == 'percent')) {
if ($msrp > 0) {
return 100 - round($price * 100 / $msrp);
}
}
else {
if ($msrp > $price) {
$value = $msrp - $price;
}
}
if (isset($params['currency'])) {
$lang = $this->Application->recallObject('lang.current');
/* @var $lang LanguagesItem */
$iso = $this->GetISO($params['currency']);
$value = $this->ConvertCurrency($value, $iso);
$value = $lang->formatNumber( sprintf('%.2f', $value) );
$value = $this->AddCurrencySymbol($value, $iso);
}
return $value;
}
/**
* Hides permission tab, when it's not allowed by configuration settings
*
* @param Array $params
*/
function ModifyUnitConfig($params)
{
$config = $this->getUnitConfig();
$edit_tab_preset = $config->getEditTabPresetByName('Default');
$object = $this->getObject($params);
/* @var $object kDBItem */
$product_type = $object->GetDBField('Type');
if ($product_type != PRODUCT_TYPE_TANGIBLE) {
unset($edit_tab_preset['inventory']);
}
if ($product_type == PRODUCT_TYPE_SUBSCRIPTION) {
unset($edit_tab_preset['options']);
}
else {
unset($edit_tab_preset['access_and_pricing']);
}
if ($product_type != PRODUCT_TYPE_TANGIBLE && $product_type != PRODUCT_TYPE_PACKAGE) {
unset($edit_tab_preset['pricing']);
}
else {
unset($edit_tab_preset['pricing2']);
}
if ($product_type != PRODUCT_TYPE_DOWNLOADABLE) {
unset($edit_tab_preset['files_and_pricing']);
}
if ($product_type != PRODUCT_TYPE_PACKAGE) {
unset($edit_tab_preset['package_content']);
}
$config->addEditTabPresets($edit_tab_preset, 'Default');
}
/**
* Checks, that current product is in compare products list
*
* @param Array $params
* @return string
* @access protected
*/
protected function InCompare($params)
{
$object = $this->getObject($params);
/* @var $object kDBItem */
$products = $this->Application->GetVarDirect('compare_products', 'Cookie');
$products = $products ? explode('|', $products) : Array ();
return in_array($object->GetID(), $products);
}
/**
* Checks, that one more product can be added to comparison list
*
* @param Array $params
* @return string
* @access protected
*/
protected function ComparePossible($params)
{
$products = $this->Application->GetVarDirect('compare_products', 'Cookie');
$products = $products ? explode('|', $products) : Array ();
return count($products) < $this->Application->ConfigValue('MaxCompareProducts');
}
/**
* Checks if given field is filled for at least one product in comparison page
*
* @param Array $params
* @return string
* @access protected
*/
protected function HasCompareField($params)
{
$object =& $this->GetList($params);
$object->GoFirst();
$field = $this->SelectParam($params, 'name,field');
while ( !$object->EOL() ) {
if ( $object->GetField($field) ) {
// don't use GetCol, since it fails to process ML fields
return true;
}
$object->GoNext();
}
return false;
}
/**
* Builds link to product compare page
*
* @param Array $params
* @return string
* @access protected
*/
protected function CompareLink($params)
{
- $params['continue'] = kUtil::escape($this->Application->HREF('__default__', '', Array ('pass_category' => 1)), kUtil::ESCAPE_URL);
+ $params['continue'] = $this->Application->HREF('__default__', '', Array ('pass_category' => 1));
return $this->Application->ProcessParsedTag('m', 'Link', $params);
}
/**
* Builds link to continue website browsing from compare products page
*
* @param Array $params
* @return string
* @access protected
*/
protected function ContinueLink($params)
{
$url = $this->Application->GetVar('continue');
if ( isset($params['redirect']) && $params['redirect'] ) {
$this->Application->Redirect('external:' . $url);
}
return $url;
}
}
\ No newline at end of file
Index: branches/5.3.x/admin_templates/shipping/shipping_costs.tpl
===================================================================
--- branches/5.3.x/admin_templates/shipping/shipping_costs.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/shipping/shipping_costs.tpl (revision 15971)
@@ -1,216 +1,216 @@
<inp2:adm_SetPopupSize width="850" height="610"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="s" section="in-commerce:shipping" title_preset="costs" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
var $checked_count = 0;
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('s','<inp2:s_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('s','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('s', '<inp2:s_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('s', '<inp2:s_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('in-commerce:flip', '<inp2:m_phrase label="la_ToolTip_Flip" escape="1"/>',
function() {
submit_event('s','OnFlip');
} ) );
a_toolbar.AddButton( new ToolBarButton('in-commerce:clear_all', '<inp2:m_phrase label="la_ToolTip_ClearAll" escape="1"/>', function() {
if(confirm('<inp2:m_phrase label="la_ClearCostsWarning"/>'))
submit_event('sc','OnClearAll');
}
) );
a_toolbar.AddButton( new ToolBarButton('in-commerce:modify', '<inp2:m_phrase label="la_ToolTip_Modify" escape="1"/>',
function() {
- openSelector('s', '<inp2:m_t t="in-commerce/shipping/modify_selector" pass="all,sc" sc_event="OnSaveCreated"/>');
+ openSelector('s', '<inp2:m_t t="in-commerce/shipping/modify_selector" pass="all,sc" sc_event="OnSaveCreated" no_amp="1" js_escape="1"/>');
} ) );
a_toolbar.Render();
a_toolbar.DisableButton('modify');
<inp2:m_if check="s_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="s_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="s_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
function reflect_toolbar($prefix_special, $id, $field)
{
var $element = document.getElementById($prefix_special+'['+$id+']['+$field+']');
if($element.checked)
{
$checked_count++;
}
else
{
$checked_count--;
}
if($checked_count)
{
a_toolbar.EnableButton('modify');
}
else
{
a_toolbar.DisableButton('modify');
}
}
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="row_header">
<td>
<input type="checkbox" name="<inp2:{$prefix}_InputName field="$IdField"/>" id="<inp2:{$prefix}_InputName field="$IdField"/>" value="<inp2:{$prefix}_field field="$IdField"/>" onclick="reflect_toolbar('<inp2:m_param name="prefix"/>', <inp2:{$prefix}_field field="$IdField"/>, '<inp2:m_param name="IdField"/>')">
<inp2:m_RenderElement name="$header_caption"/>
<a href="javascript:propagate_values('<inp2:m_param name="prefix"/>', <inp2:{$prefix}_field field="$IdField"/>)"><img src="<inp2:m_TemplatesBase module='In-Commerce'/>/img/list_horiz_propagate.gif" alt="<inp2:m_phrase label="la_PropagateValues"/>" border="0"></a>
</td>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="column_header">
<td align="center" style="border-left:1px solid black">
<input type="checkbox" name="<inp2:{$prefix}_InputName field="$IdField"/>" id="<inp2:{$prefix}_InputName field="$IdField"/>" value="<inp2:{$prefix}_field field="$IdField"/>" onclick="reflect_toolbar('<inp2:m_param name="prefix"/>', <inp2:{$prefix}_field field="$IdField"/>, '<inp2:m_param name="IdField"/>')">
<inp2:m_RenderElement name="$header_caption"/>
<a href="javascript:propagate_values('<inp2:m_param name="prefix"/>', <inp2:{$prefix}_field field="$IdField"/>)"><img src="<inp2:m_TemplatesBase module='In-Commerce'/>/img/list_vertic_propagate.gif" alt="<inp2:m_phrase label="la_PropagateValues"/>" border="0"></a>
</td>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="zone_caption">
<nobr><inp2:z_field field="Name"/></nobr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="bracket_caption">
<inp2:m_if check="s_FieldEquals" name="Type" value="1">
<inp2:m_if check="lang.current_FieldEquals" field="UnitSystem" value="1">
<inp2:br_field field="Start"/> <inp2:m_Phrase label="la_kg" /> - <inp2:m_if check="br_fieldequals" field="End" value="-1">∞<inp2:m_else/><inp2:br_field field="End"/> <inp2:m_Phrase label="la_kg" /></inp2:m_if>
</inp2:m_if>
<inp2:m_if check="lang.current_FieldEquals" field="UnitSystem" value="2">
<inp2:br_field field="Start_a"/> <inp2:m_Phrase label="la_lbs" /> <inp2:br_field field="Start_b"/> <inp2:m_Phrase label="la_oz" /> - <inp2:m_if check="br_fieldequals" field="End" value="-1">∞<inp2:m_else/><inp2:br_field field="End_a"/> <inp2:m_Phrase label="la_lbs" /> <inp2:br_field field="End_b"/> <inp2:m_Phrase label="la_oz" /></inp2:m_if>
</inp2:m_if>
<inp2:m_else />
<nobr><inp2:br_field field="Start"/> - <inp2:m_if check="br_fieldequals" field="End" value="-1">∞<inp2:m_else/><inp2:br_field field="End" /></inp2:m_if></nobr>
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="cost_cell">
<td style="border-left:1px solid black" align="center">
<nobr>$ <input type="text" maxlength="<inp2:s_CostInputSize/>" size="<inp2:s_CostInputSize/>" name="<inp2:sc_InputName field="Flat"/><inp2:m_if check="s_fieldequals" field="CostType" value="2">_input</inp2:m_if>" id="<inp2:sc_InputName field="Flat"/><inp2:m_if check="s_fieldequals" field="CostType" value="2" >_input</inp2:m_if>" value="<inp2:sc_field field="Flat" />"<inp2:m_if check="s_fieldequals" field="CostType" value="2" > disabled</inp2:m_if>>
% <input type="text" maxlength="<inp2:s_CostInputSize/>" size="<inp2:s_CostInputSize/>" name="<inp2:sc_InputName field="PerUnit"/><inp2:m_if check="s_fieldequals" field="CostType" value="1">_input</inp2:m_if>" id="<inp2:sc_InputName field="PerUnit"/><inp2:m_if check="s_fieldequals" field="CostType" value="1" >_input</inp2:m_if>" value="<inp2:sc_field field="PerUnit" />"<inp2:m_if check="s_fieldequals" field="CostType" value="1" > disabled</inp2:m_if>></nobr>
<inp2:m_if check="s_fieldequals" field="CostType" value="2" >
<input type="hidden" name="<inp2:sc_InputName field="Flat"/>" id="<inp2:sc_InputName field="Flat"/>" value="<inp2:sc_field field="Flat"/>">
</inp2:m_if>
<inp2:m_if check="s_fieldequals" field="CostType" value="1" >
<input type="hidden" name="<inp2:sc_InputName field="PerUnit"/>" id="<inp2:sc_InputName field="PerUnit"/>" value="<inp2:sc_field field="PerUnit"/>">
</inp2:m_if>
<input type="hidden" name="<inp2:sc_InputName field="BracketId"/>" id="<inp2:sc_InputName field="BracketId"/>" value="<inp2:br_field field="BracketId"/>">
<input type="hidden" name="<inp2:sc_InputName field="ZoneID"/>" id="<inp2:sc_InputName field="ZoneID"/>" value="<inp2:z_field field="ZoneID"/>">
</td>
</inp2:m_DefineElement>
<inp2:sc_SaveWarning name="grid_save_warning"/>
<inp2:sc_ErrorWarning name="form_error_warning"/>
<div id="scroll_container" mode="minimal">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="la_section_General"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="s" field="CostType" title="la_fld_CostType"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="s" field="ZeroIfEmpty" title="la_fld_EmptyCellsAre" size="20"/>
<inp2:m_RenderElement design="form_row" prefix="s" field="PrecisionBeforeSep" title="la_Precision">
<td class="control-cell">
<select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:{$prefix}_InputName field="PrecisionBeforeSep"/>" id="<inp2:{$prefix}_InputName field="PrecisionBeforeSep"/>">
<inp2:m_if check="m_ParamEquals" name="use_phrases" value="1" >
<inp2:{$prefix}_PredefinedOptions field="PrecisionBeforeSep" block="inp_option_phrase" selected="selected"/>
<inp2:m_else/>
<inp2:{$prefix}_PredefinedOptions field="PrecisionBeforeSep" block="inp_option_item" selected="selected"/>
</inp2:m_if>
</select> , <select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:{$prefix}_InputName field="PrecisionAfterSep"/>" id="<inp2:{$prefix}_InputName field="PrecisionAfterSep"/>">
<inp2:m_if check="m_ParamEquals" name="use_phrases" value="1" >
<inp2:{$prefix}_PredefinedOptions field="PrecisionAfterSep" block="inp_option_phrase" selected="selected"/>
<inp2:m_else/>
<inp2:{$prefix}_PredefinedOptions field="PrecisionAfterSep" block="inp_option_item" selected="selected"/>
</inp2:m_if>
</select>
</td>
</inp2:m_RenderElement>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="la_section_ShippingCosts"/>
</table>
<div id="cost_container" style="overflow: auto;">
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder" style="border-top:none">
<inp2:s_ShowCostsTable/>
</table>
</div>
<input type="hidden" name="z_propagate_id" id="z_propagate_id" value="">
<input type="hidden" name="br_propagate_id" id="br_propagate_id" value="">
<script type="text/javascript">
function propagate_values(prefix,id)
{
document.getElementById(prefix + '_propagate_id').value = id;
submit_event('sc', 'OnPropagate');
}
document.getElementById('<inp2:s_InputName field="CostType"/>').onchange = saveShipping;
document.getElementById('<inp2:s_InputName field="PrecisionBeforeSep"/>').onchange = saveShipping;
document.getElementById('<inp2:s_InputName field="PrecisionAfterSep"/>').onchange = saveShipping;
function saveShipping()
{
submit_event('s', 'OnPreSave');
}
$(document).ready(
function() {
maximizeElement('#cost_container');
}
);
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.3.x/admin_templates/affiliate_plans/affiliate_plans_items.tpl
===================================================================
--- branches/5.3.x/admin_templates/affiliate_plans/affiliate_plans_items.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/affiliate_plans/affiliate_plans_items.tpl (revision 15971)
@@ -1,116 +1,116 @@
<inp2:adm_SetPopupSize width="750" height="400"/>
<inp2:m_include t="incs/header"/>
<inp2:m_if check="api_IsEntireOrder">
<inp2:m_SetParam grid="Default"/>
<inp2:m_else/>
<inp2:m_SetParam grid="AffiliatePlansItems"/>
</inp2:m_if>
<inp2:m_RenderElement name="combined_header" prefix="ap" section="in-commerce:affiliate_plans" grid="$grid" title_preset="affiliate_plans_items" pagination="1" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('ap','<inp2:ap_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('ap','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('ap', '<inp2:ap_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('ap', '<inp2:ap_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Products" escape="1"/>',
function() {
- openSelector('api', '<inp2:adm_SelectorLink prefix="api" selection_mode="multi" tabs_dependant="no" tab_prefixes="p"/>', '');
+ openSelector('api', '<inp2:adm_SelectorLink prefix="api" selection_mode="multi" tabs_dependant="no" tab_prefixes="p" no_amp="1" js_escape="1"/>', '');
} ) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('api')
} ) );
a_toolbar.AddButton( new ToolBarButton('entire_order', '<inp2:m_phrase label="la_ToolTip_EntireOrder" escape="1"/>',
function() {
if (inpConfirm('<inp2:m_phrase label="la_EntireOrderConfirmation"/>'))
{
submit_event('api', 'OnEntireOrder');
}
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
<inp2:m_if check="ap_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="ap_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="ap_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
function edit()
{
// required for correct row selection
}
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="api" grid="$grid"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="grid_item_checkbox_td">
<inp2:m_if check="FieldEquals" field="ItemType" value="1">
<inp2:Field field="ProductId" no_special="no_special"/>
<inp2:m_else/>
<inp2:Field field="CategoryId" no_special="no_special"/>
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="api" IdField="AffiliateItemId" grid="$grid"/>
<script type="text/javascript">
<inp2:m_if check="api_IsEntireOrder" >
a_toolbar.DisableButton('new_item');
</inp2:m_if>
Grids['api'].SetDependantToolbarButtons( new Array('delete') );
</script>
<input type="hidden" name="main_prefix" id="main_prefix" value="api">
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.3.x/admin_templates/affiliate_plans/affiliates_edit.tpl
===================================================================
--- branches/5.3.x/admin_templates/affiliate_plans/affiliates_edit.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/affiliate_plans/affiliates_edit.tpl (revision 15971)
@@ -1,102 +1,102 @@
<inp2:adm_SetPopupSize width="750" height="400"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="affil" section="in-commerce:affiliates" title_preset="affiliates_edit" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('affil','<inp2:affil_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('affil','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('affil', '<inp2:affil_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('affil', '<inp2:affil_NextId/>');
}
) );
<inp2:m_if check="affil_IsNewMode" inverse="inverse">
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('in-commerce:pay_out', '<inp2:m_phrase label="la_ToolTip_PayOut" escape="1"/>', function() {
- direct_edit('affil', '<inp2:m_t t="in-commerce/affiliate_plans/affiliates_payout" m_opener="d" apayments_event="OnNew" pass="all,apayments"/>');
+ direct_edit('affil', '<inp2:m_t t="in-commerce/affiliate_plans/affiliates_payout" m_opener="d" apayments_event="OnNew" pass="all,apayments" no_amp="1" js_escape="1"/>');
}
) );
</inp2:m_if>
a_toolbar.Render();
<inp2:m_if check="affil_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="affil_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="affil_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:affil_SaveWarning name="grid_save_warning"/>
<inp2:affil_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="la_section_General"/>
<inp2:m_RenderElement name="inp_id_label" prefix="affil" field="AffiliateId" title="la_fld_Id"/>
<inp2:m_RenderElement name="inp_edit_user" prefix="affil" field="PortalUserId" title="la_fld_Username"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="affil" field="AffiliatePlanId" title="la_fld_AffiliatePlan"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="affil" field="PaymentTypeId" title="la_fld_PaymentType"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="affil" field="SSN" title="la_fld_SSN" />
<inp2:m_RenderElement name="inp_edit_radio" prefix="affil" field="Status" title="la_fld_Status"/>
<inp2:m_RenderElement name="inp_edit_date" prefix="affil" field="CreatedOn" title="la_fld_RegisteredOn" />
<inp2:m_RenderElement name="inp_edit_textarea" prefix="affil" field="Comments" title="la_fld_Comments" cols="40" rows="5"/>
<inp2:m_if check="affil_IsNewMode" inverse="inverse">
<inp2:m_RenderElement name="subsection" title="la_section_AdvertisingMaterials"/>
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="label-cell">
<inp2:m_phrase label="la_fld_AffiliateLink"/>:
</td>
<td class="control-mid"> </td>
<td class="control-cell">
<a href="<inp2:affil_GetAffiliateLink template='index'/>" target="_blank"><inp2:affil_GetAffiliateLink template="index" prefix="_FRONT_"/></a>
</td>
</tr>
<inp2:m_RenderElement name="inp_label" prefix="affil" field="AffiliateCode" title="la_fld_AffiliateCode"/>
<inp2:m_RenderElement name="subsection" title="la_section_Statistics"/>
<inp2:m_RenderElement name="inp_label" prefix="affil" field="AccumulatedAmount" title="la_fld_AccumulatedAmount" currency="selected"/>
<inp2:m_RenderElement name="inp_label" prefix="affil" field="ItemsSold" title="la_fld_ItemsSold"/>
<inp2:m_RenderElement name="inp_label" prefix="affil" field="AmountToPay" title="la_fld_AmountToPay" currency="selected"/>
<inp2:m_RenderElement name="inp_label" prefix="affil" field="LastPaymentDate_date" title="la_fld_LastPaymentDate"/>
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.3.x/admin_templates/import_progress.tpl
===================================================================
--- branches/5.3.x/admin_templates/import_progress.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/import_progress.tpl (revision 15971)
@@ -1,16 +1,16 @@
<inp2:adm_SetPopupSize width="780" height="670"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p.import" section="in-portal:browse" perm_section="PRODUCT" permission_type="VIEW" system_permission="0" title_preset="products_import"/>
<inp2:m_RenderElement name="ajax_progress_bar" cancel_action="cancel_action();"/>
<script type="text/javascript">
function cancel_action() {
submit_event('p.import', 'OnExportCancel');
}
- $ProductImport = new AjaxProgressBar('<inp2:m_t t="dummy" p.import_event="OnExportProgress" pass="m,p.import" js_escape="1"/>');
+ $ProductImport = new AjaxProgressBar('<inp2:m_t t="dummy" p.import_event="OnExportProgress" pass="m,p.import" no_amp="1" js_escape="1"/>');
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.3.x/admin_templates/reports/results.tpl
===================================================================
--- branches/5.3.x/admin_templates/reports/results.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/reports/results.tpl (revision 15971)
@@ -1,68 +1,68 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="rep" section="in-commerce:reports" pagination="1" title_preset="report_results"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
<script type="text/javascript">
function edit()
{
// do nothing
}
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Back" escape="1"/>', function() {
-// window.location = '<inp2:m_t t="../../plugins/reports/admin_templates/reports" "pass"="m,rep" "rep_event="OnNew"/>'
- window.location = '<inp2:m_Link template="in-commerce/reports/reports" pass="m,rep" rep_event="OnNew" no_amp="1" />';
+// window.location = '<inp2:m_t t="../../plugins/reports/admin_templates/reports" "pass"="m,rep" "rep_event="OnNew" no_amp="1" js_escape="1"/>'
+ window.location = '<inp2:m_Link template="in-commerce/reports/reports" pass="m,rep" rep_event="OnNew" no_amp="1" js_escape="1"/>';
return true;
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
window.print();
}
) );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.AddButton( new ToolBarButton('export', '<inp2:m_phrase label="la_ToolTip_Export" escape="1"/>', function() {
submit_event('rep','OnExportReport');
}
) );
<inp2:m_if check="rep.metric_ReportTypeEquals" value="2">
// By Users report have no chart
<inp2:m_else/>
// Only PHP5 have chart
<inp2:m_if check="rep_IsPHPxOrGreater" version="5">
// Chart window open button
a_toolbar.AddButton( new ToolBarButton('in-commerce:view_chart', '<inp2:m_phrase label="la_ToolTip_View_Chart" escape="1"/>', function() {
- openSelector('rep', '<inp2:m_Link template="in-commerce/reports/chart" pass="all" js_escape="1"/>');
+ openSelector('rep', '<inp2:m_Link template="in-commerce/reports/chart" pass="all" no_amp="1" js_escape="1"/>');
}
) );
</inp2:m_if>
</inp2:m_if>
a_toolbar.Render();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="rep" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="rep" IdField="CategoryId" grid="Default" totals_render_as="grid_total_row"/>
<script type="text/javascript">
Grids['rep'].SetDependantToolbarButtons( new Array() );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.3.x/admin_templates/reports/progress.tpl
===================================================================
--- branches/5.3.x/admin_templates/reports/progress.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/reports/progress.tpl (revision 15971)
@@ -1,15 +1,15 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="rep" section="in-commerce:reports" title_preset="report_progress"/>
<inp2:m_RenderElement name="ajax_progress_bar" cancel_action="cancel_action();"/>
<script type="text/javascript">
function cancel_action() {
submit_event('rep', 'OnGoBack');
}
- // $ProductExport = new AjaxProgressBar('<inp2:m_t t="../../plugins/reports/admin_templates/status_xml" no_amp="1"/>');
+ // $ProductExport = new AjaxProgressBar('<inp2:m_t t="../../plugins/reports/admin_templates/status_xml" no_amp="1" js_escape="1"/>');
- $ProductExport = new AjaxProgressBar('<inp2:m_Link template="in-commerce/reports/status_xml" no_amp="1"/>');
+ $ProductExport = new AjaxProgressBar('<inp2:m_Link template="in-commerce/reports/status_xml" no_amp="1" js_escape="1"/>');
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.3.x/admin_templates/orders/export/export.tpl
===================================================================
--- branches/5.3.x/admin_templates/orders/export/export.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/orders/export/export.tpl (revision 15971)
@@ -1,171 +1,171 @@
<inp2:adm_SetPopupSize width="780" height="670"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="ord.export" section="in-commerce:orders" title_preset="orders_export"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
document.getElementById('hidden_export_columns').value = select_to_string('<inp2:ord.export_InputName field="ExportColumns"/>');
submit_event('ord.export', 'OnExportBegin');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('ord.export', 'OnGoBack');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:ord.export_SaveWarning name="grid_save_warning"/>
<inp2:ord.export_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="la_section_General"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="ord.export" field="ExportFormat" title="la_fld_ExportFormat" use_phrases="0"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord.export" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord.export" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="ord.export" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="ord.export" field="LineEndingsInside" title="la_fld_LineEndingsInside" use_phrases="0"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord.export" field="IncludeFieldTitles" title="la_fld_IncludeFieldTitles"/>
<inp2:m_RenderElement design="form_row" prefix="ord.export" field="ExportPresets" title="la_fld_ExportPresets">
<td class="control-cell">
<select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:ord.export_InputName field="ExportPresets"/>" id="<inp2:ord.export_InputName field="ExportPresets"/>" onchange="update_fields(this.value)">
<inp2:ord.export_PredefinedOptions field="ExportPresets" block="inp_option_item" selected="selected"/>
</select>
<input class="button" type="button" value="<inp2:m_Phrase label="la_Text_Delete"/>" onclick="delete_preset()">
</td>
</inp2:m_RenderElement>
<inp2:m_RenderElement design="form_row" prefix="ord.export" field="ExportColumns" title="la_fld_ExportColumns">
<td class="control-cell">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" onclick="move_options_up('<inp2:ord.export_InputName field="ExportColumns"/>', 1)" class="button">
<input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" onclick="move_options_down('<inp2:ord.export_InputName field="ExportColumns"/>', 1)" class="button"><br />
<img src="img/s.gif" width="1" height="5" alt=""><br />
</td>
<td><img src="img/s.gif" width="45" height="1" alt=""><br></td>
<td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
</tr>
<tr>
<td>
<select multiple id="<inp2:ord.export_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
<inp2:ord.export_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
</select>
<input type="hidden" id="hidden_export_columns" name="<inp2:ord.export_InputName field="ExportColumns"/>" value="<inp2:ord.export_Field field="ExportColumns"/>" />
</td>
<td align="center">
<input type="button" value=" «« " onclick="move_selected('<inp2:ord.export_InputName field="AvailableColumns"/>', '<inp2:ord.export_InputName field="ExportColumns"/>')" class="button"><br>
<img src="img/s.gif" width="1" height="4" alt=""><br>
<input type="button" value=" »» " onclick="move_selected('<inp2:ord.export_InputName field="ExportColumns"/>', '<inp2:ord.export_InputName field="AvailableColumns"/>'); select_sort('<inp2:ord.export_InputName field="AvailableColumns"/>');" class="button">
</td>
<td>
<select multiple id="<inp2:ord.export_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
<inp2:ord.export_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
</select>
</td>
</tr>
</table>
</td>
</inp2:m_RenderElement>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord.export" field="ExportSavePreset" title="la_fld_ExportSavePreset" size="2" maxlength="1" onclick="update_preset_field(this.checked)"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord.export" field="ExportPresetName" title="la_fld_ExportPresetName" size="20" />
<inp2:m_RenderElement name="inp_edit_box" prefix="ord.export" field="ExportFilename" title="la_fld_ExportFilename" size="20" />
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<script type="text/javascript" src="incs/ajax.js"></script>
<script type="text/javascript">
var delete_busy = false;
function delete_preset()
{
if (!confirm('<inp2:m_Phrase label="la_ConfirmDeleteExportPreset" js_escape="1"/>')) return;
var $kf = document.getElementById('kernel_form');
tmp = $kf.elements['events[ord.export]'].value;
$kf.elements['events[ord.export]'].value = 'OnDeleteExportPreset';
Request.method = 'POST';
Request.params = Request.serializeForm($kf);
$kf.elements['events[ord.export]'].value = tmp;
- Request.makeRequest('<inp2:m_t ajax="1" ord.export_event="OnDeleteExportPreset" js_escape="1" no_amp="1"/>', delete_busy, '', function() {
+ Request.makeRequest('<inp2:m_t ajax="1" ord.export_event="OnDeleteExportPreset" no_amp="1" js_escape="1"/>', delete_busy, '', function() {
presets = document.getElementById('<inp2:ord.export_InputName field="ExportPresets"/>');
for (i=0; i< presets.options.length; i++) {
if (presets.options[i].selected) {
presets.options.remove[i];
}
}
presets.options[0].selected = true;
}, function() {alert('error')} );
}
function update_preset_field(status)
{
if (status) {
presets = document.getElementById('<inp2:ord.export_InputName field="ExportPresets"/>');
if ( presets.value != '' ) {
for (i=0; i< presets.options.length; i++) {
if (presets.options[i].selected) {
preset_name = presets.options[i].text
}
}
document.getElementById('<inp2:ord.export_InputName field="ExportPresetName"/>').value = preset_name;
}
}
document.getElementById('<inp2:ord.export_InputName field="ExportPresetName"/>').disabled = !status;
}
function update_fields(preset)
{
$export = select_to_string(document.getElementById('<inp2:ord.export_InputName field="ExportColumns"/>'));
if ($export != '') {
string_to_selected($export, document.getElementById('<inp2:ord.export_InputName field="ExportColumns"/>'));
move_selected('<inp2:ord.export_InputName field="ExportColumns"/>', '<inp2:ord.export_InputName field="AvailableColumns"/>');
}
av = document.getElementById('<inp2:ord.export_InputName field="AvailableColumns"/>');
fields = preset.split('|');
for (var i=0; i<fields.length; i++) {
fld = fields[i];
var $cur = null;
for (var $i = 0; $i < av.length; $i++)
{
cur = av.options[$i];
if (cur.value == fld) {
av.options[$i].selected = true;
move_selected('<inp2:ord.export_InputName field="AvailableColumns"/>', '<inp2:ord.export_InputName field="ExportColumns"/>');
}
else {
av.options[$i].selected = false;
}
}
}
}
update_preset_field(document.getElementById('<inp2:ord.export_InputName field="ExportPresetName"/>').checked)
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.3.x/admin_templates/orders/export/export_progress.tpl
===================================================================
--- branches/5.3.x/admin_templates/orders/export/export_progress.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/orders/export/export_progress.tpl (revision 15971)
@@ -1,16 +1,16 @@
<inp2:adm_SetPopupSize width="780" height="670"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="ord.export" section="in-commerce:orders" title_preset="orders_export"/>
<inp2:m_RenderElement name="ajax_progress_bar" cancel_action="cancel_action();"/>
<script type="text/javascript">
function cancel_action() {
submit_event('ord.export', 'OnExportCancel');
}
- $ProductExport = new AjaxProgressBar('<inp2:m_t t="in-commerce/orders/export/export_status_xml" no_amp="1"/>');
+ $ProductExport = new AjaxProgressBar('<inp2:m_t t="in-commerce/orders/export/export_status_xml" no_amp="1" js_escape="1"/>');
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.3.x/admin_templates/orders/orders_edit_billing.tpl
===================================================================
--- branches/5.3.x/admin_templates/orders/orders_edit_billing.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/orders/orders_edit_billing.tpl (revision 15971)
@@ -1,220 +1,220 @@
<inp2:adm_SetPopupSize width="820" height="570"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_edit_billing" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('ord','<inp2:ord_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('ord','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('ord', '<inp2:ord_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('ord', '<inp2:ord_NextId/>');
}
) );
<inp2:m_if check="ord_OrderEditable">
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('reset_to_user', '<inp2:m_phrase label="la_ToolTip_ResetToUser" escape="1"/>', function() {
submit_event('ord','OnResetToUser');
}
) );
a_toolbar.AddButton( new ToolBarButton('in-commerce:reset_to_shipping', '<inp2:m_phrase label="la_ToolTip_ResetToShipping" escape="1"/>', function() {
submit_event('ord','OnResetToShipping');
}
) );
</inp2:m_if>
a_toolbar.Render();
<inp2:m_if check="ord_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="ord_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="ord_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<script type="text/javascript">
function OpenGWResults(field) {
- openSelector('ord', '<inp2:m_Link template="in-commerce/orders/gw_results" pass="m,ord"/>&field=' + field, '', '500x400');
+ openSelector('ord', '<inp2:m_Link template="in-commerce/orders/gw_results" pass="m,ord" no_amp="1" js_escape="1"/>&field=' + field, '', '500x400');
}
</script>
<inp2:m_DefineElement name="inp_gwresults" is_last="" as_label="" currency="" is_last="">
<inp2:m_RenderElement design="form_row" pass_params="1">
<td class="control-cell">
<inp2:m_if check="m_Param" name="display_field"><inp2:m_Param name="display_field"/>: <inp2:Field name="$field" format="$display_field"/></inp2:m_if>
<a href="javascript:OpenGWResults('<inp2:m_param name="field"/>')"><inp2:m_Phrase label="la_Details"/></a>
</td>
</inp2:m_RenderElement>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="ord" field="Status" db="db"/>
<inp2:ord_SaveWarning name="grid_save_warning"/>
<inp2:ord_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="la_section_OrderBilling"/>
<inp2:m_if check="ord_OrderEditable">
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingTo" title="la_fld_BillingTo" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingCompany" title="la_fld_BillingCompany" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingPhone" title="la_fld_BillingPhone" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingFax" title="la_fld_BillingFax" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingEmail" title="la_fld_BillingEmail" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingAddress1" title="la_fld_BillingAddress1" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingAddress2" title="la_fld_BillingAddress2" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingCity" title="la_fld_BillingCity" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingState" title="la_fld_BillingState" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingZip" title="la_fld_BillingZip" size="10"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="BillingCountry" title="la_fld_BillingCountry" size="20"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="PaymentType" title="la_fld_PaymentType" onchange="submit_event('ord','OnPreSave');"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="IsRecurringBilling" title="la_fld_IsRecurringBilling"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="NextCharge" title="la_fld_NextCharge"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="VATIncluded"/>
<!--<inp2:m_RenderElement name="inp_gwresults" prefix="ord" display_field="score" field="VerificationResult" title="la_fld_VerificationResult" />-->
<inp2:m_if check="ord_UsingCreditCard">
<inp2:m_RenderElement name="subsection" title="la_section_CreditCard"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="PaymentCardType" title="la_fld_PaymentCardType"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="PaymentAccount" title="la_fld_CreditCardNumber" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="PaymentNameOnCard" title="la_fld_PaymentNameOnCard" size="20"/>
<inp2:m_RenderElement design="form_row" prefix="ord" field="PaymentCCExpDate" title="la_fld_PaymentCCExpDate">
<td class="control-cell">
<input type="text" size="3" maxlength="2" name="<inp2:ord_InputName field="PaymentCCExpMonth"/>" id="<inp2:ord_InputName field="PaymentCCExpMonth"/>" value="<inp2:ord_Field field="PaymentCCExpMonth"/>">
/
<input type="text" size="3" maxlength="2" name="<inp2:ord_InputName field="PaymentCCExpYear"/>" id="<inp2:ord_InputName field="PaymentCCExpYear"/>" value="<inp2:ord_Field field="PaymentCCExpYear"/>">
</td>
</inp2:m_RenderElement>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="PaymentCVV2" title="la_fld_PaymentCVV2" size="5" maxlength="5"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="PaymentExpires" title="la_fld_PaymentExpires" size="16"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="ChargeOnNextApprove" title="la_fld_ChargeOnNextApprove"/>
<inp2:m_else/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="PaymentAccount" title="la_fld_PaymentAccount" size="20"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="PaymentExpires" title="la_fld_PaymentDate" size="16"/>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="GWResult1" db="db">
<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="GWResult1" title="la_fld_AuthorizationResult" />
</inp2:m_if>
<inp2:m_if check="ord_Field" name="GWResult2" db="db">
<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="GWResult2" title="la_fld_CaptureResult" />
</inp2:m_if>
<inp2:m_else/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingTo" title="la_fld_BillingTo" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingCompany" title="la_fld_BillingCompany" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingPhone" title="la_fld_BillingPhone" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingFax" title="la_fld_BillingFax" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingEmail" title="la_fld_BillingEmail" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingAddress1" title="la_fld_BillingAddress1" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingAddress2" title="la_fld_BillingAddress2" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingCity" title="la_fld_BillingCity" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingState" title="la_fld_BillingState" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingZip" title="la_fld_BillingZip" size="10"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingCountry" title="la_fld_BillingCountry" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentType" title="la_fld_PaymentType"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="IsRecurringBilling" title="la_fld_IsRecurringBilling"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="NextCharge" title="la_fld_NextCharge"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="VATIncluded"/>
<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="VerificationResult" display_field="score" title="la_fld_VerificationResult" />
<inp2:m_if check="ord_UsingCreditCard">
<inp2:m_RenderElement name="subsection" title="la_section_CreditCard"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentCardType" title="la_fld_PaymentCardType"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentAccount" title="la_fld_CreditCardNumber"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentNameOnCard" title="la_fld_PaymentNameOnCard"/>
<inp2:m_RenderElement design="form_row" prefix="ord" field="PaymentCCExpDate" title="la_fld_PaymentCCExpDate">
<td class="control-cell">
<inp2:ord_Field field="PaymentCCExpMonth"/> / <inp2:ord_Field field="PaymentCCExpYear"/>
</td>
</inp2:m_RenderElement>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentCVV2" title="la_fld_PaymentCVV2"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentExpires" title="la_fld_PaymentExpires"/>
<inp2:m_else/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentAccount" title="la_fld_PaymentAccount"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentExpires" title="la_fld_PaymentDate"/>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="GWResult1" db="db">
<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="GWResult1" title="la_fld_AuthorizationResult" />
</inp2:m_if>
<inp2:m_if check="ord_Field" name="GWResult2" db="db">
<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="GWResult2" title="la_fld_CaptureResult" />
</inp2:m_if>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="CouponId">
<inp2:m_RenderElement name="inp_label" prefix="ord" field="CouponCode" title="la_fld_CouponCode" />
</inp2:m_if>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="DiscountTotal" title="la_fld_TotalSavings" />
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ReturnTotal" title="la_fld_TotalReturns" />
<inp2:m_if check="ord_FieldEquals" name="VAT" value="0.00">
<inp2:m_else />
<inp2:m_RenderElement name="inp_label" prefix="ord" field="AmountWithoutVAT" title="la_fld_SubTotal" />
<inp2:m_RenderElement name="inp_label" prefix="ord" field="VAT" title="la_fld_VAT" />
</inp2:m_if>
<inp2:m_if check="ord_Field" name="GiftCertificateId">
<inp2:m_RenderElement name="inp_label" prefix="ord" field="GiftCertificateCode" title="la_fld_GiftCertificateNumber" />
<inp2:m_RenderElement name="inp_label" prefix="ord" field="GiftCertificateDiscount" title="la_fld_GiftCertificateAmountApplied" />
</inp2:m_if>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="TotalAmount" title="la_fld_TotalAmount" />
<inp2:m_if check="ord_HasOriginalAmount" >
<inp2:m_RenderElement name="inp_label" prefix="ord" field="OriginalAmount" title="la_fld_OriginalAmount" />
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<input type="hidden" name="to_tab" value="Billing">
<input type="hidden" name="check_billing_address" value="true" />
<inp2:m_if check="ord_UsingCreditCard">
<input type="hidden" name="check_credit_card" value="true" />
</inp2:m_if>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.3.x/admin_templates/orders/orders_edit_items.tpl
===================================================================
--- branches/5.3.x/admin_templates/orders/orders_edit_items.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/orders/orders_edit_items.tpl (revision 15971)
@@ -1,251 +1,251 @@
<inp2:adm_SetPopupSize width="820" height="570"/>
<inp2:m_include t="incs/header"/>
<inp2:m_if check="ord_OrderEditable">
<inp2:m_SetParam grid="Default"/>
<inp2:m_else/>
<inp2:m_SetParam grid="NotEditable"/>
</inp2:m_if>
<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_edit_items" grid="$grid" pagination="1" pagination_prefix="orditems" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('ord','<inp2:ord_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('ord','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('ord', '<inp2:ord_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('ord', '<inp2:ord_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
function edit(){
std_edit_temp_item('orditems', 'in-commerce/orders/order_product_edit');
}
<inp2:m_if check="ord_OrderEditable">
//Order items related:
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_Add_Items" escape="1"/>',
function() {
- openSelector('orditems', '<inp2:adm_SelectorLink prefix="ord" selection_mode="single" tab_prefixes="p"/>', '', null, 'OnSaveItems');
+ openSelector('orditems', '<inp2:adm_SelectorLink prefix="ord" selection_mode="single" tab_prefixes="p" no_amp="1" js_escape="1"/>', '', null, 'OnSaveItems');
} ) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('orditems')
} ) );
a_toolbar.AddButton( new ToolBarButton('in-commerce:recalculate_order', '<inp2:m_phrase label="la_RecalculateOrder"/>',
function() {
submit_event('ord', 'OnRecalculateItems');
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
</inp2:m_if>
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
<inp2:m_if check="ord_Status" is_not="incomplete">
a_toolbar.HideButton('arrange');
</inp2:m_if>
<inp2:m_if check="ord_IsSingle">
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="ord_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="ord_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
// stuff for updating extended price based on price & quantity entered
function CalculateSubtotal($prefix_special, $price_field, $result_id) {
if (typeof(Grids[$prefix_special]) != 'object') {
return false;
}
var $sub_total = 0;
var $grid_items = Grids[$prefix_special].Items;
for (var $i in $grid_items) {
$id = $grid_items[$i].ItemId;
var $price_control = document.getElementById($prefix_special + '['+$id+'][' + $price_field + ']');
$sub_total += NumberFormatter.Parse($price_field == 'ExtendedPrice' ? $price_control.innerHTML : $price_control.value);
}
document.getElementById($result_id).innerHTML = NumberFormatter.Format($sub_total.toFixed(2));
}
function UpdateExtendedPrice($prefix_special, $id)
{
<inp2:m_if check="ord_OrderEditable">
// 1. calculate current row extended price
var $qty = NumberFormatter.Parse(document.getElementById($prefix_special+'['+$id+'][Quantity]').value);
var $price = NumberFormatter.Parse(document.getElementById($prefix_special+'['+$id+'][Price]').value);
var $ext_price = Math.round($qty*$price*100)/100;
document.getElementById($prefix_special+'['+$id+'][ExtendedPrice]').innerHTML = NumberFormatter.Format($ext_price.toFixed(2));
// 2. recalculate subtotal
CalculateSubtotal($prefix_special, 'ExtendedPrice', 'order_subtotal');
</inp2:m_if>
// 3. recalculate return total
CalculateSubtotal('orditems', 'ReturnAmount', 'order_returntotal');
}
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="orditems" grid="$grid"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="option_value_element">
<inp2:m_param name="value"/> <inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/> (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>
<inp2:m_if check="m_ParamEquals" name="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="option_element">
<inp2:m_if check="m_ParamEquals" param="type" value="6"> <!-- checkboxes - multiple -->
<strong><inp2:m_param name="option"/>:</strong>
<inp2:PrintOptionValues render_as="option_value_element"/>
<inp2:m_else/>
<strong><inp2:m_param name="option"/>:</strong> <inp2:m_param name="value"/>
<inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/> (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>
</inp2:m_if><br/>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="option_value_element_no_price">
<inp2:m_param name="value"/>
<inp2:m_if check="m_ParamEquals" name="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="option_element_no_price">
<inp2:m_if check="m_ParamEquals" param="type" value="6"> <!-- checkboxes - multiple -->
<strong><inp2:m_param name="option"/>:</strong>
<inp2:PrintOptionValues render_as="option_value_element_no_price"/>
<inp2:m_else/>
<strong><inp2:m_param name="option"/>:</strong> <inp2:m_param name="value"/>
</inp2:m_if><br/>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="product_image">
<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="grid_productname_td" format="" module="">
<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">
<div style="width: 120px;">
<inp2:p_Image render_as="product_image" thumbnail="1" DefaultImage="noimage.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" />
</div>
</inp2:m_if>
<inp2:Field field="$field" first_chars="50"/> (<inp2:Field field="ProductId"/>)
<inp2:m_if check="ord_BackOrderFlag"><span class="error"><inp2:m_Phrase label="la_ItemBackordered"/></span></inp2:m_if>
<inp2:m_if check="HasOptions">
<br/>
<small>
<inp2:m_if check="FieldEquals" field="OptionsSelectionMode" value="0">
<!-- selectable options -->
<inp2:PrintOptions render_as="option_element"/>
<inp2:m_else/>
<!-- listed combinations -->
<inp2:PrintOptions render_as="option_element_no_price"/>
</inp2:m_if>
</small>
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="grid_edit_td">
<input type="text" onkeyup="UpdateExtendedPrice('<inp2:m_param name="PrefixSpecial"/>', <inp2:{$PrefixSpecial}_Field field="OrderItemId"/>);" class="text" name="<inp2:{$PrefixSpecial}_InputName field="$field"/>" id="<inp2:{$PrefixSpecial}_InputName field="$field"/>" value="<inp2:{$PrefixSpecial}_field field="$field" grid="$grid"/>" size="4">
</inp2:m_DefineElement>
<inp2:m_DefineElement name="grid_quantity_td">
<inp2:m_if check="FieldEquals" field="Type" value="1">
<input type="text" onkeyup="UpdateExtendedPrice('<inp2:m_param name="PrefixSpecial"/>', <inp2:{$PrefixSpecial}_Field field="OrderItemId"/>);" class="text" name="<inp2:{$PrefixSpecial}_InputName field="$field"/>" id="<inp2:{$PrefixSpecial}_InputName field="$field"/>" value="<inp2:{$PrefixSpecial}_field field="$field" grid="$grid"/>" size="4">
<inp2:m_else />
<span class="text"><inp2:{$PrefixSpecial}_field field="$field" grid="$grid"/></span>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="$PrefixSpecial" field="$field"/>
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="grid_price_td">
<input type="text" onkeyup="UpdateExtendedPrice('<inp2:m_param name="PrefixSpecial"/>', <inp2:{$PrefixSpecial}_Field field="OrderItemId"/>);" class="text" name="<inp2:{$PrefixSpecial}_InputName field="$field"/>" id="<inp2:{$PrefixSpecial}_InputName field="$field"/>" value="<inp2:{$PrefixSpecial}_field field="$field" grid="$grid"/>" size="5">
</inp2:m_DefineElement>
<inp2:m_DefineElement name="grid_extendedprice_td">
<span id="<inp2:InputName field="$field"/>"><inp2:Field field="$field" grid="$grid" format="%.2f"/></span>
<script type="text/javascript">UpdateExtendedPrice('<inp2:m_param name="PrefixSpecial"/>',<inp2:Field field="OrderItemId"/>);</script>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="orderitems_total_td">
<inp2:m_if check="FieldOption" field="$field" option="totals">
<inp2:FieldOption field="$field" option="totals" result_to_var="totals"/>
'<inp2:FieldTotal field="$field" function="$totals"/>'
<inp2:m_else/>
<inp2:m_if check="m_Param" name="field" equals_to="ReturnAmount">
'<span id="order_returntotal">0.00</span>'
</inp2:m_if>
<inp2:m_if check="m_Param" name="field" equals_to="ExtendedPrice">
<inp2:m_if check="ord_OrderEditable">
'<span id="order_subtotal">0.00</span>'
<inp2:m_else/>
'<span id="order_subtotal"><inp2:ord_Field name="SubTotal"/></span>'
</inp2:m_if>
</inp2:m_if>
<inp2:m_ifnot check="m_Param" name="field" equals_to="ReturnAmount|ExtendedPrice">
' '
</inp2:m_ifnot>
</inp2:m_if>
<inp2:m_ifnot check="m_Param" name="is_last">, </inp2:m_ifnot>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" grid="$grid" PrefixSpecial="orditems" IdField="OrderItemId" totals_block="orderitems_total_td" totals_render_as="grid_total_row"/>
<script type="text/javascript">
Grids['orditems'].SetDependantToolbarButtons( new Array('delete') );
<inp2:m_if check="ord_OrderEditable">
CalculateSubtotal('orditems', 'ExtendedPrice', 'order_subtotal');
</inp2:m_if>
CalculateSubtotal('orditems', 'ReturnAmount', 'order_returntotal');
</script>
<input type="hidden" name="main_prefix" id="main_prefix" value="ord">
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.3.x/admin_templates/orders/orders_edit_preview.tpl
===================================================================
--- branches/5.3.x/admin_templates/orders/orders_edit_preview.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/orders/orders_edit_preview.tpl (revision 15971)
@@ -1,390 +1,390 @@
<inp2:adm_SetPopupSize width="820" height="570"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_edit_preview" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('ord','<inp2:ord_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('ord','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('ord', '<inp2:ord_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('ord', '<inp2:ord_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
- openSelector('ord', '<inp2:m_Link template="in-commerce/orders/orders_edit_print" pass="all"/>', '', '750x700');
+ openSelector('ord', '<inp2:m_Link template="in-commerce/orders/orders_edit_print" pass="all" no_amp="1" js_escape="1"/>', '', '750x700');
}
) );
<inp2:m_if check="ord_OrderEditable">
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_PlaceOrder" escape="1"/>', function() {
submit_event('ord','OnCompleteOrder');
}
) );
</inp2:m_if>
a_toolbar.Render();
<inp2:m_if check="ord_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="ord_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="ord_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:ord_SaveWarning name="grid_save_warning"/>
<inp2:ord_ErrorWarning name="form_error_warning"/>
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="la_section_General"/>
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<td class="text">
<inp2:m_phrase label="la_fld_OrderNumber"/>:
</td>
<td>
<inp2:ord_Field field="OrderNumber"/> (<inp2:ord_Field field="Status"/>)
</td>
<td> </td>
</tr>
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<td class="text">
<inp2:m_phrase label="la_fld_Date"/>:
</td>
<td>
<inp2:ord_Field field="OrderDate"/>
</td>
<td> </td>
</tr>
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<td class="text">
<inp2:m_phrase label="la_fld_Username"/>:
</td>
<td>
<inp2:ord_Field field="PortalUserId"/> (<inp2:ord_Field field="CustomerName"/>)
</td>
<td> </td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" width="100%" class="tableborder">
<tr>
<td>
<table cellspacing="0" cellpadding="2" width="100%" border="0">
<tr class="subsectiontitle">
<td colspan="2">
<inp2:m_Phrase label="la_comm_ShippingBillingInfo"/>
</td>
</tr>
<tr>
<inp2:m_if check="ord_Field" name="ShippingTo">
<td width="50%" class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>" style="vertical-align: top">
<!-- shipping -->
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="order_preview_field_name"><inp2:m_phrase label="la_fld_ShippingTo"/>:</td>
<td class="order_preview_field_value"><inp2:ord_Field field="ShippingTo"/></td>
</tr>
<inp2:m_if check="ord_Field" name="ShippingEmail">
<tr>
<td class="order_preview_field_name"><inp2:m_phrase label="lu_field_email"/>:</td>
<td class="order_preview_field_value"><inp2:ord_Field field="ShippingEmail"/></td>
</tr>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="ShippingPhone">
<tr>
<td class="order_preview_field_name"><inp2:m_phrase label="lu_comm_PhoneNumber"/>:</td>
<td class="order_preview_field_value"><inp2:ord_Field field="ShippingPhone"/></td>
</tr>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="ShippingFax">
<tr>
<td class="order_preview_field_name"><inp2:m_phrase label="lu_comm_FaxNumber"/>:</td>
<td class="order_preview_field_value"><inp2:ord_Field field="ShippingFax"/></td>
</tr>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="ShippingCompany">
<tr>
<td class="order_preview_field_name"><inp2:m_phrase label="lu_shipping_Company"/>:</td>
<td class="order_preview_field_value"><inp2:ord_Field field="ShippingCompany"/></td>
</tr>
</inp2:m_if>
<tr>
<td class="order_preview_field_name" style="vertical-align: top;">Address:</td>
<td class="order_preview_field_value">
<inp2:m_if check="ord_FieldEquals" field="ShippingAddress1" value="" inverse="inverse" >
<inp2:ord_Field field="ShippingAddress1"/><br>
</inp2:m_if>
<inp2:m_if check="ord_FieldEquals" field="ShippingAddress2" value="" inverse="inverse" >
<inp2:ord_Field field="ShippingAddress2"/><br>
</inp2:m_if>
<inp2:ord_PrintLocation type="Shipping"/>
</td>
</tr>
</table>
</td>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="BillingTo">
<td width="50%" class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>" style="vertical-align: top">
<!-- billing -->
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="order_preview_field_name"><inp2:m_phrase label="la_fld_BillingTo"/>:</td>
<td class="order_preview_field_value"><inp2:ord_Field field="BillingTo"/></td>
</tr>
<inp2:m_if check="ord_Field" name="BillingEmail">
<tr>
<td class="order_preview_field_name"><inp2:m_phrase label="lu_billing_Email"/>:</td>
<td class="order_preview_field_value"><inp2:ord_Field field="BillingEmail"/></td>
</tr>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="BillingPhone">
<tr>
<td class="order_preview_field_name"><inp2:m_phrase label="lu_comm_PhoneNumber"/>:</td>
<td class="order_preview_field_value"><inp2:ord_Field field="BillingPhone"/></td>
</tr>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="BillingFax">
<tr>
<td class="order_preview_field_name"><inp2:m_phrase label="lu_comm_FaxNumber"/>:</td>
<td class="order_preview_field_value"><inp2:ord_Field field="BillingFax"/></td>
</tr>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="BillingCompany">
<tr>
<td class="order_preview_field_name"><inp2:m_phrase label="lu_billing_Company"/>:</td>
<td class="order_preview_field_value"><inp2:ord_Field field="BillingCompany"/></td>
</tr>
</inp2:m_if>
<tr>
<td class="order_preview_field_name" style="vertical-align: top;"><inp2:m_phrase label="lu_billing_Address"/>:</td>
<td class="order_preview_field_value">
<inp2:m_if check="ord_FieldEquals" field="BillingAddress1" value="" inverse="inverse" >
<inp2:ord_Field field="BillingAddress1"/><br>
</inp2:m_if>
<inp2:m_if check="ord_FieldEquals" field="BillingAddress2" value="" inverse="inverse" >
<inp2:ord_Field field="BillingAddress2"/><br>
</inp2:m_if>
<inp2:ord_PrintLocation type="Billing"/>
</td>
</tr>
<tr>
<td class="order_preview_field_name"><inp2:m_phrase label="la_fld_PaymentType"/>:</td>
<td class="order_preview_field_value"><inp2:ord_Field field="PaymentType"/></td>
</tr>
</table>
</td>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="ShippingTo" inverse="inverse"><td width="50%" valign="top"> </td></inp2:m_if>
<inp2:m_if check="ord_Field" name="BillingTo" inverse="inverse"><td width="50%" valign="top"> </td></inp2:m_if>
</tr>
<tr class="subsectiontitle">
<td colspan="2">
<inp2:m_Phrase label="la_comm_OrderContents"/>
</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" width="100%" border="0" class="orders_flat_table">
<tr class="subsectiontitle">
<td width="70%"<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders"> colspan="2"</inp2:m_if> nowrap><inp2:m_Phrase label="la_col_Product"/></td>
<td width="10%" nowrap style="text-align: center"><inp2:m_Phrase label="la_col_Quantity"/></td>
<td width="10%" nowrap style="text-align: right"><inp2:m_Phrase label="column:la_fld_Price"/></td>
<td width="10%" nowrap style="text-align: right"><inp2:m_Phrase label="la_col_ExtendedPrice"/></td>
</tr>
<inp2:m_DefineElement name="option_value_element">
<inp2:m_param name="value"/> <inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/> (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>
<inp2:m_if check="m_ParamEquals" name="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="option_element">
<inp2:m_if check="m_ParamEquals" param="type" value="6"> <!-- checkboxes - multiple -->
<strong><inp2:m_param name="option"/>:</strong>
<inp2:PrintOptionValues render_as="option_value_element"/>
<inp2:m_else/>
<strong><inp2:m_param name="option"/>:</strong> <inp2:m_param name="value"/>
<inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/> (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>
</inp2:m_if><br/>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="option_value_element_no_price">
<inp2:m_param name="value"/>
<inp2:m_if check="m_ParamEquals" name="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="option_element_no_price">
<inp2:m_if check="m_ParamEquals" param="type" value="6"> <!-- checkboxes - multiple -->
<strong><inp2:m_param name="option"/>:</strong>
<inp2:PrintOptionValues render_as="option_value_element_no_price"/>
<inp2:m_else/>
<strong><inp2:m_param name="option"/>:</strong> <inp2:m_param name="value"/>
</inp2:m_if><br/>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="product_image">
<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" />
</inp2:m_DefineElement>
<inp2:m_DefineElement name="order_detail_row">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">
<td valign="top" width="120">
<inp2:p_Image render_as="product_image" thumbnail="1" DefaultImage="../../in-commerce/admin_templates/img/itemicons/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" />
</td>
</inp2:m_if>
<td align="left" valign="top" width="100%">
<strong><inp2:{$PrefixSpecial}_Field field="ProductName"/></strong><br/>
<small><strong>SKU: </strong><inp2:Field field="SKU"/></small>
<inp2:m_if check="HasOptions">
<br/>
<small>
<inp2:m_if check="DisplayOptionsPricing"> <!-- selectable options or overriding combination -->
<inp2:PrintOptions render_as="option_element"/>
<inp2:m_else/> <!-- listed combinations -->
<inp2:PrintOptions render_as="option_element_no_price"/>
</inp2:m_if>
</small>
<br/>
</inp2:m_if>
<inp2:m_if check="HasDiscount">
<br />
<inp2:m_Phrase label="lu_comm_RegularPrice" />: <inp2:Field name="FlatPrice" /><br />
<inp2:m_Phrase label="lu_comm_Discount" />: - <inp2:Field name="ItemDiscount" />
</inp2:m_if>
</td>
<td align="right" nowrap style="text-align: center"><inp2:{$PrefixSpecial}_Field field="Quantity"/></td>
<td align="right" nowrap><inp2:{$PrefixSpecial}_Field field="Price"/></td>
<td align="right" nowrap><inp2:{$PrefixSpecial}_Field field="ExtendedPrice"/></td>
</tr>
</inp2:m_DefineElement>
<inp2:orditems_PrintList block="order_detail_row" per_page="-1"/>
<tr style="border-top: 2px solid black">
<td align="left"<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders"> colspan="2"</inp2:m_if>>
<inp2:m_if check="ord_Field" name="CouponId">
<span class="order_preview_field_name"><inp2:m_Phrase label="la_CouponCode"/>:</span> <inp2:ord_Field field="CouponCode"/><br />
</inp2:m_if>
<inp2:m_if check="ord_FieldEquals" field="DiscountTotal" value="0.00" inverse="inverse">
<span class="order_preview_field_name"><inp2:m_Phrase label="la_TotalSavings"/>:</span> <inp2:ord_Field field="DiscountTotal"/><br />
</inp2:m_if>
</td>
<td align="right" nowrap colspan="2" class="order-totals-name"><inp2:m_Phrase label="la_SubTotal"/>:</td>
<td align="right" nowrap class="arial2">
<inp2:m_if check="ord_FieldEquals" name="VAT" value="0.00">
<inp2:ord_Field field="AmountWithoutVAT"/>
<inp2:m_else />
<inp2:ord_Field field="SubTotal"/>
</inp2:m_if>
</td>
</tr>
<inp2:m_DefineElement name="shipping_total">
<tr>
<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="la_ShippingHandling"/><inp2:m_if check="ord_ShippingType"> (<inp2:ord_ShippingType />):</inp2:m_if></td>
<td align="right" nowrap class="arial2"><inp2:ord_Field field="ShippingCost"/></td>
</tr>
<tr>
<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="la_Insurance_Fee"/>:</td>
<td align="right" nowrap class="arial2"><inp2:ord_Field field="InsuranceFee"/></td>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="vat_total">
<tr>
<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="la_VAT"/> <inp2:ord_Field field="VATPercent"/>%:</td>
<td align="right" nowrap class="arial2"><inp2:ord_Field field="VAT"/></td>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="processing_total">
<tr>
<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="la_ProcessingFee"/>:</td>
<td align="right" nowrap class="arial2"><inp2:ord_Field field="ProcessingFee"/></td>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="return_total">
<tr>
<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="la_fld_TotalReturns"/>:</td>
<td align="right" nowrap class="arial2">-<inp2:ord_Field field="ReturnTotal"/></td>
</tr>
</inp2:m_DefineElement>
<inp2:ord_PrintTotals
shipping_render_as="shipping_total"
processing_render_as="processing_total"
vat_render_as="vat_total"
return_render_as="return_total"/>
<inp2:m_if check="ord_Field" field="GiftCertificateId">
<tr>
<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="la_fld_GiftCertificateNumber"/>:</td>
<td align="right" nowrap class="arial2"><inp2:ord_Field field="GiftCertificateCode"/></td>
</tr>
<tr>
<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="la_fld_Gift_CertificateAmountApplied"/>:</td>
<td align="right" nowrap class="arial2"><inp2:ord_Field field="GiftCertificateDiscount"/></td>
</tr>
</inp2:m_if>
<tr>
<td align="right" colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">3<inp2:m_else/>2</inp2:m_if>"> </td>
<td align="right"><span class="order_preview_field_name">Total:</span></td>
<td align="right" nowrap><span class="order_preview_field_name"><inp2:ord_Field field="TotalAmount"/></span></td>
</tr>
<inp2:m_if check="ord_HasOriginalAmount" >
<tr>
<td align="right"<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders"> colspan="2"</inp2:m_if>> </td>
<td align="right" colspan="2" nowrap><span class="order_preview_field_name"><inp2:m_Phrase label="la_fld_OriginalAmount"/>:</span></td>
<td align="right" nowrap <span class="order_preview_field_name"><inp2:ord_Field field="OriginalAmount"/></span></td>
</tr>
</inp2:m_if>
</table>
</td>
</tr>
</table>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.3.x/admin_templates/export_progress.tpl
===================================================================
--- branches/5.3.x/admin_templates/export_progress.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/export_progress.tpl (revision 15971)
@@ -1,16 +1,16 @@
<inp2:adm_SetPopupSize width="780" height="670"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p.export" section="in-portal:browse" perm_section="PRODUCT" permission_type="VIEW" system_permission="0" title_preset="products_export"/>
<inp2:m_RenderElement name="ajax_progress_bar" cancel_action="cancel_action();"/>
<script type="text/javascript">
function cancel_action() {
submit_event('p.export', 'OnExportCancel');
}
- $ProductExport = new AjaxProgressBar('<inp2:m_t t="dummy" p.export_event="OnExportProgress" pass="m,p.export" js_escape="1"/>');
+ $ProductExport = new AjaxProgressBar('<inp2:m_t t="dummy" p.export_event="OnExportProgress" pass="m,p.export" no_amp="1" js_escape="1"/>');
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.3.x/admin_templates/products/products_relations.tpl
===================================================================
--- branches/5.3.x/admin_templates/products/products_relations.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/products/products_relations.tpl (revision 15971)
@@ -1,105 +1,105 @@
<inp2:adm_SetPopupSize width="1000" height="680"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="rel" title_preset="relations" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('p','<inp2:p_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('p','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('p', '<inp2:p_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('p', '<inp2:p_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
//Relations related:
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Relation" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
- openSelector('rel', '<inp2:adm_SelectorLink prefix="rel" selection_mode="single" tab_prefixes="all"/>', 'TargetId', '950x600');
+ openSelector('rel', '<inp2:adm_SelectorLink prefix="rel" selection_mode="single" tab_prefixes="all" no_amp="1" js_escape="1"/>', 'TargetId', '950x600');
} ) );
function edit()
{
std_edit_temp_item('rel', 'in-commerce/products/relations_edit');
}
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('rel')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
submit_event('rel','OnMassApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
submit_event('rel','OnMassDecline');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep4') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
<inp2:m_if check="p_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="p_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="p_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="rel" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="rel" IdField="RelationshipId" grid="Default"/>
<script type="text/javascript">
Grids['rel'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline') );
</script>
<input type="hidden" name="TargetId" id="TargetId" value="<inp2:m_get name="TargetId"/>">
<input type="hidden" name="TargetType" id="TargetType" value="<inp2:m_get name="TargetType"/>">
<inp2:m_include t="incs/footer"/>
<script type="text/javascript">
var $env = document.getElementById('sid').value+'-:m<inp2:m_get name="m_cat_id"/>-1-1-1-s';
</script>
\ No newline at end of file
Index: branches/5.3.x/admin_templates/products/products_edit.tpl
===================================================================
--- branches/5.3.x/admin_templates/products/products_edit.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/products/products_edit.tpl (revision 15971)
@@ -1,181 +1,181 @@
<inp2:adm_SetPopupSize width="1000" height="680"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" title_preset="products_edit" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('p','<inp2:p_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('p','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('p', '<inp2:p_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('p', '<inp2:p_NextId/>');
}
) );
//a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.Render();
<inp2:m_if check="p_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="p_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="p_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
<inp2:m_RenderElement name="ml_selector" prefix="p"/>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="p" field="Type" db="db"/>
<inp2:p_SaveWarning name="grid_save_warning"/>
<inp2:p_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="la_section_Product"/>
<inp2:m_RenderElement name="inp_label" prefix="p" field="ProductId" title="la_fld_Id"/>
<inp2:m_if check="m_IsDebugMode" >
<inp2:m_RenderElement name="inp_label" prefix="p" field="Type" title="la_fld_ProductType"/>
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_box_ml" prefix="p" field="Name" title="la_fld_Title" size="70"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="SKU" title="la_fld_SKU" size="70"/>
<inp2:m_RenderElement name="inp_edit_codemirror" prefix="p" field="Description" title="la_fld_Description" allow_html="1" language="text/html"/>
<inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="p" field="DescriptionExcerpt" title="la_fld_DescriptionExcerpt" cols="70" rows="3"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="AutomaticFilename" title="la_fld_AutomaticFilename" onchange="reflect_filename()"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="Filename" title="la_fld_Filename" size="70"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="p" field="CategoryId" title="la_fld_ParentSection" display_original="1"/>
<inp2:m_RenderElement name="subsection" title="la_section_Properties"/>
<inp2:m_if check="p_FieldEquals" field="Type" value="1" >
<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="MinQtyFreePromoShipping" title="la_fld_ProductFreeShipping" size="5"/>
</inp2:m_if>
<inp2:m_if check="p_FieldEquals" field="Type" value="1">
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<td class="label-cell">
<inp2:m_phrase label="la_fld_ManageShipping"/>:
</td>
<td class="control-mid"> </td>
<td class="control-cell">
<a href="javascript:openShipping()">Open</a>
</td>
</tr>
</inp2:m_if>
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<td class="label-cell">
<inp2:m_phrase label="la_fld_AssignedCoupon"/>:
</td>
<td class="control-mid"> </td>
<td class="control-cell">
<inp2:p_Field name="AssignedCoupon" /> <a href="javascript:openCouponSelector()">Open</a>
</td>
</tr>
<inp2:m_RenderElement name="inp_edit_options" prefix="p" field="ManufacturerId" title="la_fld_Manufacturer" size="4" has_empty="1"/>
<inp2:m_if check="p_FieldEquals" field="Type" value="3">
<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="Price" title="la_fld_Price" size="5"/>
</inp2:m_if>
<inp2:m_if check="p_FieldEquals" field="Type" value="6">
<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="Price" title="la_fld_Price" size="5"/>
</inp2:m_if>
<inp2:m_if check="p_FieldEquals" field="Type" value="1" >
<inp2:m_RenderElement name="inp_edit_weight" prefix="p" field="Weight" title="la_fld_Weight" size="5"/>
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="MSRP" title="la_fld_MSRP" size="5"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="Status" title="la_fld_Status"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="NewItem" title="la_fld_New"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="HotItem" title="la_fld_TopSeller"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="PopItem" title="la_fld_Pop"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="EditorsPick" title="la_fld_EditorsPick"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="Featured" title="la_fld_Featured"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="OnSale" title="la_fld_OnSale"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="Priority" title="la_fld_Priority" size="4"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="p" field="CreatedOn" title="la_fld_CreatedOn" size="12"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="p" field="Expire" title="la_fld_Expire" size="12"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="MetaKeywords" title="la_fld_MetaKeywords" size="70"/>
<inp2:m_RenderElement name="inp_edit_textarea" prefix="p" field="MetaDescription" title="la_fld_MetaDescription" cols="70" rows="5"/>
<inp2:m_if check="p_FieldEquals" field="Type" value="1" >
<inp2:m_RenderElement name="subsection" title="la_section_Backordering"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="BackOrder" title="la_fld_BackOrder"/>
<inp2:m_RenderElement name="inp_edit_date_time" format="mm/dd/y" prefix="p" field="BackOrderDate" title="la_fld_BackOrderDate" size="12"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="QtyInStockMin" title="la_fld_QtyInStockMin" size="4"/>
</inp2:m_if>
<inp2:m_RenderElement name="subsection" title="la_section_Counters"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="CachedRating" title="la_fld_Rating" size="4"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="CachedVotesQty" title="la_fld_Votes" size="4"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="Hits" title="la_fld_QtySold" size="4"/>
<input type="hidden" name="Hits_original" id="Hits_original" value="<inp2:p_Field name="Hits" db="db" />" />
<!-- custom fields: begin -->
<inp2:m_include t="incs/custom_blocks"/>
<inp2:cf.general_PrintList render_as="cv_row_block" SourcePrefix="p" value_field="Value" per_page="-1" grid="Default" />
<!-- custom fields: end -->
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<script language="javascript" type="text/javascript">
$(document).ready(reflect_filename);
disable_categories('<inp2:p_InputName name="CategoryId"/>', <inp2:p_AllowedCategoriesJSON/>);
function reflect_filename() {
var $checked = document.getElementById('_cb_<inp2:p_InputName field="AutomaticFilename"/>').checked;
document.getElementById('<inp2:p_InputName field="Filename"/>').readOnly = $checked;
}
function openShipping() {
- openSelector('p','<inp2:m_link t="in-commerce/products/shipping_options" pass="all"/>', 'ShippingOption', '800x600', 'OnPreSaveAndOpenPopup');
+ openSelector('p','<inp2:m_link t="in-commerce/products/shipping_options" pass="all" no_amp="1" js_escape="1"/>', 'ShippingOption', '800x600', 'OnPreSaveAndOpenPopup');
}
function openCouponSelector() {
- openSelector('p','<inp2:m_link t="in-commerce/discounts/coupon_selector" pass="all"/>', 'AssignedCoupon', '800x400', 'OnPreSaveAndOpenPopup');
+ openSelector('p','<inp2:m_link t="in-commerce/discounts/coupon_selector" pass="all" no_amp="1" js_escape="1"/>', 'AssignedCoupon', '800x400', 'OnPreSaveAndOpenPopup');
}
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.3.x/admin_templates/products/products_categories.tpl
===================================================================
--- branches/5.3.x/admin_templates/products/products_categories.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/products/products_categories.tpl (revision 15971)
@@ -1,84 +1,84 @@
<inp2:adm_SetPopupSize width="1000" height="680"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="p-ci" title_preset="categories" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
function edit(){ }
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('p','<inp2:p_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('p','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('p', '<inp2:p_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('p', '<inp2:p_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
//Category related:
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Category" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
- openSelector('p', '<inp2:adm_SelectorLink prefix="p" selection_mode="multi" tab_prefixes="none"/>', 'ItemCategory');
+ openSelector('p', '<inp2:adm_SelectorLink prefix="p" selection_mode="multi" tab_prefixes="none" no_amp="1" js_escape="1"/>', 'ItemCategory');
} ) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('p-ci')
} ) );
a_toolbar.AddButton( new ToolBarButton('setprimary', '<inp2:m_phrase label="la_ToolTip_SetPrimary" escape="1"/>', function() {
submit_event('p-ci','OnSetPrimary');
}
) );
a_toolbar.Render();
<inp2:m_if check="p_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="p_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="p_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="p-ci" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="grid_checkbox_category_td">
<inp2:CategoryName field="$field" primary_title="la_PrimaryCategory" no_special="1"/>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="p-ci" IdField="CategoryId" grid="Default"/>
<script type="text/javascript">
Grids['p-ci'].SetDependantToolbarButtons( new Array('delete','setprimary') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.3.x/admin_templates/products/products_packagecontent.tpl
===================================================================
--- branches/5.3.x/admin_templates/products/products_packagecontent.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/products/products_packagecontent.tpl (revision 15971)
@@ -1,95 +1,95 @@
<inp2:adm_SetPopupSize width="1000" height="680"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="p.content" title_preset="content" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('p','<inp2:p_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('p','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('p', '<inp2:p_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('p', '<inp2:p_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_Add_Items" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
- openSelector('p', '<inp2:adm_SelectorLink prefix="p" selection_mode="multi" tab_prefixes="p"/>', 'PackageContent', null, 'OnSaveItems');
+ openSelector('p', '<inp2:adm_SelectorLink prefix="p" selection_mode="multi" tab_prefixes="p" no_amp="1" js_escape="1"/>', 'PackageContent', null, 'OnSaveItems');
} ) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
submit_event('p.content','OnRemovePackageItem');
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
function edit()
{
alert();
}
a_toolbar.Render();
<inp2:m_if check="p_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="p_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="p_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="p.content" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_include t="categories/ci_blocks"/>
<inp2:m_DefineElement name="qty_td" >
<inp2:Field field="QtyInStock" grid="$grid"/>/<inp2:Field field="QtyReserved" grid="$grid"/>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="p.content" IdField="ProductId" grid="Default" types="content"/>
<input type="hidden" name="TargetId" id="TargetId" value="<inp2:m_get name="TargetId"/>">
<input type="hidden" name="TargetType" id="TargetType" value="<inp2:m_get name="TargetType"/>">
<input type="hidden" name="main_prefix" id="main_prefix" value="p">
<inp2:m_include t="incs/footer"/>
<script type="text/javascript">
var $env = document.getElementById('sid').value+'-:m<inp2:m_get name="m_cat_id"/>-1-1-1-s';
</script>
\ No newline at end of file
Index: branches/5.3.x/admin_templates/products/products_options.tpl
===================================================================
--- branches/5.3.x/admin_templates/products/products_options.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/products/products_options.tpl (revision 15971)
@@ -1,128 +1,128 @@
<inp2:adm_SetPopupSize width="1000" height="680"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="po" title_preset="options" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('p','<inp2:p_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('p','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('p', '<inp2:p_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('p', '<inp2:p_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
//Pricing related:
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_NewOption" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_new_item('po', 'in-commerce/products/option_edit')
} ) );
function edit()
{
std_edit_temp_item('po', 'in-commerce/products/option_edit');
}
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('po')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
submit_event('po','OnMassMoveUp');
}
) );
a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
submit_event('po','OnMassMoveDown');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep5') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
<inp2:m_if check="p_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="p_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="p_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="po" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="option_name_td">
<inp2:Field field="$field" grid="$grid"/><inp2:m_ifnot check="Field" field="Priority" equals_to="0"><span class="priority"><sup><inp2:Field field="Priority" /></sup></span></inp2:m_ifnot>
</inp2:m_DefineElement>
<script type="text/javascript">
function openCombinations() {
set_hidden_field('events[poc.edit]', 'OnNew');
- openSelector('p', '<inp2:m_Link t="in-commerce/products/option_combinations" pass="all,poc" poc_id=""/>', '', '800x600');
+ openSelector('p', '<inp2:m_Link t="in-commerce/products/option_combinations" pass="all,poc" poc_id="" no_amp="1" js_escape="1"/>', '', '800x600');
}
</script>
<div id="scroll_container" mode="minimal">
<table class="edit-form" style="border-bottom: 1px solid black;">
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="label-cell">
<inp2:m_phrase label="la_fld_ManageCombinations"/>:
</td>
<td class="control-mid"> </td>
<td class="control-cell">
<a href="javascript:openCombinations();">Open</a>
</td>
</tr>
<inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="OptionsSelectionMode" title="la_fld_OptionsSelectionMode"/>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<inp2:m_RenderElement name="grid" PrefixSpecial="po" IdField="ProductOptionId" grid="Default"/>
<script type="text/javascript">
Grids['po'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','move_up','move_down') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.3.x/admin_templates/products/products_pricing.tpl
===================================================================
--- branches/5.3.x/admin_templates/products/products_pricing.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/products/products_pricing.tpl (revision 15971)
@@ -1,250 +1,250 @@
<inp2:adm_SetPopupSize width="1000" height="680"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" title_preset="pricing" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript" src='js/catalog.js'></script>
<script type="text/javascript">
Request.progressText = '<inp2:m_phrase name="la_title_Loading" escape="1"/>';
Catalog.prototype.AfterInit = function () {
var $default_group = <inp2:conf_ConfigValue name="User_LoggedInGroup"/>;
set_hidden_field('group_id', $default_group);
$('#current_group_id').val($default_group).change();
}
Catalog.prototype.go_to_group = function($group_id) {
this.refreshTab('pr.tang', 'pr.tang_div');
}
Catalog.prototype.refreshTab = function($prefix, $div_id, $force) {
var $group_id = $('#current_group_id').val();
var $tab_group_id = document.getElementById($div_id).getAttribute('group_id');
if ($group_id != $tab_group_id || $force) {
// query tab content only in case if not queried or category don't match
var $url = this.URLMask.replace('#ITEM_PREFIX#', $prefix).replace('#GROUP_ID#', $group_id);
this.BusyRequest[$prefix] = false;
Request.makeRequest($url, this.BusyRequest[$prefix], $div_id, this.successCallback, this.errorCallback, $div_id, this);
}
}
// adds information about tab to tab_registry
Catalog.prototype.registerTab = function($tab_id) {
var $tab = document.getElementById($tab_id + '_div');
var $index = this.TabRegistry.length;
this.TabRegistry[$index] = new Array();
this.TabRegistry[$index]['tab_id'] = $tab_id;
this.TabRegistry[$index]['prefix'] = $tab.getAttribute('prefix');
this.TabRegistry[$index]['dep_buttons'] = new Array();
this.TabRegistry[$index]['index'] = $index;
}
Catalog.prototype.displaySearch = function ($prefix) {
}
Catalog.prototype.submit_event = function($prefix_special, $event, $t, $return_result) {
var $prev_template = get_hidden_field('t');
if (isset($event)) set_hidden_field('events[' + $prefix_special + ']', $event);
if (isset($t)) set_hidden_field('t', $t);
var $tab_id = this.queryTabRegistry('prefix', this.ActivePrefix, 'tab_id');
if ($return_result)
this.submit_kernel_form($tab_id);
else
this.submit_kernel_form();
set_hidden_field('t', $prev_template);
}
- var $BracketManager = new Catalog('<inp2:m_Link template="in-commerce/products/products_pricing_grid" item_prefix="#ITEM_PREFIX#" group_id="#GROUP_ID#" no_amp="1" pass="m,p,pr.tang"/>', 'permmanager_', 'ProductPriceBracketManager');
+ var $BracketManager = new Catalog('<inp2:m_Link template="in-commerce/products/products_pricing_grid" item_prefix="#ITEM_PREFIX#" group_id="#GROUP_ID#" pass="m,p,pr.tang" no_amp="1" js_escape="1"/>', 'permmanager_', 'ProductPriceBracketManager');
</script>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('p','<inp2:p_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('p','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('p', '<inp2:p_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('p', '<inp2:p_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
function add_brackets()
{
//submit_event('pr.tang', 'OnMoreBrackets')
set_hidden_field('group_id', get_hidden_field('current_group_id'));
set_hidden_field('item_prefix', $BracketManager.ActivePrefix);
$BracketManager.submit_event('pr.tang', 'OnMoreBrackets', 'in-commerce/products/products_pricing_grid', true);
}
a_toolbar.AddButton( new ToolBarButton('in-commerce:more_brackets', '<inp2:m_phrase label="la_ToolTip_MoreBrackets" escape="1"/>', add_brackets) );
function infinity()
{
//submit_event('pr.tang', 'OnInfinity');
set_hidden_field('group_id', get_hidden_field('current_group_id'));
set_hidden_field('item_prefix', $BracketManager.ActivePrefix);
$BracketManager.submit_event('pr.tang', 'OnInfinity', 'in-commerce/products/products_pricing_grid', true);
}
a_toolbar.AddButton( new ToolBarButton('in-commerce:infinity', '<inp2:m_phrase label="la_ToolTip_Infinity" escape="1"/>', infinity) );
function arrange_brackets()
{
//submit_event('pr.tang', 'OnArrange')
set_hidden_field('group_id', get_hidden_field('current_group_id'));
set_hidden_field('item_prefix', $BracketManager.ActivePrefix);
$BracketManager.submit_event('pr.tang', 'OnArrange', 'in-commerce/products/products_pricing_grid', true);
//$BracketManager.refreshTab('pr.tang', 'pr.tang_div', true);
}
a_toolbar.AddButton( new ToolBarButton('in-commerce:arrange', '<inp2:m_phrase label="la_ToolTip_Arrange" escape="1"/>', arrange_brackets) );
function delete_brackets()
{
if (confirm('<inp2:m_Phrase name="la_msg_ConfirmDeletePricing" js_escape="1" no_editing="1"/>')) {
set_hidden_field('group_id', get_hidden_field('current_group_id'));
set_hidden_field('item_prefix', $BracketManager.ActivePrefix);
$BracketManager.submit_event('pr.tang', 'OnDeleteBrackets', 'in-commerce/products/products_pricing_grid', true);
}
}
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_DeleteGroupPricing" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>', delete_brackets) );
-
+
function edit(){ }
a_toolbar.Render();
<inp2:m_if check="p_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="p_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="p_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
a_toolbar.DisableButton('delete');
-
+
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="g" grid="Radio"/>
</tr>
</tbody>
</table>
<script type="text/javascript">
function set_start(id, next_id)
{
//var next_id = id - 1;
var input_id = ('pr.tang[' + next_id) + '][MinQty]';
var orig_id = ('pr.tang[' + id) + '][MinQty]';
if(document.getElementById(input_id) != null)
{
var new_value = parseInt(document.getElementById('pr.tang[' + id + '][MaxQty]').value);
if( isNaN(new_value) ) new_value = 0;
document.getElementById('pr.tang[' + id + '][MaxQty]').value = new_value;
document.getElementById(input_id).value = new_value;
}
}
function enableKernelFormFields()
{
var kForm = document.forms.kernel_form;
var elem = false;
for (var i=0; i<kForm.elements.length; i++){
elem = kForm.elements[i];
if (elem.type == "text" && elem.disabled == true){
elem.disabled = false;
}
}
}
</script>
<inp2:pr.tang_SaveWarning name="grid_save_warning"/>
<div id="scroll_container" mode="minimal">
<table class="edit-form" style="border-bottom: 1px solid black;">
<inp2:m_RenderElement name="subsection" title="la_section_General"/>
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<td class="label-cell">
<inp2:m_Phrase name="la_fld_Group"/>:
</td>
<td class="control-mid"> </td>
<td class="control-cell">
<select name="current_group_id" id="current_group_id">
<inp2:m_DefineElement name="group_element">
<option value="<inp2:Field name='GroupId'/>"><inp2:Field name="Name"/></option>
</inp2:m_DefineElement>
<inp2:g_PrintList render_as="group_element" per_page="-1"/>
</select>
</td>
</tr>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<inp2:m_include t="in-commerce/products/products_pricing_grid" tab_init="1" item_prefix="pr.tang"/>
<inp2:m_include t="incs/footer"/>
<script type="text/javascript">
var $last_group_id = false;
$(document).ready(
function() {
$('#current_group_id').change(
function ($e) {
var $group_id = $(this).val();
if ($last_group_id !== false) {
// save pricings from previous selected group
set_hidden_field('group_id', $last_group_id);
set_hidden_field('item_prefix', $BracketManager.ActivePrefix);
$BracketManager.submit_event('pr.tang', 'OnArrange', 'in-commerce/products/products_pricing_grid', false);
}
// get prices from new group
set_hidden_field('group_id', $group_id);
$BracketManager.go_to_group($group_id);
// remember previous selected group
$last_group_id = $group_id;
}
);
$BracketManager.Init(false);
}
);
document.forms.kernel_form.onsubmit = enableKernelFormFields;
</script>
\ No newline at end of file
Index: branches/5.3.x/admin_templates/import.tpl
===================================================================
--- branches/5.3.x/admin_templates/import.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/import.tpl (revision 15971)
@@ -1,223 +1,223 @@
<inp2:adm_SetPopupSize width="780" height="670"/>
<inp2:m_include t="incs/header"/>
<inp2:p.import_PresetFormFields/>
<inp2:m_RenderElement name="combined_header" prefix="adm" section="in-portal:main_import" title_preset="import"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
- location.href = '<inp2:m_Link t="tools/import2"/>';
+ location.href = '<inp2:m_Link t="tools/import2" no_amp="1" js_escape="1"/>';
}
) );
a_toolbar.AddButton( new ToolBarButton('import', '<inp2:m_phrase label="la_ToolTip_Import" escape="1"/>', function() {
document.getElementById('export_columns').value = select_to_string('<inp2:p.import_InputName field="ExportColumns"/>');
submit_event('p.import','OnExportBegin');
}
) );
a_toolbar.Render();
function check_radio($id)
{
document.getElementById($id).checked = true;
}
// gets value of checked radio button
function get_checked($field_name) {
var $ret = false;
var $fields = document.getElementsByName($field_name);
for(var $i = 0; $i < $fields.length; $i++) {
if ($fields[$i].checked) {
$ret = $fields[$i].value;
break;
}
}
return $ret;
}
// enable/disable form fields based on other field values
function reflectFormFields()
{
var $auto_fields = get_checked('<inp2:p.import_InputName field="FieldTitles"/>') == 1 ? true : false;
if ($auto_fields) {
document.getElementById('_cb_<inp2:p.import_InputName field="SkipFirstRow"/>').checked = true;
}
document.getElementById('_cb_<inp2:p.import_InputName field="SkipFirstRow"/>').onchange();
document.getElementById('<inp2:p.import_InputName field="ExportColumns"/>').disabled = $auto_fields;
document.getElementById('<inp2:p.import_InputName field="AvailableColumns"/>').disabled = $auto_fields;
var $btn = null;
var $btns = Array('up', 'down', 'left', 'right');
var $i = 0;
while ($i < $btns.length) {
$btn = document.getElementById('btn_move_'+$btns[$i]);
$btn.disabled = $auto_fields;
$btn.className = $auto_fields ? 'button-disabled' : 'button';
$i++;
}
}
Application.setHook('p.import:OnBeforeOpenSelector',
function() {
document.getElementById('export_columns').value = select_to_string('<inp2:p.import_InputName field="ExportColumns"/>');
}
);
$(document).ready(
function() {
$('#step_number').text(3);
}
);
</script>
</td>
</tr>
</tbody>
</table>
<inp2:p.import_SaveWarning name="grid_save_warning"/>
<inp2:p.import_ErrorWarning name="form_error_warning"/>
<table class="edit-form bordered">
<inp2:m_RenderElement name="subsection" title="la_section_General"/>
<inp2:m_RenderElement design="form_row" prefix="p.import" field="ImportSource" title="la_fld_ImportFilename">
<td class="control-cell">
<table border="0">
<tr>
<td>
<input type="radio" name="<inp2:p.import_InputName field="ImportSource"/>" id="<inp2:p.import_InputName field="ImportSource"/>_1"<inp2:m_if check="p.import_FieldEquals" field="ImportSource" value="1"> checked</inp2:m_if> value="1" />
</td>
<td>
<label for="<inp2:p.import_InputName field="ImportSource"/>_1">upload</label>
</td>
<td>
<input type="file" name="<inp2:p.import_InputName field="ImportFilename"/>" id="<inp2:p.import_InputName field="ImportFilename"/>" onclick="check_radio('<inp2:p.import_InputName field="ImportSource"/>_1');">
</td>
</tr>
<tr>
<td>
<input type="radio" name="<inp2:p.import_InputName field="ImportSource"/>" id="<inp2:p.import_InputName field="ImportSource"/>_2"<inp2:m_if check="p.import_FieldEquals" field="ImportSource" value="2"> checked</inp2:m_if> value="2" />
</td>
<td>
<label for="<inp2:p.import_InputName field="ImportSource"/>_2">select</label>
</td>
<td>
<select name="<inp2:p.import_InputName field="ImportLocalFilename"/>" onclick="check_radio('<inp2:p.import_InputName field="ImportSource"/>_2');">
<inp2:p.import_PredefinedOptions field="ImportLocalFilename" block="inp_option_item" selected="selected"/>
</select>
</td>
</tr>
</table>
</td>
</inp2:m_RenderElement>
<inp2:m_RenderElement name="inp_edit_box" prefix="p.import" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="p.import" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="p.import" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="p.import" field="SkipFirstRow" title="la_fld_SkipFirstRow"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="p.import" field="FieldTitles" title="la_fld_FieldTitles" onclick="reflectFormFields();"/>
<inp2:m_RenderElement design="form_row" prefix="p.import" field="ExportColumns" title="la_fld_ImportColumns">
<td class="control-cell">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" id="btn_move_up" onclick="move_options_up('<inp2:p.import_InputName field="ExportColumns"/>', 1)" class="button">
<input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" id="btn_move_down" onclick="move_options_down('<inp2:p.import_InputName field="ExportColumns"/>', 1)" class="button"><br />
<img src="img/spacer.gif" width="1" height="5" alt=""><br />
</td>
<td><img src="img/spacer.gif" width="45" height="1" alt=""><br></td>
<td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
</tr>
<tr>
<td>
<select multiple id="<inp2:p.import_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
<inp2:p.import_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
</select>
<input type="hidden" id="export_columns" name="<inp2:p.import_InputName field="ExportColumns"/>" value="<inp2:p.import_Field field="ExportColumns"/>" />
</td>
<td align="center">
<input type="button" value=" «« " id="btn_move_left" onclick="move_selected('<inp2:p.import_InputName field="AvailableColumns"/>', '<inp2:p.import_InputName field="ExportColumns"/>')" class="button"><br>
<img src="img/spacer.gif" width="1" height="4" alt=""><br>
<input type="button" value=" »» " id="btn_move_right" onclick="move_selected('<inp2:p.import_InputName field="ExportColumns"/>', '<inp2:p.import_InputName field="AvailableColumns"/>'); select_sort('<inp2:p.import_InputName field="AvailableColumns"/>');" class="button">
</td>
<td>
<select multiple id="<inp2:p.import_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
<inp2:p.import_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
</select>
</td>
</tr>
</table>
</td>
</inp2:m_RenderElement>
<!-- CATEGORY SELECTOR: BEGIN -->
<inp2:m_DefineElement name="root_cat_caption">
<inp2:m_Phrase name="la_rootcategory_name"/>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="category_caption">
<inp2:m_param name="separator"/><inp2:m_param name="cat_name"/>
</inp2:m_DefineElement>
<inp2:m_RenderElement design="form_row" prefix="p.import" field="CategoryId" title="la_fld_ImportCategory">
<td class="control-cell">
<b><inp2:p.import_CategoryPath separator=" > " root_cat_render_as="root_cat_caption" render_as="category_caption" session_var="ImportCategory"/></b>
<input type="hidden" name="<inp2:p.import_InputName field='CategoryId'/>" value="<inp2:p.import_Field field='CategoryId' db='db'/>" />
<a href="<inp2:adm_SelectorLink prefix='p.import' selection_mode='single' tab_prefixes='none'/>" onclick="javascript:openSelector('p.import', this.href, 'ImportCategory', null, 'OnSaveSettings'); return false;"><img src="img/icons/icon24_cat.gif" border="0" align="absmiddle" /></a>
</td>
</inp2:m_RenderElement>
<!-- CATEGORY SELECTOR: END -->
<inp2:m_RenderElement name="inp_edit_box" prefix="p.import" field="CategorySeparator" title="la_fld_CategorySeparator" size="2" maxlength="1"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="p.import" field="ReplaceDuplicates" title="la_fld_ReplaceDuplicates" />
<inp2:m_RenderElement design="form_row" prefix="p.import" field="CheckDuplicatesMethod" title="la_fld_CheckDuplicatesMethod">
<td class="control-cell">
<table cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<input type="radio"<inp2:m_if check="p.import_FieldEquals" field="CheckDuplicatesMethod" value="1"> checked</inp2:m_if> name="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_1" value="1" />
</td>
<td>
<label for="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_1"><inp2:m_phrase name="la_IDField" />: PRODUCTID</label>
</td>
</tr>
<tr>
<td valign="top">
<input type="radio"<inp2:m_if check="p.import_FieldEquals" field="CheckDuplicatesMethod" value="2"> checked</inp2:m_if> name="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_2" value="2" />
</td>
<td>
<label for="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_2"><inp2:m_phrase name="la_OtherFields" />: </label>
<inp2:p.import_PredefinedOptions prefix="p.import" field="DuplicateCheckFields" block="inp_checkbox_item" selected="checked"/>
<inp2:m_RenderElement prefix="p.import" name="inp_edit_hidden" field="DuplicateCheckFields"/>
</td>
</tr>
</table>
</td>
</inp2:m_RenderElement>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
<script language="javascript" type="text/javascript">
reflectFormFields();
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.3.x/admin_templates/discounts/coupons_list.tpl
===================================================================
--- branches/5.3.x/admin_templates/discounts/coupons_list.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/discounts/coupons_list.tpl (revision 15971)
@@ -1,67 +1,67 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="coup" section="in-commerce:coupons" title_preset="coupons_list" pagination="1" tabs="in-commerce/discounts/discounts_list_tabs"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
std_edit_item('coup', 'in-commerce/discounts/coupon_edit');
}
var a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Coupon" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_precreate_item('coup', 'in-commerce/discounts/coupon_edit')
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('coup')
} ) );
a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>',
function() {
//set_event('sc', 'OnSaveCreated');
- openSelector('coup', '<inp2:m_Link template="in-commerce/discounts/coupon_clone_selector" pass="all"/>', '', '600x260', 'OnPrepareClone');
+ openSelector('coup', '<inp2:m_Link template="in-commerce/discounts/coupon_clone_selector" pass="all" no_amp="1" js_escape="1"/>', '', '600x260', 'OnPrepareClone');
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
submit_event('coup','OnMassApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
submit_event('coup','OnMassDecline');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="coup" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="coup" IdField="CouponId" grid="Default"/>
<script type="text/javascript">
Grids['coup'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','clone') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.3.x/admin_templates/discounts/coupon_items.tpl
===================================================================
--- branches/5.3.x/admin_templates/discounts/coupon_items.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/discounts/coupon_items.tpl (revision 15971)
@@ -1,116 +1,116 @@
<inp2:adm_SetPopupSize width="870" height="600"/>
<inp2:m_include t="incs/header"/>
<inp2:m_if check="coupi_IsEntireOrder">
<inp2:m_SetParam grid="Default"/>
<inp2:m_else/>
<inp2:m_SetParam grid="CouponItems"/>
</inp2:m_if>
<inp2:m_RenderElement name="combined_header" prefix="coup" section="in-commerce:coupons" title_preset="coupons_items" grid="$grid" pagination="1" pagination_prefix="coupi" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('coup','<inp2:coup_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('coup','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('coup', '<inp2:coup_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('coup', '<inp2:coup_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Products" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
- openSelector('coupi', '<inp2:adm_SelectorLink prefix="coupi" selection_mode="multi" tabs_dependant="no" tab_prefixes="p"/>', '');
+ openSelector('coupi', '<inp2:adm_SelectorLink prefix="coupi" selection_mode="multi" tabs_dependant="no" tab_prefixes="p" no_amp="1" js_escape="1"/>', '');
} ) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('coupi')
} ) );
a_toolbar.AddButton( new ToolBarButton('in-commerce:entire_order', '<inp2:m_phrase label="la_ToolTip_EntireOrder" escape="1"/>',
function() {
if (inpConfirm('<inp2:m_phrase label="la_EntireOrderConfirmation"/>'))
{
submit_event('coupi', 'OnEntireOrder');
}
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
<inp2:m_if check="coup_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="coup_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="coup_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
function edit()
{
// required for correct row selection
}
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="coupi" grid="$grid"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="grid_item_td">
<inp2:m_if check="FieldEquals" field="ItemType" value="1">
<inp2:Field field="ProductId" no_special="no_special"/>
<inp2:m_else/>
<inp2:Field field="CategoryId" no_special="no_special"/>
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="coupi" IdField="CouponItemId" grid="$grid"/>
<script type="text/javascript">
<inp2:m_if check="coupi_IsEntireOrder" >
a_toolbar.DisableButton('new_item');
</inp2:m_if>
Grids['coupi'].SetDependantToolbarButtons( new Array('delete') );
</script>
<input type="hidden" name="main_prefix" id="main_prefix" value="coupi">
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.3.x/admin_templates/discounts/gift_certificate_list.tpl
===================================================================
--- branches/5.3.x/admin_templates/discounts/gift_certificate_list.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/discounts/gift_certificate_list.tpl (revision 15971)
@@ -1,63 +1,63 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="gc" section="in-commerce:gift-certificates" title_preset="gift_certificates_list" pagination="1" tabs="in-commerce/discounts/discounts_list_tabs"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
std_edit_item('gc', 'in-commerce/discounts/gift_certificate_edit');
}
var a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_NewGiftCertificate" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_precreate_item('gc', 'in-commerce/discounts/gift_certificate_edit')
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('gc')
} ) );
a_toolbar.AddButton( new ToolBarButton('e-mail', '<inp2:m_phrase label="la_ToolTip_SendMail" escape="1"/>', function() {
submit_event('gc', 'OnEmailGiftCertificate');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="gc" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="gc" IdField="GiftCertificateId" grid="Default"/>
<script type="text/javascript">
Grids['gc'].SetDependantToolbarButtons( new Array('edit','delete','e-mail') );
addLoadEvent(
function() {
<inp2:m_if check="m_Recall" name="print_certificate_id">
- openSelector('gc', '<inp2:gc_PrintLink template="in-commerce/discounts/gift_certificate_print" no_amp="1"/>');
+ openSelector('gc', '<inp2:gc_PrintLink template="in-commerce/discounts/gift_certificate_print" no_amp="1" js_escape="1"/>');
</inp2:m_if>
}
);
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.3.x/admin_templates/discounts/discount_items.tpl
===================================================================
--- branches/5.3.x/admin_templates/discounts/discount_items.tpl (revision 15970)
+++ branches/5.3.x/admin_templates/discounts/discount_items.tpl (revision 15971)
@@ -1,116 +1,116 @@
<inp2:adm_SetPopupSize width="870" height="600"/>
<inp2:m_include t="incs/header"/>
<inp2:m_if check="di_IsEntireOrder">
<inp2:m_SetParam grid="Default"/>
<inp2:m_else/>
<inp2:m_SetParam grid="DiscountItems"/>
</inp2:m_if>
<inp2:m_RenderElement name="combined_header" prefix="d" section="in-commerce:discounts" title_preset="discount_items" grid="$grid" pagination="1" pagination_prefix="di" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('d','<inp2:d_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('d','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('d', '<inp2:d_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('d', '<inp2:d_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Products" escape="1"/>',
function() {
- openSelector('di', '<inp2:adm_SelectorLink prefix="di" selection_mode="multi" tabs_dependant="no" tab_prefixes="p"/>', '');
+ openSelector('di', '<inp2:adm_SelectorLink prefix="di" selection_mode="multi" tabs_dependant="no" tab_prefixes="p" no_amp="1" js_escape="1"/>', '');
} ) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('di')
} ) );
a_toolbar.AddButton( new ToolBarButton('in-commerce:entire_order', '<inp2:m_phrase label="la_ToolTip_EntireOrder" escape="1"/>',
function() {
if (inpConfirm('<inp2:m_phrase label="la_EntireOrderConfirmation"/>'))
{
submit_event('di', 'OnEntireOrder');
}
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
<inp2:m_if check="d_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="d_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="d_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
function edit()
{
// required for correct row selection
}
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="di" grid="$grid"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="grid_item_td">
<inp2:m_if check="FieldEquals" field="ItemType" value="1">
<inp2:Field field="ProductId" no_special="no_special"/>
<inp2:m_else/>
<inp2:Field field="CategoryId" no_special="no_special"/>
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="di" IdField="DiscountItemId" grid="$grid"/>
<script type="text/javascript">
<inp2:m_if check="di_IsEntireOrder" >
a_toolbar.DisableButton('new_item');
</inp2:m_if>
Grids['di'].SetDependantToolbarButtons( new Array('delete') );
</script>
<input type="hidden" name="main_prefix" id="main_prefix" value="di">
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Event Timeline
Log In to Comment