more changes etemplate_old --> etemplate, maybe better not started that ;-)

This commit is contained in:
Ralf Becker 2014-03-23 09:34:18 +00:00
parent 570b95f9ae
commit 20193e6418
17 changed files with 68 additions and 70 deletions

View File

@ -62,7 +62,7 @@ class ajax_captcha_widget
//sets main etemplate cell with data created in etemplate.captcha_widget
$cell['type'] = 'template';
$cell['size'] = $cell['name'];
$widget = new etemplate_old('etemplate.captcha_widget');
$widget = new etemplate('etemplate.captcha_widget');
$widget->no_onclick = True;
$cell['obj'] = &$widget;

View File

@ -183,7 +183,7 @@ class ajax_select_widget
$cell['size'] = $cell['name'];
$value = array('value' => $current_value, 'search' => $title);
$widget = new etemplate_old('etemplate.ajax_select_widget');
$widget = new etemplate('etemplate.ajax_select_widget');
$widget->no_onclick = True;
// Link if readonly & link is set
@ -278,7 +278,7 @@ class ajax_select_widget
$value = $results[0][$extension_data['options']['id_field']];
return true;
} elseif ($count > 1) {
etemplate_old::set_validation_error($name,lang("More than 1 match for '%1'",$value_in['search']));
etemplate::set_validation_error($name,lang("More than 1 match for '%1'",$value_in['search']));
$loop = true;
return false;
} else {
@ -299,7 +299,7 @@ class ajax_select_widget
if(!$return) {
$value = $extension_data['old_value'];
etemplate_old::set_validation_error($name,lang('Required'));
etemplate::set_validation_error($name,lang('Required'));
$loop = true;
}

View File

@ -463,7 +463,7 @@ class customfields_widget
'size' => $field['type'] == 'link-entry' ? '' : $field['type'],
));
// register post-processing of link widget to get eg. needed/required validation
etemplate_old::$request->set_to_process(etemplate_old::form_name($form_name,$this->prefix.$lname), 'ext-link');
etemplate::$request->set_to_process(etemplate::form_name($form_name,$this->prefix.$lname), 'ext-link');
}
$cell['data'][0]['c'.$n++] = $row_class.',top';

View File

