bugfix [ 904313 ] Problem with page-template preview in 6.0.0
This commit is contained in:
parent
b0ae354c4e
commit
ce8272c62e
3 changed files with 16 additions and 1 deletions
|
|
@ -1388,6 +1388,12 @@ The unique identifier for the selected template. Defaults to "1".
|
|||
|
||||
The namespace for the list of templates to return. If this is omitted, all templates will be displayed.
|
||||
|
||||
=item extras
|
||||
|
||||
If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows:
|
||||
|
||||
'onChange="this.form.submit()"'
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
|
@ -1398,7 +1404,8 @@ sub template {
|
|||
return selectList({
|
||||
name=>$name,
|
||||
options=>WebGUI::Template::getList($_[0]->{namespace}),
|
||||
value=>[$templateId]
|
||||
value=>[$templateId],
|
||||
extras=>$_[0]->{extras}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -290,9 +290,14 @@ sub drawTemplate {
|
|||
$template =~ s/\r//g;
|
||||
$template =~ s/\'/\\\'/g;
|
||||
$template = WebGUI::Macro::negate($template);
|
||||
$template =~ s/\<style.*?\>.*?\<\/style\>//gi;
|
||||
$template =~ s/\<script.*?\>.*?\<\/script\>//gi;
|
||||
$template =~ s/\<table.*?\>/\<table cellspacing=0 cellpadding=3 width=100 height=80 border=1\>/ig;
|
||||
$template =~ s/\<tmpl_loop\s+position(\d+)\_loop\>.*?\<\/tmpl\_loop\>/$1/ig;
|
||||
$template =~ s/\<tmpl_if.*?\>.*?\<\/tmpl_if\>//ig;
|
||||
$template =~ s/\<tmpl_if.*?\>//ig;
|
||||
$template =~ s/\<\/tmpl_if\>//ig;
|
||||
$template =~ s/\<tmpl_var.*?\>//ig;
|
||||
return $template;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue