<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @UVDeskSupportCenter/Knowledgebase/ticket.html.twig */
class __TwigTemplate_6ce1bc886a3354754c177acc91477a77 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'ogtitle' => [$this, 'block_ogtitle'],
'twtitle' => [$this, 'block_twtitle'],
'metaDescription' => [$this, 'block_metaDescription'],
'metaKeywords' => [$this, 'block_metaKeywords'],
'body' => [$this, 'block_body'],
'footer' => [$this, 'block_footer'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@UVDeskSupportCenter/Templates/layout.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@UVDeskSupportCenter/Knowledgebase/ticket.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@UVDeskSupportCenter/Knowledgebase/ticket.html.twig"));
// line 8
$context["recaptchaDetail"] = twig_get_attribute($this->env, $this->source, (isset($context["recaptcha_service"]) || array_key_exists("recaptcha_service", $context) ? $context["recaptcha_service"] : (function () { throw new RuntimeError('Variable "recaptcha_service" does not exist.', 8, $this->source); })()), "getRecaptchaDetails", [], "method", false, false, false, 8);
// line 1
$this->parent = $this->loadTemplate("@UVDeskSupportCenter/Templates/layout.html.twig", "@UVDeskSupportCenter/Knowledgebase/ticket.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 2
public function block_title($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Create Ticket", [], "messages");
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 3
public function block_ogtitle($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "ogtitle"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "ogtitle"));
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Create Ticket", [], "messages");
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 4
public function block_twtitle($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "twtitle"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "twtitle"));
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Create Ticket", [], "messages");
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 5
public function block_metaDescription($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "metaDescription"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "metaDescription"));
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("create.ticket.metaDescription", [], "messages");
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 6
public function block_metaKeywords($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "metaKeywords"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "metaKeywords"));
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("create.ticket.metaKeywords", [], "messages");
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 10
public function block_body($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 11
echo "\t<style>
\t\t.uv-field{
\t\t\tpadding: 5px 10px;
\t\t}
\t\t.grammarly-fix-message-container {
\t\t\toverflow: visible !important;
\t\t}
\t\t.grammarly-fix-message {
\t\t\tmax-width: 158%;
\t\t}
\t\t.uv-field-success-icon {
\t\t\tdisplay: none !important;
\t\t}
\t\t.mce-path {
\t\tdisplay: none !important;
\t\t}
\t\t
\t\t.uv-element-block label.uv-field-label.required::after {
\t\t\tcontent: \"*\";
\t\t\tcolor: #FC6868;
\t\t\tfont-weight: 700;
\t\t\tdisplay: inline-block;
\t\t}
\t</style>
\t";
// line 36
$context["isTicketViewPage"] = ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["app"] ?? null), "user", [], "any", false, true, false, 36), "id", [], "any", true, true, false, 36)) ? (true) : (false));
// line 37
echo "\t
\t<div class=\"uv-paper-article uv-paper-form\">
\t\t<div class=\"uv-paper-section\">
\t\t\t<section>
\t\t\t\t<h1>";
// line 42
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Create Ticket Request"), "html", null, true);
echo "</h1>
\t\t\t\t<div class=\"uv-form\">
\t\t\t\t\t<form action=\"";
// line 45
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_customer_create_ticket");
echo "\" method=\"post\" id=\"create-ticket-form\" enctype=\"multipart/form-data\">
\t\t\t\t\t\t";
// line 46
if ( !(isset($context["isTicketViewPage"]) || array_key_exists("isTicketViewPage", $context) ? $context["isTicketViewPage"] : (function () { throw new RuntimeError('Variable "isTicketViewPage" does not exist.', 46, $this->source); })())) {
// line 47
echo "\t\t\t\t\t\t\t<!-- Field -->
\t\t\t\t\t\t\t<div class=\"uv-element-block\">
\t\t\t\t\t\t\t\t<label class=\"uv-field-label required\">";
// line 49
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Name"), "html", null, true);
echo "</label>
\t\t\t\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t\t\t\t<input name=\"name\" class=\"uv-field create-ticket\" type=\"text\" value=\"";
// line 51
((twig_get_attribute($this->env, $this->source, ($context["post"] ?? null), "name", [], "any", true, true, false, 51)) ? (print (twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["post"]) || array_key_exists("post", $context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.', 51, $this->source); })()), "name", [], "any", false, false, false, 51), "html", null, true))) : (print ("")));
echo "\">
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t<span class=\"uv-field-info\">";
// line 53
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Enter your name"), "html", null, true);
echo "</span>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<!-- //Field -->
\t\t\t\t\t\t\t<!-- Field -->
\t\t\t\t\t\t\t<div class=\"uv-element-block\">
\t\t\t\t\t\t\t\t<label class=\"uv-field-label required\">";
// line 59
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Email"), "html", null, true);
echo "</label>
\t\t\t\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t\t\t\t<input name=\"from\" class=\"uv-field create-ticket\" type=\"text\" value=\"";
// line 61
((twig_get_attribute($this->env, $this->source, ($context["post"] ?? null), "from", [], "any", true, true, false, 61)) ? (print (twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["post"]) || array_key_exists("post", $context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.', 61, $this->source); })()), "from", [], "any", false, false, false, 61), "html", null, true))) : (print ("")));
echo "\">
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t<span class=\"uv-field-info\">";
// line 63
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Enter your email"), "html", null, true);
echo "</span>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<!-- //Field -->
\t\t\t\t\t\t";
}
// line 67
echo "\t\t\t\t\t\t<!-- Field -->
\t\t\t\t\t\t<div class=\"uv-element-block\">
\t\t\t\t\t\t\t<label class=\"uv-field-label required\">";
// line 69
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type"), "html", null, true);
echo "</label>
\t\t\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t\t\t<select name=\"type\" class=\"uv-select create-ticket\" id=\"type\">
\t\t\t\t\t\t\t\t\t<option value=\"\">";
// line 72
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Select type"), "html", null, true);
echo "</option>
\t\t\t\t\t\t\t\t\t";
// line 74
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["ticket_service"]) || array_key_exists("ticket_service", $context) ? $context["ticket_service"] : (function () { throw new RuntimeError('Variable "ticket_service" does not exist.', 74, $this->source); })()), "getTypes", [], "method", false, false, false, 74));
foreach ($context['_seq'] as $context["_key"] => $context["type"]) {
// line 75
echo "\t\t\t\t\t\t\t\t\t\t<option value=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["type"], "id", [], "any", false, false, false, 75), "html", null, true);
echo "\" ";
echo (((twig_get_attribute($this->env, $this->source, ($context["post"] ?? null), "type", [], "any", true, true, false, 75) && (twig_get_attribute($this->env, $this->source, (isset($context["post"]) || array_key_exists("post", $context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.', 75, $this->source); })()), "type", [], "any", false, false, false, 75) == twig_get_attribute($this->env, $this->source, $context["type"], "id", [], "any", false, false, false, 75)))) ? ("selected") : (""));
echo ">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["type"], "name", [], "any", false, false, false, 75), "html", null, true);
echo "</option>
\t\t\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['type'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 77
echo "\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<span class=\"uv-field-info\">";
// line 79
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Choose ticket type"), "html", null, true);
echo "</span>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<!-- //Field -->
\t\t\t\t\t\t<!-- Field -->
\t\t\t\t\t\t<div class=\"uv-element-block\">
\t\t\t\t\t\t\t<label class=\"uv-field-label required\">";
// line 85
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Subject"), "html", null, true);
echo "</label>
\t\t\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t\t\t<input name=\"subject\" class=\"uv-field create-ticket\" type=\"text\" value=\"";
// line 87
((twig_get_attribute($this->env, $this->source, ($context["post"] ?? null), "subject", [], "any", true, true, false, 87)) ? (print (twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["post"]) || array_key_exists("post", $context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.', 87, $this->source); })()), "subject", [], "any", false, false, false, 87), "html", null, true))) : (print ("")));
echo "\">
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<span class=\"uv-field-info\">";
// line 89
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Ticket subject"), "html", null, true);
echo "</span>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<!-- //Field -->
\t\t\t\t\t\t<!-- Field -->
\t\t\t\t\t\t<div class=\"uv-element-block\">
\t\t\t\t\t\t\t<label class=\"uv-field-label required\">";
// line 95
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Message"), "html", null, true);
echo "</label>
\t\t\t\t\t\t\t<div class=\"uv-field-block grammarly-fix-message-container\">
\t\t\t\t\t\t\t\t<textarea name=\"reply\" id=\"create-reply\" class=\"uv-field create-ticket grammarly-fix-message\" type=\"text\">";
// line 97
((twig_get_attribute($this->env, $this->source, ($context["post"] ?? null), "reply", [], "any", true, true, false, 97)) ? (print (twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["post"]) || array_key_exists("post", $context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.', 97, $this->source); })()), "reply", [], "any", false, false, false, 97), "html", null, true))) : (print ("")));
echo "</textarea>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<span class=\"uv-field-info\">";
// line 99
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Ticket query message"), "html", null, true);
echo "</span>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<!-- //Field -->
\t\t\t\t\t\t<!-- Field -->
\t\t\t\t\t\t<div class=\"uv-element-block attachment-block uv-no-error-success-icon\" id=\"uv-attachment-option\">
\t\t\t\t\t\t\t<label>
\t\t\t\t\t\t\t\t<span class=\"uv-file-label\">";
// line 106
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Add Attachment"), "html", null, true);
echo "</span>
\t\t\t\t\t\t\t</label>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<!-- //Field -->
\t\t\t\t\t\t";
// line 110
if (((isset($context["recaptchaDetail"]) || array_key_exists("recaptchaDetail", $context) ? $context["recaptchaDetail"] : (function () { throw new RuntimeError('Variable "recaptchaDetail" does not exist.', 110, $this->source); })()) && (twig_get_attribute($this->env, $this->source, (isset($context["recaptchaDetail"]) || array_key_exists("recaptchaDetail", $context) ? $context["recaptchaDetail"] : (function () { throw new RuntimeError('Variable "recaptchaDetail" does not exist.', 110, $this->source); })()), "isActive", [], "any", false, false, false, 110) == true))) {
// line 111
echo "\t\t\t\t\t\t\t<div class=\"clearfix\"></div>
\t\t\t\t\t\t\t<div class=\"g-recaptcha\" data-sitekey=\"";
// line 112
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["recaptchaDetail"]) || array_key_exists("recaptchaDetail", $context) ? $context["recaptchaDetail"] : (function () { throw new RuntimeError('Variable "recaptchaDetail" does not exist.', 112, $this->source); })()), "siteKey", [], "any", false, false, false, 112), "html", null, true);
echo "\"></div>
\t\t\t\t\t\t\t<div class=\"clearfix\"></div>
";
} else {
// line 115
echo " <!-- Recaptcha will not support -->
";
}
// line 117
echo "
\t\t\t\t\t\t";
// line 119
echo "\t\t\t\t\t\t";
$context["CustomerCustomFields"] = twig_get_attribute($this->env, $this->source, (isset($context["ticket_service"]) || array_key_exists("ticket_service", $context) ? $context["ticket_service"] : (function () { throw new RuntimeError('Variable "ticket_service" does not exist.', 119, $this->source); })()), "getCustomerCreateTicketCustomFieldSnippet", [], "method", false, false, false, 119);
// line 120
echo "\t\t\t\t\t\t";
$context["removeMe"] = [];
// line 121
echo "\t\t\t\t\t\t";
if ((isset($context["CustomerCustomFields"]) || array_key_exists("CustomerCustomFields", $context) ? $context["CustomerCustomFields"] : (function () { throw new RuntimeError('Variable "CustomerCustomFields" does not exist.', 121, $this->source); })())) {
// line 122
echo "\t\t\t\t\t\t\t<div class=\"custom-fields clearfix\">
\t\t\t\t\t\t\t\t";
// line 123
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["CustomerCustomFields"]) || array_key_exists("CustomerCustomFields", $context) ? $context["CustomerCustomFields"] : (function () { throw new RuntimeError('Variable "CustomerCustomFields" does not exist.', 123, $this->source); })()));
foreach ($context['_seq'] as $context["key"] => $context["customField"]) {
// line 124
echo "\t\t\t\t\t\t\t\t\t<div class=\"uv-element-block input-group ";
echo ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, $context["customField"], "customFieldsDependency", [], "any", false, false, false, 124))) ? ("dependent") : (""));
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["customField"], "customFieldsDependency", [], "any", false, false, false, 124));
foreach ($context['_seq'] as $context["_key"] => $context["customFieldCustomFieldsDependency"]) {
echo " dependency";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["customFieldCustomFieldsDependency"], "id", [], "any", false, false, false, 124), "html", null, true);
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['customFieldCustomFieldsDependency'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
echo "\" style=\"position: relative; ";
echo ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, $context["customField"], "customFieldsDependency", [], "any", false, false, false, 124))) ? ("display: none;") : (""));
echo "\">
\t\t\t\t\t\t\t\t\t\t<label class=\"uv-field-label\" for=\"for";
// line 125
echo twig_escape_filter($this->env, (twig_get_attribute($this->env, $this->source, $context["customField"], "name", [], "any", false, false, false, 125) . twig_get_attribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 125)), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["customField"], "name", [], "any", false, false, false, 125), "html", null, true);
echo "</label>
\t\t\t\t\t\t\t\t\t\t";
// line 126
if ((twig_get_attribute($this->env, $this->source, $context["customField"], "fieldType", [], "any", false, false, false, 126) == "text")) {
// line 127
echo "\t\t\t\t\t\t\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"";
// line 128
((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["customField"], "validation", [], "array", false, true, false, 128), "fieldtype", [], "array", true, true, false, 128)) ? (print (twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["customField"], "validation", [], "array", false, false, false, 128), "fieldtype", [], "array", false, false, false, 128), "html", null, true))) : (print ("text")));
echo "\" name=\"customFields[";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 128), "html", null, true);
echo "]\" class=\"uv-field create-ticket\" value=\"\" ";
echo ((twig_get_attribute($this->env, $this->source, $context["customField"], "required", [], "any", false, false, false, 128)) ? ("required") : (""));
echo " id=\"for";
echo twig_escape_filter($this->env, (twig_get_attribute($this->env, $this->source, $context["customField"], "name", [], "any", false, false, false, 128) . twig_get_attribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 128)), "html", null, true);
echo "\" placeholder=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["customField"], "placeholder", [], "any", false, false, false, 128), "html", null, true);
echo "\">
\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t";
} elseif (twig_in_filter(twig_get_attribute($this->env, $this->source, // line 131
$context["customField"], "fieldType", [], "any", false, false, false, 131), [0 => "date", 1 => "time", 2 => "datetime"])) {
// line 132
echo "\t\t\t\t\t\t\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t\t\t\t\t\t\t<input class=\"uv-field form-control create-ticket uv-date-picker ";
// line 133
if ((twig_get_attribute($this->env, $this->source, $context["customField"], "fieldType", [], "any", false, false, false, 133) == "time")) {
echo "time";
} else {
echo "calendar";
}
echo " uv-header-";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["customField"], "fieldType", [], "any", false, false, false, 133), "html", null, true);
echo "\" type=\"text\" name=\"customFields[";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 133), "html", null, true);
echo "]\" ";
echo ((twig_get_attribute($this->env, $this->source, $context["customField"], "required", [], "any", false, false, false, 133)) ? ("required") : (""));
echo " id=\"for";
echo twig_escape_filter($this->env, (twig_get_attribute($this->env, $this->source, $context["customField"], "name", [], "any", false, false, false, 133) . twig_get_attribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 133)), "html", null, true);
echo "\" value=\"\">
\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t";
} elseif ((twig_get_attribute($this->env, $this->source, // line 135
$context["customField"], "fieldType", [], "any", false, false, false, 135) == "textarea")) {
// line 136
echo "\t\t\t\t\t\t\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t\t\t\t\t\t\t<textarea name=\"customFields[";
// line 137
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 137), "html", null, true);
echo "]\" class=\"uv-field create-ticket\" ";
echo ((twig_get_attribute($this->env, $this->source, $context["customField"], "required", [], "any", false, false, false, 137)) ? ("required") : (""));
echo " id=\"for";
echo twig_escape_filter($this->env, (twig_get_attribute($this->env, $this->source, $context["customField"], "name", [], "any", false, false, false, 137) . twig_get_attribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 137)), "html", null, true);
echo "\"></textarea>
\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t";
} elseif (twig_in_filter(twig_get_attribute($this->env, $this->source, // line 140
$context["customField"], "fieldType", [], "any", false, false, false, 140), [0 => "file"])) {
// line 141
echo "\t\t\t\t\t\t\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"file\" name=\"customFields[";
// line 142
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 142), "html", null, true);
echo "]\" class=\"uv-field create-ticket\" ";
echo ((twig_get_attribute($this->env, $this->source, $context["customField"], "required", [], "any", false, false, false, 142)) ? ("required") : (""));
echo " id=\"for";
echo twig_escape_filter($this->env, (twig_get_attribute($this->env, $this->source, $context["customField"], "name", [], "any", false, false, false, 142) . twig_get_attribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 142)), "html", null, true);
echo "\">
\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t";
} elseif (twig_in_filter(twig_get_attribute($this->env, $this->source, // line 145
$context["customField"], "fieldType", [], "any", false, false, false, 145), [0 => "select"])) {
// line 146
echo "\t\t\t\t\t\t\t\t\t\t\t";
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["customField"], "customFieldValues", [], "any", false, false, false, 146))) {
// line 147
echo "\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t\t\t\t\t\t\t\t<select name=\"customFields[";
// line 148
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 148), "html", null, true);
echo "]\" class=\"uv-select create-ticket\" id=\"for";
echo twig_escape_filter($this->env, (twig_get_attribute($this->env, $this->source, $context["customField"], "name", [], "any", false, false, false, 148) . twig_get_attribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 148)), "html", null, true);
echo "\" ";
echo ((twig_get_attribute($this->env, $this->source, $context["customField"], "required", [], "any", false, false, false, 148)) ? ("required") : (""));
echo ">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"\">";
// line 149
echo "Select option";
echo "</option>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 150
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["customField"], "customFieldValues", [], "any", false, false, false, 150));
foreach ($context['_seq'] as $context["_key"] => $context["customFieldValues"]) {
// line 151
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["customFieldValues"], "id", [], "any", false, false, false, 151), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["customFieldValues"], "name", [], "any", false, false, false, 151), "html", null, true);
echo "</option>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['customFieldValues'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 153
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t";
} else {
// line 156
echo "\t\t\t\t\t\t\t\t\t\t\t\t<!--Hide this beacause choices aren't available-->
\t\t\t\t\t\t\t\t\t\t\t\t";
// line 157
$context["removeMe"] = twig_array_merge((isset($context["removeMe"]) || array_key_exists("removeMe", $context) ? $context["removeMe"] : (function () { throw new RuntimeError('Variable "removeMe" does not exist.', 157, $this->source); })()), [0 => (("for" . twig_get_attribute($this->env, $this->source, $context["customField"], "name", [], "any", false, false, false, 157)) . twig_get_attribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 157))]);
// line 158
echo "\t\t\t\t\t\t\t\t\t\t\t";
}
// line 159
echo "
\t\t\t\t\t\t\t\t\t\t";
} elseif (twig_in_filter(twig_get_attribute($this->env, $this->source, // line 160
$context["customField"], "fieldType", [], "any", false, false, false, 160), [0 => "checkbox"])) {
// line 161
echo "\t\t\t\t\t\t\t\t\t\t\t";
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["customField"], "customFieldValues", [], "any", false, false, false, 161))) {
// line 162
echo "\t\t\t\t\t\t\t\t\t\t\t\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["customField"], "customFieldValues", [], "any", false, false, false, 162));
foreach ($context['_seq'] as $context["_key"] => $context["customFieldValues"]) {
// line 163
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"uv-split-field\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"uv-checkbox\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"customFields[";
// line 166
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 166), "html", null, true);
echo "][]\" value=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["customFieldValues"], "id", [], "any", false, false, false, 166), "html", null, true);
echo "\" id=\"for";
echo twig_escape_filter($this->env, (twig_get_attribute($this->env, $this->source, $context["customFieldValues"], "name", [], "any", false, false, false, 166) . twig_get_attribute($this->env, $this->source, $context["customFieldValues"], "id", [], "any", false, false, false, 166)), "html", null, true);
echo "\" class=\"create-ticket\"/>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"uv-checkbox-view\"></span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"uv-radio-label\" for=\"for";
// line 169
echo twig_escape_filter($this->env, (twig_get_attribute($this->env, $this->source, $context["customFieldValues"], "name", [], "any", false, false, false, 169) . twig_get_attribute($this->env, $this->source, $context["customFieldValues"], "id", [], "any", false, false, false, 169)), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["customFieldValues"], "name", [], "any", false, false, false, 169), "html", null, true);
echo "</span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t</label>
\t\t\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['customFieldValues'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 173
echo "\t\t\t\t\t\t\t\t\t\t\t";
} else {
// line 174
echo "\t\t\t\t\t\t\t\t\t\t\t\t<!--Hide this beacause choices aren't available-->
\t\t\t\t\t\t\t\t\t\t\t\t";
// line 175
$context["removeMe"] = twig_array_merge((isset($context["removeMe"]) || array_key_exists("removeMe", $context) ? $context["removeMe"] : (function () { throw new RuntimeError('Variable "removeMe" does not exist.', 175, $this->source); })()), [0 => (("for" . twig_get_attribute($this->env, $this->source, $context["customField"], "name", [], "any", false, false, false, 175)) . twig_get_attribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 175))]);
// line 176
echo "\t\t\t\t\t\t\t\t\t\t\t";
}
// line 177
echo "
\t\t\t\t\t\t\t\t\t\t";
} elseif (twig_in_filter(twig_get_attribute($this->env, $this->source, // line 178
$context["customField"], "fieldType", [], "any", false, false, false, 178), [0 => "radio"])) {
// line 179
echo "\t\t\t\t\t\t\t\t\t\t\t";
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["customField"], "customFieldValues", [], "any", false, false, false, 179))) {
// line 180
echo "\t\t\t\t\t\t\t\t\t\t\t\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["customField"], "customFieldValues", [], "any", false, false, false, 180));
foreach ($context['_seq'] as $context["_key"] => $context["customFieldValues"]) {
// line 181
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"uv-split-field\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"uv-radio\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"customFields[";
// line 184
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 184), "html", null, true);
echo "]\" value=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["customFieldValues"], "id", [], "any", false, false, false, 184), "html", null, true);
echo "\" id=\"for";
echo twig_escape_filter($this->env, (twig_get_attribute($this->env, $this->source, $context["customFieldValues"], "name", [], "any", false, false, false, 184) . twig_get_attribute($this->env, $this->source, $context["customFieldValues"], "id", [], "any", false, false, false, 184)), "html", null, true);
echo "\" class=\"create-ticket\"/>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"uv-radio-view\"></span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"uv-radio-label\" for=\"for";
// line 187
echo twig_escape_filter($this->env, (twig_get_attribute($this->env, $this->source, $context["customFieldValues"], "name", [], "any", false, false, false, 187) . twig_get_attribute($this->env, $this->source, $context["customFieldValues"], "id", [], "any", false, false, false, 187)), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["customFieldValues"], "name", [], "any", false, false, false, 187), "html", null, true);
echo "</span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t</label>
\t\t\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['customFieldValues'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 191
echo "\t\t\t\t\t\t\t\t\t\t\t";
} else {
// line 192
echo "\t\t\t\t\t\t\t\t\t\t\t\t<!--Hide this beacause choices aren't available-->
\t\t\t\t\t\t\t\t\t\t\t\t";
// line 193
$context["removeMe"] = twig_array_merge((isset($context["removeMe"]) || array_key_exists("removeMe", $context) ? $context["removeMe"] : (function () { throw new RuntimeError('Variable "removeMe" does not exist.', 193, $this->source); })()), [0 => (("for" . twig_get_attribute($this->env, $this->source, $context["customField"], "name", [], "any", false, false, false, 193)) . twig_get_attribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 193))]);
// line 194
echo "\t\t\t\t\t\t\t\t\t\t\t";
}
// line 195
echo "
\t\t\t\t\t\t\t\t\t\t";
}
// line 197
echo "\t\t\t\t\t\t\t\t\t\t";
if (twig_get_attribute($this->env, $this->source, ($context["formErrors"] ?? null), (("customFields[" . twig_get_attribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 197)) . "]"), [], "array", true, true, false, 197)) {
// line 198
echo "\t\t\t\t\t\t\t\t\t\t\t<div class=\"text-danger\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["formErrors"]) || array_key_exists("formErrors", $context) ? $context["formErrors"] : (function () { throw new RuntimeError('Variable "formErrors" does not exist.', 198, $this->source); })()), (("customFields[" . twig_get_attribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 198)) . "]"), [], "array", false, false, false, 198), "html", null, true);
echo "</div>
\t\t\t\t\t\t\t\t\t\t";
}
// line 200
echo "\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['key'], $context['customField'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 202
echo "\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t";
}
// line 204
echo "
\t\t\t\t\t\t<div class=\"uv-element-block\">
\t\t\t\t\t\t\t<button type=\"submit\" id=\"create-ticket-btn\" class=\"uv-btn\">";
// line 206
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Create Ticket"), "html", null, true);
echo "</button>
\t\t\t\t\t\t</div>
\t\t\t\t\t</form>
\t\t\t\t</div>
\t\t\t</section>
\t\t</div>
\t</div>
\t";
// line 214
if (twig_get_attribute($this->env, $this->source, (isset($context["user_service"]) || array_key_exists("user_service", $context) ? $context["user_service"] : (function () { throw new RuntimeError('Variable "user_service" does not exist.', 214, $this->source); })()), "isfileExists", [0 => "apps/uvdesk/form-component"], "method", false, false, false, 214)) {
// line 215
echo "\t\t";
echo twig_include($this->env, $context, "@_uvdesk_extension_uvdesk_form_component/CustomFields/customFieldValidation.html.twig");
echo "
\t";
} elseif (twig_get_attribute($this->env, $this->source, // line 216
(isset($context["user_service"]) || array_key_exists("user_service", $context) ? $context["user_service"] : (function () { throw new RuntimeError('Variable "user_service" does not exist.', 216, $this->source); })()), "isfileExists", [0 => "apps/uvdesk/custom-fields"], "method", false, false, false, 216)) {
// line 217
echo "\t\t";
echo twig_include($this->env, $context, "@_uvdesk_extension_uvdesk_custom_fields/CustomFields/customFieldValidation.html.twig");
echo "
\t";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 221
public function block_footer($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "footer"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "footer"));
// line 222
echo "
\t";
// line 223
$context["isTicketViewPage"] = ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["app"] ?? null), "user", [], "any", false, true, false, 223), "id", [], "any", true, true, false, 223)) ? (true) : (false));
// line 224
echo "\t";
$this->displayParentBlock("footer", $context, $blocks);
echo "
\t";
// line 226
if (((isset($context["recaptchaDetail"]) || array_key_exists("recaptchaDetail", $context) ? $context["recaptchaDetail"] : (function () { throw new RuntimeError('Variable "recaptchaDetail" does not exist.', 226, $this->source); })()) && (twig_get_attribute($this->env, $this->source, (isset($context["recaptchaDetail"]) || array_key_exists("recaptchaDetail", $context) ? $context["recaptchaDetail"] : (function () { throw new RuntimeError('Variable "recaptchaDetail" does not exist.', 226, $this->source); })()), "isActive", [], "any", false, false, false, 226) == true))) {
// line 227
echo " <script src='https://www.google.com/recaptcha/api.js'></script>
";
}
// line 229
echo " ";
echo twig_include($this->env, $context, "@UVDeskSupportCenter/Templates/tinyMCE.html.twig");
echo "
\t";
// line 230
echo twig_include($this->env, $context, "@UVDeskCoreFramework/Templates/attachment.html.twig");
echo "
\t<script type=\"text/javascript\">
\t";
// line 233
if ((twig_get_attribute($this->env, $this->source, (isset($context["user_service"]) || array_key_exists("user_service", $context) ? $context["user_service"] : (function () { throw new RuntimeError('Variable "user_service" does not exist.', 233, $this->source); })()), "isfileExists", [0 => "apps/uvdesk/form-component"], "method", false, false, false, 233) == false)) {
// line 234
echo "\tcustomFieldValidation = {};
\t";
}
// line 236
echo "\t\t\$(function () {
\t\tsfTinyMce.init({
height: '155px',
\t\t\tselector : '#create-reply',
\t\t\timages_upload_url: \"\",
setup: function(editor) {
},
\t\t\tplugins: [
],
\t\t\ttoolbar: '| undo redo | bold italic forecolor ',
\t\t});
\t\t\t";
// line 247
if (array_key_exists("removeMe", $context)) {
// line 248
echo "\t\t\t\t\$.each(";
echo json_encode((isset($context["removeMe"]) || array_key_exists("removeMe", $context) ? $context["removeMe"] : (function () { throw new RuntimeError('Variable "removeMe" does not exist.', 248, $this->source); })()));
echo ", function(key, value){
\t\t\t\t\t\$('label[for=\"' + value + '\"]').parent().hide();
\t\t\t\t});
\t\t\t";
}
// line 252
echo "\t\t\t\$('.uv-header-date').datetimepicker({
\tformat: 'YYYY-MM-DD',
\t});
\t\$('.uv-header-time').datetimepicker({
\tformat: 'LT',
\t});
\t\$('.uv-header-datetime').datetimepicker({
\tformat: 'YYYY-MM-DD H:m:s'
\t});
\t\t\tvar CreateTicketModel = Backbone.Model.extend({
\t\t\t\tidAttribute : \"id\",
\t\t\t\tdefaults : {
\t\t\t\t\tpath : \"\",
\t\t\t\t},
\t\t\t\tvalidation: _.extend(customFieldValidation, {
\t\t\t\t\t";
// line 267
if ( !(isset($context["isTicketViewPage"]) || array_key_exists("isTicketViewPage", $context) ? $context["isTicketViewPage"] : (function () { throw new RuntimeError('Variable "isTicketViewPage" does not exist.', 267, $this->source); })())) {
// line 268
echo "\t\t\t\t\t\t'name' : {
\t\t\t\t\t\t\trequired : true,
\t\t\t\t\t\t\tmsg : '";
// line 270
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html", null, true);
echo "'
\t\t\t\t\t\t},
\t\t\t\t\t\t'from' :
\t\t\t\t\t\t[{
\t\t\t\t\t\t\trequired : true,
\t\t\t\t\t\t\tmsg : '";
// line 275
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html", null, true);
echo "'
\t\t\t\t\t\t},{
\t\t\t\t\t\t\tpattern : 'email',
\t\t\t\t\t\t\tmsg : '";
// line 278
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Email address is invalid"), "html", null, true);
echo "'
\t\t\t\t\t\t}],
\t\t\t\t\t";
}
// line 281
echo "\t\t\t\t\t'type' : {
\t\t\t\t\t\trequired : true,
\t\t\t\t\t\tmsg : '";
// line 283
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html", null, true);
echo "'
\t\t\t\t\t},
\t\t\t\t\t'subject' : {
\t\t\t\t\t\trequired : true,
\t\t\t\t\t\tmsg : '";
// line 287
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html", null, true);
echo "'
\t\t\t\t\t},
\t\t\t\t\t'reply' : {
\t\t\t\t\t\tfn: function(value) {
if(!tinyMCE.get(\"uv-edit-create-thread\"))
return false;
var html = tinyMCE.get(\"uv-edit-create-thread\").getContent();
if(app.appView.stripHTML(html) != '') {
return false;
}
return true;
},
\t\t\t\t\t\tmsg : '";
// line 299
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html", null, true);
echo "'
\t\t\t\t\t},
\t\t\t\t\t";
// line 301
if (((isset($context["recaptchaDetail"]) || array_key_exists("recaptchaDetail", $context) ? $context["recaptchaDetail"] : (function () { throw new RuntimeError('Variable "recaptchaDetail" does not exist.', 301, $this->source); })()) && (twig_get_attribute($this->env, $this->source, (isset($context["recaptchaDetail"]) || array_key_exists("recaptchaDetail", $context) ? $context["recaptchaDetail"] : (function () { throw new RuntimeError('Variable "recaptchaDetail" does not exist.', 301, $this->source); })()), "isActive", [], "any", false, false, false, 301) == true))) {
// line 302
echo " 'g-recaptcha-response' : {
fn: function(value) {
if(grecaptcha.getResponse().length > 0)
return false;
else
return true;
},
msg : '";
// line 309
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Please select CAPTCHA"), "html", null, true);
echo "'
}
\t\t\t\t ";
}
// line 312
echo "\t\t\t\t}),
\t\t\t\turlRoot : \"";
// line 313
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_customer_create_ticket");
echo "\"
\t\t\t});
\t\t\tvar CreateTicketForm = Backbone.View.extend({
\t\t\t\tinitialize : function() {
\t\t\t\t\tBackbone.Validation.bind(this);
\t\t\t\t\tvar jsonContext = JSON.parse('";
// line 318
echo ((array_key_exists("errors", $context)) ? ((isset($context["errors"]) || array_key_exists("errors", $context) ? $context["errors"] : (function () { throw new RuntimeError('Variable "errors" does not exist.', 318, $this->source); })())) : ("{}"));
echo "');
\t\t\t\t\tfor (var field in jsonContext) {
\t\t\t\t\t\tBackbone.Validation.callbacks.invalid(this, field, jsonContext[field], 'input');
\t\t\t\t\t}
\t\t\t\t},
\t\t\t\tevents : {
\t\t\t\t\t'click #create-ticket-btn' : \"saveTicket\",
\t\t\t\t\t'change #type' : \"updateCustomFields\",
\t\t\t\t\t'blur input:not(input[type=file]), textarea, select, checkbox': 'formChanegd',
\t\t\t\t\t'change input[type=file]': 'formChanegd',
\t\t\t\t},
\t\t\t\tformChanegd: function(e) {
\t\t\t\t\tthis.model.set(Backbone.\$(e.currentTarget).attr('name'), Backbone.\$(e.currentTarget).val())
\t\t\t\t\tthis.model.isValid([Backbone.\$(e.currentTarget).attr('name')])
\t\t\t\t},
\t\t\t\tsaveTicket : function (e) {
\t\t\t\t\te.preventDefault();
\t\t\t\t\tvar currentElement = Backbone.\$(e.currentTarget);
\t\t\t\t\tvar data = currentElement.closest('form').serializeObject();
\t\t\t\t\tthis.model.set(data);
\t\t\t\t\tif(this.model.isValid(true)) {
\t\t\t\t\t\t\$('#create-ticket-form').submit();
\t\t\t\t\t\t\$('form').find('#create-ticket-btn').attr('disabled', 'disabled');
\t\t\t\t\t}
\t\t\t\t},
\t\t\t\tupdateCustomFields : function (e) {
\t\t\t\t\tvar dependentFields = e.currentTarget.value;
\t\t\t\t\tthis.\$('.dependent').hide();
\t\t\t\t\tthis.\$('.dependency' + dependentFields).show();
\t\t\t\t}
\t\t\t});
\t\t\tvar createticketForm = new CreateTicketForm({
\t\t\t\tel : \$(\"#create-ticket-form\"),
\t\t\t\tmodel : new CreateTicketModel()
\t\t\t});
\t\t});
\t</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@UVDeskSupportCenter/Knowledgebase/ticket.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 860 => 318, 852 => 313, 849 => 312, 843 => 309, 834 => 302, 832 => 301, 827 => 299, 812 => 287, 805 => 283, 801 => 281, 795 => 278, 789 => 275, 781 => 270, 777 => 268, 775 => 267, 758 => 252, 750 => 248, 748 => 247, 735 => 236, 731 => 234, 729 => 233, 723 => 230, 718 => 229, 714 => 227, 712 => 226, 706 => 224, 704 => 223, 701 => 222, 691 => 221, 677 => 217, 675 => 216, 670 => 215, 668 => 214, 657 => 206, 653 => 204, 649 => 202, 642 => 200, 636 => 198, 633 => 197, 629 => 195, 626 => 194, 624 => 193, 621 => 192, 618 => 191, 606 => 187, 596 => 184, 591 => 181, 586 => 180, 583 => 179, 581 => 178, 578 => 177, 575 => 176, 573 => 175, 570 => 174, 567 => 173, 555 => 169, 545 => 166, 540 => 163, 535 => 162, 532 => 161, 530 => 160, 527 => 159, 524 => 158, 522 => 157, 519 => 156, 514 => 153, 503 => 151, 499 => 150, 495 => 149, 487 => 148, 484 => 147, 481 => 146, 479 => 145, 469 => 142, 466 => 141, 464 => 140, 454 => 137, 451 => 136, 449 => 135, 432 => 133, 429 => 132, 427 => 131, 413 => 128, 410 => 127, 408 => 126, 402 => 125, 385 => 124, 381 => 123, 378 => 122, 375 => 121, 372 => 120, 369 => 119, 366 => 117, 362 => 115, 356 => 112, 353 => 111, 351 => 110, 344 => 106, 334 => 99, 329 => 97, 324 => 95, 315 => 89, 310 => 87, 305 => 85, 296 => 79, 292 => 77, 279 => 75, 275 => 74, 270 => 72, 264 => 69, 260 => 67, 253 => 63, 248 => 61, 243 => 59, 234 => 53, 229 => 51, 224 => 49, 220 => 47, 218 => 46, 214 => 45, 208 => 42, 201 => 37, 199 => 36, 172 => 11, 162 => 10, 143 => 6, 124 => 5, 105 => 4, 86 => 3, 67 => 2, 56 => 1, 54 => 8, 41 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends \"@UVDeskSupportCenter/Templates/layout.html.twig\" %}
{% block title %}{% trans %}Create Ticket{% endtrans %}{% endblock %}
{% block ogtitle %}{% trans %}Create Ticket{% endtrans %}{% endblock %}
{% block twtitle %}{% trans %}Create Ticket{% endtrans %}{% endblock %}
{% block metaDescription %}{% trans %}create.ticket.metaDescription{% endtrans %}{% endblock %}
{% block metaKeywords %}{% trans %}create.ticket.metaKeywords{% endtrans %}{% endblock %}
{% set recaptchaDetail = recaptcha_service.getRecaptchaDetails() %}
{% block body %}
\t<style>
\t\t.uv-field{
\t\t\tpadding: 5px 10px;
\t\t}
\t\t.grammarly-fix-message-container {
\t\t\toverflow: visible !important;
\t\t}
\t\t.grammarly-fix-message {
\t\t\tmax-width: 158%;
\t\t}
\t\t.uv-field-success-icon {
\t\t\tdisplay: none !important;
\t\t}
\t\t.mce-path {
\t\tdisplay: none !important;
\t\t}
\t\t
\t\t.uv-element-block label.uv-field-label.required::after {
\t\t\tcontent: \"*\";
\t\t\tcolor: #FC6868;
\t\t\tfont-weight: 700;
\t\t\tdisplay: inline-block;
\t\t}
\t</style>
\t{% set isTicketViewPage = (app.user.id is defined ? true : false) %}
\t
\t<div class=\"uv-paper-article uv-paper-form\">
\t\t<div class=\"uv-paper-section\">
\t\t\t<section>
\t\t\t\t<h1>{{ 'Create Ticket Request'|trans }}</h1>
\t\t\t\t<div class=\"uv-form\">
\t\t\t\t\t<form action=\"{{ path('helpdesk_customer_create_ticket') }}\" method=\"post\" id=\"create-ticket-form\" enctype=\"multipart/form-data\">
\t\t\t\t\t\t{% if not isTicketViewPage %}
\t\t\t\t\t\t\t<!-- Field -->
\t\t\t\t\t\t\t<div class=\"uv-element-block\">
\t\t\t\t\t\t\t\t<label class=\"uv-field-label required\">{{ 'Name'|trans }}</label>
\t\t\t\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t\t\t\t<input name=\"name\" class=\"uv-field create-ticket\" type=\"text\" value=\"{{ post.name is defined ? post.name : '' }}\">
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t<span class=\"uv-field-info\">{{ 'Enter your name'|trans }}</span>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<!-- //Field -->
\t\t\t\t\t\t\t<!-- Field -->
\t\t\t\t\t\t\t<div class=\"uv-element-block\">
\t\t\t\t\t\t\t\t<label class=\"uv-field-label required\">{{ 'Email'|trans }}</label>
\t\t\t\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t\t\t\t<input name=\"from\" class=\"uv-field create-ticket\" type=\"text\" value=\"{{ post.from is defined ? post.from : '' }}\">
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t<span class=\"uv-field-info\">{{ 'Enter your email'|trans }}</span>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<!-- //Field -->
\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t<!-- Field -->
\t\t\t\t\t\t<div class=\"uv-element-block\">
\t\t\t\t\t\t\t<label class=\"uv-field-label required\">{{ 'Type'|trans }}</label>
\t\t\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t\t\t<select name=\"type\" class=\"uv-select create-ticket\" id=\"type\">
\t\t\t\t\t\t\t\t\t<option value=\"\">{{ 'Select type'|trans }}</option>
\t\t\t\t\t\t\t\t\t{% for type in ticket_service.getTypes() %}
\t\t\t\t\t\t\t\t\t\t<option value=\"{{ type.id }}\" {{ post.type is defined and post.type == type.id ? 'selected' : '' }}>{{ type.name }}</option>
\t\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<span class=\"uv-field-info\">{{ 'Choose ticket type'|trans }}</span>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<!-- //Field -->
\t\t\t\t\t\t<!-- Field -->
\t\t\t\t\t\t<div class=\"uv-element-block\">
\t\t\t\t\t\t\t<label class=\"uv-field-label required\">{{ 'Subject'|trans }}</label>
\t\t\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t\t\t<input name=\"subject\" class=\"uv-field create-ticket\" type=\"text\" value=\"{{ post.subject is defined ? post.subject : '' }}\">
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<span class=\"uv-field-info\">{{ 'Ticket subject'|trans }}</span>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<!-- //Field -->
\t\t\t\t\t\t<!-- Field -->
\t\t\t\t\t\t<div class=\"uv-element-block\">
\t\t\t\t\t\t\t<label class=\"uv-field-label required\">{{ 'Message'|trans }}</label>
\t\t\t\t\t\t\t<div class=\"uv-field-block grammarly-fix-message-container\">
\t\t\t\t\t\t\t\t<textarea name=\"reply\" id=\"create-reply\" class=\"uv-field create-ticket grammarly-fix-message\" type=\"text\">{{ post.reply is defined ? post.reply : '' }}</textarea>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<span class=\"uv-field-info\">{{ 'Ticket query message'|trans }}</span>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<!-- //Field -->
\t\t\t\t\t\t<!-- Field -->
\t\t\t\t\t\t<div class=\"uv-element-block attachment-block uv-no-error-success-icon\" id=\"uv-attachment-option\">
\t\t\t\t\t\t\t<label>
\t\t\t\t\t\t\t\t<span class=\"uv-file-label\">{{ 'Add Attachment'|trans }}</span>
\t\t\t\t\t\t\t</label>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<!-- //Field -->
\t\t\t\t\t\t{% if recaptchaDetail and recaptchaDetail.isActive == true %}
\t\t\t\t\t\t\t<div class=\"clearfix\"></div>
\t\t\t\t\t\t\t<div class=\"g-recaptcha\" data-sitekey=\"{{ recaptchaDetail.siteKey }}\"></div>
\t\t\t\t\t\t\t<div class=\"clearfix\"></div>
{% else %}
<!-- Recaptcha will not support -->
{% endif %}
\t\t\t\t\t\t{# CustomFields #}
\t\t\t\t\t\t{% set CustomerCustomFields = ticket_service.getCustomerCreateTicketCustomFieldSnippet() %}
\t\t\t\t\t\t{% set removeMe = [] %}
\t\t\t\t\t\t{% if CustomerCustomFields %}
\t\t\t\t\t\t\t<div class=\"custom-fields clearfix\">
\t\t\t\t\t\t\t\t{% for key, customField in CustomerCustomFields %}
\t\t\t\t\t\t\t\t\t<div class=\"uv-element-block input-group {{ customField.customFieldsDependency|length ? 'dependent' : '' }} {% for customFieldCustomFieldsDependency in customField.customFieldsDependency %} dependency{{customFieldCustomFieldsDependency.id}}{% endfor %}\" style=\"position: relative; {{ customField.customFieldsDependency|length ? 'display: none;' : '' }}\">
\t\t\t\t\t\t\t\t\t\t<label class=\"uv-field-label\" for=\"for{{customField.name~customField.id}}\">{{ customField.name }}</label>
\t\t\t\t\t\t\t\t\t\t{% if customField.fieldType == 'text' %}
\t\t\t\t\t\t\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"{{ customField['validation']['fieldtype'] is defined ? customField['validation']['fieldtype'] :'text' }}\" name=\"customFields[{{customField.id}}]\" class=\"uv-field create-ticket\" value=\"\" {{ customField.required ? \"required\" : \"\" }} id=\"for{{customField.name~customField.id}}\" placeholder=\"{{customField.placeholder}}\">
\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t{% elseif customField.fieldType in ['date', 'time', 'datetime'] %}
\t\t\t\t\t\t\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t\t\t\t\t\t\t<input class=\"uv-field form-control create-ticket uv-date-picker {% if customField.fieldType == 'time' %}time{% else %}calendar{% endif %} uv-header-{{ customField.fieldType }}\" type=\"text\" name=\"customFields[{{customField.id}}]\" {{ customField.required ? \"required\" : \"\" }} id=\"for{{customField.name~customField.id}}\" value=\"\">
\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t{% elseif customField.fieldType == 'textarea' %}
\t\t\t\t\t\t\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t\t\t\t\t\t\t<textarea name=\"customFields[{{customField.id}}]\" class=\"uv-field create-ticket\" {{ customField.required ? \"required\" : \"\" }} id=\"for{{customField.name~customField.id}}\"></textarea>
\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t{% elseif customField.fieldType in ['file'] %}
\t\t\t\t\t\t\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"file\" name=\"customFields[{{customField.id}}]\" class=\"uv-field create-ticket\" {{ customField.required ? \"required\" : \"\" }} id=\"for{{customField.name~customField.id}}\">
\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t{% elseif customField.fieldType in ['select'] %}
\t\t\t\t\t\t\t\t\t\t\t{% if customField.customFieldValues is not empty %}
\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t\t\t\t\t\t\t\t<select name=\"customFields[{{customField.id}}]\" class=\"uv-select create-ticket\" id=\"for{{customField.name~customField.id}}\" {{ customField.required ? \"required\" : \"\" }}>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"\">{{ 'Select option' }}</option>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% for customFieldValues in customField.customFieldValues %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"{{customFieldValues.id}}\">{{customFieldValues.name}}</option>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t\t\t\t\t<!--Hide this beacause choices aren't available-->
\t\t\t\t\t\t\t\t\t\t\t\t{% set removeMe = removeMe|merge([\"for\"~customField.name~customField.id]) %}
\t\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t{% elseif customField.fieldType in ['checkbox'] %}
\t\t\t\t\t\t\t\t\t\t\t{% if customField.customFieldValues is not empty %}
\t\t\t\t\t\t\t\t\t\t\t\t{% for customFieldValues in customField.customFieldValues %}
\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"uv-split-field\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"uv-checkbox\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"customFields[{{customField.id}}][]\" value=\"{{customFieldValues.id}}\" id=\"for{{customFieldValues.name~customFieldValues.id}}\" class=\"create-ticket\"/>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"uv-checkbox-view\"></span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"uv-radio-label\" for=\"for{{customFieldValues.name~customFieldValues.id}}\">{{ customFieldValues.name }}</span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t</label>
\t\t\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t\t\t\t\t<!--Hide this beacause choices aren't available-->
\t\t\t\t\t\t\t\t\t\t\t\t{% set removeMe = removeMe|merge([\"for\"~customField.name~customField.id]) %}
\t\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t{% elseif customField.fieldType in ['radio'] %}
\t\t\t\t\t\t\t\t\t\t\t{% if customField.customFieldValues is not empty %}
\t\t\t\t\t\t\t\t\t\t\t\t{% for customFieldValues in customField.customFieldValues %}
\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"uv-split-field\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"uv-radio\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"customFields[{{customField.id}}]\" value=\"{{customFieldValues.id}}\" id=\"for{{customFieldValues.name~customFieldValues.id}}\" class=\"create-ticket\"/>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"uv-radio-view\"></span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"uv-radio-label\" for=\"for{{customFieldValues.name~customFieldValues.id}}\">{{ customFieldValues.name }}</span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t</label>
\t\t\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t\t\t\t\t<!--Hide this beacause choices aren't available-->
\t\t\t\t\t\t\t\t\t\t\t\t{% set removeMe = removeMe|merge([\"for\"~customField.name~customField.id]) %}
\t\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t{% if formErrors['customFields['~customField.id~']'] is defined %}
\t\t\t\t\t\t\t\t\t\t\t<div class=\"text-danger\">{{formErrors['customFields['~customField.id~']']}}</div>
\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t<div class=\"uv-element-block\">
\t\t\t\t\t\t\t<button type=\"submit\" id=\"create-ticket-btn\" class=\"uv-btn\">{{ 'Create Ticket'|trans }}</button>
\t\t\t\t\t\t</div>
\t\t\t\t\t</form>
\t\t\t\t</div>
\t\t\t</section>
\t\t</div>
\t</div>
\t{% if user_service.isfileExists('apps/uvdesk/form-component') %}
\t\t{{ include('@_uvdesk_extension_uvdesk_form_component/CustomFields/customFieldValidation.html.twig') }}
\t{% elseif user_service.isfileExists('apps/uvdesk/custom-fields') %}
\t\t{{ include('@_uvdesk_extension_uvdesk_custom_fields/CustomFields/customFieldValidation.html.twig') }}
\t{% endif %}
{% endblock %}
{% block footer %}
\t{% set isTicketViewPage = (app.user.id is defined ? true : false) %}
\t{{ parent() }}
\t{% if recaptchaDetail and recaptchaDetail.isActive == true %}
<script src='https://www.google.com/recaptcha/api.js'></script>
{% endif %}
{{ include(\"@UVDeskSupportCenter/Templates/tinyMCE.html.twig\") }}
\t{{ include('@UVDeskCoreFramework/Templates/attachment.html.twig') }}
\t<script type=\"text/javascript\">
\t{% if user_service.isfileExists('apps/uvdesk/form-component') == false %}
\tcustomFieldValidation = {};
\t{% endif %}
\t\t\$(function () {
\t\tsfTinyMce.init({
height: '155px',
\t\t\tselector : '#create-reply',
\t\t\timages_upload_url: \"\",
setup: function(editor) {
},
\t\t\tplugins: [
],
\t\t\ttoolbar: '| undo redo | bold italic forecolor ',
\t\t});
\t\t\t{% if(removeMe is defined) %}
\t\t\t\t\$.each({{ removeMe | json_encode |raw }}, function(key, value){
\t\t\t\t\t\$('label[for=\"' + value + '\"]').parent().hide();
\t\t\t\t});
\t\t\t{% endif %}
\t\t\t\$('.uv-header-date').datetimepicker({
\tformat: 'YYYY-MM-DD',
\t});
\t\$('.uv-header-time').datetimepicker({
\tformat: 'LT',
\t});
\t\$('.uv-header-datetime').datetimepicker({
\tformat: 'YYYY-MM-DD H:m:s'
\t});
\t\t\tvar CreateTicketModel = Backbone.Model.extend({
\t\t\t\tidAttribute : \"id\",
\t\t\t\tdefaults : {
\t\t\t\t\tpath : \"\",
\t\t\t\t},
\t\t\t\tvalidation: _.extend(customFieldValidation, {
\t\t\t\t\t{% if not isTicketViewPage %}
\t\t\t\t\t\t'name' : {
\t\t\t\t\t\t\trequired : true,
\t\t\t\t\t\t\tmsg : '{{ \"This field is mandatory\"|trans }}'
\t\t\t\t\t\t},
\t\t\t\t\t\t'from' :
\t\t\t\t\t\t[{
\t\t\t\t\t\t\trequired : true,
\t\t\t\t\t\t\tmsg : '{{ \"This field is mandatory\"|trans }}'
\t\t\t\t\t\t},{
\t\t\t\t\t\t\tpattern : 'email',
\t\t\t\t\t\t\tmsg : '{{ \"Email address is invalid\"|trans }}'
\t\t\t\t\t\t}],
\t\t\t\t\t{% endif %}
\t\t\t\t\t'type' : {
\t\t\t\t\t\trequired : true,
\t\t\t\t\t\tmsg : '{{ \"This field is mandatory\"|trans }}'
\t\t\t\t\t},
\t\t\t\t\t'subject' : {
\t\t\t\t\t\trequired : true,
\t\t\t\t\t\tmsg : '{{ \"This field is mandatory\"|trans }}'
\t\t\t\t\t},
\t\t\t\t\t'reply' : {
\t\t\t\t\t\tfn: function(value) {
if(!tinyMCE.get(\"uv-edit-create-thread\"))
return false;
var html = tinyMCE.get(\"uv-edit-create-thread\").getContent();
if(app.appView.stripHTML(html) != '') {
return false;
}
return true;
},
\t\t\t\t\t\tmsg : '{{ \"This field is mandatory\"|trans }}'
\t\t\t\t\t},
\t\t\t\t\t{% if recaptchaDetail and recaptchaDetail.isActive == true %}
'g-recaptcha-response' : {
fn: function(value) {
if(grecaptcha.getResponse().length > 0)
return false;
else
return true;
},
msg : '{{ \"Please select CAPTCHA\"|trans }}'
}
\t\t\t\t {% endif %}
\t\t\t\t}),
\t\t\t\turlRoot : \"{{ path('helpdesk_customer_create_ticket') }}\"
\t\t\t});
\t\t\tvar CreateTicketForm = Backbone.View.extend({
\t\t\t\tinitialize : function() {
\t\t\t\t\tBackbone.Validation.bind(this);
\t\t\t\t\tvar jsonContext = JSON.parse('{{ errors is defined ? errors|raw : \"{}\" }}');
\t\t\t\t\tfor (var field in jsonContext) {
\t\t\t\t\t\tBackbone.Validation.callbacks.invalid(this, field, jsonContext[field], 'input');
\t\t\t\t\t}
\t\t\t\t},
\t\t\t\tevents : {
\t\t\t\t\t'click #create-ticket-btn' : \"saveTicket\",
\t\t\t\t\t'change #type' : \"updateCustomFields\",
\t\t\t\t\t'blur input:not(input[type=file]), textarea, select, checkbox': 'formChanegd',
\t\t\t\t\t'change input[type=file]': 'formChanegd',
\t\t\t\t},
\t\t\t\tformChanegd: function(e) {
\t\t\t\t\tthis.model.set(Backbone.\$(e.currentTarget).attr('name'), Backbone.\$(e.currentTarget).val())
\t\t\t\t\tthis.model.isValid([Backbone.\$(e.currentTarget).attr('name')])
\t\t\t\t},
\t\t\t\tsaveTicket : function (e) {
\t\t\t\t\te.preventDefault();
\t\t\t\t\tvar currentElement = Backbone.\$(e.currentTarget);
\t\t\t\t\tvar data = currentElement.closest('form').serializeObject();
\t\t\t\t\tthis.model.set(data);
\t\t\t\t\tif(this.model.isValid(true)) {
\t\t\t\t\t\t\$('#create-ticket-form').submit();
\t\t\t\t\t\t\$('form').find('#create-ticket-btn').attr('disabled', 'disabled');
\t\t\t\t\t}
\t\t\t\t},
\t\t\t\tupdateCustomFields : function (e) {
\t\t\t\t\tvar dependentFields = e.currentTarget.value;
\t\t\t\t\tthis.\$('.dependent').hide();
\t\t\t\t\tthis.\$('.dependency' + dependentFields).show();
\t\t\t\t}
\t\t\t});
\t\t\tvar createticketForm = new CreateTicketForm({
\t\t\t\tel : \$(\"#create-ticket-form\"),
\t\t\t\tmodel : new CreateTicketModel()
\t\t\t});
\t\t});
\t</script>
{% endblock %}", "@UVDeskSupportCenter/Knowledgebase/ticket.html.twig", "/var/www/vhosts/kuckuck.app/support.kuckuck.app/vendor/uvdesk/support-center-bundle/Resources/views/Knowledgebase/ticket.html.twig");
}
}