@ -254,11 +254,11 @@ class date_widget
if ($cell['needed'])
{
etemplate_old::$request->set_to_process($name,'ext-'.$type,array(
etemplate::$request->set_to_process($name,'ext-'.$type,array(
'needed' => $cell['needed'],
));
}
$tpl = new etemplate_old;
$tpl = new etemplate;
$tpl->init('*** generated fields for date','','',0,'',0,0); // make an empty template
// keep the editor away from the generated tmpls
$tpl->no_onclick = true;
@ -439,7 +439,7 @@ class date_widget
'value' => $value,
'unit' => $unit,
);
$tpl = new etemplate_old;
$tpl = new etemplate;
$tpl->init('*** generated fields for duration','','',0,'',0,0); // make an empty template
// keep the editor away from the generated tmpls
$tpl->no_onclick = true;
@ -567,7 +567,7 @@ class date_widget
}
elseif (!preg_match('/^-?[0-9]*[,.]?[0-9]*'.($extension_data['percent_allowed'] ? '%?' : '').'$/',$value_in))
{
etemplate_old::set_validation_error($name,lang("'%1' is not a valid floatingpoint number !!!",$value_in));
etemplate::set_validation_error($name,lang("'%1' is not a valid floatingpoint number !!!",$value_in));
return false;
}
else
@ -641,7 +641,7 @@ class date_widget
// checking the date is a correct one
if (!checkdate($value['m'],$value['d'],$value['Y']))
{
etemplate_old::set_validation_error($name,lang("'%1' is not a valid date !!!",
etemplate::set_validation_error($name,lang("'%1' is not a valid date !!!",
common::dateformatorder($value['Y'],$value['m'],$value['d'],true)));
}
$data_format = $extension_data['data_format'];

View File

@ -284,7 +284,7 @@ class db_tools
{
echo 'editor.edit: content ='; _debug_array($content);
}
$tpl = new etemplate_old('etemplate.db-tools.edit');
$tpl = new etemplate('etemplate.db-tools.edit');
$tpl->exec('etemplate.db_tools.edit',$content,$sel_options,$no_button,
array('posted_table' => $this->table,'posted_app' => $this->app,'changes' => $this->changes));
}
@ -376,7 +376,7 @@ class db_tools
$new_version[$minor] = sprintf('%03d',1+$new_version[$minor]);
$content['new_version'] = implode('.',$new_version);
$tmpl = new etemplate_old('etemplate.db-tools.ask_save');
$tmpl = new etemplate('etemplate.db-tools.ask_save');
if (!file_exists(EGW_SERVER_ROOT."/$posted_app/setup/tables_current.inc.php"))
{

View File

@ -106,7 +106,7 @@ class editor
function __construct()
{
$this->etemplate = new etemplate_old();
$this->etemplate = new etemplate();
$this->extensions = $GLOBALS['egw']->session->appsession('extensions','etemplate');
}
@ -280,7 +280,7 @@ class editor
{
$content[$row] = $param;
}
$list_result = new etemplate_old('etemplate.editor.list_result');
$list_result = new etemplate('etemplate.editor.list_result');
$GLOBALS['egw_info']['flags']['app_header'] = lang('Editable Templates - Search');
$list_result->exec('etemplate.editor.list_result',$content,'','',array(
'result' => $result,
@ -484,7 +484,7 @@ class editor
'xml' => $xml ? '<pre>'.html::htmlspecialchars($xml)."</pre>\n" : '',
);
$editor = new etemplate_old('etemplate.editor.new');
$editor = new etemplate('etemplate.editor.new');
if (isset($content['values']) && !isset($content['vals']))
{
$r = 1;
@ -1154,7 +1154,7 @@ class editor
/**
* edit dialog for a widget
*
* @param array $content the submitted content of the etemplate_old::exec function, default null
* @param array $content the submitted content of the etemplate::exec function, default null
* @param string $msg msg to display, default ''
*/
function widget($content=null,$msg='')
@ -1360,8 +1360,8 @@ class editor
$content['cell']['options'] = explode(',',$content['cell']['size']);
$editor = new etemplate_old('etemplate.editor.widget');
$type_tmpl = new etemplate_old;
$editor = new etemplate('etemplate.editor.widget');
$type_tmpl = new etemplate;
list($ext_type) = explode('-',$widget['type']);
// allow to read template of app-specific widgets from their app: eg. "infolog-value" --> "infolog.widget.infolog-value"
@ -1475,7 +1475,7 @@ class editor
/**
* edit dialog for the styles of a templat or app
*
* @param array $content the submitted content of the etemplate_old::exec function, default null
* @param array $content the submitted content of the etemplate::exec function, default null
* @param string $msg msg to display, default ''
*/
function styles($content=null,$msg='')
@ -1545,7 +1545,7 @@ class editor
'java_script' => $js ? '<script>'.$js.'</script>' : '',
'msg' => $msg
);
$tmpl = new etemplate_old('etemplate.editor.styles');
$tmpl = new etemplate('etemplate.editor.styles');
if ($content['from'])
{

View File

@ -341,7 +341,7 @@ class etemplate extends boetemplate
echo '<div id="popupMainDiv">'."\n";
if ($GLOBALS['egw_info']['user']['apps']['manual']) // adding a manual icon to every popup
{
$manual = new etemplate_old('etemplate.popup.manual');
$manual = new etemplate('etemplate.popup.manual');
echo $manual->show(array());
unset($manual);
echo '<style type="text/css">.ajax-loader { position: absolute; right: 27px; top: 24px; display: none; }</style>'."\n";
@ -488,7 +488,7 @@ class etemplate extends boetemplate
foreach(explode('|',$tabs) as $tab)
{
if (strpos('.',$tab) === false) $tab = $this->name.'.'.$tab;
$tab_tpl = new etemplate_old($tab);
$tab_tpl = new etemplate($tab);
if ($tab_tpl->get_widget_by_name($name))
{
$content[$tab_name] = $tab;
@ -1546,7 +1546,7 @@ class etemplate extends boetemplate
$obj_read = 'already loaded';
if (is_array($cell['obj']))
{
$obj = new etemplate_old();
$obj = new etemplate();
$obj->init($cell['obj']);
$cell['obj'] =& $obj;
unset($obj);
@ -1559,12 +1559,12 @@ class etemplate extends boetemplate
$obj_read = is_object($cell['obj']) ? 'obj from content' : 'obj read, obj-name from content';
if (!is_object($cell['obj']))
{
$cell['obj'] = new etemplate_old($cell['obj'],$this->as_array());
$cell['obj'] = new etemplate($cell['obj'],$this->as_array());
}
}
else
{ $obj_read = 'obj read';
$cell['obj'] = new etemplate_old($name,$this->as_array());
$cell['obj'] = new etemplate($name,$this->as_array());
}
}
if (is_int($this->debug) && $this->debug >= 3 || $this->debug == $cell['type'])
@ -2187,7 +2187,7 @@ class etemplate extends boetemplate
// inserts the styles of a named template
if (preg_match('/template::styles\(["\']{1}(.*)["\']{1}\)/U',$on,$matches))
{
$tpl = $matches[1] == $this->name ? $this : new etemplate_old($matches[1]);
$tpl = $matches[1] == $this->name ? $this : new etemplate($matches[1]);
$on = str_replace($matches[0],"'<style>".str_replace(array("\n","\r"),'',$tpl->style)."</style>'",$on);
}
}
@ -2514,5 +2514,3 @@ class etemplate extends boetemplate
}
}
}
class etemplate_old extends etemplate {}

View File

@ -320,7 +320,7 @@ class etemplate_new extends etemplate_widget_template
{
// Old etemplate submit
error_log("Old etemplate submitted");
return ExecMethod('etemplate.etemplate_old.process_exec');
return ExecMethod('etemplate.etemplate.process_exec');
}
error_log(__METHOD__."(".array2string($content).")");

View File

@ -170,7 +170,7 @@ class historylog_widget
}
unset($historylog);
$tpl = new etemplate_old;
$tpl = new etemplate;
$tpl->init('*** generated fields for historylog','','',0,'',0,0); // make an empty template
// keep the editor away from the generated tmpls
$tpl->no_onclick = true;

View File

@ -176,7 +176,7 @@ class link_widget
}
}
if (!($popup = egw_link::is_popup($value['app'],'view')) &&
etemplate_old::$request->output_mode == 2) // we are in a popup
etemplate::$request->output_mode == 2) // we are in a popup
{
$target = '_blank';
}
@ -263,14 +263,14 @@ class link_widget
// modify add_app default to the action used as value
if (isset($value['add_app']) && $app == $value['add_app']) $value['add_app'] = $action;
}
$tpl = new etemplate_old('etemplate.link_widget.add');
$tpl = new etemplate('etemplate.link_widget.add');
break;
case 'link-to':
$GLOBALS['egw_info']['flags']['include_xajax'] = true;
if ($value['search_label'] && $extension_data['search_label'] != $value['search_label']) $value['search_label'] = lang($value['search_label']);
$extension_data = $value;
$tpl = new etemplate_old('etemplate.link_widget.to');
$tpl = new etemplate('etemplate.link_widget.to');
if ($value['link_label']) $tpl->set_cell_attribute('create','label',$value['link_label']);
if ($value['search_label']) $tpl->set_cell_attribute('search','label',$value['search_label']);
@ -300,7 +300,7 @@ class link_widget
return True;
}
$value['link_list_format'] = $GLOBALS['egw_info']['user']['preferences']['common']['link_list_format'];
$tpl = new etemplate_old('etemplate.link_widget.list');
$tpl = new etemplate('etemplate.link_widget.list');
for($row=$tpl->rows-1; list(,$link) = each($links); ++$row)
{
$value[$row] = $link;
@ -309,7 +309,7 @@ class link_widget
{
$value[$row]['view'] = egw_link::view($link['app'],$link['id'],$link);
if (!($value[$row]['popup'] = egw_link::is_popup($link['app'],'view',$link)) &&
etemplate_old::$request->output_mode == 2) // we are in a popup
etemplate::$request->output_mode == 2) // we are in a popup
{
$value[$row]['target'] = '_blank'; // we create a new window as the linked page is no popup
}
@ -330,7 +330,7 @@ class link_widget
$value[$row]['icon'] = egw_link::get_registry($value[$row]['app'], 'icon');
$value[$row]['label'] = 'Unlink';
$value[$row]['help'] = lang('Remove this link (not the entry itself)');
if(!egw_link::is_popup($link['app'],'view') && etemplate_old::$request->output_mode == 2)
if(!egw_link::is_popup($link['app'],'view') && etemplate::$request->output_mode == 2)
{
// If link doesn't want a popup, make sure to open it in appropriate tab of main window
$value[$row]['view'] = "javascript:if(typeof opener.top.framework != 'undefined') {
@ -358,7 +358,7 @@ class link_widget
return true;
}
$GLOBALS['egw_info']['flags']['include_xajax'] = true;
$tpl = new etemplate_old('etemplate.link_widget.entry');
$tpl = new etemplate('etemplate.link_widget.entry');
$options = $cell['size'] ? explode(',',$cell['size']) : array();
$app = $extension_data['app'] = $options[0];
$link_type = $extension_data['link_type'];
@ -501,7 +501,7 @@ class link_widget
list($w,$h) = explode('x',$popup);
$options = ' onclick="window.open(this,this.target,\'width='.(int)$w.',height='.(int)$h.',location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false;"';
}
elseif (etemplate_old::$request->output_mode == 2 || // we are in a popup
elseif (etemplate::$request->output_mode == 2 || // we are in a popup
$link['app'] == egw_link::VFS_APPNAME || // or it's a link to an attachment
($target = egw_link::get_registry($link['app'],'view_target'))) // or explicit target set
{
@ -659,7 +659,7 @@ class link_widget
if (!($link_id = egw_link::link($value['to_app'],$value['to_id'],
egw_link::VFS_APPNAME,$value['file'],$value['remark'])))
{
etemplate_old::set_validation_error($name.'[file]',lang('Error copying uploaded file to vfs!'));
etemplate::set_validation_error($name.'[file]',lang('Error copying uploaded file to vfs!'));
}
else
{
@ -675,7 +675,7 @@ class link_widget
}
else
{
etemplate_old::set_validation_error($name.'[file]',lang('You need to select a file first!'));
etemplate::set_validation_error($name.'[file]',lang('You need to select a file first!'));
}
$extension_data = $value;
$loop = True;

View File

@ -324,8 +324,8 @@ class nextmatch_widget
if (!is_array($readonlys)) $readonlys = array();
if (($total = $extension_data['total'] = $value['total'] = self::call_get_rows($value,$rows,$readonlys['rows'])) === false)
{
//error_log(__METHOD__."() etemplate_old::set_validation_error('$name') '$value[get_rows]' is no valid method!!!");
etemplate_old::set_validation_error($name,__METHOD__."($cell[name]): '$value[get_rows]' is no valid method !!!");
//error_log(__METHOD__."() etemplate::set_validation_error('$name') '$value[get_rows]' is no valid method!!!");
etemplate::set_validation_error($name,__METHOD__."($cell[name]): '$value[get_rows]' is no valid method !!!");
}
// allow the get_rows function to override / set sel_options
if (isset($rows['sel_options']) && is_array($rows['sel_options']))
@ -347,7 +347,7 @@ class nextmatch_widget
}
if (!is_object($value['template']))
{
$value['template'] = new etemplate_old($value['template'],$tmpl->as_array());
$value['template'] = new etemplate($value['template'],$tmpl->as_array());
}
if (is_array($value['rows'][0])) // pad 0 based arrays with rows-1 false values
{
@ -370,7 +370,7 @@ class nextmatch_widget
{ // disable whole nextmatch line if no scrolling necessary
if ($value['header_left'] || $value['header_right'])
{
$nextmatch = new etemplate_old('etemplate.nextmatch_widget.header_only');
$nextmatch = new etemplate('etemplate.nextmatch_widget.header_only');
$cell['size'] = $cell['name'];
$cell['obj'] = &$nextmatch;
$cell['name'] = $nextmatch->name;
@ -385,7 +385,7 @@ class nextmatch_widget
}
else
{
$nextmatch = new etemplate_old('etemplate.nextmatch_widget');
$nextmatch = new etemplate('etemplate.nextmatch_widget');
// keep the editor away from the generated tmpls
$nextmatch->no_onclick = true;
@ -405,7 +405,7 @@ class nextmatch_widget
{
// make each letter internally behave like a button
$form_name = $name.'[searchletter]['.($key === 'all' ? $key : $letter).']';
etemplate_old::$request->set_to_process($form_name,'button');
etemplate::$request->set_to_process($form_name,'button');
if (!$key) $letterbox =& $lettersearch[1]; // to re-use the first child
$letterbox = boetemplate::empty_cell('label',$letter,array(
@ -414,13 +414,13 @@ class nextmatch_widget
$key === 'all' && !$value['searchletter'] ? '_active' : ''),
'no_lang' => 2,
'align' => $key == 'all' ? 'right' : '',
'onclick' => 'return submitit('.etemplate_old::$name_form.",'$form_name');",
'onclick' => 'return submitit('.etemplate::$name_form.",'$form_name');",
));
// if not the first (re-used) child, add it to the parent
if ($key) boetemplate::add_child($lettersearch,$letterbox);
unset($letterbox);
}
//_debug_array(etemplate_old::$request->to_process);
//_debug_array(etemplate::$request->to_process);
}
if(isset($value['no_search'])) $value['no_start_search'] = $value['no_search'];
foreach(array('no_cat'=>'cat_id','no_filter'=>'filter','no_filter2'=>'filter2', 'no_search' => 'search', 'no_start_search' => 'start_search' ) as $val_name => $cell_name)
@ -536,7 +536,7 @@ class nextmatch_widget
}
$value['bottom'] = $value; // copy the values for the bottom-bar
// pass actions and row_id to etemplate_old::show_grid()
// pass actions and row_id to etemplate::show_grid()
$value['rows']['_actions'] =& $value['actions'];
$value['rows']['_action_links'] =& $value['action_links'];
$value['rows']['_row_id'] =& $value['row_id'];
@ -873,7 +873,7 @@ class nextmatch_widget
/**
* Return HTML to initialise actions, if called without arguments only CSS and JS get loaded
*
* Gets called from etemplate_old::show_grid() and addressbook_ui::view (without arguments).
* Gets called from etemplate::show_grid() and addressbook_ui::view (without arguments).
*
* @param array $actions=null
* @param array $action_links=null
@ -917,8 +917,8 @@ class nextmatch_widget
actionCntr.updateActions('.json_encode($enc_actions).');
actionCntr.setDefaultExecute("javaScript:nm_action");
actionCntr.etemplate_var_prefix="'.etemplate_old::$name_vars.'";
actionCntr.etemplate_form=document.forms.'.etemplate_old::$name_form.';
actionCntr.etemplate_var_prefix="'.etemplate::$name_vars.'";
actionCntr.etemplate_form=document.forms.'.etemplate::$name_form.';
var actionLinks = ["'.implode('","', $action_links).'"];
@ -1159,7 +1159,7 @@ class nextmatch_widget
}
/**
* Extract the column names and labels from the template (callback for etemplate_old::widget_tree_walk())
* Extract the column names and labels from the template (callback for etemplate::widget_tree_walk())
*
* @param array &$widget
* @param array &$cols here we add the column-name/-label
@ -1491,7 +1491,7 @@ class nextmatch_widget
}
if (!$exportLimitExempted && (!bo_merge::hasExportLimit($export_limit,'ISALLOWED') || (bo_merge::hasExportLimit($export_limit) && (int)$export_limit < $total)))
{
etemplate_old::set_validation_error($name,lang('You are not allowed to export more than %1 entries!',(int)$export_limit));
etemplate::set_validation_error($name,lang('You are not allowed to export more than %1 entries!',(int)$export_limit));
return false;
}
if (!isset($value['no_csv_support'])) $value['no_csv_support'] = !is_array($value['csv_fields']);
@ -1579,7 +1579,7 @@ class nextmatch_widget
*/
private static function csv_encode($data,$fields,$use_type=true,$extra_sel_options=null,$charset_out=null,$charset=null,$separator=';')
{
$sel_options =& etemplate_old::$request->sel_options;
$sel_options =& etemplate::$request->sel_options;
$out = array();
foreach($fields as $field => $label)

View File

@ -281,8 +281,8 @@ class select_widget
}
$cell['type'] = 'html';
$cell['size'] = ''; // is interpreted as link otherwise
etemplate_old::$request->set_to_process($name,'select');
if ($cell['needed']) etemplate_old::$request->set_to_process_attribute($name,'needed',$cell['needed']);
etemplate::$request->set_to_process($name,'select');
if ($cell['needed']) etemplate::$request->set_to_process_attribute($name,'needed',$cell['needed']);
break;
}
$cell['no_lang'] = True;
@ -386,7 +386,7 @@ class select_widget
}
if (!$readonly)
{
etemplate_old::$request->set_to_process($name,'ext-select-dow');
etemplate::$request->set_to_process($name,'ext-select-dow');
}
$cell['size'] = $rows.($type2 ? ','.$type2 : '');
break;

