File: /home/cafsindia/help.cafsindia.com/var/cache/dev/twig/f8/f8e363aa84662af9c5eae226383d0eec.php
<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
use Twig\TemplateWrapper;
/* @UVDeskCoreFramework/Email/emailSettings.html.twig */
class __TwigTemplate_0128960b22dbcd8352577d60f5c7cce2 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'pageContent' => [$this, 'block_pageContent'],
'footer' => [$this, 'block_footer'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "@UVDeskCoreFramework//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", "@UVDeskCoreFramework/Email/emailSettings.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@UVDeskCoreFramework/Email/emailSettings.html.twig"));
$this->parent = $this->loadTemplate("@UVDeskCoreFramework//Templates//layout.html.twig", "@UVDeskCoreFramework/Email/emailSettings.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
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"));
yield "Email Settings";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
// line 5
public function block_pageContent($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", "pageContent"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "pageContent"));
// line 6
yield " <div class=\"uv-inner-section\">
";
// line 8
yield "\t\t";
$context["asideTemplate"] = "Webkul\\UVDesk\\CoreFrameworkBundle\\Dashboard\\AsideTemplate";
// line 9
yield "\t\t";
$context["asideSidebarReference"] = "Webkul\\UVDesk\\CoreFrameworkBundle\\UIComponents\\Dashboard\\Panel\\Sidebars\\Settings";
// line 10
yield "
\t\t";
// line 11
yield CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["uvdesk_extensibles"]) || array_key_exists("uvdesk_extensibles", $context) ? $context["uvdesk_extensibles"] : (function () { throw new RuntimeError('Variable "uvdesk_extensibles" does not exist.', 11, $this->source); })()), "getRegisteredComponent", [(isset($context["asideTemplate"]) || array_key_exists("asideTemplate", $context) ? $context["asideTemplate"] : (function () { throw new RuntimeError('Variable "asideTemplate" does not exist.', 11, $this->source); })())], "method", false, false, false, 11), "renderSidebar", [(isset($context["asideSidebarReference"]) || array_key_exists("asideSidebarReference", $context) ? $context["asideSidebarReference"] : (function () { throw new RuntimeError('Variable "asideSidebarReference" does not exist.', 11, $this->source); })())], "method", false, false, false, 11);
yield "
<div class=\"uv-view\">
<div class=\"uv-action-bar\">
<div class=\"uv-action-bar-col-lt\">
<h1>
";
// line 17
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Email Settings"), "html", null, true);
yield "
</h1>
</div>
</div>
<div id=\"email-settings\">
\t\t\t</div>
\t\t</div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
// line 27
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 28
yield "\t";
yield from $this->yieldParentBlock("footer", $context, $blocks);
yield "
<script id=\"email-settings-form-tempplate\" type=\"text/template\">
<form id=\"email-settings-form\">\t\t\t
<!-- .fade-out-white -->
<div style=\"width: 500px;max-width: 80%;\">
<!-- .jelly-out -->
<div class=\"uv-element-block\">
<label class=\"uv-field-label\">";
// line 36
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Email Id"), "html", null, true);
yield "</label>
<div class=\"uv-field-block\">
<input class=\"uv-field\" type=\"text\" name=\"id\" value='<%= (typeof(id) !== \"undefined\") ? id : \"\" %>'>
</div>
</div>
<div class=\"uv-element-block\">
<label class=\"uv-field-label\">";
// line 42
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Name"), "html", null, true);
yield "</label>
<div class=\"uv-field-block\">
<input class=\"uv-field\" type=\"text\" name=\"name\" value='<%= (typeof(name) !== \"undefined\") ? name : \"\" %>'>
</div>
</div>
<div class=\"uv-element-block\">
<label class=\"uv-field-label\">";
// line 48
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Swiftmailer id (Select from drop down)"), "html", null, true);
yield "</label>
<div class=\"uv-field-block\">
<select name=\"mailer_id\" class=\"uv-select\" type=\"text\" value='<%= (typeof(mailer_id) !== \"undefined\") ? mailer_id : \"\" %>'>
<% if (typeof(mailer_id) == \"undefined\") { %>
<option>Select swiftmailer</option>
<% } %>
";
// line 55
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["swiftmailers"]) || array_key_exists("swiftmailers", $context) ? $context["swiftmailers"] : (function () { throw new RuntimeError('Variable "swiftmailers" does not exist.', 55, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["swiftmailer"]) {
// line 56
yield " <option <%= typeof(mailer_id) !== 'undefined' && mailer_id == \"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["swiftmailer"], "html", null, true);
yield "\" ? selected=\"selected\" : \"\" %>>";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["swiftmailer"], "html", null, true);
yield "</option>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['swiftmailer'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 58
yield " </select>
</div>
</div>
<div class=\"uv-pop-up-actions\">
<button type=\"submit\" class=\"uv-btn save-email-settings\">";
// line 62
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Proceed"), "html", null, true);
yield "</button>
</div>
</div>
</form>
</script>
<script type=\"text/javascript\">
var emailSettingsModel = Backbone.Model.extend({
defaults: {
'id': \"";
// line 71
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["email_settings"]) || array_key_exists("email_settings", $context) ? $context["email_settings"] : (function () { throw new RuntimeError('Variable "email_settings" does not exist.', 71, $this->source); })()), "id", [], "any", false, false, false, 71), "html", null, true);
yield "\",
'name': \"";
// line 72
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["email_settings"]) || array_key_exists("email_settings", $context) ? $context["email_settings"] : (function () { throw new RuntimeError('Variable "email_settings" does not exist.', 72, $this->source); })()), "name", [], "any", false, false, false, 72), "html", null, true);
yield "\",
'mailer_id': \"";
// line 73
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["email_settings"]) || array_key_exists("email_settings", $context) ? $context["email_settings"] : (function () { throw new RuntimeError('Variable "email_settings" does not exist.', 73, $this->source); })()), "mailer_id", [], "any", false, false, false, 73), "html", null, true);
yield "\",
},
validation: {
'id': [
{
\t\t\t\t\t\trequired: true,
\t\t\t\t\t\tmsg: '";
// line 79
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Please enter a mailer id"), "html", null, true);
yield "'
\t\t\t\t\t},
{
\t\t\t\t\t\tpattern: 'email',
\t\t\t\t\t\tmsg: '";
// line 83
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Please enter a valid e-mail id"), "html", null, true);
yield "'
\t\t\t\t\t},
],
'name': [
{
required: true,
\t\t\t\t\t\tmsg: '";
// line 89
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Please enter a mailer id"), "html", null, true);
yield "'
},
],
\"mailer_id\": function (id) {
\t\t\t\t\tif (id == \"Select swiftmailer\")
\t\t\t\t\t\treturn '";
// line 94
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Please select a swiftmailer id"), "html", null, true);
yield "';
\t\t\t\t},
}
});
var emailSettingsForm = Backbone.View.extend({
el: '#email-settings',
model: new emailSettingsModel(),
email_settings_form_template: _.template(\$('#email-settings-form-tempplate').html()),
\t\t events : {
\t\t \t'click .save-email-settings' : 'saveEmailSettings',
\t\t },
initialize: function () {
this.render();
},
render: function () {
this.\$el.html(this.email_settings_form_template(this.model.toJSON()));
},
saveEmailSettings: function (event) {
event.preventDefault();
Backbone.Validation.bind(this);
var data = this.\$el.find('#email-settings-form').serializeObject();
this.model.set(data);
if (this.model.isValid(true)) {
\t\t\t\t\tapp.appView.showLoader();
this.model.save({}, {
url: \"";
// line 121
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_update_emails_settings_xhr");
yield "\",
success: function (model, response, options) {
\t\t\t\t\tapp.appView.hideLoader();
this.model.attributes = response.email_settings;
app.appView.renderResponseAlert(response);
}.bind(this),
error: function (model, response, options) {
\t\t\t\t\tapp.appView.hideLoader();
}
});
}
}
});
new emailSettingsForm();
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "@UVDeskCoreFramework/Email/emailSettings.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 290 => 121, 260 => 94, 252 => 89, 243 => 83, 236 => 79, 227 => 73, 223 => 72, 219 => 71, 207 => 62, 201 => 58, 190 => 56, 186 => 55, 176 => 48, 167 => 42, 158 => 36, 146 => 28, 136 => 27, 116 => 17, 107 => 11, 104 => 10, 101 => 9, 98 => 8, 95 => 6, 85 => 5, 65 => 3, 42 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% extends \"@UVDeskCoreFramework//Templates//layout.html.twig\" %}
{% block title %}Email Settings{% endblock %}
{% block pageContent %}
<div class=\"uv-inner-section\">
{# Append Panel Aside #}
\t\t{% set asideTemplate = 'Webkul\\\\UVDesk\\\\CoreFrameworkBundle\\\\Dashboard\\\\AsideTemplate' %}
\t\t{% set asideSidebarReference = 'Webkul\\\\UVDesk\\\\CoreFrameworkBundle\\\\UIComponents\\\\Dashboard\\\\Panel\\\\Sidebars\\\\Settings' %}
\t\t{{ uvdesk_extensibles.getRegisteredComponent(asideTemplate).renderSidebar(asideSidebarReference) | raw }}
<div class=\"uv-view\">
<div class=\"uv-action-bar\">
<div class=\"uv-action-bar-col-lt\">
<h1>
{{ 'Email Settings'|trans }}
</h1>
</div>
</div>
<div id=\"email-settings\">
\t\t\t</div>
\t\t</div>
</div>
{% endblock %}
{% block footer %}
\t{{ parent() }}
<script id=\"email-settings-form-tempplate\" type=\"text/template\">
<form id=\"email-settings-form\">\t\t\t
<!-- .fade-out-white -->
<div style=\"width: 500px;max-width: 80%;\">
<!-- .jelly-out -->
<div class=\"uv-element-block\">
<label class=\"uv-field-label\">{{ 'Email Id'|trans }}</label>
<div class=\"uv-field-block\">
<input class=\"uv-field\" type=\"text\" name=\"id\" value='<%= (typeof(id) !== \"undefined\") ? id : \"\" %>'>
</div>
</div>
<div class=\"uv-element-block\">
<label class=\"uv-field-label\">{{ 'Name'|trans }}</label>
<div class=\"uv-field-block\">
<input class=\"uv-field\" type=\"text\" name=\"name\" value='<%= (typeof(name) !== \"undefined\") ? name : \"\" %>'>
</div>
</div>
<div class=\"uv-element-block\">
<label class=\"uv-field-label\">{{ 'Swiftmailer id (Select from drop down)'|trans }}</label>
<div class=\"uv-field-block\">
<select name=\"mailer_id\" class=\"uv-select\" type=\"text\" value='<%= (typeof(mailer_id) !== \"undefined\") ? mailer_id : \"\" %>'>
<% if (typeof(mailer_id) == \"undefined\") { %>
<option>Select swiftmailer</option>
<% } %>
{% for swiftmailer in swiftmailers %}
<option <%= typeof(mailer_id) !== 'undefined' && mailer_id == \"{{swiftmailer}}\" ? selected=\"selected\" : \"\" %>>{{ swiftmailer }}</option>
{% endfor %}
</select>
</div>
</div>
<div class=\"uv-pop-up-actions\">
<button type=\"submit\" class=\"uv-btn save-email-settings\">{{ 'Proceed'|trans }}</button>
</div>
</div>
</form>
</script>
<script type=\"text/javascript\">
var emailSettingsModel = Backbone.Model.extend({
defaults: {
'id': \"{{ email_settings.id }}\",
'name': \"{{ email_settings.name }}\",
'mailer_id': \"{{ email_settings.mailer_id }}\",
},
validation: {
'id': [
{
\t\t\t\t\t\trequired: true,
\t\t\t\t\t\tmsg: '{{ \"Please enter a mailer id\"|trans }}'
\t\t\t\t\t},
{
\t\t\t\t\t\tpattern: 'email',
\t\t\t\t\t\tmsg: '{{ \"Please enter a valid e-mail id\"|trans }}'
\t\t\t\t\t},
],
'name': [
{
required: true,
\t\t\t\t\t\tmsg: '{{ \"Please enter a mailer id\"|trans }}'
},
],
\"mailer_id\": function (id) {
\t\t\t\t\tif (id == \"Select swiftmailer\")
\t\t\t\t\t\treturn '{{ \"Please select a swiftmailer id\"|trans }}';
\t\t\t\t},
}
});
var emailSettingsForm = Backbone.View.extend({
el: '#email-settings',
model: new emailSettingsModel(),
email_settings_form_template: _.template(\$('#email-settings-form-tempplate').html()),
\t\t events : {
\t\t \t'click .save-email-settings' : 'saveEmailSettings',
\t\t },
initialize: function () {
this.render();
},
render: function () {
this.\$el.html(this.email_settings_form_template(this.model.toJSON()));
},
saveEmailSettings: function (event) {
event.preventDefault();
Backbone.Validation.bind(this);
var data = this.\$el.find('#email-settings-form').serializeObject();
this.model.set(data);
if (this.model.isValid(true)) {
\t\t\t\t\tapp.appView.showLoader();
this.model.save({}, {
url: \"{{ path('helpdesk_member_update_emails_settings_xhr') }}\",
success: function (model, response, options) {
\t\t\t\t\tapp.appView.hideLoader();
this.model.attributes = response.email_settings;
app.appView.renderResponseAlert(response);
}.bind(this),
error: function (model, response, options) {
\t\t\t\t\tapp.appView.hideLoader();
}
});
}
}
});
new emailSettingsForm();
</script>
{% endblock %}
", "@UVDeskCoreFramework/Email/emailSettings.html.twig", "/home/users/sanjeev.papnoi/www/html/uvdesk-community-v1.1.6/vendor/uvdesk/core-framework/Resources/views/Email/emailSettings.html.twig");
}
}