use strict;return sub{my $this = shift;my $C = $this->{C};$this->out("<div class=\"d-sm-flex align-items-center justify-content-between mb-4\">\n	<h1 class=\"h3 mb-2 text-gray-800\">\n");if ( $C->{TableTitleFull} ) {$this->out("			$C->{TableTitleFull}\n");} elsif ( $C->{TableTitle} ) {$this->out("			$C->{TableTitle}\n");}$this->out("	</h1>\n</div>\n\n");if ( $C->{Form}{errors} ) {$this->out("<div class=\"card mb-4 py-3 border-left-danger\">\n	<div class=\"card-body\">\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("			$C->{error}{message}\n");}$this->out("	</div>\n</div>\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\">\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<div class=\"card mb-4\">\n	<div class=\"card-header py-3\">\n		<h6 class=\"m-0 font-weight-bold text-primary\">\n");if ( $C->{TableTitleFull} ) {$this->out("				$C->{TableTitleFull}\n");} elsif ( $C->{TableTitle} ) {$this->out("				$C->{TableTitle}:\n");if ( $C->{View}{stored} ) {$this->out("					editing record #$C->{View}{ID}\n");} else {$this->out("					adding new record\n");}$this->out("");} else {$this->out("");if ( $C->{View}{stored} ) {$this->out("					Editing record #$C->{View}{ID}\n");} else {$this->out("					Adding new record\n");}$this->out("");}$this->out("		</h6>\n	</div>\n	<div class=\"card-body\">\n");if ( scalar(@{$C->{Form}{fields}}) >= 3 && ! $C->{TabActs}{EditorSingleButtons} ) {$this->out("	<div class=\"btn-group mb-4\">\n		<button type=\"button\" class=\"btn btn-primary\" onclick=\"atkGoActionEditor(\'save\')\">Save</button>\n		<button type=\"button\" class=\"btn btn-primary dropdown-toggle dropdown-toggle-split\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n			<span class=\"sr-only\">Toggle Dropdown</span>\n		</button>\n		<div class=\"dropdown-menu\">\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("		</div>\n	</div>\n");}$this->out("\n");my $in = $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("");$C->{ctrl} = "$C->{Form}{$C->{f}}";$this->out("");if ( $C->{ctrl} ) {$this->out("	<div class=\"form-group row\">\n		<label class=\"col-4 col-form-label\">$C->{Form}{names}{$C->{f}}</label>\n		<div class=\"col-8\">$C->{ctrl}</div>\n	</div>\n");}$this->out("");}$this->out("	<div class=\"btn-group mt-4\">\n		<button type=\"button\" class=\"btn btn-primary\" onclick=\"atkGoActionEditor(\'save\')\">Save</button>\n		<button type=\"button\" class=\"btn btn-primary dropdown-toggle dropdown-toggle-split\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n			<span class=\"sr-only\">Toggle Dropdown</span>\n		</button>\n		<div class=\"dropdown-menu\">\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("		</div>\n	</div>\n</div>\n</div>\n</form>\n");}