View File

@ -1232,7 +1232,7 @@ class soetemplate
case 'template':
if (!isset($widget['obj']) && $widget['name'][0] != '@')
{
$widget['obj'] = new etemplate_old;
$widget['obj'] = new etemplate;
if (!$widget['obj']->read($widget['name'])) $widget['obj'] = false;
}
if (!is_object($widget['obj'])) break; // cant descent into template

View File

@ -480,7 +480,7 @@ class vfs_widget
{
if (!egw_vfs::unlink($extension_data['path'].$file))
{
etemplate_old::set_validation_error($name,lang('Error deleting %1!',egw_vfs::decodePath($extension_data['path'].$file)));
etemplate::set_validation_error($name,lang('Error deleting %1!',egw_vfs::decodePath($extension_data['path'].$file)));
}
break;
}
@ -488,7 +488,7 @@ class vfs_widget
}
elseif (!egw_vfs::unlink($extension_data['path']))
{
etemplate_old::set_validation_error($name,lang('Error deleting %1!',egw_vfs::decodePath($extension_data['path'])));
etemplate::set_validation_error($name,lang('Error deleting %1!',egw_vfs::decodePath($extension_data['path'])));
}
$loop = true;
return false;
@ -505,8 +505,8 @@ class vfs_widget
$error = boetemplate::get_array($_FILES['exec']['error'],$name);
if ($error)
{
etemplate_old::set_validation_error($name,lang('Error uploading file!')."\n".
etemplate_old::max_upload_size_message());
etemplate::set_validation_error($name,lang('Error uploading file!')."\n".
etemplate::max_upload_size_message());
$loop = true;
return false;
}
@ -521,7 +521,7 @@ class vfs_widget
$is_preg = $extension_data['mimetype'][0] == '/';
if (!$is_preg && strcasecmp($extension_data['mimetype'],$type) || $is_preg && !preg_match($extension_data['mimetype'],$type))
{
etemplate_old::set_validation_error($name,lang('File is of wrong type (%1 != %2)!',$type,$extension_data['mimetype']));
etemplate::set_validation_error($name,lang('File is of wrong type (%1 != %2)!',$type,$extension_data['mimetype']));
return false;
}
}
@ -541,12 +541,12 @@ class vfs_widget
}
if (!egw_vfs::file_exists($dir = egw_vfs::dirname($path)) && !egw_vfs::mkdir($dir,null,STREAM_MKDIR_RECURSIVE))
{
etemplate_old::set_validation_error($name,lang('Error create parent directory %1!',egw_vfs::decodePath($dir)));
etemplate::set_validation_error($name,lang('Error create parent directory %1!',egw_vfs::decodePath($dir)));
return false;
}
if (!copy($tmp_name,egw_vfs::PREFIX.$path))
{
etemplate_old::set_validation_error($name,lang('Error copying uploaded file to vfs!'));
etemplate::set_validation_error($name,lang('Error copying uploaded file to vfs!'));
return false;
}
$value = $path; // return path of file, important if only a temporary location is used

