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\n<form name=Editor method=POST action=\"$C->{SELF_URL_NO_QS}\" enctype=\"multipart/form-data\">\n<input type=\"hidden\" name=\"TabAct\" value=\"massedit\">\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>\n");if ( $C->{TableTitle} ) {$this->out("$C->{TableTitle}:");}$this->out("		Mass editing $C->{MasseditNumRecords} record(s)\n	</td>\n</tr>\n<tr><td><table class=atkInnerTable cellpadding=4 cellspacing=3 width=100\%>\n");my $in = [$C->{Form}->sections];my $loop = ref($in) eq "ARRAY" ? $in : ref($in) eq "CODE" ? &{$in} : [];$C->{ITERATION}{s} = -1;for my $f (@$loop) {$C->{ITERATION}{s}++;$C->{s} = $f;$this->out("	<tr><td class=\"atkEditorControl\" style=\"text-align:left\"><input type=\"checkbox\" name=\"massedit_sections\" value=\"$C->{s}\" onChange=\"var el = document.getElementById(\'TrSection$C->{s}\'); el.style.display = this.checked ? \'\' : \'none\'\"> $C->{Form}{names}{$C->{s}}</td></tr>\n	<tr id=\"TrSection$C->{s}\" style=\"display:none\">\n		<td class=atkEditorRight>\n		<table>\n");my $in = [grep { index($_, $C->{s}) == 0 } $C->{Form}->fields];my $loop = ref($in) eq "ARRAY" ? $in : ref($in) eq "CODE" ? &{$in} : [];$C->{ITERATION}{f} = -1;for my $f (@$loop) {$C->{ITERATION}{f}++;$C->{f} = $f;$this->out("		<tr>\n			<td>$C->{Form}{names}{$C->{f}}</td>\n			<td>$C->{Form}{$C->{f}}</td>\n		</tr>\n");}$this->out("		</table>\n		</td>\n	</tr>\n");}$this->out("</table></td></tr>\n<tr>\n	<td class=atkEditorControl>\n		<input type=\"submit\" class=\"atkButton\" name=\"do_save\" value=\"Save\">\n		<input type=\"submit\" class=\"atkButton\" name=\"do_none\" value=\"Return without changes\">\n	</td>\n</tr>\n</table>\n\n</form>\n");}