Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Sat, Feb 22, 12:00 AM

in-portal

Index: branches/5.2.x/core/kernel/processors/main_processor.php
===================================================================
--- branches/5.2.x/core/kernel/processors/main_processor.php (revision 16061)
+++ branches/5.2.x/core/kernel/processors/main_processor.php (revision 16062)
@@ -1,1286 +1,1286 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license GNU/GPL
* In-Portal is Open Source software.
* This means that this software may have been modified pursuant
* the GNU General Public License, and as distributed it includes
* or is derivative of works licensed under the GNU General Public License
* or other free or open source software licenses.
* See http://www.in-portal.org/license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
class kMainTagProcessor extends kTagProcessor {
public function __construct()
{
parent::__construct();
$actions = $this->Application->recallObject('kActions');
/* @var $actions Params */
$actions->Set('t', $this->Application->GetVar('t'));
$actions->Set('sid', $this->Application->GetSID());
$actions->Set('m_opener', $this->Application->GetVar('m_opener') );
}
/**
* Base folder for all template includes
*
* @param Array $params
* @return string
*/
function TemplatesBase($params)
{
static $cached = Array ();
$cache_key = crc32( serialize($params) );
if (!array_key_exists($cache_key, $cached)) {
$module = array_key_exists('module', $params) ? $params['module'] : 'core';
if ($this->Application->isAdmin) {
if ($module == 'in-portal') {
$module = 'kernel';
}
// remove leading slash + substitute module
$module_path = $this->Application->findModule('Name', $module, 'Path');
if ($module_path !== false) {
$path = $module_path . 'admin_templates';
}
else {
// remove leading slash + substitute module
$path = preg_replace('/\/(.*?)\/(.*)/', $module . '/\\2', THEMES_PATH);
}
}
else {
$path = mb_substr(THEMES_PATH, 1);
if (mb_strtolower($module) == 'in-portal') {
$module_folder = 'platform';
}
else {
$module_folder = $this->Application->findModule('Name', $module, 'TemplatePath');
}
$path .= rtrim('/' . trim($module_folder, '/'), '/') . '/';
}
$cached[$cache_key] = $this->Application->BaseURL() . $path;
}
return $cached[$cache_key];
}
/**
* Creates <base href ..> HTML tag for all templates
* affects future css, js files and href params of links
*
* @param Array $params
* @return string
* @access protected
* @see kMainTagProcessor::TemplatesBase
*/
protected function Base_Ref($params)
{
// tag TemplatesBase adds trailing "/" but only on Front-End
$base_href = rtrim($this->TemplatesBase($params), '/');
return '<base href="' . $base_href . '/" />';
}
/**
* Returns base url for web-site
*
* @return string
* @access public
*/
function BaseURL()
{
return $this->Application->BaseURL();
}
//for compatability with K3 tags
function Base($params)
{
return $this->TemplatesBase($params).'/';
}
function ProjectBase($params)
{
return $this->Application->BaseURL();
}
/*function Base($params)
{
return $this->Application->BaseURL().$params['add'];
}*/
/**
* Used to create link to any template.
* use "pass" paramter if "t" tag to specify
* prefix & special of object to be represented
* in resulting url
*
* @param Array $params
* @return string
* @access public
*/
function T($params)
{
// by default link to current template
$template = $this->SelectParam($params, 't,template');
$prefix = array_key_exists('prefix', $params) ? $params['prefix'] : '';
unset($params['t'], $params['template'], $params['prefix']);
return $this->Application->HREF($template, $prefix, $params);
}
function Link($params)
{
// pass "m" prefix, instead of "all", that is by default on Front-End
if (!array_key_exists('pass', $params)) {
$params['pass'] = 'm';
}
return $this->T($params);
}
/**
* Performs redirect to provided template/url
*
* @param Array $params
* @return string
*/
function Redirect($params)
{
$this->Application->Redirect('external:' . $this->Link($params));
return '';
}
/*function Env($params)
{
$t = $params['template'];
unset($params['template']);
return $this->Application->BuildEnv($t, $params, 'm', false, false);
}*/
function FormAction($params)
{
if (!array_key_exists('pass', $params)) {
$params['pass'] = 'all,m';
}
$params['pass_category'] = 1;
return $this->Application->HREF('', '', $params);
}
/*// NEEDS TEST
function Config($params)
{
return $this->Application->ConfigOption($params['var']);
}
function Object($params)
{
$name = $params['name'];
$method = $params['method'];
$tmp = $this->Application->recallObject($name);
if ($tmp != null) {
if (method_exists($tmp, $method))
return $tmp->$method($params);
else
echo "Method $method does not exist in object ".get_class($tmp)." named $name<br>";
}
else
echo "Object $name does not exist in the appliaction<br>";
}*/
/**
* Tag, that always returns true.
* For parser testing purposes
*
* @param Array $params
* @return bool
* @access public
*/
function True($params)
{
return true;
}
/**
* Tag, that always returns false.
* For parser testing purposes
*
* @param Array $params
* @return bool
* @access public
*/
function False($params)
{
return false;
}
/**
* Returns block parameter by name (used only as "check" parameter value for "m_if" tag!)
*
* @param Array $params
* @return stirng
* @access public
*/
function Param($params)
{
$name = $params['name'];
if (array_key_exists($name, $this->Application->Parser->Captures)) {
$capture_params = $params;
$capture_params['name'] = '__capture_' . $name;
$this->Application->Parser->SetParam($name, $this->Application->ParseBlock($capture_params));
}
$res = $this->Application->Parser->GetParam($name);
if ($res === false) {
$res = '';
}
if (array_key_exists('plus', $params)) {
$res += $params['plus'];
}
return $res;
}
/**
* Compares block parameter with value specified
*
* @param Array $params
* @return bool
* @access public
*/
function ParamEquals($params)
{
$name = $this->SelectParam($params, 'name,var,param');
$value = $params['value'];
return ($this->Application->Parser->GetParam($name) == $value);
}
/*function PHP_Self($params)
{
return $HTTP_SERVER_VARS['PHP_SELF'];
}
*/
/**
* Returns session variable value by name
*
* @param Array $params
* @return string
* @access public
*/
function Recall($params)
{
$var_name = $this->SelectParam($params,'name,var,param');
if (isset($params['persistent']) && $params['persistent']) {
$ret = $this->Application->RecallPersistentVar($var_name);
}
else {
$ret = $this->Application->RecallVar($var_name);
}
$ret = ($ret === false && isset($params['no_null'])) ? '' : $ret;
if (getArrayValue($params, 'special') || getArrayValue($params, 'htmlchars')) {
$ret = kUtil::escape($ret, kUtil::ESCAPE_HTML);
}
if (getArrayValue($params, 'urlencode')) {
$ret = kUtil::escape($ret, kUtil::ESCAPE_URL);
}
return $ret;
}
function RemoveVar($params)
{
$this->Application->RemoveVar( $this->SelectParam($params,'name,var,param') );
}
// bad style to store something from template to session !!! (by Alex)
// Used here only to test how session works, nothing more
function Store($params)
{
//echo"Store $params[name]<br>";
$name = $params['name'];
$value = $params['value'];
$this->Application->StoreVar($name,$value);
}
/**
* Links variable from request with variable from session
*
* @param Array $params
* @return string
* @access protected
*/
protected function LinkVar($params)
{
$var_name = $params['name'];
$session_var_name = isset($params['session_name']) ? $params['session_name'] : $var_name;
$default_value = isset($params['default']) ? $params['default'] : '';
$this->Application->LinkVar($var_name, $session_var_name, $default_value);
return '';
}
/**
* Links variable from request with variable from session and returns it's value
*
* @param Array $params
* @return string
* @access protected
*/
protected function GetLinkedVar($params)
{
$this->LinkVar($params);
return $this->Application->GetVar( $params['name'] );
}
/**
* Sets application variable value(-s)
*
* @param Array $params
* @access public
*/
function Set($params)
{
foreach ($params as $param => $value) {
$this->Application->SetVar($param, $value);
}
}
/**
* Increment application variable
* specified by number specified
*
* @param Array $params
* @access public
*/
function Inc($params)
{
$this->Application->SetVar($params['param'], $this->Application->GetVar($params['param']) + $params['by']);
}
/**
* Retrieves application variable
* value by name
*
* @param Array $params
* @return string
* @access public
*/
function Get($params)
{
$name = $this->SelectParam($params, 'name,var,param');
if ( strpos($name, '[') !== false ) {
preg_match('/([^\[\]]+)\[(.*)\]/', $name, $regs);
$function_params = explode('][', $regs[2]);
- $ret = $this->Application->GetVar($regs[1], Array ());
- array_unshift_ref($function_params, $ret);
+ $ret = $this->Application->GetVar($regs[1], array());
+ kUtil::array_unshift_ref($function_params, $ret);
- return call_user_func_array('getArrayValue', $function_params);
+ $ret = call_user_func_array('getArrayValue', $function_params);
}
else {
$ret = $this->Application->GetVar($name, '');
}
- if (array_key_exists('no_html_escape', $params) && $params['no_html_escape']) {
- return kUtil::unescape($ret, kUtil::ESCAPE_HTML);
+ if ( array_key_exists('no_html_escape', $params) && $params['no_html_escape'] ) {
+ return $this->Application->isAdmin ? $ret : kUtil::unescape($ret, kUtil::ESCAPE_HTML);
}
- return $ret;
+ return kUtil::escape($ret, kUtil::ESCAPE_HTML);
}
/**
* Retrieves application constant
* value by name
*
* @param Array $params
* @return string
* @access public
*/
function GetConst($params)
{
$constant_name = $this->SelectParam($params, 'name,const');
return defined($constant_name) ? constant($constant_name) : '';
}
/**
* Retrieves configuration variable value by name
*
* @param Array $params
* @return string
* @access public
*/
function GetConfig($params)
{
$config_name = $this->SelectParam($params, 'name,var');
$ret = $this->Application->ConfigValue($config_name);
if ( isset($params['formatted']) && $params['formatted'] ) {
$sql = 'SELECT ValueList
FROM ' . TABLE_PREFIX . 'SystemSettings
WHERE VariableName = ' . $this->Conn->qstr($config_name) . ' AND ElementType IN ("select", "radio")';
$value_list = $this->Conn->GetOne($sql);
if ( $value_list ) {
$helper = $this->Application->recallObject('InpCustomFieldsHelper');
/* @var $helper InpCustomFieldsHelper */
$options = $helper->GetValuesHash($value_list);
$ret = isset($options[$ret]) ? $options[$ret] : $ret;
}
}
if ( isset($params['as_label']) && $params['as_label'] ) {
$ret = $this->Application->Phrase($ret);
}
return $ret;
}
/**
* Compares configuration variable to a given value
*
* @param Array $params
* @return bool
* @deprecated
* @access protected
*/
protected function ConfigEquals($params)
{
$option = $this->SelectParam($params, 'name,option,var');
return $this->Application->ConfigValue($option) == $params['value'];
}
/**
* Creates all hidden fields
* needed for kernel_form
*
* @param Array $params
* @return string
* @access protected
*/
protected function DumpSystemInfo($params)
{
$actions = $this->Application->recallObject('kActions');
/* @var $actions Params */
$actions->Set('t', $this->Application->GetVar('t'));
$o = '';
$params = $actions->GetParams();
foreach ($params AS $name => $val) {
$o .= "<input type='hidden' name='$name' id='$name' value='$val'>\n";
}
return $o;
}
/**
* Used for search sidebox on front-end only
*
* @param Array $params
* @return string
* @access protected
*/
protected function GetFormHiddens($params)
{
$t = $this->SelectParam($params, 'template,t');
unset($params['template']);
$form_fields = Array ();
if ( $this->Application->RewriteURLs() ) {
$session = $this->Application->recallObject('Session');
/* @var $session Session */
if ( $session->NeedQueryString() ) {
$form_fields['sid'] = $this->Application->GetSID();
}
}
else {
$form_fields['env'] = $this->Application->BuildEnv($t, $params, 'm', false, false);
}
if ( $this->Application->GetVar('admin') == 1 ) {
$form_fields['admin'] = 1;
}
$ret = '';
$field_tpl = '<input type="hidden" name="%1$s" id="%1$s" value="%2$s"/>' . "\n";
foreach ($form_fields as $form_field => $field_value) {
$ret .= sprintf($field_tpl, $form_field, $field_value);
}
return $ret;
}
function Odd_Even($params)
{
$odd = $params['odd'];
$even = $params['even'];
if (!isset($params['var'])) {
$var = 'odd_even';
}
else {
$var = $params['var'];
}
if ($this->Application->GetVar($var) == 'even') {
if (!isset($params['readonly']) || !$params['readonly']) {
$this->Application->SetVar($var, 'odd');
}
return $even;
}
else {
if (!isset($params['readonly']) || !$params['readonly']) {
$this->Application->SetVar($var, 'even');
}
return $odd;
}
}
/**
* Returns phrase translation by name
*
* @param Array $params
* @return string
* @access public
*/
function Phrase($params)
{
$phrase_name = $this->SelectParam($params, 'label,name,title');
$default_translation = $this->SelectParam($params, 'default');
$no_editing = isset($params['no_editing']) && $params['no_editing'];
$translation = $this->Application->Phrase($phrase_name, !$no_editing);
$phrase_key = mb_strtoupper($phrase_name);
if ( $default_translation && strpos($translation, '!' . $phrase_key . '!') !== false ) {
$phrase = $this->Application->recallObject('phrases.autocreate', null, Array ('skip_autoload' => true));
/* @var $phrase kDBItem */
if ( !$phrase->Load($phrase_key, 'PhraseKey') ) {
$phrase->SetDBField('Phrase', $phrase_name);
$ml_helper = $this->Application->recallObject('kMultiLanguageHelper');
/* @var $ml_helper kMultiLanguageHelper */
$languages = $ml_helper->getLanguages();
foreach ($languages AS $language_id) {
$phrase->SetDBField('l' . $language_id . '_Translation', $default_translation);
}
if ( $phrase->Create() ) {
$translation = $default_translation;
}
}
}
if ( isset($params['escape']) && $params['escape'] ) {
// html escaping here is redundant
$translation = kUtil::escape($translation, kUtil::ESCAPE_JS);
}
return $translation;
}
// for tabs
function is_active($params)
{
$test_templ = $this->SelectParam($params, 'templ,template,t');
if ( !getArrayValue($params, 'allow_empty') ) {
$if_true = getArrayValue($params, 'true') ? $params['true'] : 1;
$if_false = getArrayValue($params, 'false') ? $params['false'] : 0;
}
else {
$if_true = $params['true'];
$if_false = $params['false'];
}
$physical_template = $this->Application->getPhysicalTemplate($this->Application->GetVar('t'));
return preg_match('/^' . str_replace('/', '\/', $test_templ) . '/i', $physical_template) ? $if_true : $if_false;
}
function IsNotActive($params)
{
return !$this->is_active($params);
}
function IsActive($params)
{
return $this->is_active($params);
}
function is_t_active($params)
{
return $this->is_active($params);
}
function CurrentTemplate($params)
{
return $this->is_active($params);
}
/**
* Checks if session variable
* specified by name value match
* value passed as parameter
*
* @param Array $params
* @return string
* @access public
*/
function RecallEquals($params)
{
$name = $this->SelectParam($params, 'name,var');
$value = $params['value'];
if (isset($params['persistent']) && $params['persistent']) {
return $this->Application->RecallPersistentVar($name) == $value;
}
return ($this->Application->RecallVar($name) == $value);
}
/**
* Checks if application variable specified by name value match value passed as parameter
*
* @param Array $params
* @return bool
* @access protected
* @deprecated
*/
protected function GetEquals($params)
{
$name = $this->SelectParam($params, 'var,name,param');
return $this->Application->GetVar($name) == $params['value'];
}
function ModuleInclude($params)
{
$ret = '';
$included = Array ();
$block_params = array_merge($params, Array ('is_silent' => 2)); // don't make fatal errors in case if template is missing
$current_template = $this->Application->GetVar('t');
$replace_main = isset($params['replace_m']) && $params['replace_m'];
$skip_prefixes = isset($params['skip_prefixes']) ? explode(',', $params['skip_prefixes']) : Array ();
$cms_mode = $this->Application->GetVar('admin');
foreach ($this->Application->ModuleInfo as $module_name => $module_data) {
$module_key = mb_strtolower($module_name);
if ( $module_name == 'In-Portal' ) {
if ( !$cms_mode && $this->Application->isAdmin ) {
// don't process In-Portal templates in admin
continue;
}
// Front-End still relies on In-Portal module
$module_prefix = $module_data['TemplatePath'];
}
elseif ( $this->Application->isAdmin && $module_data['Path'] != 'core/' ) {
$module_prefix = $module_key . '/'; // was $module_data['Path'];
}
else {
$module_prefix = $module_data['TemplatePath']; // always have trailing "/"
}
if ( in_array($module_prefix, $included) ) {
// template by this path was already included by other module (e.g. in-portal used core's template)
continue;
}
$block_params['t'] = $module_prefix . $this->SelectParam($params, $module_key . '_template,' . $module_key . '_t,template,t');
$check_prefix = $module_data['Var'];
if ( $check_prefix == 'adm' && $replace_main ) {
$check_prefix = 'c';
}
if ( $block_params['t'] == $current_template || in_array($check_prefix, $skip_prefixes) ) {
continue;
}
$no_data = $this->SelectParam($params, $module_key . '_block_no_data,block_no_data');
if ( $no_data ) {
$block_params['block_no_data'] = $module_prefix . '/' . $no_data;
}
$ret .= $this->Application->IncludeTemplate($block_params);
$included[] = $module_prefix;
}
return $ret;
}
function ModuleEnabled($params)
{
return $this->Application->isModuleEnabled( $params['module'] );
}
/**
* Checks if debug mode is on
*
* @param Array $params
* @return bool
* @access public
*/
function IsDebugMode($params)
{
return defined('DEBUG_MODE') && $this->Application->isDebugMode();
}
/*function MassParse($params)
{
$qty = $params['qty'];
$block = $params['block'];
$mode = $params['mode'];
$o = '';
if ($mode == 'func') {
$func = create_function('$params', '
$o = \'<tr>\';
$o.= \'<td>a\'.$params[\'param1\'].\'</td>\';
$o.= \'<td>a\'.$params[\'param2\'].\'</td>\';
$o.= \'<td>a\'.$params[\'param3\'].\'</td>\';
$o.= \'<td>a\'.$params[\'param4\'].\'</td>\';
$o.= \'</tr>\';
return $o;
');
for ($i=1; $i<$qty; $i++) {
$block_params['param1'] = rand(1, 10000);
$block_params['param2'] = rand(1, 10000);
$block_params['param3'] = rand(1, 10000);
$block_params['param4'] = rand(1, 10000);
$o .= $func($block_params);
}
return $o;
}
$block_params['name'] = $block;
for ($i=0; $i<$qty; $i++) {
$block_params['param1'] = rand(1, 10000);
$block_params['param2'] = rand(1, 10000);
$block_params['param3'] = rand(1, 10000);
$block_params['param4'] = rand(1, 10000);
$block_params['passed'] = $params['passed'];
$block_params['prefix'] = 'm';
$o.= $this->Application->ParseBlock($block_params);
}
return $o;
}*/
function LoggedIn($params)
{
return $this->Application->LoggedIn();
}
/**
* Allows to check if permission exists directly in template and perform additional actions if required
*
* @param Array $params
* @return bool
*/
function CheckPermission($params)
{
$perm_helper = $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
return $perm_helper->TagPermissionCheck($params);
}
/**
* Checks if user is logged in and if not redirects it to template passed
*
* @param Array $params
*/
function RequireLogin($params)
{
$t = $this->Application->GetVar('t');
$next_t = getArrayValue($params, 'next_template');
if ( $next_t ) {
$t = $next_t;
}
// check by permissions: begin
if ((isset($params['perm_event']) && $params['perm_event']) ||
(isset($params['perm_prefix']) && $params['perm_prefix']) ||
(isset($params['permissions']) && $params['permissions'])) {
$perm_helper = $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
$perm_status = $perm_helper->TagPermissionCheck($params);
if (!$perm_status) {
list($redirect_template, $redirect_params) = $perm_helper->getPermissionTemplate($params);
$this->Application->Redirect($redirect_template, $redirect_params);
}
else {
return ;
}
}
// check by permissions: end
// check by configuration value: begin
$condition = getArrayValue($params, 'condition');
if (!$condition) {
$condition = true;
}
else {
if (substr($condition, 0, 1) == '!') {
$condition = !$this->Application->ConfigValue(substr($condition, 1));
}
else {
$condition = $this->Application->ConfigValue($condition);
}
}
// check by configuration value: end
// check by belonging to group: begin
$group = $this->SelectParam($params, 'group');
$group_access = true;
if ($group) {
$sql = 'SELECT GroupId
FROM '.TABLE_PREFIX.'UserGroups
WHERE Name = '.$this->Conn->qstr($group);
$group_id = $this->Conn->GetOne($sql);
if ($group_id) {
$groups = explode(',', $this->Application->RecallVar('UserGroups'));
$group_access = in_array($group_id, $groups);
}
}
// check by belonging to group: end
if ((!$this->Application->LoggedIn() || !$group_access) && $condition) {
$redirect_params = $this->Application->HttpQuery->getRedirectParams(true);
if (MOD_REWRITE) {
// TODO: $next_t variable is ignored !!! (is anyone using m_RequireLogin tag with "next_template" parameter?)
$redirect_params = Array (
'm_cat_id' => 0,
'next_template' => kUtil::escape('external:' . $_SERVER['REQUEST_URI'], kUtil::ESCAPE_URL),
);
}
else {
$redirect_params['next_template'] = $t;
}
if (array_key_exists('pass_category', $params)) {
$redirect_params['pass_category'] = $params['pass_category'];
}
if (array_key_exists('use_section', $params)) {
$redirect_params['use_section'] = $params['use_section'];
}
if ( $this->Application->LoggedIn() && !$group_access) {
$this->Application->Redirect($params['no_group_perm_template'], $redirect_params);
}
$this->Application->Redirect($params['login_template'], $redirect_params);
}
}
/**
* Checks, that user belongs to a group with a given name
*
* @param Array $params
* @return bool
*/
protected function IsMember($params)
{
$sql = 'SELECT GroupId
FROM ' . TABLE_PREFIX . 'UserGroups
WHERE Name = ' . $this->Conn->qstr($params['group']);
$group_id = $this->Conn->GetOne($sql);
if ( $group_id ) {
$groups = explode(',', $this->Application->RecallVar('UserGroups'));
return in_array($group_id, $groups);
}
return false;
}
/**
* Checks if SSL is on and redirects to SSL URL if needed
* If SSL_URL is not defined in config - the tag does not do anything
* If for_logged_in_only="1" exits if user is not logged in.
* If called without params forces https right away. If called with by_config="1" checks the
* Require SSL setting from General Config and if it is ON forces https
*
* @param Array $params
*/
protected function CheckSSL($params)
{
$ssl = $this->Application->isAdmin ? $this->Application->ConfigValue('AdminSSL_URL') : false;
if ( !$ssl ) {
// not in admin or admin ssl url is empty
$ssl_url = $this->Application->siteDomainField('SSLUrl');
$ssl = $ssl_url !== false ? $ssl_url : $this->Application->ConfigValue('SSL_URL');
}
if ( !$ssl || ($this->Application->TemplatesCache->forceThemeName !== false) ) {
// SSL URL is not set - no way to require SSL
// internal parsing (e.g. "TemplateParser::_parseTemplate") -> don't redirect
return;
}
$require = false;
if ( isset($params['mode']) && $params['mode'] == 'required' ) {
$require = true;
if ( isset($params['for_logged_in_only']) && $params['for_logged_in_only'] && !$this->Application->LoggedIn() ) {
$require = false;
}
if ( isset($params['condition']) ) {
if ( !$this->Application->ConfigValue($params['condition']) ) {
$require = false;
}
}
}
if ( EDITING_MODE ) {
// match SSL mode on front-end to one in administrative console, when browse modes are used
$require = $this->Application->ConfigValue('Require_AdminSSL');
}
$http_query = $this->Application->recallObject('HTTPQuery');
/* @var $http_query kHTTPQuery */
$pass = $http_query->getRedirectParams();
$pass['pass_events'] = 1; // to make sure all events are passed when redirect happens
if ( $require ) {
if ( PROTOCOL == 'https://' ) {
$this->Application->SetVar('__KEEP_SSL__', 1);
return;
}
$pass['__SSL__'] = 1;
$this->Application->Redirect('', $pass);
}
else {
if ( PROTOCOL == 'https://' && $this->Application->ConfigValue('Force_HTTP_When_SSL_Not_Required') ) {
if ( $this->Application->GetVar('__KEEP_SSL__') ) {
return;
}
// $pass_more = Array ('pass' => 'm', 'm_cat_id' => 0, '__SSL__' => 0);
$pass['__SSL__'] = 0;
$this->Application->Redirect('', $pass); // $pass_more
}
}
}
function ConstOn($params)
{
$name = $this->SelectParam($params,'name,const');
return kUtil::constOn($name);
}
function SetDefaultCategory($params)
{
$category_id = $this->Application->findModule('Name', $params['module'], 'RootCat');
$this->Application->SetVar('m_cat_id', $category_id);
}
function XMLTemplate($params)
{
$this->NoDebug($params);
if ( isset($params['cache']) && $params['cache'] ) {
$nextyear = intval(date('Y') + 1);
$format = "D, d M Y H:i:s";
$expiration = gmdate($format, time() + $params['cache']) . ' GMT';
$last_modified = time();
header('Cache-Control: public, cache, max-age=' . $params['cache']);
header("Expires: $expiration");
header('Pragma: public');
// Getting headers sent by the client.
$headers = $this->_requestHeaders();
// Checking if the client is validating his cache and if it is current.
if ( isset($headers['If-Modified-Since']) && (strtotime($headers['If-Modified-Since']) > $last_modified - $params['cache']) ) {
// Client's cache IS current, so we just respond '304 Not Modified'.
header('Last-Modified: ' . date($format, strtotime($headers['If-Modified-Since'])) . ' GMT', true, 304);
exit;
}
else {
// Image not cached or cache outdated, we respond '200 OK' and output the image.
header('Last-Modified: ' . gmdate($format, $last_modified) . ' GMT', true, 200);
}
}
// xml documents are usually long
kUtil::setResourceLimit();
if ( !$this->Application->GetVar('debug') ) {
return $this->Application->XMLHeader(getArrayValue($params, 'xml_version'));
}
return '';
}
protected function _requestHeaders()
{
if ( function_exists('apache_request_headers') ) {
// If apache_request_headers() exists...
$headers = apache_request_headers();
if ($headers) {
return $headers; // And works... Use it
}
}
$headers = Array ();
foreach (array_keys($_SERVER) as $skey) {
if (substr($skey, 0, 5) == 'HTTP_') {
$headername = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($skey, 0, 5)))));
$headers[$headername] = $_SERVER[$skey];
}
}
return $headers;
}
function Header($params)
{
header($params['data']);
}
function NoDebug($params)
{
if ( !$this->Application->GetVar('debug') ) {
kUtil::safeDefine('DBG_SKIP_REPORTING', 1);
}
}
/**
* Returns Home category name
*
* @param Array $params
* @return string
* @deprecated
*/
function RootCategoryName($params)
{
$no_editing = array_key_exists('no_editing', $params) && $params['no_editing'];
return $this->Application->Phrase('la_rootcategory_name', !$no_editing);
}
/**
* Allows to attach file directly from email event template
*
* @param Array $params
*/
function AttachFile($params)
{
$path = FULL_PATH . '/' . $params['path'];
$pseudo = isset($params['special']) ? 'EmailSender.' . $params['special'] : 'EmailSender';
$esender = $this->Application->recallObject($pseudo);
/* @var $esender kEmailSendingHelper */
if ( file_exists($path) ) {
$esender->AddAttachment($path);
}
}
function CaptchaImage($params)
{
$this->NoDebug($params);
$this->Application->SetVar('skip_last_template', 1);
$captcha_helper = $this->Application->recallObject('CaptchaHelper');
/* @var $captcha_helper kCaptchaHelper */
// generate captcha code
$code = $captcha_helper->prepareCode( $this->Application->GetVar('var') );
$captcha_helper->GenerateCaptchaImage($code, $this->Application->GetVar('w'), $this->Application->GetVar('h'), true);
}
function SID($params)
{
return $this->Application->GetSID();
}
function ModuleInfo($params)
{
return $this->Application->findModule($params['key'], $params['value'], $params['return']);
}
function Random($params)
{
return rand(1, 100000000);
}
/**
* Prints parser params, available at current deep level
*
* @param Array $params
* @return string
*/
function PrintCurrentParams($params)
{
$current_params = $this->Application->Parser->Params;
foreach ($current_params as $param_name => $param_value) {
$current_params[$param_name] = $param_name . ' = "' . $param_value . '"';
}
return '<pre>' . implode("\n", $current_params) . '</pre>';
}
/**
* Gets previously defined counter result
*
* @param Array $params
* @return int
*/
function GetCounter($params)
{
return $this->Application->getCounter($params['name'], $params);
}
/**
* Increments PageHit counter
*
* @param Array $params
* @return int
*/
function RegisterPageHit($params)
{
if ($this->Application->ConfigValue('UsePageHitCounter')) {
// get current counte
$sql = 'SELECT VariableValue
FROM '.TABLE_PREFIX.'SystemSettings
WHERE VariableName = "PageHitCounter"';
$page_counter = (int)$this->Conn->GetOne($sql);
$sql = 'UPDATE LOW_PRIORITY '.TABLE_PREFIX.'SystemSettings
SET VariableValue = '.($page_counter + 1).'
WHERE VariableName = "PageHitCounter"';
$this->Conn->Query($sql);
}
}
function Timestamp($params)
{
$format = isset($params['format']) ? $params['format'] : 'd.m.Y H:i:s';
return adodb_date($format);
}
function GetUrlHiddenFileds($params)
{
$vars = Array ('page', 'per_page', 'sort_by');
$ret = '<input type="hidden" name="main_list" value="1"/>';
if (array_key_exists('skip', $params)) {
$vars = array_diff($vars, $params['skip']);
}
foreach ($vars as $var_name) {
$var_value = $this->Application->GetVar($var_name);
if ($var_value) {
$ret .= '<input type="hidden" name="' . $var_name . '" value="' . $var_value . '"/>';
}
}
return $ret;
}
/**
* Returns current Page URL (without re-assembling it).
* "skip_query" param is optional and will remove the ?QUERY part from the result.
*
* @param Array $params
* @return string
* @access protected
*/
protected function CurrentPageLink($params)
{
if ( isset($params['skip_query']) && $params['skip_query'] ) {
return preg_replace('/\?' . preg_quote($_SERVER['QUERY_STRING'], '/') . '$/', '', $_SERVER['REQUEST_URI']);
}
return $_SERVER['REQUEST_URI'];
}
/**
* Returns current maintenance mode state
*
* @param Array $params
* @return int
* @access protected
*/
protected function MaintenanceMode($params)
{
$check_ips = isset($params['check_ips']) ? $params['check_ips'] : true;
return $this->Application->getMaintenanceMode($check_ips);
}
/**
* Checks if element with given name is defined
*
* @param Array $params
* @return int
* @access protected
*/
protected function ElementDefined($params)
{
return $this->Application->Parser->blockFound($params['name']);
}
}
Index: branches/5.2.x/core/admin_templates/export/export_progress.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/export/export_progress.tpl (revision 16061)
+++ branches/5.2.x/core/admin_templates/export/export_progress.tpl (revision 16062)
@@ -1,35 +1,35 @@
<inp2:adm_SetPopupSize width="515" height="194"/>
<inp2:m_include t="incs/header"/>
-<inp2:m_Get var="PrefixSpecial" result_to_var="exportprefix" />
+<inp2:m_Get var="PrefixSpecial" no_html_escape="1" result_to_var="exportprefix" />
<inp2:{$exportprefix}_PermSection section="main" result_to_var="permsection" />
<inp2:m_RenderElement name="combined_header" section="$permsection" prefix="adm" title_preset="csv_export"/>
<inp2:m_RenderElement name="ajax_progress_bar" cancel_action="cancel_action();"/>
<script type="text/javascript">
function cancel_action() {
redirect('<inp2:m_Link template="export/export_complete"/>');
}
function rand(n)
{
return (Math.floor(Math.random() * n + 1));
}
var PrefixSpecial = '<inp2:m_Get var="PrefixSpecial" js_escape="1" />';
var grid = '<inp2:m_Get var="grid" js_escape="1" />';
var export_rand = '';
for(var i=0; i<10; i++) {
export_rand += (rand(10) - 1);
}
var action_url = '<inp2:m_t template="index" adm_event="OnExportCSV" type="return_progress" finish_template="export/export_complete" PrefixSpecial="#PrefixSpecial#" grid="#grid#" export_rand="#export_rand#" pass="m,adm" no_amp="1"/>';
action_url = action_url.replace('#PrefixSpecial#', PrefixSpecial);
action_url = action_url.replace('#grid#', grid);
action_url = action_url.replace('#export_rand#', export_rand);
// window.open(action_url);
$QueueProcessor = new AjaxProgressBar(action_url);
</script>
-<inp2:m_include t="incs/footer"/>
\ No newline at end of file
+<inp2:m_include t="incs/footer"/>
Index: branches/5.2.x/core/admin_templates/categories/category_path.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/categories/category_path.tpl (revision 16061)
+++ branches/5.2.x/core/admin_templates/categories/category_path.tpl (revision 16062)
@@ -1,15 +1,15 @@
<inp2:m_DefaultParam category_id=""/>
<inp2:m_if check="m_Get" name="ajax" equals_to="yes">
<inp2:m_NoDebug/>
- <inp2:m_Get name="category_id" result_to_var="category_id"/>
+ <inp2:m_Get name="category_id" no_html_escape="1" result_to_var="category_id"/>
</inp2:m_if>
<inp2:m_DefineElement name="category_caption">
<inp2:m_ifnot check="m_Param" name="is_first">
<inp2:m_param name="separator"/>
</inp2:m_ifnot>
<inp2:m_param name="cat_name"/>
</inp2:m_DefineElement>
-<inp2:c_CategoryPath cat_id="$category_id" separator=" &gt; " render_as="category_caption"/>
\ No newline at end of file
+<inp2:c_CategoryPath cat_id="$category_id" separator=" &gt; " render_as="category_caption"/>
Index: branches/5.2.x/core/admin_templates/categories/permissions_tab.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/categories/permissions_tab.tpl (revision 16061)
+++ branches/5.2.x/core/admin_templates/categories/permissions_tab.tpl (revision 16062)
@@ -1,77 +1,77 @@
<inp2:m_RequireLogin permissions="in-portal:browse.view" system="1"/>
<inp2:m_if check="m_ParamEquals" name="tab_init" value="1">
<div id="<inp2:m_param name="item_prefix"/>_div" prefix="<inp2:m_param name="item_prefix"/>" group_id="-1" class="catalog-tab"><!-- IE minimal height problem fix --></div>
<script type="text/javascript">$PermManager.registerTab('<inp2:m_param name="item_prefix"/>');</script>
<inp2:m_else/>
<inp2:lang.current_SetContentType content_type="text/plain"/>
if ($request_visible) {
- document.getElementById('<inp2:m_get name="item_prefix"/>_div').setAttribute('group_id', <inp2:m_get name="group_id"/>);
- maximizeElement( jq('#<inp2:m_get name="item_prefix"/>_div') );
+ document.getElementById('<inp2:m_get name="item_prefix" no_html_escape="1" js_escape="1"/>_div').setAttribute('group_id', <inp2:m_get name="group_id" no_html_escape="1" js_escape="1"/>);
+ maximizeElement( jq('#<inp2:m_get name="item_prefix" no_html_escape="1" js_escape="1"/>_div') );
}
<inp2:m_if check="c_SaveWarning">
document.getElementById('save_warning').style.display = 'block';
$edit_mode = true;
</inp2:m_if>
#separator#
<inp2:m_DefineElement name="permission_element">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<td>
<inp2:m_phrase name="$Description"/> [<inp2:m_param name="PermissionName"/>]
</td>
<td>
<!-- Inherited checkbox -->
<input
type="hidden"
id="<inp2:PermInputName sub_key="inherited"/>"
name="<inp2:PermInputName sub_key="inherited"/>"
value="<inp2:m_if check="m_ParamEquals" name="Inherited" value="1">1<inp2:m_else/>0</inp2:m_if>" />
<input
type="checkbox"
id="_cb_<inp2:PermInputName sub_key="inherited"/>"
<inp2:m_if check="m_ParamEquals" name="Inherited" value="1">checked</inp2:m_if>
onchange="update_checkbox(this, document.getElementById('<inp2:PermInputName sub_key="inherited"/>'));"
onclick="inherited_click('<inp2:m_param name="PermissionName"/>', <inp2:m_param name="InheritedValue"/>, this.checked, '_cb_<inp2:PermInputName sub_key="value"/>')" />
</td>
<td>
<inp2:CategoryPath cat_id="$InheritedFrom"/>
</td>
<td>
<!-- Access checkbox -->
<input
type="hidden"
id="<inp2:PermInputName sub_key="value"/>"
name="<inp2:PermInputName sub_key="value"/>"
value="<inp2:m_if check="m_ParamEquals" name="Value" value="1">1<inp2:m_else/>0</inp2:m_if>" />
<input
type="checkbox"
id="_cb_<inp2:PermInputName sub_key="value"/>"
<inp2:m_if check="m_ParamEquals" name="Inherited" value="1">disabled="disabled"</inp2:m_if>
<inp2:m_if check="m_ParamEquals" name="Value" value="1">checked</inp2:m_if>
onchange="update_checkbox(this, document.getElementById('<inp2:PermInputName sub_key="value"/>'));"
onclick="update_light('<inp2:m_param name="PermissionName"/>', this.checked)" />
</td>
<td>
<img id="light_<inp2:m_param name="PermissionName"/>" src="img/perm_<inp2:m_if check="m_ParamEquals" name="Value" value="1">green<inp2:m_else/>red</inp2:m_if>.gif"/>
</td>
</tr>
</inp2:m_DefineElement>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder_full">
<inp2:m_set odd_even="table-color1"/>
<thead class="subsectiontitle">
<td><inp2:m_phrase name="column:la_fld_Description"/></td>
<td><inp2:m_phrase name="la_col_Inherited"/></td>
<td><inp2:m_phrase name="la_col_InheritedFrom"/></td>
<td><inp2:m_phrase name="la_col_Access"/></td>
<td><inp2:m_phrase name="la_col_Effective"/></td>
</thead>
<inp2:c-perm_PrintPermissions render_as="permission_element"/>
</table>
-</inp2:m_if>
\ No newline at end of file
+</inp2:m_if>
Index: branches/5.2.x/core/admin_templates/catalog_tab.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/catalog_tab.tpl (revision 16061)
+++ branches/5.2.x/core/admin_templates/catalog_tab.tpl (revision 16062)
@@ -1,95 +1,95 @@
<inp2:m_RequireLogin permissions="in-portal:browse.view" system="1"/>
<inp2:m_DefineElement name="catalog_tab">
<inp2:m_if check="m_ParamEquals" name="tab_init" value="" inverse="inverse">
<inp2:m_if check="m_ParamEquals" name="tab_init" value="1">
a_toolbar.AddButton(
new ToolBarButton(
'new_cat',
'<inp2:m_phrase label="la_ToolTip_New_Category" escape="1"/>',
add_item,
true
)
);
</inp2:m_if>
<inp2:m_if check="m_Param" name="tab_init" equals_to="2">
<div id="categories_div" prefix="<inp2:m_param name='prefix'/>" view_template="catalog_tab" edit_template="categories/categories_edit" category_id="-1" dep_buttons="new_cat" class="catalog-tab"><!-- IE minimal height problem fix --></div>
<script type="text/javascript">$Catalog.registerTab('categories');</script>
</inp2:m_if>
<inp2:m_if check="m_ParamEquals" name="tab_init" value="3">
$Catalog.setItemCount('<inp2:m_Param name="prefix"/>', '<inp2:{$prefix}_CatalogItemCount grid="$grid_name"/>');
</inp2:m_if>
<inp2:m_else/>
<inp2:lang.current_SetContentType content_type="text/plain"/>
<inp2:m_include t="incs/blocks"/>
<inp2:m_include t="incs/in-portal"/>
<inp2:m_include t="categories/ci_blocks"/>
<inp2:m_if check="m_Param" name="prefix" equals_to="c.showall">
<inp2:$prefix_InitList grid="$grid_name" parent_cat_id="any"/>
<inp2:m_else/>
<inp2:$prefix_InitList grid="$grid_name"/>
</inp2:m_if>
// substiture form action, like from was created from here
document.getElementById('categories_form').action = '<inp2:m_t pass="all" no_amp="1" js_escape="1"/>';
$Catalog.setItemCount('<inp2:m_param name="prefix"/>', '<inp2:$prefix_CatalogItemCount/>');
- $Catalog.setCurrentCategory('<inp2:m_param name="prefix"/>', <inp2:m_get name="m_cat_id"/>);
+ $Catalog.setCurrentCategory('<inp2:m_param name="prefix"/>', <inp2:m_get name="m_cat_id" no_html_escape="1" js_escape="1"/>);
$Catalog.saveSearch('<inp2:m_Param name="prefix"/>', '<inp2:$prefix_SearchKeyword js_escape="1"/>', '<inp2:m_Param name="grid_name"/>');
<inp2:m_RenderElement name="structure_reload_element"/>
<inp2:m_DefineElement name="grid_parent_category_td" format="">
<inp2:Field name="ParentId" result_to_var="item_category" db="db"/>
<inp2:m_if check="m_Get" name="type" equals_to="item_selector">
<inp2:CategoryName cat_id="$item_category"/>
<inp2:m_else/>
<a href="<inp2:m_Link template='catalog/catalog' m_cat_id='$item_category' no_pass_through='1'/>"><inp2:CategoryName cat_id="$item_category"/></a>
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="page_browse_td" format="">
<inp2:m_if check="m_Get" name="type" equals_to="item_selector">
<a href="javascript:$Catalog.go_to_cat(<inp2:m_get name="c_id"/>, '<inp2:GetModulePrefix/>');" title="<inp2:m_Phrase name='la_alt_GoInside' html_escape='1'/>"><inp2:Field field="$field" grid="$grid" format="$format"/></a>
<inp2:m_else/>
<a href="<inp2:ItemEditLink/>" title="<inp2:m_Phrase name='la_Text_Edit' no_editing='1'/>" onclick="return direct_edit('<inp2:m_param name="PrefixSpecial"/>', this.href);"><inp2:Field field="$field" grid="$grid" format="$format"/></a>
</inp2:m_if>
<!--##<span class="small-statistics">(<inp2:SubCatCount/> / <inp2:ItemCount/>)</span>##-->
<inp2:m_if check="BrowseModeAvailable" pass_params="1">
<a href="<inp2:PageBrowseLink/>" title="<inp2:m_Phrase name='la_alt_Browse' no_editing='1'/>"><img src="<inp2:m_TemplatesBase/>/img/ic_browse_mode.gif" width="8" height="7" alt="<inp2:m_Phrase name='la_alt_Browse' html_escape='1'/>" border="0"/></a>
</inp2:m_if>
<inp2:m_if check="Field" field="Type" equals_to="2" db="db">
<span class="field-required" title="<inp2:m_Phrase name='la_System' no_editing='1'/>">&nbsp;*</span>
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid_js" PrefixSpecial="$prefix" IdField="CategoryId" grid="$grid_name" menu_filters="yes"/>
<inp2:m_RenderElement name="grid_search_buttons" PrefixSpecial="$prefix" grid="$grid_name" ajax="1"/>
Grids['<inp2:m_param name="prefix"/>'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','sep3','cut','copy','move_up','move_down','sep6'));
<inp2:m_RenderElement name="reflect_catalog_buttons"/>
<inp2:m_if check="m_Recall" name="root_delete_error">
alert('<inp2:m_Phrase name="la_error_RootCategoriesDelete"/>');
<inp2:m_RemoveVar name="root_delete_error"/>
</inp2:m_if>
<inp2:m_if check="adm_CheckPermCache">
Application.SetVar('continue', 1);
openSelector('c', '<inp2:m_t t="categories/cache_updater" pass="m"/>');
</inp2:m_if>
#separator#
<!-- categories tab: begin -->
<inp2:m_RenderElement name="kernel_form" form_name="categories_form"/>
<inp2:m_RenderElement name="grid" ajax="1" PrefixSpecial="$prefix" IdField="CategoryId" grid="$grid_name" menu_filters="yes"/>
<inp2:m_RenderElement name="kernel_form_end"/>
<!-- categories tab: end -->
</inp2:m_if>
</inp2:m_DefineElement>
-<inp2:c_InitCatalogTab render_as="catalog_tab" default_grid="Default" radio_grid="Radio"/>
\ No newline at end of file
+<inp2:c_InitCatalogTab render_as="catalog_tab" default_grid="Default" radio_grid="Radio"/>
Index: branches/5.2.x/core/admin_templates/custom_fields/custom_fields_edit.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/custom_fields/custom_fields_edit.tpl (revision 16061)
+++ branches/5.2.x/core/admin_templates/custom_fields/custom_fields_edit.tpl (revision 16062)
@@ -1,158 +1,158 @@
<inp2:adm_SetPopupSize width="750" height="620"/>
<inp2:m_include t="incs/header"/>
-<inp2:m_Get name="section" result_to_var="section"/>
+<inp2:m_Get name="section" no_html_escape="1" result_to_var="section"/>
<inp2:m_RenderElement name="combined_header" prefix="cf" section="$section" perm_event="cf:OnLoad" title_preset="custom_fields_edit"/>
<!-- 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('cf','<inp2:cf_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('cf','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('cf', '<inp2:cf_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('cf', '<inp2:cf_NextId/>');
}
) );
a_toolbar.Render();
<inp2:m_if check="cf_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="cf_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="cf_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="cf" field="Type" db="db"/>
<inp2:cf_SaveWarning name="grid_save_warning"/>
<inp2:cf_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="cf" field="CustomFieldId" title="la_prompt_FieldId"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="cf" field="FieldName" title="la_prompt_FieldName" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="cf" field="FieldLabel" title="la_prompt_FieldLabel" size="40"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="cf" field="MultiLingual" title="la_fld_MultiLingual"/>
<inp2:m_RenderElement name="subsection" title="la_tab_AdminUI"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="cf" field="OnGeneralTab" title="la_prompt_showgeneraltab"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="cf" field="Heading" title="la_prompt_heading" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="cf" field="Prompt" title="la_prompt_FieldPrompt" size="40"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="cf" field="ElementType" title="la_prompt_InputType" size="20" has_empty="1" onchange="update_layout();"/>
<inp2:m_if check="cf_Field" name="ElementType" equals_to="select|multiselect|radio" db="db" inverse="inverse">
<inp2:m_RenderElement name="inp_edit_box" prefix="cf" field="ValueList" title="la_prompt_valuelist" size="40"/>
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="cf" field="IsRequired" title="la_fld_IsRequired"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="cf" field="DefaultValue" title="la_prompt_Default"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="cf" field="DisplayOrder" title="la_field_displayorder" size="10"/>
<inp2:m_if check="m_IsDebugMode">
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="cf" field="IsSystem" title="la_fld_IsSystem"/>
</inp2:m_if>
<inp2:m_if check="cf_Field" name="ElementType" equals_to="select|multiselect|radio" db="db">
<inp2:m_RenderElement name="subsection" title="la_section_Values"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="cf" field="SortValues" title="la_fld_SortValues"/>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="cf" field="OptionKey"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="cf" field="OptionTitle" title="la_fld_OptionTitle" size="60"/>
<inp2:m_RenderElement name="inp_edit_minput" prefix="cf" field="Options" title="la_fld_Options" format="#OptionTitle# (#OptionKey#)" style="width: 400px; height: 200px;"/>
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<inp2:m_if check="cf_Field" name="ElementType" equals_to="select|multiselect|radio" db="db">
<script type="text/javascript">
Options.registerControl('OptionKey', 'text', false);
Options.registerControl('OptionTitle', 'text', true);
Options.LoadValues();
Options.getControlValue = function ($field) {
var $value = this.getControl($field).value;
if ($field == 'OptionKey' && !$value) {
$options = this.getControl(this.FieldName, 'minput').options;
if ($options.length) {
var $i = 0;
var $max_option_key = 0;
while ($i < $options.length) {
if (parseInt(this.Records[ $options[$i].value ]['OptionKey']) > $max_option_key) {
$max_option_key = parseInt(this.Records[ $options[$i].value ]['OptionKey']);
}
$i++;
}
return $max_option_key + 1;
}
// when no this will be 1st record in list use 1
return 1;
}
return $value;
}
Options.compareRecords = function($record_a, $record_b) {
// compare by option title only, it's id doesn't matter
return $record_a['OptionTitle'].toLowerCase() == $record_b['OptionTitle'].toLowerCase();
}
</script>
</inp2:m_if>
<script type="text/javascript">
function update_layout() {
var $last_element_type = '<inp2:cf_Field name="ElementType" db="db" js_escape="1"/>';
var $element_type = document.getElementById('<inp2:cf_InputName name="ElementType" js_escape="1"/>').value;
// value is changed from ml supported to normal or otherwise
if (canHaveMultipleValues($last_element_type) != canHaveMultipleValues($element_type)) {
submit_event('cf', 'OnPreSave');
}
}
function canHaveMultipleValues($element_type) {
var $element_types = ['select', 'multiselect', 'radio'];
return $element_types.indexOf($element_type) != -1;
}
</script>
<inp2:m_include t="incs/footer"/>
Index: branches/5.2.x/core/admin_templates/custom_fields/custom_fields_list.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/custom_fields/custom_fields_list.tpl (revision 16061)
+++ branches/5.2.x/core/admin_templates/custom_fields/custom_fields_list.tpl (revision 16062)
@@ -1,92 +1,92 @@
<inp2:m_include t="incs/header"/>
-<inp2:m_Get name="section" result_to_var="section"/>
+<inp2:m_Get name="section" no_html_escape="1" result_to_var="section"/>
<inp2:m_RenderElement name="combined_header" prefix="cf" section="$section" perm_event="cf:OnLoad" title_preset="custom_fields_list" pagination="1"/>
<!-- 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('cf', 'custom_fields/custom_fields_edit');
}
var a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_CustomField" escape="1"/>::<inp2:m_phrase label="la_Add" escape="1"/>',
function() {
std_precreate_item('cf', 'custom_fields/custom_fields_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('cf')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
<inp2:m_if check="m_isDebugMode">
a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>',
function() {
submit_event('cf', 'OnMassClone')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
</inp2:m_if>
a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
submit_event('cf','OnMassMoveUp');
}
) );
a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
submit_event('cf','OnMassMoveDown');
}
) );
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();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="cf" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="cf_grid_data_td">
<inp2:Field field="$field" grid="$grid" no_special="no_special" as_label="1" />
</inp2:m_DefineElement>
<style type="text/css">
tr.row-disabled td {
background-color: #FFDFE0;
}
tr.grid-data-row-even.row-disabled td {
background-color: #F4D4D5;
}
</style>
<inp2:m_DefineElement name="row_class">
<inp2:m_if check="Field" field="IsSystem" db="db">
row-disabled
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="cf" IdField="CustomFieldId" grid="Default" row_class_render_as="row_class"/>
<script type="text/javascript">
Grids['cf'].SetDependantToolbarButtons( new Array('edit','delete', 'clone', 'move_down', 'move_up') );
</script>
-<inp2:m_include t="incs/footer"/>
\ No newline at end of file
+<inp2:m_include t="incs/footer"/>
Index: branches/5.2.x/core/admin_templates/promo_block_groups/promo_block_group_list.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/promo_block_groups/promo_block_group_list.tpl (revision 16061)
+++ branches/5.2.x/core/admin_templates/promo_block_groups/promo_block_group_list.tpl (revision 16062)
@@ -1,69 +1,69 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" section="in-portal:promo_block_groups" prefix="promo-block-group" title_preset="promo_block_group_list" />
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
<inp2:m_include t="promo_block_groups/section_reload"/>
//do not rename - this function is used in default grid for double click!
function edit()
{
std_edit_item('promo-block-group', 'promo_block_groups/promo_block_group_edit');
}
var a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_precreate_item('promo-block-group', 'promo_block_groups/promo_block_group_edit');
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>::<inp2:m_phrase label="la_ShortToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('promo-block-group')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
submit_event('promo-block-group', 'OnMassApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
submit_event('promo-block-group', '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="promo-block-group" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_if check="m_Get" var="grid_error">
<inp2:m_RenderElement design="form_message" pass_params="1">
- <inp2:m_Get name="grid_error" result_to_var="grid_error"/>
+ <inp2:m_Get name="grid_error" no_html_escape="1" result_to_var="grid_error"/>
<inp2:m_Phrase name="$grid_error"/>
</inp2:m_RenderElement>
</inp2:m_if>
<inp2:m_RenderElement name="grid" PrefixSpecial="promo-block-group" IdField="PromoBlockGroupId" grid="Default" grid_filters="1"/>
<script type="text/javascript">
Grids['promo-block-group'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline') );
</script>
<inp2:m_include t="incs/footer"/>
Index: branches/5.2.x/core/admin_templates/reviews/reviews_tab.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/reviews/reviews_tab.tpl (revision 16061)
+++ branches/5.2.x/core/admin_templates/reviews/reviews_tab.tpl (revision 16062)
@@ -1,43 +1,43 @@
<inp2:m_RequireLogin permissions="in-portal:reviews.view" system="1"/>
<inp2:m_DefineElement name="catalog_tab">
<inp2:m_if check="m_ParamEquals" name="tab_init" value="">
<inp2:lang.current_SetContentType content_type="text/plain"/>
<inp2:m_include t="incs/blocks"/>
<inp2:m_include t="incs/in-portal"/>
<inp2:$prefix_InitList grid="$grid_name"/>
$Catalog.setItemCount('<inp2:m_param name="prefix"/>', '<inp2:{$prefix}_CatalogItemCount/>');
$Catalog.setCurrentCategory('<inp2:m_param name="prefix"/>', 0);
$Catalog.saveSearch('<inp2:m_Param name="prefix"/>', '<inp2:$prefix_SearchKeyword js_escape="1"/>', '<inp2:m_Param name="grid_name"/>');
<inp2:m_DefineElement name="grid_reviewtext_td">
<inp2:Field field="$field" cut_first="100"/>
<br />
<span class="small-statistics">
<a href="<inp2:ItemEditLink/>" onclick="return direct_edit('<inp2:m_param name="prefix"/>', this.href);"><inp2:Field field="CatalogItemName"/></a>
</span>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid_js" PrefixSpecial="$prefix" IdField="ReviewId" grid="$grid_name"/>
<inp2:m_if check="m_ParamEquals" name="tab_dependant" value="yes">
Grids['<inp2:m_param name="prefix"/>'].AddAlternativeGrid('<inp2:m_param name="cat_prefix"/>', true);
</inp2:m_if>
Grids['<inp2:m_param name="prefix"/>'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','sep3','cut','copy','move_up','move_down','sep6'));
$Catalog.reflectPasteButton(<inp2:c_HasClipboard/>);
$Catalog.setViewMenu('<inp2:m_param name="prefix"/>');
<inp2:m_if check="m_ParamEquals" name="tab_mode" value="single">
Grids['<inp2:m_param name="prefix"/>'].DblClick = function() {return false};
</inp2:m_if>
#separator#
<!-- products tab: begin -->
<inp2:m_RenderElement name="kernel_form" form_name="{$tab_name}_form"/>
<inp2:m_RenderElement name="grid" ajax="1" PrefixSpecial="$prefix" IdField="ReviewId" grid="$grid_name"/>
<inp2:m_RenderElement name="kernel_form_end"/>
<!-- products tab: end -->
</inp2:m_if>
</inp2:m_DefineElement>
-<inp2:m_Get name="item_prefix" result_to_var="prefix"/>
-<inp2:{$prefix}_InitCatalogTab render_as="catalog_tab" default_grid="ReviewsSection" radio_grid="Radio"/>
\ No newline at end of file
+<inp2:m_Get name="item_prefix" no_html_escape="1" result_to_var="prefix"/>
+<inp2:{$prefix}_InitCatalogTab render_as="catalog_tab" default_grid="ReviewsSection" radio_grid="Radio"/>
Index: branches/5.2.x/core/admin_templates/reviews/review_direct_edit.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/reviews/review_direct_edit.tpl (revision 16061)
+++ branches/5.2.x/core/admin_templates/reviews/review_direct_edit.tpl (revision 16062)
@@ -1,51 +1,51 @@
<inp2:adm_SetPopupSize width="750" height="400"/>
<inp2:m_include t="incs/header"/>
-<inp2:m_Get name="item_prefix" result_to_var="prefix"/>
+<inp2:m_Get name="item_prefix" no_html_escape="1" result_to_var="prefix"/>
<inp2:m_RenderElement name="combined_header" prefix="c" section="in-portal:reviews" title_preset="review_edit"/>
<!-- 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('<inp2:m_Param name="prefix"/>','<inp2:{$prefix}_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('<inp2:m_Param name="prefix"/>','OnCancel');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:$prefix_SaveWarning name="grid_save_warning"/>
<inp2:$prefix_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" prefix="$prefix" fields="ItemId,TextFormat,ReviewId,CreatedById,ReviewText,Rating" title="la_Text_Review"/>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="$prefix" field="ItemId"/>
<inp2:m_RenderElement name="inp_edit_checkbox_allow_html" prefix="$prefix" field="TextFormat"/>
<inp2:m_RenderElement name="inp_id_label" prefix="$prefix" field="ReviewId" title="la_fld_Id"/>
<inp2:m_RenderElement name="inp_edit_user" prefix="$prefix" field="CreatedById" title="la_fld_CreatedById" class="text"/>
<inp2:m_RenderElement name="inp_edit_textarea" prefix="$prefix" field="ReviewText" title="la_fld_ReviewText" control_options="{min_height: 100}" cols="70" rows="8"/>
<inp2:m_RenderElement name="subsection" prefix="$prefix" fields="Status,Priority,CreatedOn" title="la_Text_General"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="$prefix" field="Status" title="la_fld_Status"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="$prefix" field="Priority" title="la_fld_Priority" size="3" class="text"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="$prefix" field="CreatedOn" title="la_fld_CreatedOn" size="20" class="text"/>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
-<inp2:m_include t="incs/footer"/>
\ No newline at end of file
+<inp2:m_include t="incs/footer"/>
Index: branches/5.2.x/core/admin_templates/head.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/head.tpl (revision 16061)
+++ branches/5.2.x/core/admin_templates/head.tpl (revision 16062)
@@ -1,125 +1,125 @@
<inp2:m_Set skip_last_template="1"/>
<inp2:m_include t="incs/header" nobody="yes"/>
<inp2:m_NoDebug/>
<inp2:m_Set skip_last_template="1"/>
<script type="text/javascript">
$popup_manager = new AjaxPopupManager('<inp2:m_Link template="index" js_escape="1"/>');
grid_widths_cache = new Array();
</script>
<inp2:m_DefineElement name="root_node"><inp2:m_param name="section_url"/></inp2:m_DefineElement>
<body style="overflow: hidden; background-color: white;">
<style type="text/css">
div.layout {
position: absolute;
}
</style>
<div id="site_logo">
<table class="head-table" style="width: 100%;" cellpadding="0" cellspacing="0">
<td style="height: 95px; text-align: left;">
<div class="layout" style="top: 0px; left: 0px; vertical-align: top;">
<a href="<inp2:adm_PrintSection render_as='root_node' section_name='in-portal:browse_site'/>" target="main">
<img src="<inp2:adm_AdminSkin type='logo'/>" alt="" border="0"/>
</a>
</div>
<div class="layout" style="top: 5px; right: 8px;">
<inp2:m_if check="lang.enabled_IsMultiLanguage">
<select name="language" onchange="change_language();" style="color: white; background-color: transparent; border-width: 0px;">
<inp2:m_DefineElement name="lang_elem">
<option style="background-color: #1DAAF2;" value="<inp2:Field name="LanguageId"/>" <inp2:m_if check="SelectedLanguage">selected="selected"</inp2:m_if> ><inp2:Field name="LocalName"/></option>
</inp2:m_DefineElement>
<inp2:lang.enabled_PrintList render_as="lang_elem"/>
</select>
</inp2:m_if>
<inp2:m_if check="lang.current_Field" name="UserDocsUrl">
<a href="<inp2:lang.current_Field name='UserDocsUrl' js_escape='1'/>" id="help_link" target="_blank">
<img src="<inp2:m_TemplatesBase/>/img/top_frame/help_icon.gif" width="15" height="15" border="0"/><br />
</a>
</inp2:m_if>
</div>
<div class="layout" style="bottom:35px; right:8px; font-size:30px;">
<!--##<a href="http://www.intechnic.com" target="_new">
<img src="<inp2:adm_ModulePath module="core"/>img/logo_intechnic.gif" alt="" width="115" height="49" alt="Intechnic Corporation" border="0"/>
</a>##-->
<inp2:m_if check="adm_AdminSkin" type="DisplaySiteNameInHeader">
<a href="<inp2:adm_PrintSection render_as='root_node' section_name='in-portal:browse_site'/>" target="main">
<inp2:m_GetConfig var="Site_Name"/>
</a>
</inp2:m_if>
</div>
</td>
</table>
</div>
<div style="background: url(<inp2:m_TemplatesBase/>/img/top_frame/toolbar_background.gif) repeat-x top left;">
<div style="<inp2:m_if check='adm_AdminSkin' type='LogoBottom'>background: url(<inp2:adm_AdminSkin type='LogoBottom'/>) no-repeat bottom left; </inp2:m_if>text-align: left;">
<table cellpadding="0" cellspacing="0" style="width: 100%;">
<tr>
<td style="vertical-align: bottom; height: 22px; font-size: 9px; width: <inp2:adm_MenuFrameWidth/>px;">
<inp2:m_if check="m_RecallEquals" name="ShowAdminMenu" value="0" persistent="1">
<a id="menu_toggle_link" href="#"><img src="img/list_arrow_desc.gif" id="menu_toggle_img" width="15" height="15" alt=""/><span id="menu_toggle_text"><inp2:m_Phrase name="la_ToolTip_HideMenu"/></span></a>
<inp2:m_else/>
<a id="menu_toggle_link" href="#"><img src="img/list_arrow_desc.gif" id="menu_toggle_img" width="15" height="15" alt=""/><span id="menu_toggle_text"><inp2:m_Phrase name="la_ToolTip_ShowMenu"/></span></a>
</inp2:m_if>
</td>
<td>
<div id="extra_toolbar" style="height: 22px;"></div>
<inp2:m_Include template="themes/extra_toolbar"/>
</td>
<td class="kx-block-header" align="right" nowrap valign="middle">
<table cellpadding="0" cellspacing="0" border="0" >
<tr>
<td class="kx-block-header" style="background-image: none;">
<inp2:m_phrase name="la_Logged_in_as"/> <strong><a href="javascript:change_password();" class="kx-header-link"><inp2:u.current_LoginName/></strong></a>
|
<a href="<inp2:m_t t="index" u_event="OnLogout" pass="m,u"/>" target="_parent" class="kx-header-link"><strong><inp2:m_Phrase label="la_Logout"/></strong></a>
</td>
<td>
<a href="<inp2:m_t t="index" u_event="OnLogout" pass="m,u"/>" target="_parent"><img src="<inp2:adm_ModulePath module='core'/>img/x.gif" alt="" width="15" height="15" /></a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
<inp2:m_include t="incs/footer"/>
<script type="text/javascript" src="js/frame_resizer.js"></script>
<script type="text/javascript">
var $skip_refresh = true;
function change_language() {
// when changing language submit is made to frameset, not the current frame
var $kf = document.getElementById($form_name);
$kf.target = 'main_frame';
submit_event('lang', 'OnChangeLanguage', 'index');
}
function change_password() {
- getFrame('main').set_hidden_field('u_id', <inp2:m_get name="u.current_id"/>);
+ getFrame('main').set_hidden_field('u_id', <inp2:m_get name="u.current_id" no_html_escape="1" js_escape="1"/>);
<inp2:m_if check="m_GetEquals" name="u.current_id" value="-1">
open_popup('u', '', 'users/root_edit_password');
<inp2:m_else/>
open_popup('u', '', 'users/user_edit_password');
</inp2:m_if>
}
$FrameResizer = new FrameResizer('<inp2:m_Phrase name="la_ToolTip_ShowMenu" js_escape="1"/>', '<inp2:m_Phrase name="la_ToolTip_HideMenu" js_escape="1"/>', window.parent, '<inp2:m_Link pass="m,adm" adm_event="OnSaveSetting" var_name="#NAME#" var_value="#VALUE#" no_amp="1"/>', <inp2:adm_MenuFrameWidth/>);
$FrameResizer.InitControls($FrameResizer);
$FrameResizer.SetStatus(<inp2:m_if check="m_RecallEquals" name="ShowAdminMenu" value="0" persistent="1">0<inp2:m_else/>1</inp2:m_if>);
-</script>
\ No newline at end of file
+</script>
Index: branches/5.2.x/core/admin_templates/config/config_general.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/config/config_general.tpl (revision 16061)
+++ branches/5.2.x/core/admin_templates/config/config_general.tpl (revision 16062)
@@ -1,180 +1,180 @@
<inp2:m_include t="incs/header"/>
-<inp2:m_Get name="section" result_to_var="section"/>
+<inp2:m_Get name="section" no_html_escape="1" result_to_var="section"/>
<inp2:m_RenderElement name="combined_header" prefix="conf" section="$section" perm_event="conf:OnLoad" title_preset="config_list_general"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
function validate_password_fields() {
var $validated = true;
$("input[primarytype='password']", '#' + $form_name).each(
function ($e) {
if ( !validate_password_field(this.id) ) {
$validated = false;
}
}
);
return $validated;
}
function validate_password_field($field_id) {
var password_field = document.getElementById($field_id),
password_verify_field = document.getElementById('verify_' + $field_id);
if ( password_field && password_verify_field && password_field.value == password_verify_field.value ) {
return true;
}
else {
var password_error_cell = document.getElementById('error_' + $field_id);
if ( password_error_cell ) {
$(window).scrollTop($(password_field).position().top - 15);
password_error_cell.innerHTML = '<inp2:m_Phrase name="la_error_PasswordMatch"/>';
}
return false;
}
}
function toggle_section($label) {
var $table = document.getElementById('config_table');
var $row = null;
var $is_visible = false;
for (var $i = 0; $i < $table.rows.length; $i++) {
$row = $table.rows[$i];
if ( $row.getAttribute('header_label') != $label ) {
continue;
}
if ( !$row.style.display ) {
$row.style.display = document.all ? 'block' : 'table-row';
}
$is_visible = !($row.style.display == 'none');
$row.style.display = $is_visible ? 'none' : (document.all ? 'block' : 'table-row');
document.getElementById('toggle_mark[' + $label + ']').innerHTML = '[' + ($is_visible ? '+' : '-') + ']';
}
}
var a_toolbar = new ToolBar();
a_toolbar.AddButton(
new ToolBarButton(
'select',
'<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>',
function() {
submit_event('conf','<inp2:conf_SaveEvent/>');
}
)
);
a_toolbar.AddButton(
new ToolBarButton(
'cancel',
'<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>',
function() {
submit_event('conf','OnCancel');
}
)
);
<inp2:m_if check="m_IsDebugMode">
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton(
new ToolBarButton(
'new_item',
'<inp2:m_phrase label="la_ToolTip_NewSystemSetting" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_precreate_item('conf', 'config/config_edit');
}
)
);
</inp2:m_if>
<inp2:m_ModuleInclude template = "config/custom_toolbar"/>
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_include t="incs/config_blocks"/>
<inp2:m_RenderElement name="config_updated_notice"/>
<inp2:conf_SaveWarning name="grid_save_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="bordered" id="config_table">
<!-- module root category selector: begin -->
<tr class="subsectiontitle">
<td colspan="2">
<inp2:m_phrase name="la_Text_RootCategory" />
</td>
<td align="right">
<a class="config-header" href="javascript:toggle_section('la_Text_RootCategory');" id="toggle_mark[la_Text_RootCategory]" title="Collapse/Expand Section">[-]</a>
</td>
</tr>
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>" header_label="la_Text_RootCategory">
<td>
<span class="text"><inp2:m_phrase name="la_prompt_RootCategory" /></span>
</td>
<td>
<inp2:m_DefineElement name="category_caption">
<inp2:m_ifnot check="m_Param" name="is_first">
<inp2:m_param name="separator"/>
</inp2:m_ifnot>
<inp2:m_param name="cat_name"/>
</inp2:m_DefineElement>
<b><inp2:conf_CategoryPath separator=" &gt; " render_as="category_caption" /></b>
<input type="hidden" name="conf[ModuleRootCategory][VariableValue]" value="<inp2:conf_ModuleRootCategory/>"/>
<a href="<inp2:adm_SelectorLink prefix='conf' selection_mode='single' tab_prefixes='none'/>" onclick="openSelector('conf', this.href, 'ModuleRootCategory', '950x600'); return false;"><img src="img/icons/icon24_cat.gif" border="0" align="absmiddle" /></a>
</td>
<td class="error">&nbsp;</td>
</tr>
<!-- module root category selector: end -->
<inp2:conf_PrintList block="config_block" per_page="-1" full_block="config_block" half_block1="config_block1" half_block2="config_block2" value_render_as="cf_default_value"/>
</table>
<script type="text/javascript">
<inp2:m_if check="m_Get" name="refresh_tree">
getFrame('menu').location.reload();
</inp2:m_if>
<inp2:m_if check="m_Get" name="refresh_all">
var $menu_frame = getFrame('menu');
$menu_frame.parent.location.href = $menu_frame.parent.location.href;
</inp2:m_if>
Application.setHook(
'conf:*',
function ($event) {
$event.status = $event.Name == 'OnCancel' ? true : validate_password_fields();
}
);
<inp2:m_if check="m_Get" name="first_error">
$(document).ready(function () {
var $error_cell = $('.field-<inp2:m_Get name="first_error"/>.error');
if ( $error_cell.length ) {
$(window).scrollTop($error_cell.position().top - 15);
}
});
</inp2:m_if>
</script>
-<inp2:m_include t="incs/footer"/>
\ No newline at end of file
+<inp2:m_include t="incs/footer"/>
Index: branches/5.2.x/core/admin_templates/config/config_edit.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/config/config_edit.tpl (revision 16061)
+++ branches/5.2.x/core/admin_templates/config/config_edit.tpl (revision 16062)
@@ -1,100 +1,100 @@
<inp2:adm_SetPopupSize width="650" height="790"/>
<inp2:m_include t="incs/header"/>
-<inp2:m_Get name="section" result_to_var="section"/>
+<inp2:m_Get name="section" no_html_escape="1" result_to_var="section"/>
<inp2:m_RenderElement name="combined_header" prefix="conf" section="$section" title_preset="config_edit"/>
<!-- 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('conf', '<inp2:conf_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
cancel_edit('conf', 'OnCancelEdit','<inp2:conf_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('reset_edit', '<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>', function() {
reset_form('conf', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
}
) );
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('conf', '<inp2:conf_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('conf', '<inp2:conf_NextId/>');
}
) );
a_toolbar.Render();
<inp2:m_if check="conf_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="conf_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="conf_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:conf_SaveWarning name="grid_save_warning"/>
<inp2:conf_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="inp_id_label" prefix="conf" field="VariableId" title="la_fld_Id"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="conf" field="VariableName" title="la_fld_SystemSettingName"/>
<inp2:m_RenderElement name="inp_label" prefix="conf" field="VariableValue" title="la_fld_SystemSettingValue"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="conf" field="ModuleOwner" title="la_fld_Module" has_empty="1"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="conf" field="Section" title="la_fld_SystemSettingSection"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="conf" field="Heading" title="la_prompt_heading"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="conf" field="Prompt" title="la_prompt_FieldPrompt"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="conf" field="HintLabel" title="la_fld_SystemSettingHint"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="conf" field="ElementType" title="la_prompt_InputType" has_empty="1"/>
<inp2:m_RenderElement name="inp_edit_textarea" prefix="conf" field="Validation" title="la_fld_SystemSettingValidation"/>
<inp2:m_RenderElement name="inp_edit_textarea" prefix="conf" field="ValueList" title="la_prompt_valuelist"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="conf" field="DisplayOrder" title="la_field_displayorder"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="conf" field="GroupDisplayOrder"/>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<script type="text/javascript">
$(document).ready(function () {
var $field_mask = '<inp2:conf_InputName name="#FIELD_NAME#" js_escape="1"/>',
$suggest_url = '<inp2:m_Link template="dummy" pass="m,conf" conf_event="OnSuggestValues" field="#FIELD_NAME#" cur_value="#CUR_VALUE#" no_amp="1"/>';
new AJAXDropDown($field_mask.replace('#FIELD_NAME#', 'Section'), function(cur_value) {
return $suggest_url.replace('#FIELD_NAME#', 'Section').replace('#CUR_VALUE#', encodeURIComponent(cur_value));
}, function(item) {
return item.getAttribute('value');
});
new AJAXDropDown($field_mask.replace('#FIELD_NAME#', 'Heading'), function(cur_value) {
return $suggest_url.replace('#FIELD_NAME#', 'Heading').replace('#CUR_VALUE#', encodeURIComponent(cur_value));
}, function(item) {
return item.getAttribute('value');
});
});
</script>
-<inp2:m_include t="incs/footer"/>
\ No newline at end of file
+<inp2:m_include t="incs/footer"/>
Index: branches/5.2.x/core/admin_templates/config/config_search.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/config/config_search.tpl (revision 16061)
+++ branches/5.2.x/core/admin_templates/config/config_search.tpl (revision 16062)
@@ -1,142 +1,142 @@
<inp2:m_include t="incs/header"/>
-<inp2:m_Get name="section" result_to_var="section"/>
+<inp2:m_Get name="section" no_html_escape="1" result_to_var="section"/>
<inp2:m_RenderElement name="combined_header" prefix="confs" section="$section" perm_event="confs:OnLoad" title_preset="config_list_search"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
var a_toolbar = new ToolBar();
<inp2:m_if check="m_IsDebugMode">
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_NewSearchConfig" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>', function() {
std_new_item('confs', 'config/config_search_edit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
</inp2:m_if>
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('confs','<inp2:confs_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('confs','OnCancel');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="confs_checkbox_td">
<td valign="top" class="text">
<inp2:m_if check="m_ParamEquals" name="nolabel" value="true">
<inp2:m_else />
<label for="_cb_<inp2:InputName field="$Field"/>"><inp2:m_Phrase label="$Label" /></label>
</inp2:m_if>
<input type="checkbox" name="_cb_<inp2:InputName field="$Field"/>" <inp2:Field field="$Field" checked="checked" db="db"/> id="_cb_<inp2:InputName field="$Field"/>" onclick="update_checkbox(this, document.getElementById('<inp2:InputName field="$Field"/>'))" >
<input type="hidden" id="<inp2:InputName field="$Field"/>" name="<inp2:InputName field="$Field"/>" value="<inp2:Field field="$Field" db="db"/>">
</td>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="confs_edit_text">
<td valign="top" class="text">
<label for="<inp2:InputName field="$Field"/>"><inp2:m_Phrase label="$Label" /></label>
<input type="text" name="<inp2:InputName field="$Field"/>" value="<inp2:Field field="$Field"/>" size="3" />
</td>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="confs_detail_row">
<inp2:m_if check="m_ParamEquals" name="show_heading" value="1">
<tr class="subsectiontitle">
<td colspan="4">
<inp2:Field name="ConfigHeader" as_label="1"/>
</td>
</tr>
</inp2:m_if>
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<td class="text">
<inp2:Field field="DisplayName" as_label="true" />
<inp2:m_if check="m_IsDebugMode">
<br /><small style="color: grey;">[ID: <b><inp2:Field name="SearchConfigId"/></b>; DisplayOrder: <b><inp2:Field name="DisplayOrder"/></b>; Field: <b><inp2:Field name="FieldName"/></b>]</small>
</inp2:m_if>
</td>
<inp2:m_if check="Field" name="FieldType" equals_to="text|range|select|multiselect" db="db">
<inp2:m_RenderElement name="confs_checkbox_td" pass_params="true" IdField="SearchConfigId" Label="la_prompt_SimpleSearch" Field="SimpleSearch" />
<inp2:m_else/>
<td class="text">
&nbsp;
</td>
</inp2:m_if>
<inp2:m_RenderElement name="confs_edit_text" pass_params="true" IdField="SearchConfigId" Label="la_prompt_weight" Field="Priority" />
<inp2:m_RenderElement name="confs_checkbox_td" pass_params="true" IdField="SearchConfigId" Label="la_prompt_AdvancedSearch" Field="AdvancedSearch" />
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="config_values">
<tr class="subsectiontitle">
<td colspan="4">
<inp2:m_phrase name="$module_item" /> <inp2:m_phrase name="la_prompt_relevence_settings" />
</td>
</tr>
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<td colspan="4">
<inp2:m_phrase name="la_prompt_required_field_increase"/>
<input type="text" size="3" name="conf[<inp2:conf_GetVariableID name="SearchRel_Increase_{$module_key}"/>][VariableValue]" VALUE="<inp2:Field field="SearchRel_Increase_{$module_key}" />">%
</td>
</tr>
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<td colspan="4">
<inp2:m_phrase name="la_prompt_relevence_percent"/>
<input type="text" size="3" name="conf[<inp2:conf_GetVariableID name="SearchRel_Keyword_{$module_key}"/>][VariableValue]" value="<inp2:Field field="SearchRel_Keyword_{$module_key}" />">% <inp2:Field field="SearchRel_Keyword_{$module_key}_prompt" as_label="1" /> &nbsp;&nbsp;&nbsp;
<input type="text" size="3" name="conf[<inp2:conf_GetVariableID name="SearchRel_Pop_{$module_key}"/>][VariableValue]" value="<inp2:Field field="SearchRel_Pop_{$module_key}" />">% <inp2:Field field="SearchRel_Pop_{$module_key}_prompt" as_label="1" />&nbsp;&nbsp;&nbsp;
<input type="text" size="3" name="conf[<inp2:conf_GetVariableID name="SearchRel_Rating_{$module_key}"/>][VariableValue]" value="<inp2:Field field="SearchRel_Rating_{$module_key}" />">% <inp2:Field field="SearchRel_Rating_{$module_key}_prompt" as_label="1" />
</td>
</tr>
<inp2:m_if check="m_GetEquals" name="module" value="In-Portal" inverse="inverse">
<tr class="subsectiontitle">
<td colspan="4">
<inp2:m_phrase name="$module_item" /> <inp2:m_phrase name="la_prompt_multipleshow" />
</td>
</tr>
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<td class="text" width="120"><inp2:Field field="Search_ShowMultiple_{$module_key}_prompt" as_label="1"/></td>
<td class="text" colspan="3">
<input type="checkbox" name="_cb_conf[<inp2:conf_GetVariableID name="Search_ShowMultiple_{$module_key}"/>][VariableValue]" <inp2:Field field="Search_ShowMultiple_{$module_key}" checked="checked" db="db"/> id="_cb_conf[<inp2:conf_GetVariableID name="Search_ShowMultiple_{$module_key}"/>][VariableValue]" onclick="update_checkbox(this, document.getElementById('conf[<inp2:conf_GetVariableID name="Search_ShowMultiple_{$module_key}"/>][VariableValue]'))" >
<input type="hidden" id="conf[<inp2:conf_GetVariableID name="Search_ShowMultiple_{$module_key}"/>][VariableValue]" name="conf[<inp2:conf_GetVariableID name="Search_ShowMultiple_{$module_key}"/>][VariableValue]" value="<inp2:Field field="Search_ShowMultiple_{$module_key}" db="db"/>">
</td>
</tr>
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_include t="incs/config_blocks"/>
<inp2:m_RenderElement name="config_updated_notice"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="bordered"<inp2:m_if check="conf_ShowRelevance"> style="border-bottom-width: 0px;"</inp2:m_if>>
<inp2:confs_PrintList render_as="confs_detail_row" />
</table>
<inp2:m_if check="conf_ShowRelevance">
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="bordered">
<inp2:conf_PrintConfList block="config_values" per_page="-1"/>
</table>
</inp2:m_if>
-<inp2:m_include t="incs/footer"/>
\ No newline at end of file
+<inp2:m_include t="incs/footer"/>
Index: branches/5.2.x/core/admin_templates/config/config_universal.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/config/config_universal.tpl (revision 16061)
+++ branches/5.2.x/core/admin_templates/config/config_universal.tpl (revision 16062)
@@ -1,151 +1,151 @@
<inp2:m_include t="incs/header"/>
<inp2:conf_InitList name="Default" per_page="-1"/>
-<inp2:m_Get name="section" result_to_var="section"/>
+<inp2:m_Get name="section" no_html_escape="1" result_to_var="section"/>
<inp2:m_RenderElement name="combined_header" prefix="conf" section="$section" title_preset="section_label" perm_event="conf:OnLoad"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
function validate_password_fields() {
var $validated = true;
$("input[primarytype='password']", '#' + $form_name).each(
function ($e) {
if ( !validate_password_field(this.id) ) {
$validated = false;
}
}
);
return $validated;
}
function validate_password_field($field_id) {
var password_field = document.getElementById($field_id),
password_verify_field = document.getElementById('verify_' + $field_id);
if ( password_field && password_verify_field && password_field.value == password_verify_field.value ) {
return true;
}
else {
var password_error_cell = document.getElementById('error_' + $field_id);
if ( password_error_cell ) {
$(window).scrollTop($(password_field).position().top - 15);
password_error_cell.innerHTML = '<inp2:m_Phrase name="la_error_PasswordMatch"/>';
}
return false;
}
}
function toggle_section($label) {
var $row = null,
$is_visible = false,
$table = document.getElementById('config_table');
for (var $i = 0; $i < $table.rows.length; $i++) {
$row = $table.rows[$i];
if ( $row.getAttribute('header_label') != $label ) {
continue;
}
if ( !$row.style.display ) {
$row.style.display = document.all ? 'block' : 'table-row';
}
$is_visible = !($row.style.display == 'none');
$row.style.display = $is_visible ? 'none' : (document.all ? 'block' : 'table-row');
document.getElementById('toggle_mark[' + $label + ']').innerHTML = '[' + ($is_visible ? '+' : '-') + ']';
}
}
var a_toolbar = new ToolBar();
a_toolbar.AddButton(
new ToolBarButton(
'select',
'<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>',
function () {
submit_event('conf', '<inp2:conf_SaveEvent/>');
}
)
);
a_toolbar.AddButton(
new ToolBarButton(
'cancel',
'<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>',
function () {
submit_event('conf', 'OnCancel');
}
)
);
<inp2:m_if check="m_IsDebugMode">
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton(
new ToolBarButton(
'new_item',
'<inp2:m_phrase label="la_ToolTip_NewSystemSetting" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_precreate_item('conf', 'config/config_edit');
}
)
);
</inp2:m_if>
<inp2:m_ModuleInclude template = "config/custom_toolbar"/>
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_include t="incs/config_blocks"/>
<inp2:m_RenderElement name="config_updated_notice"/>
<inp2:conf_SaveWarning name="grid_save_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="bordered" id="config_table">
<inp2:conf_PrintList list_name="default" block="config_block" full_block="config_block" half_block1="config_block1" half_block2="config_block2" value_render_as="cf_default_value"/>
</table>
<script type="text/javascript">
<inp2:m_if check="m_Get" name="refresh_tree">
getFrame('menu').location.reload();
</inp2:m_if>
<inp2:m_if check="m_Get" name="refresh_all">
var $menu_frame = getFrame('menu');
$menu_frame.parent.location.href = $menu_frame.parent.location.href;
</inp2:m_if>
Application.setHook(
'conf:*',
function ($event) {
$event.status = $event.Name == 'OnCancel' ? true : validate_password_fields();
}
);
<inp2:m_if check="m_Get" name="first_error">
$(document).ready(function () {
var $error_cell = $('.field-<inp2:m_Get name="first_error"/>.error');
if ( $error_cell.length ) {
$(window).scrollTop($error_cell.position().top - 15);
}
});
</inp2:m_if>
</script>
-<inp2:m_include t="incs/footer"/>
\ No newline at end of file
+<inp2:m_include t="incs/footer"/>
Index: branches/5.2.x/core/admin_templates/config/config_search_edit.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/config/config_search_edit.tpl (revision 16061)
+++ branches/5.2.x/core/admin_templates/config/config_search_edit.tpl (revision 16062)
@@ -1,76 +1,76 @@
<inp2:adm_SetPopupSize width="750" height="400"/>
<inp2:m_include t="incs/header"/>
-<inp2:m_Get name="section" result_to_var="section"/>
+<inp2:m_Get name="section" no_html_escape="1" result_to_var="section"/>
<inp2:m_RenderElement name="combined_header" prefix="confs" section="$section" perm_event="confs:OnLoad" title_preset="configsearch_edit"/>
<!-- 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('confs','<inp2:confs_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('confs','OnGoBack');
}
) );
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('confs', '<inp2:confs_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('confs', '<inp2:confs_NextId/>');
}
) );
a_toolbar.Render();
<inp2:m_if check="confs_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="confs_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="confs_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:confs_SaveWarning name="grid_save_warning"/>
<inp2:confs_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="confs" field="SearchConfigId" title="la_fld_Id"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="confs" field="TableName" title="la_fld_TableName"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="confs" field="FieldName" title="la_fld_FieldName"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="confs" field="SimpleSearch" title="la_fld_SimpleSearch"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="confs" field="AdvancedSearch" title="la_fld_AdvancedSearch"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="confs" field="Description" title="la_fld_Description"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="confs" field="DisplayName" title="la_fld_DisplayName"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="confs" field="ModuleName" title="la_fld_ModuleName"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="confs" field="ConfigHeader" title="la_fld_ConfigHeader"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="confs" field="DisplayOrder" title="la_fld_Priority"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="confs" field="Priority" title="la_fld_Weight"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="confs" field="FieldType" title="la_fld_FieldType"/>
</table>
</div>
<inp2:m_include t="incs/footer"/>
Index: branches/5.2.x/core/admin_templates/import/import_start.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/import/import_start.tpl (revision 16061)
+++ branches/5.2.x/core/admin_templates/import/import_start.tpl (revision 16062)
@@ -1,53 +1,53 @@
<inp2:adm_SetPopupSize width="500" height="270"/>
<inp2:m_include t="incs/header"/>
<inp2:m_set adm_id="0" />
-<inp2:m_Get var="PrefixSpecial" result_to_var="importprefix" />
+<inp2:m_Get var="PrefixSpecial" no_html_escape="1" result_to_var="importprefix" />
<inp2:{$importprefix}_PermSection section="main" result_to_var="permsection" />
<inp2:m_RenderElement name="combined_header" section="$permsection" prefix="adm" title_preset="csv_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('import', '<inp2:m_phrase label="la_ToolTip_Import" escape="1"/>', function() {
submit_event('adm','OnCSVImportBegin');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
window_close();
}
) );
a_toolbar.Render();
</script>
<script src="js/swfobject.js" type="text/javascript"></script>
<script type="text/javascript" src="<inp2:m_Compress files='js/uploader/upload_manager.js|js/uploader/uploader.js'/>"></script>
</td>
</tr>
</tbody>
</table>
<inp2:adm_SaveWarning name="grid_save_warning"/>
<inp2:adm_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_swf_upload" prefix="adm" field="ImportFile" title="la_fld_ImportFile"/>
<inp2:m_RenderElement name="inp_edit_filler"/>
<!--<inp2:m_RenderElement name="inp_edit_checkbox" prefix="phrases.import" field="ImportOverwrite" hint_label="la_importlang_phrasewarning" title="la_prompt_overwritephrases"/>-->
</table>
</div>
<input type="hidden" name="next_template" value="import/import_progress" />
<input type="hidden" name="PrefixSpecial" value="<inp2:m_Get var="PrefixSpecial" />" />
<input type="hidden" name="grid" value="<inp2:m_Get var="grid" />" />
-<inp2:m_include t="incs/footer"/>
\ No newline at end of file
+<inp2:m_include t="incs/footer"/>
Index: branches/5.2.x/core/admin_templates/catalog/catalog_counters.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/catalog/catalog_counters.tpl (revision 16061)
+++ branches/5.2.x/core/admin_templates/catalog/catalog_counters.tpl (revision 16062)
@@ -1,29 +1,29 @@
// counters
<inp2:m_ModuleInclude template="catalog_tab" tab_init="3"/>
// category related statistics
$Catalog.ParentCategoryID = <inp2:c_GetParentCategory/>;
<inp2:m_DefineElement name="category_caption">
<inp2:m_ifnot check="m_Param" name="is_first">
<inp2:m_param name="separator"/>
</inp2:m_ifnot>
<inp2:m_if check="m_ParamEquals" name="current" value="1" inverse="1">
<a class="control_link" href="javascript:$Catalog.go_to_cat(<inp2:m_param name="cat_id"/>);"><inp2:m_param name="cat_name"/></a>
<inp2:m_else/>
<inp2:m_param name="cat_name"/>
</inp2:m_if>
</inp2:m_DefineElement>
setInnerHTML('category_path', '<inp2:c_CategoryPath separator=" / " render_as="category_caption" js_escape="1" strip_nl="2"/>');
set_window_title( RemoveTranslationLink(document.getElementById('blue_bar').innerHTML, false).replace(/(<[^<]+>)/g, '').replace(/\s+/g, ' ').trim() );
<inp2:m_if check="m_Get" name="last_template">
- <inp2:m_Get name="last_template" result_to_var="last_template"/>
+ <inp2:m_Get name="last_template" no_html_escape="1" result_to_var="last_template"/>
<inp2:c_UpdateLastTemplate template="$last_template"/>
<inp2:m_else/>
<inp2:c_UpdateLastTemplate template="catalog/catalog"/>
</inp2:m_if>
<inp2:m_include t="categories/ci_blocks"/>
-<inp2:m_RenderElement name="structure_reload_element"/>
\ No newline at end of file
+<inp2:m_RenderElement name="structure_reload_element"/>
Index: branches/5.2.x/core/admin_templates/submissions/submission_log_edit.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/submissions/submission_log_edit.tpl (revision 16061)
+++ branches/5.2.x/core/admin_templates/submissions/submission_log_edit.tpl (revision 16062)
@@ -1,134 +1,134 @@
<inp2:adm_SetPopupSize width="820" height="570"/>
<inp2:m_include t="incs/header"/>
-<inp2:m_Get var="form_id" result_to_var="form_id"/>
+<inp2:m_Get var="form_id" no_html_escape="1" result_to_var="form_id"/>
<inp2:m_RenderElement name="combined_header" prefix="formsubs" section="in-portal:submissions:$form_id" title_preset="submission_log_edit"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
<inp2:m_if check="submission-log_IsNewItem">
a_toolbar.AddButton(
new ToolBarButton(
'select',
'<inp2:m_phrase label="la_ToolTip_Send" escape="1"/>',
function() {
submit_event('submission-log', '<inp2:submission-log_SaveEvent/>');
}
)
);
</inp2:m_if>
a_toolbar.AddButton(
new ToolBarButton(
'cancel',
'<inp2:m_phrase label="la_ToolTip_Close" escape="1"/>',
function() {
cancel_edit('submission-log', 'OnGoBack', '<inp2:submission-log_SaveEvent/>', '<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
}
)
);
<inp2:m_if check="submission-log_IsUserReply" inverse="inverse">
a_toolbar.AddButton(
new ToolBarButton(
'resend',
'<inp2:m_phrase label="la_ToolTip_Resend" escape="1"/>',
function() {
submit_event('submission-log', 'OnResendReply');
}
)
);
</inp2:m_if>
<inp2:m_if check="submission-log_IsNewItem">
a_toolbar.AddButton(
new ToolBarButton(
'reset_to_user',
'<inp2:m_phrase label="la_ToolTip_SaveAsDraft" escape="1"/>',
function() {
submit_event('submission-log', 'OnSaveDraft');
}
)
);
</inp2:m_if>
a_toolbar.Render();
</script>
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript" src="<inp2:m_Compress files='js/uploader/upload_manager.js|js/uploader/uploader.js'/>"></script>
</td>
</tr>
</table>
<inp2:m_DefineElement name="file_element">
<a href="<inp2:Field field='$field' format='full_url'/>" target="_blank"><inp2:Field field="$field"/></a><br/>
</inp2:m_DefineElement>
<input type="hidden" name="client_mode" value="<inp2:m_Get name='client_mode'/>"/>
<inp2:submission-log_SaveWarning name="grid_save_warning"/>
<inp2:submission-log_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="inp_edit_hidden" prefix="submission-log" field="FormSubmissionId"/>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="submission-log" field="DraftId"/>
<inp2:m_RenderElement name="inp_id_label" prefix="submission-log" field="SubmissionLogId" title="la_fld_Id"/>
<inp2:m_RenderElement name="inp_label" prefix="submission-log" field="FromEmail" title="la_fld_FromEmail"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="submission-log" field="ToEmail" size="60" title="la_fld_ToEmail"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="submission-log" field="Cc" size="60" title="la_fld_Cc"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="submission-log" field="Bcc" size="60" title="la_fld_Bcc"/>
<inp2:m_if check="submission-log_IsNewItem">
<inp2:m_RenderElement name="inp_edit_box" prefix="submission-log" field="Subject" size="80" title="la_fld_Subject"/>
<inp2:m_if check="submission-log_HasDraft">
<inp2:m_RenderElement design="form_row" prefix="submission-log" field="DraftId" title="la_DraftAvailableFrom">
<td class="control-cell">
<inp2:draft.related_Field name="CreatedOn"/>
[<a href="#" onclick="submit_event('<inp2:m_Param name='prefix'/>', 'OnUseDraft'); return false;"><inp2:m_Phrase name="la_btn_UseDraft"/></a>]
&nbsp;[<a href="#" onclick="submit_event('<inp2:m_Param name='prefix'/>', 'OnDeleteDraft'); return false;"><inp2:m_Phrase name="la_btn_DeleteDraft"/></a>]
</td>
</inp2:m_RenderElement>
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_textarea" prefix="submission-log" field="Message" rows="30" cols="100" title="la_fld_Message"/>
<inp2:m_RenderElement name="inp_edit_swf_upload" prefix="submission-log" field="Attachment" title="la_fld_Attachment"/>
<inp2:m_else/>
<inp2:m_RenderElement name="inp_label" prefix="submission-log" field="Subject" title="la_fld_Subject"/>
<inp2:m_RenderElement name="inp_label" prefix="submission-log" field="Message" title="la_fld_Message" nl2br="1"/>
<inp2:m_RenderElement name="inp_label" prefix="submission-log" field="ReplyStatus" title="la_fld_ReplyStatus"/>
<inp2:m_RenderElement name="inp_label" prefix="submission-log" field="RepliedOn" title="la_fld_RepliedOn"/>
<inp2:m_RenderElement name="inp_label" prefix="submission-log" field="SentStatus" title="la_fld_SentStatus"/>
<inp2:m_RenderElement name="inp_label" prefix="submission-log" field="SentOn" title="la_fld_SentOn"/>
<inp2:m_RenderElement design="form_row" prefix="submission-log" field="Attachment" title="la_fld_Attachment">
<td class="control-cell">
<inp2:$prefix_IterateFiles render_as="file_element" field="$field"/>
</td>
</inp2:m_RenderElement>
<inp2:m_if check="submission-log_Field" name="BounceInfo">
<inp2:m_RenderElement name="inp_label" prefix="submission-log" field="BounceInfo" title="la_fld_BounceInfo" nl2br="1"/>
</inp2:m_if>
<inp2:m_if check="submission-log_Field" name="BounceDate" db="db">
<inp2:m_RenderElement name="inp_label" prefix="submission-log" field="BounceDate" title="la_fld_BounceDate"/>
</inp2:m_if>
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="submission-log" field="FromEmail"/>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="submission-log" field="ReplyTo"/>
<inp2:m_RenderElement name="inp_edit_filler" />
</table>
</div>
-<inp2:m_include t="incs/footer"/>
\ No newline at end of file
+<inp2:m_include t="incs/footer"/>
Index: branches/5.2.x/core/admin_templates/submissions/submission_edit_logs.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/submissions/submission_edit_logs.tpl (revision 16061)
+++ branches/5.2.x/core/admin_templates/submissions/submission_edit_logs.tpl (revision 16062)
@@ -1,149 +1,149 @@
<inp2:adm_SetPopupSize width="800" height="640"/>
<inp2:m_include t="incs/header"/>
-<inp2:m_Get var="form_id" result_to_var="form_id"/>
+<inp2:m_Get var="form_id" no_html_escape="1" result_to_var="form_id"/>
<inp2:m_RenderElement name="combined_header" prefix="formsubs" section="in-portal:submissions:$form_id" title_preset="submission_edit_logs" tab_preset="Default" />
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tr>
<td>
<table width="100%" cellpadding="0" cellspacing="0">
<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('formsubs', '<inp2:formsubs_SaveEvent/>');
}
) );
a_toolbar.AddButton(
new ToolBarButton(
'cancel',
'<inp2:m_phrase label="la_ToolTip_Close" escape="1"/>',
function() {
submit_event('formsubs', 'OnGoBack');
}
)
);
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('formsubs', '<inp2:formsubs_PrevId/>');
}
)
);
a_toolbar.AddButton(
new ToolBarButton(
'next',
'<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>',
function() {
go_to_id('formsubs', '<inp2:formsubs_NextId/>');
}
)
);
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
function edit()
{
std_edit_temp_item('submission-log', 'submissions/submission_log_edit');
}
a_toolbar.AddButton(
new ToolBarButton(
'edit',
'<inp2:m_phrase label="la_ToolTip_View" escape="1"/>',
edit
)
);
a_toolbar.AddButton(
new ToolBarButton(
'reply',
'<inp2:m_phrase label="la_ToolTip_Reply" escape="1"/>',
function() {
Application.SetVar('client_mode', 0);
std_new_item('submission-log', 'submissions/submission_log_edit');
}
)
);
a_toolbar.AddButton(
new ToolBarButton(
'delete',
'<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('submission-log')
}
)
);
a_toolbar.AddButton(
new ToolBarButton(
'resend',
'<inp2:m_phrase label="la_ToolTip_Resend" escape="1"/>',
function() {
Application.SetVar('from_list', 1);
submit_event('submission-log', 'OnResendReply');
}
)
);
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton(
new ToolBarButton(
'view',
'<inp2:m_phrase label="la_ToolTip_View" escape="1"/>',
function(id) {
show_viewmenu(a_toolbar, 'view');
}
)
);
a_toolbar.Render();
<inp2:m_if check="formsubs_IsSingle">
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="formsubs_IsLast">
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="formsubs_IsFirst">
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</table>
</td>
</tr>
</table>
<inp2:m_DefineElement name="grid_subject_td" format="" nl2br="" first_chars="" td_style="" currency="">
<inp2:m_if check="IsNewUserReply">
<strong><inp2:Field field="$field" first_chars="$first_chars" currency="$currency" nl2br="$nl2br" grid="$grid" format="$format"/></strong>
<inp2:m_else/>
<inp2:Field field="$field" first_chars="$first_chars" currency="$currency" nl2br="$nl2br" grid="$grid" format="$format"/>
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="submission-log" IdField="SubmissionLogId" grid="Default"/>
<script type="text/javascript">
Grids['submission-log'].SetDependantToolbarButtons( new Array('edit','delete', 'resend') );
</script>
-<inp2:m_include t="incs/footer"/>
\ No newline at end of file
+<inp2:m_include t="incs/footer"/>
Index: branches/5.2.x/core/admin_templates/submissions/submission_view.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/submissions/submission_view.tpl (revision 16061)
+++ branches/5.2.x/core/admin_templates/submissions/submission_view.tpl (revision 16062)
@@ -1,223 +1,223 @@
<inp2:adm_SetPopupSize width="800" height="640"/>
<inp2:m_include t="incs/header"/>
-<inp2:m_Get var="form_id" result_to_var="form_id"/>
+<inp2:m_Get var="form_id" no_html_escape="1" result_to_var="form_id"/>
<inp2:m_if check="form_Field" name="EnableEmailCommunication" db="db">
<inp2:m_RenderElement name="combined_header" prefix="formsubs" section="in-portal:submissions:$form_id" title_preset="formsubs_view" tab_preset="Default"/>
<inp2:m_else/>
<inp2:m_RenderElement name="combined_header" prefix="formsubs" section="in-portal:submissions:$form_id" title_preset="formsubs_view"/>
</inp2:m_if>
<!-- 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('formsubs', '<inp2:formsubs_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Close" escape="1"/>', function() {
submit_event('formsubs', 'OnGoBack');
}
) );
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('formsubs', '<inp2:formsubs_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('formsubs', '<inp2:formsubs_NextId/>');
}
) );
//a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.Render();
<inp2:m_if check="formsubs_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="formsubs_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="formsubs_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<!--##<inp2:m_DefineElement name="form_field_text">
<inp2:m_if check="FieldEquals" field="Validation" value="1">
<a href="mailto:<inp2:SubmissionTag tag='Field'/>"><inp2:SubmissionTag tag="Field"/></a>
<inp2:m_else/>
<inp2:SubmissionTag tag="Field"/>
</inp2:m_if>
</inp2:m_DefineElement>##-->
<inp2:m_DefineElement name="form_field_text">
<input type="text" name="<inp2:CustomInputName/>" id="<inp2:CustomInputName/>" value="<inp2:SubmissionTag tag="Field"/>" <inp2:m_param name="field_params" />/>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="form_field_password">
<input type="password" primarytype="password" name="<inp2:CustomInputName/>" id="<inp2:CustomInputName/>" value="" />
<input type="password" name="<inp2:CustomInputName verify='1'/>" id="verify_<inp2:CustomInputName verify='1'/>" value="" />
</inp2:m_DefineElement>
<inp2:m_DefineElement name="form_field_option">
<option value="<inp2:m_param name='key'/>"<inp2:m_param name="selected"/>><inp2:m_param name="option"/></option>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="form_field_select">
<select name="<inp2:CustomInputName/>" id="<inp2:CustomInputName/>">
<inp2:SubmissionTag tag="PredefinedOptions" field="$field" block="form_field_option" selected="selected"/>
</select>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="form_field_checkbox">
<input type="hidden" id="<inp2:CustomInputName/>" name="<inp2:CustomInputName/>" value="<inp2:SubmissionTag tag='Field' field='$field' db='db'/>">
<input type="checkbox" id="_cb_<inp2:m_param name='field'/>" <inp2:SubmissionTag tag="Field" checked="checked" db="db"/> onchange="update_checkbox(this, document.getElementById('<inp2:CustomInputName/>'));">
</inp2:m_DefineElement>
<inp2:m_DefineElement name="form_field_textarea">
<textarea name="<inp2:CustomInputName/>" id="<inp2:CustomInputName/>" style="width: 100%;" <inp2:m_param name="field_params" />><inp2:SubmissionTag tag="Field" field="$field" /></textarea>
<script type="text/javascript">
Form.addControl('<inp2:CustomInputName/>', false);
</script>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="form_radio_item">
<input type="radio" <inp2:m_param name="checked"/> name="<inp2:m_param name="field_name"/>" id="<inp2:m_param name="field_name"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>"><label for="<inp2:m_param name="field_name"/>_<inp2:m_param name="key"/>"><inp2:m_param name="option"/></label>&nbsp;
</inp2:m_DefineElement>
<inp2:m_DefineElement name="form_field_radio">
<inp2:SubmissionTag tag="PredefinedOptions" field="$field" block="form_radio_item" selected="checked"/>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="form_field_upload">
<input type="file" name="<inp2:CustomInputName/>" id="<inp2:CustomInputName/>" <inp2:m_param name="field_params" />/>
<inp2:m_ifnot check="SubmissionTag" tag='Field' equals_to="" db="db">
(<a href="<inp2:SubmissionTag tag='Field' format='full_url'/>" target="_blank"><inp2:SubmissionTag tag="Field"/></a>)
</inp2:m_ifnot>
<input type="hidden" name="<inp2:CustomInputName/>[upload]" id="<inp2:CustomInputName/>[upload]" value="<inp2:SubmissionTag tag='Field'/>"/>
</inp2:m_DefineElement>
<inp2:formsubs_SaveWarning name="grid_save_warning"/>
<inp2:formsubs_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" prefix="formsubs" fields="FormSubmissionId,SubmissionTime,IPAddress,ReferrerURL,LogStatus,LastUpdatedOn" title="la_section_General"/>
<inp2:m_RenderElement name="inp_id_label" prefix="formsubs" field="FormSubmissionId" title="la_fld_Id"/>
<inp2:m_RenderElement name="inp_label" prefix="formsubs" field="SubmissionTime" title="la_fld_SubmissionTime" />
<inp2:m_RenderElement name="inp_label" prefix="formsubs" field="IPAddress" title="la_fld_IPAddress" />
<inp2:m_RenderElement name="inp_label" prefix="formsubs" field="ReferrerURL" title="la_fld_ReferrerURL" />
<inp2:m_if check="form_Field" name="EnableEmailCommunication" db="db">
<inp2:m_RenderElement name="inp_label" prefix="formsubs" field="LogStatus" title="la_fld_Status" />
<inp2:m_else/>
<inp2:m_RenderElement name="inp_edit_options" prefix="formsubs" field="LogStatus" title="la_fld_Status" has_empty="1"/>
</inp2:m_if>
<inp2:m_if check="formsubs_Field" name="LastUpdatedOn" db="db">
<inp2:m_RenderElement name="inp_label" prefix="formsubs" field="LastUpdatedOn" title="la_fld_LastUpdatedOn" />
</inp2:m_if>
<inp2:m_if check="form_Field" name="EnableEmailCommunication" db="db">
<inp2:m_ifnot check="submission-log_TotalRecords">
<inp2:m_RenderElement design="form_row" prefix="formsubs" field="MergeToSubmission" title="la_fld_MergeToSubmission">
<td class="control-cell">
<input type="hidden" id="<inp2:{$prefix}_InputName field='Is{$field}'/>" name="<inp2:{$prefix}_InputName field='Is{$field}'/>" value="<inp2:{$prefix}_Field field='Is{$field}' db='db'/>">
<input tabindex="<inp2:m_get param='tab_index'/>" type="checkbox" id="_cb_<inp2:{$prefix}_InputName field='Is{$field}'/>" name="_cb_<inp2:{$prefix}_InputName field='Is{$field}'/>" <inp2:{$prefix}_Field field="Is{$field}" checked="checked" db="db"/> class="<inp2:m_param name='field_class'/>" onchange="update_checkbox(this, document.getElementById('<inp2:{$prefix}_InputName field='Is{$field}'/>'));<inp2:m_param name='onchange'/>" onclick="<inp2:m_param name='onclick'/>">
<select tabindex="<inp2:m_get param='tab_index'/>" name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" onchange="<inp2:m_Param name='onchange'/>" style="width: 400px;">
<inp2:{$prefix}_PredefinedOptions field="$field" block="inp_option_item" selected="selected" has_empty="1"/>
</select>
</td>
</inp2:m_RenderElement>
</inp2:m_ifnot>
</inp2:m_if>
<inp2:m_RenderElement name="subsection" title="la_section_Data"/>
<inp2:m_DefineElement name="form_field" prefix="formsubs">
<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" onmouseover="show_form_error('<inp2:m_Param name='prefix' js_escape='1'/>', 'fld_<inp2:Field name='FormFieldId'/>')" onmouseout="hide_form_error('<inp2:m_Param name='prefix' js_escape='1'/>')">
<inp2:Field field="Prompt" result_to_var="title"/>
<inp2:Field field="Prompt" plus_or_as_label="1" no_special="no_special"/><inp2:m_if check="Field" name="Required" db="db"><span class="field-required">&nbsp;*</span></inp2:m_if>:<inp2:m_if check="FieldHintLabel" title_label="$title"><span>&nbsp;<img src="<inp2:m_TemplatesBase/>/img/hint_icon.png" width="12" height="13" title="<inp2:FieldHintLabel title_label='$title' html_escape='1'/>" alt="<inp2:FieldHintLabel title_label='$title' html_escape='1'/>"/></inp2:m_if>
</td>
<td class="control-mid">&nbsp;</td>
<script type="text/javascript">
if (typeof(fields['<inp2:m_Param name="prefix" js_escape="1"/>']) == 'undefined') {
fields['<inp2:m_Param name="prefix" js_escape="1"/>'] = new Object();
}
fields['<inp2:m_Param name="prefix" js_escape="1"/>']['fld_<inp2:Field name="FormFieldId"/>'] = '<inp2:Field field="Prompt" plus_or_as_label="1" no_special="no_special" js_escape="1"/>'
</script>
<td class="control-cell">
<inp2:ConfigFormElement field="Value" blocks_prefix="form_field_" element_type_field="ElementType" value_list_field="ValueList" /><br/>
</td>
</tr>
<script type="text/javascript">
add_form_error('<inp2:m_Param name="prefix" js_escape="1"/>', 'fld_<inp2:Field name="FormFieldId"/>', '<inp2:CustomInputName/>', '<inp2:SubmissionTag tag="Error" js_escape="1"/>')
</script>
</inp2:m_DefineElement>
<inp2:formflds_PrintList render_as="form_field" SourcePrefix="formsubs" per_page="-1"/>
<inp2:m_RenderElement name="subsection" prefix="formsubs" fields="Notes" title="la_section_SubmissionNotes"/>
<inp2:m_RenderElement name="inp_edit_textarea" prefix="formsubs" field="Notes" title="la_fld_Notes" />
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<inp2:m_if check="form_Field" name="EnableEmailCommunication" db="db">
<inp2:m_ifnot check="submission-log_TotalRecords">
<script language="javascript" type="text/javascript">
var $field_mask = '<inp2:formsubs_InputName name="#FIELD_NAME#" js_escape="1"/>';
$(document).ready(
function () {
processMergeToSubmission();
$( get_control($field_mask, 'IsMergeToSubmission', undefined, '_cb') ).click(processMergeToSubmission);
}
);
function processMergeToSubmission() {
var $do_merge = get_control($field_mask, 'IsMergeToSubmission', undefined, '_cb').checked;
var $merge_to_submission = get_control($field_mask, 'MergeToSubmission');
if (!$do_merge) {
$merge_to_submission.selectedIndex = 0;
}
$merge_to_submission.disabled = !$do_merge;
if ($do_merge) {
$('#merge_submission').removeClass('button-disabled').addClass('button').prop('disabled', false);
}
else {
$('#merge_submission').removeClass('button').addClass('button-disabled').prop('disabled', true);
}
}
</script>
</inp2:m_ifnot>
</inp2:m_if>
-<inp2:m_include t="incs/footer"/>
\ No newline at end of file
+<inp2:m_include t="incs/footer"/>
Index: branches/5.2.x/core/admin_templates/submissions/submissions_list.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/submissions/submissions_list.tpl (revision 16061)
+++ branches/5.2.x/core/admin_templates/submissions/submissions_list.tpl (revision 16062)
@@ -1,67 +1,67 @@
<inp2:m_include t="incs/header" />
-<inp2:m_Get var="form_id" result_to_var="form_id"/>
+<inp2:m_Get var="form_id" no_html_escape="1" result_to_var="form_id"/>
<inp2:m_RenderElement name="combined_header" prefix="formsubs" section="in-portal:submissions:$form_id" pagination="1" title_preset="formsubs_list" />
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
// don't use temp tables, since we can receive user replies while reviewing form submission
std_edit_temp_item('formsubs', 'submissions/submission_view');
}
var a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('formsubs')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton(
new ToolBarButton(
'view',
'<inp2:m_phrase label="la_ToolTip_View" escape="1"/>',
function(id) {
show_viewmenu(a_toolbar,'view');
}
)
);
a_toolbar.Render();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="formsubs" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="grid_email_td">
<a href="mailto:<inp2:Field field="$field" />"><inp2:Field field="$field"/></a>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="grid_upload_td">
<inp2:m_if check="Field" name="$field" db="db">
<a href="<inp2:Field field='$field' format='full_url'/>" target="_blank"><inp2:Field field="$field"/></a>
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="formsubs" IdField="FormSubmissionId" grid="Default"/>
<script type="text/javascript">
Grids['formsubs'].SetDependantToolbarButtons( new Array('edit','delete') );
</script>
-<inp2:m_include t="incs/footer"/>
\ No newline at end of file
+<inp2:m_include t="incs/footer"/>

Event Timeline