View File

@ -828,7 +828,7 @@ class mail_hooks
}
// create etemplate
$tpl = new etemplate_old('mail.checkmailbox');
$tpl = new etemplate('mail.checkmailbox');
$notification_message = $tpl->exec(false, $values, array(), array(), array(), 1);
//error_log(__METHOD__.__LINE__.array2string($notification_message));
// send notification

View File

@ -330,11 +330,11 @@ class preferences_settings
$setting['run_lang'] = false; // already done now
// handle as textarea
case 'textarea':
$setting['type'] = is_a($tpl, 'etemplate_old') ? 'textarea' : 'textbox';
$setting['type'] = is_a($tpl, 'etemplate') ? 'textarea' : 'textbox';
$tpl->setElementAttribute($tab.'['.$setting['name'].']', 'multiline', 'true');
// anyway setting via css: width: 99%, height: 5em
// for old eT use size attribute
if (is_a($tpl, 'etemplate_old') && (!empty($setting['cols']) || !empty($setting['rows'])))
if (is_a($tpl, 'etemplate') && (!empty($setting['cols']) || !empty($setting['rows'])))
{
$setting['size'] = $setting['rows'].','.$setting['cols'];
}

View File

@ -2,7 +2,7 @@
<!-- BEGIN header -->
<p style="text-align: center; color: red; font-weight: bold;">{error}</p>
<form method="POST" action="{action_url}">
<table align="center" width="85%" callspacing="0" style="{ border: 1px solid #000000; }">
<table align="center" width="85%">
<tr class="th">
<td colspan="2">&nbsp;<b>{title}</b></td>
</tr>