use strict;return sub{my $this = shift;my $C = $this->{C};$this->out("");if ( $C->{Form}{errors} ) {$this->out("	<div style=\"color: red\">\n");my $in = $C->{Form}{errors};my $loop = ref($in) eq "ARRAY" ? $in : ref($in) eq "CODE" ? &{$in} : [];$C->{ITERATION}{error} = -1;for my $f (@$loop) {$C->{ITERATION}{error}++;$C->{error} = $f;$this->out("		<br>* $C->{error}{message}\n");}$this->out("	</div><br>\n");}$this->out("\n<form name=Editor action=\"$C->{SYS}{URL}$C->{ENV}{PATH_INFO}\" method=POST enctype=\"multipart/form-data\">\n	<input type=\"hidden\" name=\"TabAct\">\n	<input type=\"hidden\" name=\"cgi_ret\" value=\"$C->{INPUT}{cgi_ret}\">\n	<input type=\"hidden\" name=\"ObjectID\" value=\"$C->{INPUT}{ObjectID}\">\n");my $in = $C->{KeepFields};my $loop = ref($in) eq "ARRAY" ? $in : ref($in) eq "CODE" ? &{$in} : [];$C->{ITERATION}{kf} = -1;for my $f (@$loop) {$C->{ITERATION}{kf}++;$C->{kf} = $f;$this->out("	<input type=\"hidden\" name=\"$C->{kf}\" value=\"$C->{INPUT}{$C->{kf}}\">\n");}$this->out("\n	<table border=0 cellpadding=0 cellspacing=1 class=atkMainTable>\n		<tr>\n			<td class=atkHeader>$C->{TableTitle}</td>\n		</tr>\n		<tr>\n			<td class=atkEditorControl>\n");{my $G = (ref $this)->get("$C->{TabActCfg}{template_controls}", $this->{param}) or die "no skel $C->{TabActCfg}{template_controls}";my $ctx = $this->{C};my $out = $G->execute($ctx);$this->out(@$out) if $out;}$this->out("			</td>\n		</tr>\n		<tr><td><table class=atkInnerTable cellpadding=4 cellspacing=3 width=\"100\%\">\n			<tr>\n				<td class=atkEditorRight>$C->{Form}{template}</td>\n			</tr>\n		</table></td></tr>\n		<tr>\n			<td class=atkEditorControl>\n");{my $G = (ref $this)->get("$C->{TabActCfg}{template_controls}", $this->{param}) or die "no skel $C->{TabActCfg}{template_controls}";my $ctx = $this->{C};my $out = $G->execute($ctx);$this->out(@$out) if $out;}$this->out("			</td>\n		</tr>\n	</table>\n</form>\n");}