use strict;return sub{my $this = shift;my $C = $this->{C};$this->out("");if ( $C->{Form}{errors} ) {$this->out("	<div class=\"card mb-4 py-3 border-left-danger\"><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></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=cgi_ret value=\"$C->{INPUT}{cgi_ret}\">\n<input type=hidden name=\"js_receiver\" value=\"$C->{INPUT}{js_receiver}\">\n<input type=hidden name=TabAct>\n<input type=hidden name=ObjectID value=\"$C->{INPUT}{ObjectID}\">\n<input type=hidden name=TabCustom1 value=\"$C->{INPUT}{TabCustom1}\">\n<input type=hidden name=TabCustom2 value=\"$C->{INPUT}{TabCustom2}\">\n<input type=hidden name=TabCustom3 value=\"$C->{INPUT}{TabCustom3}\">\n\n\n	<div class=\"card shadow mb-4\"> <div class=\"card-header py-3\"> <h6 class=\"m-0 font-weight-bold text-primary\">\n");if ( $C->{View}{stored} ) {$this->out("			Edit Survey (#$C->{View}{ID})\n");} else {$this->out("			Adding new Survey\n");}$this->out("	</h6>\n</div>\n\n\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("		</div>\n	</div>\n\n	<div class=\"form-group row\"><label class=\"col-sm-12 col-md-4 col-form-label\"><b style=\"color: red\">*</b> Title</label>\n		<div class=\"col-sm-12 col-md-8\">$C->{Form}{title}</div>\n</div>\n\n	<div class=\"form-group row\"><label class=\"col-sm-12 col-md-4 col-form-label\">Allow only selected admin userssto see the collected data</label>\n	<div class=\"col-sm-12 col-md-8\">$C->{Form}{user_acl}</div>\n</div>\n\n	<div class=\"form-group row\"><label class=\"col-sm-12 col-md-4 col-form-label\">Introductory HTML messages(displayed on the first page)</label>\n	<div class=\"col-sm-12 col-md-8\">$C->{Form}{intro_html}</div>\n</div>\n\n	<div class=\"form-group row\"><label class=\"col-sm-12 col-md-4 col-form-label\">Redirect to the URLsafter the form is filled</label>\n	<div class=\"col-sm-12 col-md-8\">$C->{Form}{return_url}</div>\n</div>\n\n	<div class=\"form-group row\"><label class=\"col-sm-12 col-md-4 col-form-label\">Display HTML messagesafter the form is filled</label>\n	<div class=\"col-sm-12 col-md-8\">$C->{Form}{return_html}</div>\n</div>\n\n	<div class=\"form-group row\"><label class=\"col-sm-12 col-md-4 col-form-label\">Password protection</label>\n	<div class=\"col-sm-12 col-md-8\">$C->{Form}{password}s<span style=\"font-size:90\%\">Users will have to enter this password on the first page of the Survey, so you may want to put all questions on the 2nd and other pages, and leave only introductory text and password prompt on the 1st page</span></div>\n</div>\n\n	<div class=\"form-group row\"><label class=\"col-sm-12 col-md-4 col-form-label\">CAPTCHA</label>\n	<div class=\"col-sm-12 col-md-8\">$C->{Form}{use_captcha} enable CAPTCHA for this Survey</div>\n</div>\n\n	<div class=\"form-group row\"><label class=\"col-sm-12 col-md-4 col-form-label\">Rotating Surveys</label>\n	<div class=\"col-sm-12 col-md-8\">Archive answered Survey after $C->{Form}{archive_after} days after submission and allow users to submit the same Survey again (enter 0 days to disable this feature)</div>\n</div>\n\nYou can use tag <b>#</b><b>{SURVEY$C->{Object}{id}}</b> to include this survey on the thank you page or on a Funnels page\n\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("			</div>\n		</div>\n\n</div></div>\n</form>\n");}