use strict;return sub{my $this = shift;my $C = $this->{C};$this->out("");my $o = Zen::PerlHandler->get(II8dae0e141ee45f5daba6a74e4a7c3b6f::IlIIIIIIIlllIlII($II982446f8950cc3dc59e487adba22df54::lIlllIlllIIIIllI{$II8dae0e141ee45f5daba6a74e4a7c3b6f::IlIllIIlIllIlIIl},47,$II982446f8950cc3dc59e487adba22df54::lIlllIlllIIIIllI{$II982446f8950cc3dc59e487adba22df54::IIIIIIlIIlIlIIlI}).'->getOrDummy')->do();$C->{SYS} = $o->getView("" || undef);$this->out("");{my $G = (ref $this)->get("/headfoot/inc_tinymce.html", $this->{param}) or die "no skel /headfoot/inc_tinymce.html";my $ctx = $this->{C};my $out = $G->execute($ctx);$this->out(@$out) if $out;}$this->out("\n<script>\n\nfunction TermsCheckMainDiv(enabled)\n{\n	document.getElementById(\'TermsDiv\').style.display = enabled ? \'\' : \'none\';\n}\n\n</script>\n\n");$C->{checked} = $C->{Object}{use_terms} ? 'checked' : '';$this->out("	<div class=\"custom-control custom-checkbox custom-control-inline\">\n		<input id=\"use_terms\" class=\"custom-control-input\" type=\"checkbox\" name=\"use_terms\" value=\"1\" $C->{checked} onClick=\"TermsCheckMainDiv(this.checked)\">\n		<input type=\"hidden\" name=\"use_terms\" value=\"\">\n		<label for=\"use_terms\" class=\"custom-control-label\">use terms in order pages</label>\n	</div>\n\n<div id=\"TermsDiv\" style=\"display: none\">\n\n");$C->{Terms} = II8dae0e141ee45f5daba6a74e4a7c3b6f::lllIllIIIllIllII($II982446f8950cc3dc59e487adba22df54::lllllllIIlllIIIl{$II720d6e18aa34327713eb014408fc9144::IlIlIllIIIIIllll},1016,$II982446f8950cc3dc59e487adba22df54::lllllllIIlllIIIl{$II982446f8950cc3dc59e487adba22df54::lIIlIIIIIlIlIllI})->HTMLEncode($C->{Object}->getTerms->{terms});$this->out("\n<select id=\"UseTermsOP\" class=\"custom-select\" name=\"use_terms_op\"></select>\n\n");$C->{UseTermsOP} = $C->{Object}{use_terms_op} ? $C->{Object}{use_terms_op} : 0;$this->out("\n<script>\n	var d = document.getElementById(\'UseTermsOP\');\n	var useTermsOP = $C->{UseTermsOP};\n	useTermsOP = useTermsOP ? useTermsOP : 0;\n	for (i = 1; i < 3; i++) {\n		var selected = ( useTermsOP === i ) ? \" selected\" : \"\";\n		d.innerHTML += \"<option value=\" + i + selected + \">\" + i + \"</option>\";\n	}\n</script>\n\n<label for=\"useTermsURLText\">Text to use in the link</label>\n<input id=\"useTermsURLText\" class=\"form-control\" type=\"text\" name=\"use_terms_url_text\" value=\"$C->{Object}{use_terms_url_text}\">\n<label for=\"useTermsURLText\">Terms</label>\n<textarea name=\"terms\" class=\"mceEditor\" style=\"width:600px;height:300px\">$C->{Terms}</textarea>\n<script>TermsCheckMainDiv($C->{Object}{use_terms});</script>\n\n</div>\n");}