use strict;return sub{my $this = shift;my $C = $this->{C};$this->out("<script type=\"text/javascript\" src=\"$C->{SYS}{URI}/suppl/pages/editor.js\"></script>\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<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$C->{Form}{group_id}\n\n<div class=\"card shadow mb-4\">\n	<div class=\"card-header py-3\">\n		<h6 class=\"m-0 font-weight-bold text-primary\">\n");if ( $C->{View}{stored} ) {$this->out("				Editing Page #$C->{View}{ID}\n");} else {$this->out("				Adding new Page\n");}$this->out("		</h6>\n	</div>\n	<div class=\"card-body\">\n		<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("				<a class=\"dropdown-item\" onclick=\"atkGoActionEditor(\'addpage\')\">Add a new page in the same Group</a>\n			</div>\n		</div>\n\n		<h6 class=\"mb-6 font-weight-bold text-primary\">Page properties</h6>\n		\n<div class=\"form-group row\">\n	<label class=\"col-sm-12 col-md-4 col-form-label\">Path</label>\n	<div class=\"col-sm-12 col-md-8\">$C->{Form}{url}</div>\n</div>\n<div class=\"form-group row\">\n	<label class=\"col-sm-12 col-md-4 col-form-label\">Page title</label>\n	<div class=\"col-sm-12 col-md-8\">$C->{Form}{group_title}</div>\n</div>\n<div class=\"form-group row\">\n	<label class=\"col-sm-12 col-md-4 col-form-label\">Page template</label>\n	<div class=\"col-sm-12 col-md-8\">$C->{Form}{group_tmpl_id}</div>\n</div>\n<div class=\"form-group row\">\n	<label class=\"col-sm-12 col-md-4 col-form-label\">Page protection</label>\n	<div class=\"col-4\">\n		$C->{Form}{group_protection}\n		$C->{Form}{group_mems}\n	</div>\n</div>\n<div class=\"form-group row\">\n	<label class=\"col-sm-12 col-md-4 col-form-label\">Page type</label>\n	<div class=\"col-sm-12 col-md-8\">$C->{Form}{type}</div>\n</div>\n<!-- <div class=\"form-group row\">\n	<label class=\"col-sm-12 col-md-4 col-form-label\">Page builder</label>\n	<div class=\"col-sm-12 col-md-8\"><button id=\"pageBuilder\" type=\"button\" class=\"btn btn-primary\">Run</button></div>\n	<script>\n		window.onload = function () {\n			\$(\'#pageBuilder\').on(\'click\', function () {\n				window.open(\'$C->{SYS}{URI}/master/plugins/pages/page_builder.html\', \'Page builder\', \'width=1000,height=1000\');\n			});\n		}\n	</script>\n</div> -->\n<div class=\"form-group\">\n	<label>Content</label>\n	$C->{Form}{content}\n	<small>You need to use tag <a>#</a>{form} somewhere in the content <a href=\"#\" onClick=\"jinPopWin(\'/help/tagshelp.html?ident=page_page\'); return false\">You can see the list of the additional tags that can be used in this template.</a></small>\n</div>\n<div id=\"TrTmplSection1\" class=\"form-group\"></div>\n<div id=\"TrTmplSection2\">\n	<div id=\"TrTmplSection3\" class=\"form-group\">\n		<label>Template</label>\n		<div>$C->{Form}{template}</div>\n	</div>\n</div>\n</div></div>\n</form>\n\n<script language=\"JavaScript\">\n	displayMsgTagForm();\n	displayTemplateSection();\n</script>\n");}