<?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;
/* @App/dashboard/settings/accounts/roles/main.html.twig */
class __TwigTemplate_f1ff329fdadd36c89488d62bc883083e extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
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", "@App/dashboard/settings/accounts/roles/main.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@App/dashboard/settings/accounts/roles/main.html.twig"));
// line 1
$this->env->getRuntime("Symfony\\Component\\Form\\FormRenderer")->setTheme((isset($context["containerRoleForm"]) || array_key_exists("containerRoleForm", $context) ? $context["containerRoleForm"] : (function () { throw new RuntimeError('Variable "containerRoleForm" does not exist.', 1, $this->source); })()), [0 => "@ui2022/schoolnow/forms/themes/default.html.twig"], true);
// line 2
$this->env->getRuntime("Symfony\\Component\\Form\\FormRenderer")->setTheme((isset($context["schoolRoleForm"]) || array_key_exists("schoolRoleForm", $context) ? $context["schoolRoleForm"] : (function () { throw new RuntimeError('Variable "schoolRoleForm" does not exist.', 2, $this->source); })()), [0 => "@ui2022/schoolnow/forms/themes/default.html.twig"], true);
// line 3
$this->env->getRuntime("Symfony\\Component\\Form\\FormRenderer")->setTheme((isset($context["listRoleForm"]) || array_key_exists("listRoleForm", $context) ? $context["listRoleForm"] : (function () { throw new RuntimeError('Variable "listRoleForm" does not exist.', 3, $this->source); })()), [0 => "@ui2022/schoolnow/forms/themes/default.html.twig"], true);
// line 4
echo "
";
// line 5
$this->loadTemplate("@App/dashboard/settings/accounts/roles/main.html.twig", "@App/dashboard/settings/accounts/roles/main.html.twig", 5, "1242731510")->display(twig_array_merge(twig_array_merge($context, []), ['_args' => twig_to_array([])]));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "@App/dashboard/settings/accounts/roles/main.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 52 => 5, 49 => 4, 47 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% form_theme containerRoleForm '@ui2022/schoolnow/forms/themes/default.html.twig' %}
{% form_theme schoolRoleForm '@ui2022/schoolnow/forms/themes/default.html.twig' %}
{% form_theme listRoleForm '@ui2022/schoolnow/forms/themes/default.html.twig' %}
{% embed '@ui2022/schoolnow/modal--sidepanel__content.html.twig' with {} %}
{% block header %}
{% include '@App/dashboard/settings/accounts/includes/_header.html.twig' with {
active: 'permissions',
} %}
{% endblock %}
{% block body %}
<div class=\"contacts\">
<div class=\"row justify-content-end\">
<span class=\"font-13 text-medium mb-3 col-auto\">Last modified: {{ account.touchedAt ? account.touchedAt|ui_relativeDate : '-' }}</span>
</div>
{% if account.internalUid %}
<div class=\"row justify-content-end\">
<span class=\"font-13 text-medium mb-3 col-auto\">Internal UID: {{ account.internalUid }}</span>
</div>
{% endif %}
<div class=\"sidepanel__content--body\">
<div class=\"contacts__tabs\">
{% include '@App/dashboard/settings/accounts/includes/_tabs.html.twig' with {
active: 'permissions',
} %}
<div class=\"tab-content\">
{% if account.specialPermissions.superUser %}
<div class=\"super-user-permission-block\">
<div class=\"super-user-permission-block-inner-container\">
<h1>User has \"Super Admin\" access</h1>
<p class=\"text-black mt-4\">
Super admin access grants complete control over all functions in the website. To apply more granular permissions to this user, remove Super admin access and adjust their permissions here.
</p>
<a href=\"#\" class=\"super-user-access-button mt-3\">Remove Super Admin access</a>
</div>
</div>
{% else %}
<div class=\"messages-table uilib website-table\">
<table class=\"grid-main-block\">
<tbody>
<tr>
<th class=\"heading col-6\"><img src=\"/ui2022/images/message.png\" alt=\"Message\">
Messages
</th>
<th class=\"col-3\">
</th>
<th class=\"col-2\">
<span style=\"text-decoration: underline;\">Role</span>
</th>
<th class=\"col-1\"><span> </span></th>
</tr>
{% for messageAssociation in messageAssociations %}
<tr class=\"grid-card\">
<td class=\"col-6\">
<span class=\"grid-group\">
<span class=\"grid-control\">
{% set name = messageAssociation.list ? messageAssociation.list.name : (messageAssociation.school ? messageAssociation.school.name : '[Global]') %}
{% set icon = messageAssociation.list ? 'icon-templates' : 'icon-school-activities-report' %}
<i class=\"{{ icon }}\"></i>
<span>{{ name }}</span>
</span>
</span>
</td>
<td class=\"checkbox-block col-3\"></td>
<td class=\"col-2\">
<span>{{ messageAssociation.role.name }}</span>
</td>
<td class=\"col-1\">
<span class=\"table-action\">
{% include '@ui2022/a.html.twig' with {
link: path('app.app.dashboard.settings.accounts.roles.delete', {
account: account.id,
association: messageAssociation.id,
}),
modal: 'modal__result__sidepanel',
target: \"_modal\",
html: '<i class=\"icon-delete\"></i>'
} %}
</span>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class=\"add-row-block\">
<div class=\"add-row\">
<a href=\"#\" class=\"mr-3\" data-show-form-id=\"{{ schoolRoleForm.vars.id }}\">+ Add
school</a>
<a href=\"#\" data-show-form-id=\"{{ listRoleForm.vars.id }}\">+ Add list</a>
</div>
{{ form_start(schoolRoleForm, {
action: path('app.app.dashboard.settings.accounts.roles.main', {
account: account.id,
}),
attr: {
target: '_modal',
},
}) }}
<div class=\"add-action formcontainer formfield-colored\" style=\"display: none\">
<div class=\"col-6\">
{{ form_widget(schoolRoleForm.school) }}
{{ form_errors(schoolRoleForm.school) }}
</div>
<div class=\"col-3\">
{{ form_widget(schoolRoleForm.role) }}
{{ form_errors(schoolRoleForm.role) }}
</div>
<div class=\"col-2\">
{% include '@ui2022/button--form.html.twig' with {
type: 'submit',
text: 'Add',
styles: 'md gray',
attr: {
class: 'px-4 mr-3',
disabled: 'disabled',
},
} %}
</div>
<div class=\"col-1 close-icon\">
<span><a href=\"#\"><i class=\"icon-cross\"></i></a></span>
</div>
{{ form_rest(schoolRoleForm) }}
</div>
{{ form_end(schoolRoleForm) }}
{{ form_start(listRoleForm, {
action: path('app.app.dashboard.settings.accounts.roles.main', {
account: account.id,
}),
attr: {
target: '_modal',
},
}) }}
<div class=\"add-action formcontainer formfield-colored\" style=\"display: none\">
<div class=\"col-6\">
{{ form_widget(listRoleForm.list) }}
{{ form_errors(listRoleForm.list) }}
</div>
<div class=\"col-3\">
{{ form_widget(listRoleForm.role) }}
{{ form_errors(listRoleForm.role) }}
</div>
<div class=\"col-2\">
{% include '@ui2022/button--form.html.twig' with {
type: 'submit',
text: 'Add',
styles: 'md gray',
attr: {
class: 'px-4 mr-3',
disabled: 'disabled',
},
} %}
</div>
<div class=\"col-1 close-icon\">
<span><a href=\"#\"><i class=\"icon-cross\"></i></a></span>
</div>
{{ form_rest(listRoleForm) }}
</div>
{{ form_end(listRoleForm) }}
</div>
</div>
<div class=\"messages-table uilib website-table\">
<table class=\"grid-main-block\">
<tbody>
<tr>
<th class=\"heading col-6\"><img src=\"/ui2022/images/website.png\" alt=\"Website\">
Website
</th>
<th class=\"col-3\">
<span style=\"text-decoration: underline;\">Departments</span>
</th>
<th class=\"col-2\">
<span style=\"text-decoration: underline;\">Role</span>
</th>
<th class=\"col-1\"><span> </span></th>
</tr>
{% for websiteAssociation in websiteAssociations %}
<tr class=\"grid-card\">
<td class=\"col-6\">
<span class=\"grid-group\">
<span class=\"grid-control\">
<i class=\"icon-folder\"></i>
<span>{{ websiteAssociation.container ? websiteAssociation.container.name : '[Global]' }}</span>
</span>
</span>
</td>
<td class=\"checkbox-block col-3\">
<span class=\"grid-group\">
<span class=\"custom-control custom-checkbox\">
<input
type=\"checkbox\"
class=\"custom-control-input\"
id=\"enabled_{{ websiteAssociation.id }}\"
{% if websiteAssociation.inheritance %}checked{% endif %}
data-trigger=\"toggler\"
data-toggler-url=\"{{ path('app.app.dashboard.settings.accounts.roles.inheritance_toggle', {
accountRoleAssociation: websiteAssociation.id,
}) }}\"
/>
<label class=\"custom-control-label\"
for=\"enabled_{{ websiteAssociation.id }}\"></label>
</span>
</span>
</td>
<td class=\"col-2\">
<span>{{ websiteAssociation.role.name }}</span>
</td>
<td class=\"col-1\">
<span class=\"table-action\">
{% include '@ui2022/a.html.twig' with {
link: path('app.app.dashboard.settings.accounts.roles.delete', {
account: account.id,
association: websiteAssociation.id,
}),
modal: 'modal__result__sidepanel',
target: \"_modal\",
html: '<i class=\"icon-delete\"></i>'
} %}
</span>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class=\"add-row-block\">
<div class=\"add-row\">
<a href=\"#\" data-show-form-id=\"{{ containerRoleForm.vars.id }}\">+ Add</a>
</div>
{{ form_start(containerRoleForm, {
action: path('app.app.dashboard.settings.accounts.roles.main', {
account: account.id,
}),
attr: {
target: '_modal',
},
}) }}
<div class=\"add-action formcontainer formfield-colored\" style=\"display: none\">
<div class=\"col-6\">
{{ form_widget(containerRoleForm.container) }}
{{ form_errors(containerRoleForm.container) }}
</div>
<div class=\"col-3\">
{{ form_widget(containerRoleForm.role) }}
{{ form_errors(containerRoleForm.role) }}
</div>
<div class=\"col-2\">
{% include '@ui2022/button--form.html.twig' with {
type: 'submit',
text: 'Add',
styles: 'md gray',
attr: {
class: 'px-4 mr-3',
disabled: 'disabled',
},
} %}
</div>
<div class=\"col-1 close-icon\">
<span><a href=\"#\"><i class=\"icon-cross\"></i></a></span>
</div>
{{ form_rest(containerRoleForm) }}
</div>
{{ form_end(containerRoleForm) }}
</div>
</div>
{% endif %}
</div>
</div>
</div>
</div>
<script>
(function (window, document, \$, undefined) {
\$(function () {
if (\$('.add-row-block').length > 0) {
\$('.add-row-block .add-row a').on(\"click\", function (e) {
e.preventDefault();
const formId = \$(this).data('show-form-id');
const \$form = \$('#' + formId);
const \$addAction = \$form.find('.add-action');
const \$iconCross = \$form.find('.icon-cross');
const \$submitButton = \$form.find('button[type=\"submit\"]');
const \$addRow = \$(this).parent();
\$addAction.show();
\$addRow.hide();
\$iconCross.click(function (e) {
e.preventDefault();
\$addAction.hide();
\$addRow.show();
selectDefaultOption(\$addAction.find('select[required]'));
\$form.off('change');
\$submitButton.attr('disabled', 'disabled');
return false;
});
\$form.on('change', function (e) {
if (this.checkValidity()) {
\$submitButton.removeAttr('disabled');
} else {
\$submitButton.attr('disabled', 'disabled');
}
});
selectDefaultOption(\$addAction.find('select[required]'));
return false;
})
}
function selectDefaultOption(\$selects) {
\$.each(\$selects, function (key, select) {
let selectedIndex = 0;
if (\$(select).find('option').length === 2) {
selectedIndex = 1;
}
\$(select).prop('selectedIndex', selectedIndex).trigger('change');
});
}
})
const \$togglerSuperadmin = \$('#toggler_superadmin');
\$togglerSuperadmin.on('done.toggler', function() {
\$('#sidepanel__result_view .nav-link.active').trigger('click');
});
\$('.super-user-access-button').on('click', function(e) {
e.preventDefault();
\$togglerSuperadmin.prop(\"checked\", \$togglerSuperadmin.prop(\"checked\"));
\$togglerSuperadmin.trigger('change');
return false;
});
})(window, document, jQuery);
</script>
{% include '@ui2022/modal.html.twig' with {
attr: {
id: 'modal__result__sidepanel',
class: 'modal-ajax modal-delete',
target: \"_modal\",
},
dialog_styles: 'dialog--createmsg',
} %}
{% endblock %}
{% endembed %}
", "@App/dashboard/settings/accounts/roles/main.html.twig", "/var/www/campussuite/src/App/Resources/views/dashboard/settings/accounts/roles/main.html.twig");
}
}
/* @App/dashboard/settings/accounts/roles/main.html.twig */
class __TwigTemplate_f1ff329fdadd36c89488d62bc883083e___1242731510 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'header' => [$this, 'block_header'],
'body' => [$this, 'block_body'],
];
}
protected function doGetParent(array $context)
{
return "@ui2022/schoolnow/modal--sidepanel__content.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", "@App/dashboard/settings/accounts/roles/main.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@App/dashboard/settings/accounts/roles/main.html.twig"));
$this->parent = $this->loadTemplate("@ui2022/schoolnow/modal--sidepanel__content.html.twig", "@App/dashboard/settings/accounts/roles/main.html.twig", 5);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 6
public function block_header($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", "header"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "header"));
// line 7
echo " ";
$this->loadTemplate("@App/dashboard/settings/accounts/includes/_header.html.twig", "@App/dashboard/settings/accounts/roles/main.html.twig", 7)->display(twig_array_merge(twig_array_merge($context, ["active" => "permissions"]), ['_args' => twig_to_array(["active" => "permissions"])]));
// line 10
echo " ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 11
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 12
echo " <div class=\"contacts\">
<div class=\"row justify-content-end\">
<span class=\"font-13 text-medium mb-3 col-auto\">Last modified: ";
// line 14
((twig_get_attribute($this->env, $this->source, (isset($context["account"]) || array_key_exists("account", $context) ? $context["account"] : (function () { throw new RuntimeError('Variable "account" does not exist.', 14, $this->source); })()), "touchedAt", [], "any", false, false, false, 14)) ? (print (twig_escape_filter($this->env, $this->extensions['Cms\CoreBundle\Service\Twig\DateTimeExtension']->ui_relativeDate(twig_get_attribute($this->env, $this->source, (isset($context["account"]) || array_key_exists("account", $context) ? $context["account"] : (function () { throw new RuntimeError('Variable "account" does not exist.', 14, $this->source); })()), "touchedAt", [], "any", false, false, false, 14)), "html", null, true))) : (print ("-")));
echo "</span>
</div>
";
// line 16
if (twig_get_attribute($this->env, $this->source, (isset($context["account"]) || array_key_exists("account", $context) ? $context["account"] : (function () { throw new RuntimeError('Variable "account" does not exist.', 16, $this->source); })()), "internalUid", [], "any", false, false, false, 16)) {
// line 17
echo " <div class=\"row justify-content-end\">
<span class=\"font-13 text-medium mb-3 col-auto\">Internal UID: ";
// line 18
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["account"]) || array_key_exists("account", $context) ? $context["account"] : (function () { throw new RuntimeError('Variable "account" does not exist.', 18, $this->source); })()), "internalUid", [], "any", false, false, false, 18), "html", null, true);
echo "</span>
</div>
";
}
// line 21
echo " <div class=\"sidepanel__content--body\">
<div class=\"contacts__tabs\">
";
// line 23
$this->loadTemplate("@App/dashboard/settings/accounts/includes/_tabs.html.twig", "@App/dashboard/settings/accounts/roles/main.html.twig", 23)->display(twig_array_merge(twig_array_merge($context, ["active" => "permissions"]), ['_args' => twig_to_array(["active" => "permissions"])]));
// line 26
echo " <div class=\"tab-content\">
";
// line 27
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["account"]) || array_key_exists("account", $context) ? $context["account"] : (function () { throw new RuntimeError('Variable "account" does not exist.', 27, $this->source); })()), "specialPermissions", [], "any", false, false, false, 27), "superUser", [], "any", false, false, false, 27)) {
// line 28
echo "
<div class=\"super-user-permission-block\">
<div class=\"super-user-permission-block-inner-container\">
<h1>User has \"Super Admin\" access</h1>
<p class=\"text-black mt-4\">
Super admin access grants complete control over all functions in the website. To apply more granular permissions to this user, remove Super admin access and adjust their permissions here.
</p>
<a href=\"#\" class=\"super-user-access-button mt-3\">Remove Super Admin access</a>
</div>
</div>
";
} else {
// line 39
echo " <div class=\"messages-table uilib website-table\">
<table class=\"grid-main-block\">
<tbody>
<tr>
<th class=\"heading col-6\"><img src=\"/ui2022/images/message.png\" alt=\"Message\">
Messages
</th>
<th class=\"col-3\">
</th>
<th class=\"col-2\">
<span style=\"text-decoration: underline;\">Role</span>
</th>
<th class=\"col-1\"><span> </span></th>
</tr>
";
// line 54
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["messageAssociations"]) || array_key_exists("messageAssociations", $context) ? $context["messageAssociations"] : (function () { throw new RuntimeError('Variable "messageAssociations" does not exist.', 54, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["messageAssociation"]) {
// line 55
echo " <tr class=\"grid-card\">
<td class=\"col-6\">
<span class=\"grid-group\">
<span class=\"grid-control\">
";
// line 59
$context["name"] = ((twig_get_attribute($this->env, $this->source, $context["messageAssociation"], "list", [], "any", false, false, false, 59)) ? (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["messageAssociation"], "list", [], "any", false, false, false, 59), "name", [], "any", false, false, false, 59)) : (((twig_get_attribute($this->env, $this->source, $context["messageAssociation"], "school", [], "any", false, false, false, 59)) ? (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["messageAssociation"], "school", [], "any", false, false, false, 59), "name", [], "any", false, false, false, 59)) : ("[Global]"))));
// line 60
echo " ";
$context["icon"] = ((twig_get_attribute($this->env, $this->source, $context["messageAssociation"], "list", [], "any", false, false, false, 60)) ? ("icon-templates") : ("icon-school-activities-report"));
// line 61
echo " <i class=\"";
echo twig_escape_filter($this->env, (isset($context["icon"]) || array_key_exists("icon", $context) ? $context["icon"] : (function () { throw new RuntimeError('Variable "icon" does not exist.', 61, $this->source); })()), "html", null, true);
echo "\"></i>
<span>";
// line 62
echo twig_escape_filter($this->env, (isset($context["name"]) || array_key_exists("name", $context) ? $context["name"] : (function () { throw new RuntimeError('Variable "name" does not exist.', 62, $this->source); })()), "html", null, true);
echo "</span>
</span>
</span>
</td>
<td class=\"checkbox-block col-3\"></td>
<td class=\"col-2\">
<span>";
// line 68
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["messageAssociation"], "role", [], "any", false, false, false, 68), "name", [], "any", false, false, false, 68), "html", null, true);
echo "</span>
</td>
<td class=\"col-1\">
<span class=\"table-action\">
";
// line 72
$this->loadTemplate("@ui2022/a.html.twig", "@App/dashboard/settings/accounts/roles/main.html.twig", 72)->display(twig_array_merge(twig_array_merge($context, ["link" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app.app.dashboard.settings.accounts.roles.delete", ["account" => twig_get_attribute($this->env, $this->source, // line 74
(isset($context["account"]) || array_key_exists("account", $context) ? $context["account"] : (function () { throw new RuntimeError('Variable "account" does not exist.', 74, $this->source); })()), "id", [], "any", false, false, false, 74), "association" => twig_get_attribute($this->env, $this->source, // line 75
$context["messageAssociation"], "id", [], "any", false, false, false, 75)]), "modal" => "modal__result__sidepanel", "target" => "_modal", "html" => "<i class=\"icon-delete\"></i>"]), ['_args' => twig_to_array(["link" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app.app.dashboard.settings.accounts.roles.delete", ["account" => twig_get_attribute($this->env, $this->source, // line 74
(isset($context["account"]) || array_key_exists("account", $context) ? $context["account"] : (function () { throw new RuntimeError('Variable "account" does not exist.', 74, $this->source); })()), "id", [], "any", false, false, false, 74), "association" => twig_get_attribute($this->env, $this->source, // line 75
$context["messageAssociation"], "id", [], "any", false, false, false, 75)]), "modal" => "modal__result__sidepanel", "target" => "_modal", "html" => "<i class=\"icon-delete\"></i>"])]));
// line 81
echo " </span>
</td>
</tr>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['messageAssociation'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 85
echo " </tbody>
</table>
<div class=\"add-row-block\">
<div class=\"add-row\">
<a href=\"#\" class=\"mr-3\" data-show-form-id=\"";
// line 89
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["schoolRoleForm"]) || array_key_exists("schoolRoleForm", $context) ? $context["schoolRoleForm"] : (function () { throw new RuntimeError('Variable "schoolRoleForm" does not exist.', 89, $this->source); })()), "vars", [], "any", false, false, false, 89), "id", [], "any", false, false, false, 89), "html", null, true);
echo "\">+ Add
school</a>
<a href=\"#\" data-show-form-id=\"";
// line 91
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["listRoleForm"]) || array_key_exists("listRoleForm", $context) ? $context["listRoleForm"] : (function () { throw new RuntimeError('Variable "listRoleForm" does not exist.', 91, $this->source); })()), "vars", [], "any", false, false, false, 91), "id", [], "any", false, false, false, 91), "html", null, true);
echo "\">+ Add list</a>
</div>
";
// line 93
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["schoolRoleForm"]) || array_key_exists("schoolRoleForm", $context) ? $context["schoolRoleForm"] : (function () { throw new RuntimeError('Variable "schoolRoleForm" does not exist.', 93, $this->source); })()), 'form_start', ["action" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app.app.dashboard.settings.accounts.roles.main", ["account" => twig_get_attribute($this->env, $this->source, // line 95
(isset($context["account"]) || array_key_exists("account", $context) ? $context["account"] : (function () { throw new RuntimeError('Variable "account" does not exist.', 95, $this->source); })()), "id", [], "any", false, false, false, 95)]), "attr" => ["target" => "_modal"]]);
// line 100
echo "
<div class=\"add-action formcontainer formfield-colored\" style=\"display: none\">
<div class=\"col-6\">
";
// line 103
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["schoolRoleForm"]) || array_key_exists("schoolRoleForm", $context) ? $context["schoolRoleForm"] : (function () { throw new RuntimeError('Variable "schoolRoleForm" does not exist.', 103, $this->source); })()), "school", [], "any", false, false, false, 103), 'widget');
echo "
";
// line 104
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["schoolRoleForm"]) || array_key_exists("schoolRoleForm", $context) ? $context["schoolRoleForm"] : (function () { throw new RuntimeError('Variable "schoolRoleForm" does not exist.', 104, $this->source); })()), "school", [], "any", false, false, false, 104), 'errors');
echo "
</div>
<div class=\"col-3\">
";
// line 107
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["schoolRoleForm"]) || array_key_exists("schoolRoleForm", $context) ? $context["schoolRoleForm"] : (function () { throw new RuntimeError('Variable "schoolRoleForm" does not exist.', 107, $this->source); })()), "role", [], "any", false, false, false, 107), 'widget');
echo "
";
// line 108
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["schoolRoleForm"]) || array_key_exists("schoolRoleForm", $context) ? $context["schoolRoleForm"] : (function () { throw new RuntimeError('Variable "schoolRoleForm" does not exist.', 108, $this->source); })()), "role", [], "any", false, false, false, 108), 'errors');
echo "
</div>
<div class=\"col-2\">
";
// line 111
$this->loadTemplate("@ui2022/button--form.html.twig", "@App/dashboard/settings/accounts/roles/main.html.twig", 111)->display(twig_array_merge(twig_array_merge($context, ["type" => "submit", "text" => "Add", "styles" => "md gray", "attr" => ["class" => "px-4 mr-3", "disabled" => "disabled"]]), ['_args' => twig_to_array(["type" => "submit", "text" => "Add", "styles" => "md gray", "attr" => ["class" => "px-4 mr-3", "disabled" => "disabled"]])]));
// line 120
echo " </div>
<div class=\"col-1 close-icon\">
<span><a href=\"#\"><i class=\"icon-cross\"></i></a></span>
</div>
";
// line 126
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["schoolRoleForm"]) || array_key_exists("schoolRoleForm", $context) ? $context["schoolRoleForm"] : (function () { throw new RuntimeError('Variable "schoolRoleForm" does not exist.', 126, $this->source); })()), 'rest');
echo "
</div>
";
// line 129
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["schoolRoleForm"]) || array_key_exists("schoolRoleForm", $context) ? $context["schoolRoleForm"] : (function () { throw new RuntimeError('Variable "schoolRoleForm" does not exist.', 129, $this->source); })()), 'form_end');
echo "
";
// line 131
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["listRoleForm"]) || array_key_exists("listRoleForm", $context) ? $context["listRoleForm"] : (function () { throw new RuntimeError('Variable "listRoleForm" does not exist.', 131, $this->source); })()), 'form_start', ["action" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app.app.dashboard.settings.accounts.roles.main", ["account" => twig_get_attribute($this->env, $this->source, // line 133
(isset($context["account"]) || array_key_exists("account", $context) ? $context["account"] : (function () { throw new RuntimeError('Variable "account" does not exist.', 133, $this->source); })()), "id", [], "any", false, false, false, 133)]), "attr" => ["target" => "_modal"]]);
// line 138
echo "
<div class=\"add-action formcontainer formfield-colored\" style=\"display: none\">
<div class=\"col-6\">
";
// line 141
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["listRoleForm"]) || array_key_exists("listRoleForm", $context) ? $context["listRoleForm"] : (function () { throw new RuntimeError('Variable "listRoleForm" does not exist.', 141, $this->source); })()), "list", [], "any", false, false, false, 141), 'widget');
echo "
";
// line 142
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["listRoleForm"]) || array_key_exists("listRoleForm", $context) ? $context["listRoleForm"] : (function () { throw new RuntimeError('Variable "listRoleForm" does not exist.', 142, $this->source); })()), "list", [], "any", false, false, false, 142), 'errors');
echo "
</div>
<div class=\"col-3\">
";
// line 145
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["listRoleForm"]) || array_key_exists("listRoleForm", $context) ? $context["listRoleForm"] : (function () { throw new RuntimeError('Variable "listRoleForm" does not exist.', 145, $this->source); })()), "role", [], "any", false, false, false, 145), 'widget');
echo "
";
// line 146
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["listRoleForm"]) || array_key_exists("listRoleForm", $context) ? $context["listRoleForm"] : (function () { throw new RuntimeError('Variable "listRoleForm" does not exist.', 146, $this->source); })()), "role", [], "any", false, false, false, 146), 'errors');
echo "
</div>
<div class=\"col-2\">
";
// line 149
$this->loadTemplate("@ui2022/button--form.html.twig", "@App/dashboard/settings/accounts/roles/main.html.twig", 149)->display(twig_array_merge(twig_array_merge($context, ["type" => "submit", "text" => "Add", "styles" => "md gray", "attr" => ["class" => "px-4 mr-3", "disabled" => "disabled"]]), ['_args' => twig_to_array(["type" => "submit", "text" => "Add", "styles" => "md gray", "attr" => ["class" => "px-4 mr-3", "disabled" => "disabled"]])]));
// line 158
echo " </div>
<div class=\"col-1 close-icon\">
<span><a href=\"#\"><i class=\"icon-cross\"></i></a></span>
</div>
";
// line 164
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["listRoleForm"]) || array_key_exists("listRoleForm", $context) ? $context["listRoleForm"] : (function () { throw new RuntimeError('Variable "listRoleForm" does not exist.', 164, $this->source); })()), 'rest');
echo "
</div>
";
// line 167
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["listRoleForm"]) || array_key_exists("listRoleForm", $context) ? $context["listRoleForm"] : (function () { throw new RuntimeError('Variable "listRoleForm" does not exist.', 167, $this->source); })()), 'form_end');
echo "
</div>
</div>
<div class=\"messages-table uilib website-table\">
<table class=\"grid-main-block\">
<tbody>
<tr>
<th class=\"heading col-6\"><img src=\"/ui2022/images/website.png\" alt=\"Website\">
Website
</th>
<th class=\"col-3\">
<span style=\"text-decoration: underline;\">Departments</span>
</th>
<th class=\"col-2\">
<span style=\"text-decoration: underline;\">Role</span>
</th>
<th class=\"col-1\"><span> </span></th>
</tr>
";
// line 186
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["websiteAssociations"]) || array_key_exists("websiteAssociations", $context) ? $context["websiteAssociations"] : (function () { throw new RuntimeError('Variable "websiteAssociations" does not exist.', 186, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["websiteAssociation"]) {
// line 187
echo " <tr class=\"grid-card\">
<td class=\"col-6\">
<span class=\"grid-group\">
<span class=\"grid-control\">
<i class=\"icon-folder\"></i>
<span>";
// line 192
((twig_get_attribute($this->env, $this->source, $context["websiteAssociation"], "container", [], "any", false, false, false, 192)) ? (print (twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["websiteAssociation"], "container", [], "any", false, false, false, 192), "name", [], "any", false, false, false, 192), "html", null, true))) : (print ("[Global]")));
echo "</span>
</span>
</span>
</td>
<td class=\"checkbox-block col-3\">
<span class=\"grid-group\">
<span class=\"custom-control custom-checkbox\">
<input
type=\"checkbox\"
class=\"custom-control-input\"
id=\"enabled_";
// line 202
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["websiteAssociation"], "id", [], "any", false, false, false, 202), "html", null, true);
echo "\"
";
// line 203
if (twig_get_attribute($this->env, $this->source, $context["websiteAssociation"], "inheritance", [], "any", false, false, false, 203)) {
echo "checked";
}
// line 204
echo " data-trigger=\"toggler\"
data-toggler-url=\"";
// line 205
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app.app.dashboard.settings.accounts.roles.inheritance_toggle", ["accountRoleAssociation" => twig_get_attribute($this->env, $this->source, // line 206
$context["websiteAssociation"], "id", [], "any", false, false, false, 206)]), "html", null, true);
// line 207
echo "\"
/>
<label class=\"custom-control-label\"
for=\"enabled_";
// line 210
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["websiteAssociation"], "id", [], "any", false, false, false, 210), "html", null, true);
echo "\"></label>
</span>
</span>
</td>
<td class=\"col-2\">
<span>";
// line 215
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["websiteAssociation"], "role", [], "any", false, false, false, 215), "name", [], "any", false, false, false, 215), "html", null, true);
echo "</span>
</td>
<td class=\"col-1\">
<span class=\"table-action\">
";
// line 219
$this->loadTemplate("@ui2022/a.html.twig", "@App/dashboard/settings/accounts/roles/main.html.twig", 219)->display(twig_array_merge(twig_array_merge($context, ["link" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app.app.dashboard.settings.accounts.roles.delete", ["account" => twig_get_attribute($this->env, $this->source, // line 221
(isset($context["account"]) || array_key_exists("account", $context) ? $context["account"] : (function () { throw new RuntimeError('Variable "account" does not exist.', 221, $this->source); })()), "id", [], "any", false, false, false, 221), "association" => twig_get_attribute($this->env, $this->source, // line 222
$context["websiteAssociation"], "id", [], "any", false, false, false, 222)]), "modal" => "modal__result__sidepanel", "target" => "_modal", "html" => "<i class=\"icon-delete\"></i>"]), ['_args' => twig_to_array(["link" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app.app.dashboard.settings.accounts.roles.delete", ["account" => twig_get_attribute($this->env, $this->source, // line 221
(isset($context["account"]) || array_key_exists("account", $context) ? $context["account"] : (function () { throw new RuntimeError('Variable "account" does not exist.', 221, $this->source); })()), "id", [], "any", false, false, false, 221), "association" => twig_get_attribute($this->env, $this->source, // line 222
$context["websiteAssociation"], "id", [], "any", false, false, false, 222)]), "modal" => "modal__result__sidepanel", "target" => "_modal", "html" => "<i class=\"icon-delete\"></i>"])]));
// line 228
echo " </span>
</td>
</tr>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['websiteAssociation'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 232
echo " </tbody>
</table>
<div class=\"add-row-block\">
<div class=\"add-row\">
<a href=\"#\" data-show-form-id=\"";
// line 236
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["containerRoleForm"]) || array_key_exists("containerRoleForm", $context) ? $context["containerRoleForm"] : (function () { throw new RuntimeError('Variable "containerRoleForm" does not exist.', 236, $this->source); })()), "vars", [], "any", false, false, false, 236), "id", [], "any", false, false, false, 236), "html", null, true);
echo "\">+ Add</a>
</div>
";
// line 238
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["containerRoleForm"]) || array_key_exists("containerRoleForm", $context) ? $context["containerRoleForm"] : (function () { throw new RuntimeError('Variable "containerRoleForm" does not exist.', 238, $this->source); })()), 'form_start', ["action" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app.app.dashboard.settings.accounts.roles.main", ["account" => twig_get_attribute($this->env, $this->source, // line 240
(isset($context["account"]) || array_key_exists("account", $context) ? $context["account"] : (function () { throw new RuntimeError('Variable "account" does not exist.', 240, $this->source); })()), "id", [], "any", false, false, false, 240)]), "attr" => ["target" => "_modal"]]);
// line 245
echo "
<div class=\"add-action formcontainer formfield-colored\" style=\"display: none\">
<div class=\"col-6\">
";
// line 248
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["containerRoleForm"]) || array_key_exists("containerRoleForm", $context) ? $context["containerRoleForm"] : (function () { throw new RuntimeError('Variable "containerRoleForm" does not exist.', 248, $this->source); })()), "container", [], "any", false, false, false, 248), 'widget');
echo "
";
// line 249
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["containerRoleForm"]) || array_key_exists("containerRoleForm", $context) ? $context["containerRoleForm"] : (function () { throw new RuntimeError('Variable "containerRoleForm" does not exist.', 249, $this->source); })()), "container", [], "any", false, false, false, 249), 'errors');
echo "
</div>
<div class=\"col-3\">
";
// line 252
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["containerRoleForm"]) || array_key_exists("containerRoleForm", $context) ? $context["containerRoleForm"] : (function () { throw new RuntimeError('Variable "containerRoleForm" does not exist.', 252, $this->source); })()), "role", [], "any", false, false, false, 252), 'widget');
echo "
";
// line 253
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["containerRoleForm"]) || array_key_exists("containerRoleForm", $context) ? $context["containerRoleForm"] : (function () { throw new RuntimeError('Variable "containerRoleForm" does not exist.', 253, $this->source); })()), "role", [], "any", false, false, false, 253), 'errors');
echo "
</div>
<div class=\"col-2\">
";
// line 256
$this->loadTemplate("@ui2022/button--form.html.twig", "@App/dashboard/settings/accounts/roles/main.html.twig", 256)->display(twig_array_merge(twig_array_merge($context, ["type" => "submit", "text" => "Add", "styles" => "md gray", "attr" => ["class" => "px-4 mr-3", "disabled" => "disabled"]]), ['_args' => twig_to_array(["type" => "submit", "text" => "Add", "styles" => "md gray", "attr" => ["class" => "px-4 mr-3", "disabled" => "disabled"]])]));
// line 265
echo " </div>
<div class=\"col-1 close-icon\">
<span><a href=\"#\"><i class=\"icon-cross\"></i></a></span>
</div>
";
// line 271
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["containerRoleForm"]) || array_key_exists("containerRoleForm", $context) ? $context["containerRoleForm"] : (function () { throw new RuntimeError('Variable "containerRoleForm" does not exist.', 271, $this->source); })()), 'rest');
echo "
</div>
";
// line 274
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["containerRoleForm"]) || array_key_exists("containerRoleForm", $context) ? $context["containerRoleForm"] : (function () { throw new RuntimeError('Variable "containerRoleForm" does not exist.', 274, $this->source); })()), 'form_end');
echo "
</div>
</div>
";
}
// line 278
echo " </div>
</div>
</div>
</div>
<script>
(function (window, document, \$, undefined) {
\$(function () {
if (\$('.add-row-block').length > 0) {
\$('.add-row-block .add-row a').on(\"click\", function (e) {
e.preventDefault();
const formId = \$(this).data('show-form-id');
const \$form = \$('#' + formId);
const \$addAction = \$form.find('.add-action');
const \$iconCross = \$form.find('.icon-cross');
const \$submitButton = \$form.find('button[type=\"submit\"]');
const \$addRow = \$(this).parent();
\$addAction.show();
\$addRow.hide();
\$iconCross.click(function (e) {
e.preventDefault();
\$addAction.hide();
\$addRow.show();
selectDefaultOption(\$addAction.find('select[required]'));
\$form.off('change');
\$submitButton.attr('disabled', 'disabled');
return false;
});
\$form.on('change', function (e) {
if (this.checkValidity()) {
\$submitButton.removeAttr('disabled');
} else {
\$submitButton.attr('disabled', 'disabled');
}
});
selectDefaultOption(\$addAction.find('select[required]'));
return false;
})
}
function selectDefaultOption(\$selects) {
\$.each(\$selects, function (key, select) {
let selectedIndex = 0;
if (\$(select).find('option').length === 2) {
selectedIndex = 1;
}
\$(select).prop('selectedIndex', selectedIndex).trigger('change');
});
}
})
const \$togglerSuperadmin = \$('#toggler_superadmin');
\$togglerSuperadmin.on('done.toggler', function() {
\$('#sidepanel__result_view .nav-link.active').trigger('click');
});
\$('.super-user-access-button').on('click', function(e) {
e.preventDefault();
\$togglerSuperadmin.prop(\"checked\", \$togglerSuperadmin.prop(\"checked\"));
\$togglerSuperadmin.trigger('change');
return false;
});
})(window, document, jQuery);
</script>
";
// line 361
$this->loadTemplate("@ui2022/modal.html.twig", "@App/dashboard/settings/accounts/roles/main.html.twig", 361)->display(twig_array_merge(twig_array_merge($context, ["attr" => ["id" => "modal__result__sidepanel", "class" => "modal-ajax modal-delete", "target" => "_modal"], "dialog_styles" => "dialog--createmsg"]), ['_args' => twig_to_array(["attr" => ["id" => "modal__result__sidepanel", "class" => "modal-ajax modal-delete", "target" => "_modal"], "dialog_styles" => "dialog--createmsg"])]));
// line 369
echo " ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@App/dashboard/settings/accounts/roles/main.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 1036 => 369, 1034 => 361, 949 => 278, 942 => 274, 936 => 271, 928 => 265, 926 => 256, 920 => 253, 916 => 252, 910 => 249, 906 => 248, 901 => 245, 899 => 240, 898 => 238, 893 => 236, 887 => 232, 870 => 228, 868 => 222, 867 => 221, 866 => 222, 865 => 221, 864 => 219, 857 => 215, 849 => 210, 844 => 207, 842 => 206, 841 => 205, 838 => 204, 834 => 203, 830 => 202, 817 => 192, 810 => 187, 793 => 186, 771 => 167, 765 => 164, 757 => 158, 755 => 149, 749 => 146, 745 => 145, 739 => 142, 735 => 141, 730 => 138, 728 => 133, 727 => 131, 722 => 129, 716 => 126, 708 => 120, 706 => 111, 700 => 108, 696 => 107, 690 => 104, 686 => 103, 681 => 100, 679 => 95, 678 => 93, 673 => 91, 668 => 89, 662 => 85, 645 => 81, 643 => 75, 642 => 74, 641 => 75, 640 => 74, 639 => 72, 632 => 68, 623 => 62, 618 => 61, 615 => 60, 613 => 59, 607 => 55, 590 => 54, 573 => 39, 560 => 28, 558 => 27, 555 => 26, 553 => 23, 549 => 21, 543 => 18, 540 => 17, 538 => 16, 533 => 14, 529 => 12, 519 => 11, 509 => 10, 506 => 7, 496 => 6, 52 => 5, 49 => 4, 47 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% form_theme containerRoleForm '@ui2022/schoolnow/forms/themes/default.html.twig' %}
{% form_theme schoolRoleForm '@ui2022/schoolnow/forms/themes/default.html.twig' %}
{% form_theme listRoleForm '@ui2022/schoolnow/forms/themes/default.html.twig' %}
{% embed '@ui2022/schoolnow/modal--sidepanel__content.html.twig' with {} %}
{% block header %}
{% include '@App/dashboard/settings/accounts/includes/_header.html.twig' with {
active: 'permissions',
} %}
{% endblock %}
{% block body %}
<div class=\"contacts\">
<div class=\"row justify-content-end\">
<span class=\"font-13 text-medium mb-3 col-auto\">Last modified: {{ account.touchedAt ? account.touchedAt|ui_relativeDate : '-' }}</span>
</div>
{% if account.internalUid %}
<div class=\"row justify-content-end\">
<span class=\"font-13 text-medium mb-3 col-auto\">Internal UID: {{ account.internalUid }}</span>
</div>
{% endif %}
<div class=\"sidepanel__content--body\">
<div class=\"contacts__tabs\">
{% include '@App/dashboard/settings/accounts/includes/_tabs.html.twig' with {
active: 'permissions',
} %}
<div class=\"tab-content\">
{% if account.specialPermissions.superUser %}
<div class=\"super-user-permission-block\">
<div class=\"super-user-permission-block-inner-container\">
<h1>User has \"Super Admin\" access</h1>
<p class=\"text-black mt-4\">
Super admin access grants complete control over all functions in the website. To apply more granular permissions to this user, remove Super admin access and adjust their permissions here.
</p>
<a href=\"#\" class=\"super-user-access-button mt-3\">Remove Super Admin access</a>
</div>
</div>
{% else %}
<div class=\"messages-table uilib website-table\">
<table class=\"grid-main-block\">
<tbody>
<tr>
<th class=\"heading col-6\"><img src=\"/ui2022/images/message.png\" alt=\"Message\">
Messages
</th>
<th class=\"col-3\">
</th>
<th class=\"col-2\">
<span style=\"text-decoration: underline;\">Role</span>
</th>
<th class=\"col-1\"><span> </span></th>
</tr>
{% for messageAssociation in messageAssociations %}
<tr class=\"grid-card\">
<td class=\"col-6\">
<span class=\"grid-group\">
<span class=\"grid-control\">
{% set name = messageAssociation.list ? messageAssociation.list.name : (messageAssociation.school ? messageAssociation.school.name : '[Global]') %}
{% set icon = messageAssociation.list ? 'icon-templates' : 'icon-school-activities-report' %}
<i class=\"{{ icon }}\"></i>
<span>{{ name }}</span>
</span>
</span>
</td>
<td class=\"checkbox-block col-3\"></td>
<td class=\"col-2\">
<span>{{ messageAssociation.role.name }}</span>
</td>
<td class=\"col-1\">
<span class=\"table-action\">
{% include '@ui2022/a.html.twig' with {
link: path('app.app.dashboard.settings.accounts.roles.delete', {
account: account.id,
association: messageAssociation.id,
}),
modal: 'modal__result__sidepanel',
target: \"_modal\",
html: '<i class=\"icon-delete\"></i>'
} %}
</span>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class=\"add-row-block\">
<div class=\"add-row\">
<a href=\"#\" class=\"mr-3\" data-show-form-id=\"{{ schoolRoleForm.vars.id }}\">+ Add
school</a>
<a href=\"#\" data-show-form-id=\"{{ listRoleForm.vars.id }}\">+ Add list</a>
</div>
{{ form_start(schoolRoleForm, {
action: path('app.app.dashboard.settings.accounts.roles.main', {
account: account.id,
}),
attr: {
target: '_modal',
},
}) }}
<div class=\"add-action formcontainer formfield-colored\" style=\"display: none\">
<div class=\"col-6\">
{{ form_widget(schoolRoleForm.school) }}
{{ form_errors(schoolRoleForm.school) }}
</div>
<div class=\"col-3\">
{{ form_widget(schoolRoleForm.role) }}
{{ form_errors(schoolRoleForm.role) }}
</div>
<div class=\"col-2\">
{% include '@ui2022/button--form.html.twig' with {
type: 'submit',
text: 'Add',
styles: 'md gray',
attr: {
class: 'px-4 mr-3',
disabled: 'disabled',
},
} %}
</div>
<div class=\"col-1 close-icon\">
<span><a href=\"#\"><i class=\"icon-cross\"></i></a></span>
</div>
{{ form_rest(schoolRoleForm) }}
</div>
{{ form_end(schoolRoleForm) }}
{{ form_start(listRoleForm, {
action: path('app.app.dashboard.settings.accounts.roles.main', {
account: account.id,
}),
attr: {
target: '_modal',
},
}) }}
<div class=\"add-action formcontainer formfield-colored\" style=\"display: none\">
<div class=\"col-6\">
{{ form_widget(listRoleForm.list) }}
{{ form_errors(listRoleForm.list) }}
</div>
<div class=\"col-3\">
{{ form_widget(listRoleForm.role) }}
{{ form_errors(listRoleForm.role) }}
</div>
<div class=\"col-2\">
{% include '@ui2022/button--form.html.twig' with {
type: 'submit',
text: 'Add',
styles: 'md gray',
attr: {
class: 'px-4 mr-3',
disabled: 'disabled',
},
} %}
</div>
<div class=\"col-1 close-icon\">
<span><a href=\"#\"><i class=\"icon-cross\"></i></a></span>
</div>
{{ form_rest(listRoleForm) }}
</div>
{{ form_end(listRoleForm) }}
</div>
</div>
<div class=\"messages-table uilib website-table\">
<table class=\"grid-main-block\">
<tbody>
<tr>
<th class=\"heading col-6\"><img src=\"/ui2022/images/website.png\" alt=\"Website\">
Website
</th>
<th class=\"col-3\">
<span style=\"text-decoration: underline;\">Departments</span>
</th>
<th class=\"col-2\">
<span style=\"text-decoration: underline;\">Role</span>
</th>
<th class=\"col-1\"><span> </span></th>
</tr>
{% for websiteAssociation in websiteAssociations %}
<tr class=\"grid-card\">
<td class=\"col-6\">
<span class=\"grid-group\">
<span class=\"grid-control\">
<i class=\"icon-folder\"></i>
<span>{{ websiteAssociation.container ? websiteAssociation.container.name : '[Global]' }}</span>
</span>
</span>
</td>
<td class=\"checkbox-block col-3\">
<span class=\"grid-group\">
<span class=\"custom-control custom-checkbox\">
<input
type=\"checkbox\"
class=\"custom-control-input\"
id=\"enabled_{{ websiteAssociation.id }}\"
{% if websiteAssociation.inheritance %}checked{% endif %}
data-trigger=\"toggler\"
data-toggler-url=\"{{ path('app.app.dashboard.settings.accounts.roles.inheritance_toggle', {
accountRoleAssociation: websiteAssociation.id,
}) }}\"
/>
<label class=\"custom-control-label\"
for=\"enabled_{{ websiteAssociation.id }}\"></label>
</span>
</span>
</td>
<td class=\"col-2\">
<span>{{ websiteAssociation.role.name }}</span>
</td>
<td class=\"col-1\">
<span class=\"table-action\">
{% include '@ui2022/a.html.twig' with {
link: path('app.app.dashboard.settings.accounts.roles.delete', {
account: account.id,
association: websiteAssociation.id,
}),
modal: 'modal__result__sidepanel',
target: \"_modal\",
html: '<i class=\"icon-delete\"></i>'
} %}
</span>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class=\"add-row-block\">
<div class=\"add-row\">
<a href=\"#\" data-show-form-id=\"{{ containerRoleForm.vars.id }}\">+ Add</a>
</div>
{{ form_start(containerRoleForm, {
action: path('app.app.dashboard.settings.accounts.roles.main', {
account: account.id,
}),
attr: {
target: '_modal',
},
}) }}
<div class=\"add-action formcontainer formfield-colored\" style=\"display: none\">
<div class=\"col-6\">
{{ form_widget(containerRoleForm.container) }}
{{ form_errors(containerRoleForm.container) }}
</div>
<div class=\"col-3\">
{{ form_widget(containerRoleForm.role) }}
{{ form_errors(containerRoleForm.role) }}
</div>
<div class=\"col-2\">
{% include '@ui2022/button--form.html.twig' with {
type: 'submit',
text: 'Add',
styles: 'md gray',
attr: {
class: 'px-4 mr-3',
disabled: 'disabled',
},
} %}
</div>
<div class=\"col-1 close-icon\">
<span><a href=\"#\"><i class=\"icon-cross\"></i></a></span>
</div>
{{ form_rest(containerRoleForm) }}
</div>
{{ form_end(containerRoleForm) }}
</div>
</div>
{% endif %}
</div>
</div>
</div>
</div>
<script>
(function (window, document, \$, undefined) {
\$(function () {
if (\$('.add-row-block').length > 0) {
\$('.add-row-block .add-row a').on(\"click\", function (e) {
e.preventDefault();
const formId = \$(this).data('show-form-id');
const \$form = \$('#' + formId);
const \$addAction = \$form.find('.add-action');
const \$iconCross = \$form.find('.icon-cross');
const \$submitButton = \$form.find('button[type=\"submit\"]');
const \$addRow = \$(this).parent();
\$addAction.show();
\$addRow.hide();
\$iconCross.click(function (e) {
e.preventDefault();
\$addAction.hide();
\$addRow.show();
selectDefaultOption(\$addAction.find('select[required]'));
\$form.off('change');
\$submitButton.attr('disabled', 'disabled');
return false;
});
\$form.on('change', function (e) {
if (this.checkValidity()) {
\$submitButton.removeAttr('disabled');
} else {
\$submitButton.attr('disabled', 'disabled');
}
});
selectDefaultOption(\$addAction.find('select[required]'));
return false;
})
}
function selectDefaultOption(\$selects) {
\$.each(\$selects, function (key, select) {
let selectedIndex = 0;
if (\$(select).find('option').length === 2) {
selectedIndex = 1;
}
\$(select).prop('selectedIndex', selectedIndex).trigger('change');
});
}
})
const \$togglerSuperadmin = \$('#toggler_superadmin');
\$togglerSuperadmin.on('done.toggler', function() {
\$('#sidepanel__result_view .nav-link.active').trigger('click');
});
\$('.super-user-access-button').on('click', function(e) {
e.preventDefault();
\$togglerSuperadmin.prop(\"checked\", \$togglerSuperadmin.prop(\"checked\"));
\$togglerSuperadmin.trigger('change');
return false;
});
})(window, document, jQuery);
</script>
{% include '@ui2022/modal.html.twig' with {
attr: {
id: 'modal__result__sidepanel',
class: 'modal-ajax modal-delete',
target: \"_modal\",
},
dialog_styles: 'dialog--createmsg',
} %}
{% endblock %}
{% endembed %}
", "@App/dashboard/settings/accounts/roles/main.html.twig", "/var/www/campussuite/src/App/Resources/views/dashboard/settings/accounts/roles/main.html.twig");
}
}