<?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;

/* launch/blocks/acs.html.twig */
class __TwigTemplate_92d05175d85e6066d094f9dd89c12398afb6062ce575b607396818253452453f extends 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_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "launch/blocks/acs.html.twig"));

        // line 1
        if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["token"]) || array_key_exists("token", $context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.', 1, $this->source); })()), "payload", [], "any", false, false, false, 1), "acs", [], "any", false, false, false, 1)) {
            // line 2
            echo "    <div class=\"alert alert-info\" role=\"alert\">
        <i class=\"fas fa-file-signature\"></i>&nbsp;
        ACS claim provided in message
    </div>
    <div class=\"accordion md-accordion\" id=\"accordionAcsDetails\" role=\"tablist\" aria-multiselectable=\"true\">
        <div class=\"card bg-light\">
            <div class=\"card-header dropdown-toggle clickable collapsed\" role=\"tab\" id=\"accordionAcsDetailsHeading\" data-toggle=\"collapse\" data-parent=\"#accordionAcsDetails\" href=\"#accordionAcsDetailsBody\"
                 aria-expanded=\"false\" aria-controls=\"accordionAcsDetailsBody\">
                <i class=\"fas fa-info-circle\"></i>&nbsp;ACS claim details
            </div>
            <div id=\"accordionAcsDetailsBody\" class=\"collapse card-body\" role=\"tabpanel\" aria-labelledby=\"accordionAcsDetailsHeading\" data-parent=\"#accordionAcsDetails\">
                <div class=\"row\">
                    <div class=\"col-md-6\">
                        <dl class=\"list-unstyled\">
                            <dt>Claim service url</dt>
                            <dd><a href=\"";
            // line 17
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["token"]) || array_key_exists("token", $context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.', 17, $this->source); })()), "payload", [], "any", false, false, false, 17), "acs", [], "any", false, false, false, 17), "assessmentControlUrl", [], "any", false, false, false, 17), "html", null, true);
            echo "\" target=\"_blank\">";
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["token"]) || array_key_exists("token", $context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.', 17, $this->source); })()), "payload", [], "any", false, false, false, 17), "acs", [], "any", false, false, false, 17), "assessmentControlUrl", [], "any", false, false, false, 17), "html", null, true);
            echo "</a></dd>
                        </dl>
                    </div>
                    <div class=\"col-md-6\">
                        <dl class=\"list-unstyled\">
                            <dt>Claim actions</dt>
                            <dd><code>";
            // line 23
            echo twig_escape_filter($this->env, twig_join_filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["token"]) || array_key_exists("token", $context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.', 23, $this->source); })()), "payload", [], "any", false, false, false, 23), "acs", [], "any", false, false, false, 23), "actions", [], "any", false, false, false, 23), ", "), "html", null, true);
            echo "</code></dd>
                        </dl>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <br/>
    <div class=\"card bg-light\">
        <div class=\"card-header\">
            <i class=\"fas fa-sign-in-alt\"></i>&nbsp;ACS service request
        </div>
        <div class=\"card-body\">
            <div class=\"form-row\">
                <div class=\"col col-md-12\">
                    <input type=\"text\" id=\"acsUrl\" class=\"form-control\" placeholder=\"Service Url\" value=\"";
            // line 38
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["token"]) || array_key_exists("token", $context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.', 38, $this->source); })()), "payload", [], "any", false, false, false, 38), "acs", [], "any", false, false, false, 38), "assessmentControlUrl", [], "any", false, false, false, 38), "html", null, true);
            echo "\" aria-describedby=\"boUrlHelp\" readonly>
                    <small id=\"acsUrlHelp\" class=\"form-text text-muted\">Service url</small>
                </div>
            </div>
            <br/>
            <div class=\"form-row\">
                <div class=\"col col-md-3\">
                    <input type=\"text\" id=\"acsResourceLink\" class=\"form-control\" placeholder=\"Resource link\" value=\"";
            // line 45
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["token"]) || array_key_exists("token", $context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.', 45, $this->source); })()), "payload", [], "any", false, false, false, 45), "resourceLink", [], "any", false, false, false, 45), "identifier", [], "any", false, false, false, 45), "html", null, true);
            echo "\" aria-describedby=\"acsResourceLinkHelp\">
                    <small id=\"acsResourceLinkHelp\" class=\"form-text text-muted\">Resource link identifier</small>
                </div>
                <div class=\"col col-md-3\">
                    <input type=\"text\" id=\"acsIss\" class=\"form-control\" placeholder=\"Issuer\" value=\"";
            // line 49
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["token"]) || array_key_exists("token", $context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.', 49, $this->source); })()), "payload", [], "any", false, false, false, 49), "token", [], "any", false, false, false, 49), "claims", [], "any", false, false, false, 49), "get", [0 => "iss"], "method", false, false, false, 49), "html", null, true);
            echo "\" aria-describedby=\"acsIssHelp\">
                    <small id=\"acsIssHelp\" class=\"form-text text-muted\">Issuer identifier</small>
                </div>
                <div class=\"col col-md-3\">
                    <input type=\"text\" id=\"acsSub\" class=\"form-control\" placeholder=\"User\" value=\"";
            // line 53
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["token"]) || array_key_exists("token", $context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.', 53, $this->source); })()), "payload", [], "any", false, false, false, 53), "token", [], "any", false, false, false, 53), "claims", [], "any", false, false, false, 53), "get", [0 => "sub"], "method", false, false, false, 53), "html", null, true);
            echo "\" aria-describedby=\"acsSubHelp\">
                    <small id=\"acsSubHelp\" class=\"form-text text-muted\">User identifier</small>
                </div>
                <div class=\"col col-md-3\">
                    <input type=\"number\" id=\"acsAttemptNumber\" class=\"form-control\" placeholder=\"Attempt number\" value=\"";
            // line 57
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["token"]) || array_key_exists("token", $context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.', 57, $this->source); })()), "payload", [], "any", false, false, false, 57), "proctoringAttemptNumber", [], "any", false, false, false, 57), "html", null, true);
            echo "\" aria-describedby=\"acsAttemptNumberHelp\">
                    <small id=\"acsAttemptNumberHelp\" class=\"form-text text-muted\">Attempt number</small>
                </div>
            </div>
            <br/>
            <div class=\"form-row\">
                <div class=\"col col-md-3\">
                    <div class=\"form-group\">
                        <select id=\"acsAction\" aria-describedby=\"acsActionHelp\" class=\"form-control\">
                            ";
            // line 66
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["token"]) || array_key_exists("token", $context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.', 66, $this->source); })()), "payload", [], "any", false, false, false, 66), "acs", [], "any", false, false, false, 66), "actions", [], "any", false, false, false, 66));
            foreach ($context['_seq'] as $context["_key"] => $context["action"]) {
                // line 67
                echo "                                <option value=\"";
                echo twig_escape_filter($this->env, $context["action"], "html", null, true);
                echo "\">";
                echo twig_escape_filter($this->env, $context["action"], "html", null, true);
                echo "</option>
                            ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['action'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 69
            echo "                        </select>
                        <small id=\"acsActionHelp\" class=\"form-text text-muted\">Action</small>
                    </div>
                </div>
                <div class=\"col col-md-3\">
                    <input type=\"number\" id=\"acsExtraTime\" class=\"form-control\" placeholder=\"Extra time\" aria-describedby=\"acsExtraTimeHelp\">
                    <small id=\"acsExtraTimeHelp\" class=\"form-text text-muted\">Extra time</small>
                </div>
                <div class=\"col col-md-3\">
                    <div class=\"form-group\">
                        <div class=\"input-group\" id=\"acsDatetimepicker\" data-target-input=\"nearest\">
                            <div class=\"input-group-prepend\">
                                <a id=\"launchUrlLoad\" class=\"btn btn-secondary text-white\" data-target=\"#acsDatetimepicker\" data-toggle=\"datetimepicker\">
                                    <i class=\"fas fa-calendar-day\" aria-hidden=\"true\"></i>
                                </a>
                            </div>
                            <input id=\"acsDate\" type=\"text\" class=\"form-control datetimepicker-input\" data-target=\"#acsDatetimepicker\" aria-describedby=\"acsDateHelp\"/>
                        </div>
                        <small id=\"acsDateHelp\" class=\"form-text text-muted\">Incident date</small>
                    </div>
                </div>
                <div class=\"col col-md-3\">
                    <input type=\"number\" min=\"0\" max=\"1\" step=\"0.1\" id=\"acsSeverity\" class=\"form-control\" placeholder=\"Incident severity\" aria-describedby=\"acsSeverityHelp\">
                    <small id=\"acsSeverityHelp\" class=\"form-text text-muted\">Incident severity</small>
                </div>
            </div>
            <div class=\"form-row\">
                <div class=\"col col-md-3\">
                    <input type=\"text\" min=\"0\" max=\"1\" id=\"acsReasonCode\" class=\"form-control\" placeholder=\"Reason code\" aria-describedby=\"acsReasonCodeHelp\">
                    <small id=\"acsReasonCodeHelp\" class=\"form-text text-muted\">Reason code</small>
                </div>
                <div class=\"col col-md-9\">
                    <input type=\"text\" min=\"0\" max=\"1\" id=\"acsReasonMessage\" class=\"form-control\" placeholder=\"Reason message\" aria-describedby=\"acsReasonMessageHelp\">
                    <small id=\"acsReasonMessageHelp\" class=\"form-text text-muted\">Reason message</small>
                </div>
            </div>
        </div>
        <div class=\"card-footer text-muted\">
            <div class=\"btn-group float-right\" role=\"group\" aria-label=\"Basic example\">
                <button id=\"acsLoad\" class=\"btn-primary btn\">
                    <i id=\"acsCall\" class=\"fas fa-sign-in-alt\"></i>&nbsp;Call ACS service
                </button>
                <button id=\"acsReset\" class=\"btn-secondary btn\">
                    <i class=\"fas fa-undo\"></i>&nbsp;Reset
                </button>
            </div>
        </div>
    </div>
    <div id=\"acsZone\"></div>
    <script>
        \$('#acsDatetimepicker').datetimepicker({
            format: 'YYYY-MM-DD HH:mm',
            allowInputToggle: true,
            buttons: {
                showToday: true,
                showClear: true,
                showClose: true
            }
        });

        \$(\"#acsLoad\").click(function(){
            \$.ajax({
                url: \"";
            // line 131
            echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("tool_ajax_service_acs");
            echo "\",
                method: \"POST\",
                data: {
                    registration: \"";
            // line 134
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["token"]) || array_key_exists("token", $context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.', 134, $this->source); })()), "registration", [], "any", false, false, false, 134), "identifier", [], "any", false, false, false, 134), "html", null, true);
            echo "\",
                    acsUrl: \$(\"#acsUrl\").val(),
                    acsAction: \$(\"#acsAction\").val(),
                    acsResourceLink: \$(\"#acsResourceLink\").val(),
                    acsIss: \$(\"#acsIss\").val(),
                    acsSub: \$(\"#acsSub\").val(),
                    acsAttemptNumber: \$(\"#acsAttemptNumber\").val(),
                    acsExtraTime: \$(\"#acsExtraTime\").val(),
                    acsDate: \$(\"#acsDate\").val(),
                    acsSeverity: \$(\"#acsSeverity\").val(),
                    acsReasonCode: \$(\"#acsReasonCode\").val(),
                    acsReasonMessage: \$(\"#acsReasonMessage\").val()
                },
                beforeSend: function(result){
                    \$(\"#acsCall\").removeClass(\"fa-sign-in-alt\");
                    \$(\"#acsCall\").addClass(\"fa-spinner fa-spin\");
                },
                success: function(result){
                    \$(\"#acsCall\").removeClass(\"fa-spinner fa-spin\");
                    \$(\"#acsCall\").addClass(\"fa-sign-in-alt\");
                    \$(\"#acsZone\").html(result);
                },
                error: function(result){
                    \$(\"#acsCall\").removeClass(\"fa-spinner fa-spin\");
                    \$(\"#acsCall\").addClass(\"fa-sign-in-alt\");
                    \$(\"#acsZone\").html(
                        '<br/><div class=\"card bg-light\">' +
                        '<div class=\"card-header\"><i class=\"fas fa-file-signature\"></i>&nbsp;ACS service response</div>' +
                        '<div class=\"card-body\">' +
                        '<h5 class=\"card-title\"></h5>' +
                        '<div class=\"alert alert-danger\" role=\"alert\">'+
                        '<i class=\"fas fa-exclamation-circle\"></i>&nbsp;Error ' +
                        result.responseJSON.code +
                        ': ' +
                        result.responseJSON.message +
                        '</div>' +
                        '</div>' +
                        '</div>'
                    );
                }
            });
        });

        \$(\"#acsReset\").click(function(){
            \$(\"#acsZone\").html(\"\");
            \$('#acsAction :nth-child(1)').prop('selected', true);
            \$(\"#acsResourceLink\").val(\"";
            // line 180
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["token"]) || array_key_exists("token", $context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.', 180, $this->source); })()), "payload", [], "any", false, false, false, 180), "resourceLink", [], "any", false, false, false, 180), "identifier", [], "any", false, false, false, 180), "html", null, true);
            echo "\");
            \$(\"#acsIss\").val(\"";
            // line 181
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["token"]) || array_key_exists("token", $context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.', 181, $this->source); })()), "payload", [], "any", false, false, false, 181), "token", [], "any", false, false, false, 181), "claims", [], "any", false, false, false, 181), "get", [0 => "iss"], "method", false, false, false, 181), "html", null, true);
            echo "\");
            \$(\"#acsSub\").val(\"";
            // line 182
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["token"]) || array_key_exists("token", $context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.', 182, $this->source); })()), "payload", [], "any", false, false, false, 182), "token", [], "any", false, false, false, 182), "claims", [], "any", false, false, false, 182), "get", [0 => "sub"], "method", false, false, false, 182), "html", null, true);
            echo "\");
            \$(\"#acsAttemptNumber\").val(\"";
            // line 183
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["token"]) || array_key_exists("token", $context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.', 183, $this->source); })()), "payload", [], "any", false, false, false, 183), "proctoringAttemptNumber", [], "any", false, false, false, 183), "html", null, true);
            echo "\");
            \$(\"#acsDate\").val(\"\");
            \$(\"#acsExtraTime\").val(\"\");
            \$(\"#acsSeverity\").val(\"\");
            \$(\"#acsReasonCode\").val(\"\");
            \$(\"#acsReasonMessage\").val(\"\");
        });
    </script>
";
        } else {
            // line 192
            echo "    <div class=\"alert alert-dark alert-no-margin-bottom\" role=\"alert\">
        <i class=\"fas fa-ban\"></i>&nbsp;No ACS claim provided in message
    </div>
";
        }
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    public function getTemplateName()
    {
        return "launch/blocks/acs.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  289 => 192,  277 => 183,  273 => 182,  269 => 181,  265 => 180,  216 => 134,  210 => 131,  146 => 69,  135 => 67,  131 => 66,  119 => 57,  112 => 53,  105 => 49,  98 => 45,  88 => 38,  70 => 23,  59 => 17,  42 => 2,  40 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("{% if token.payload.acs %}
    <div class=\"alert alert-info\" role=\"alert\">
        <i class=\"fas fa-file-signature\"></i>&nbsp;
        ACS claim provided in message
    </div>
    <div class=\"accordion md-accordion\" id=\"accordionAcsDetails\" role=\"tablist\" aria-multiselectable=\"true\">
        <div class=\"card bg-light\">
            <div class=\"card-header dropdown-toggle clickable collapsed\" role=\"tab\" id=\"accordionAcsDetailsHeading\" data-toggle=\"collapse\" data-parent=\"#accordionAcsDetails\" href=\"#accordionAcsDetailsBody\"
                 aria-expanded=\"false\" aria-controls=\"accordionAcsDetailsBody\">
                <i class=\"fas fa-info-circle\"></i>&nbsp;ACS claim details
            </div>
            <div id=\"accordionAcsDetailsBody\" class=\"collapse card-body\" role=\"tabpanel\" aria-labelledby=\"accordionAcsDetailsHeading\" data-parent=\"#accordionAcsDetails\">
                <div class=\"row\">
                    <div class=\"col-md-6\">
                        <dl class=\"list-unstyled\">
                            <dt>Claim service url</dt>
                            <dd><a href=\"{{ token.payload.acs.assessmentControlUrl }}\" target=\"_blank\">{{ token.payload.acs.assessmentControlUrl }}</a></dd>
                        </dl>
                    </div>
                    <div class=\"col-md-6\">
                        <dl class=\"list-unstyled\">
                            <dt>Claim actions</dt>
                            <dd><code>{{ token.payload.acs.actions|join(', ') }}</code></dd>
                        </dl>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <br/>
    <div class=\"card bg-light\">
        <div class=\"card-header\">
            <i class=\"fas fa-sign-in-alt\"></i>&nbsp;ACS service request
        </div>
        <div class=\"card-body\">
            <div class=\"form-row\">
                <div class=\"col col-md-12\">
                    <input type=\"text\" id=\"acsUrl\" class=\"form-control\" placeholder=\"Service Url\" value=\"{{ token.payload.acs.assessmentControlUrl }}\" aria-describedby=\"boUrlHelp\" readonly>
                    <small id=\"acsUrlHelp\" class=\"form-text text-muted\">Service url</small>
                </div>
            </div>
            <br/>
            <div class=\"form-row\">
                <div class=\"col col-md-3\">
                    <input type=\"text\" id=\"acsResourceLink\" class=\"form-control\" placeholder=\"Resource link\" value=\"{{ token.payload.resourceLink.identifier }}\" aria-describedby=\"acsResourceLinkHelp\">
                    <small id=\"acsResourceLinkHelp\" class=\"form-text text-muted\">Resource link identifier</small>
                </div>
                <div class=\"col col-md-3\">
                    <input type=\"text\" id=\"acsIss\" class=\"form-control\" placeholder=\"Issuer\" value=\"{{ token.payload.token.claims.get('iss') }}\" aria-describedby=\"acsIssHelp\">
                    <small id=\"acsIssHelp\" class=\"form-text text-muted\">Issuer identifier</small>
                </div>
                <div class=\"col col-md-3\">
                    <input type=\"text\" id=\"acsSub\" class=\"form-control\" placeholder=\"User\" value=\"{{ token.payload.token.claims.get('sub') }}\" aria-describedby=\"acsSubHelp\">
                    <small id=\"acsSubHelp\" class=\"form-text text-muted\">User identifier</small>
                </div>
                <div class=\"col col-md-3\">
                    <input type=\"number\" id=\"acsAttemptNumber\" class=\"form-control\" placeholder=\"Attempt number\" value=\"{{ token.payload.proctoringAttemptNumber }}\" aria-describedby=\"acsAttemptNumberHelp\">
                    <small id=\"acsAttemptNumberHelp\" class=\"form-text text-muted\">Attempt number</small>
                </div>
            </div>
            <br/>
            <div class=\"form-row\">
                <div class=\"col col-md-3\">
                    <div class=\"form-group\">
                        <select id=\"acsAction\" aria-describedby=\"acsActionHelp\" class=\"form-control\">
                            {% for action in token.payload.acs.actions %}
                                <option value=\"{{ action }}\">{{ action }}</option>
                            {% endfor %}
                        </select>
                        <small id=\"acsActionHelp\" class=\"form-text text-muted\">Action</small>
                    </div>
                </div>
                <div class=\"col col-md-3\">
                    <input type=\"number\" id=\"acsExtraTime\" class=\"form-control\" placeholder=\"Extra time\" aria-describedby=\"acsExtraTimeHelp\">
                    <small id=\"acsExtraTimeHelp\" class=\"form-text text-muted\">Extra time</small>
                </div>
                <div class=\"col col-md-3\">
                    <div class=\"form-group\">
                        <div class=\"input-group\" id=\"acsDatetimepicker\" data-target-input=\"nearest\">
                            <div class=\"input-group-prepend\">
                                <a id=\"launchUrlLoad\" class=\"btn btn-secondary text-white\" data-target=\"#acsDatetimepicker\" data-toggle=\"datetimepicker\">
                                    <i class=\"fas fa-calendar-day\" aria-hidden=\"true\"></i>
                                </a>
                            </div>
                            <input id=\"acsDate\" type=\"text\" class=\"form-control datetimepicker-input\" data-target=\"#acsDatetimepicker\" aria-describedby=\"acsDateHelp\"/>
                        </div>
                        <small id=\"acsDateHelp\" class=\"form-text text-muted\">Incident date</small>
                    </div>
                </div>
                <div class=\"col col-md-3\">
                    <input type=\"number\" min=\"0\" max=\"1\" step=\"0.1\" id=\"acsSeverity\" class=\"form-control\" placeholder=\"Incident severity\" aria-describedby=\"acsSeverityHelp\">
                    <small id=\"acsSeverityHelp\" class=\"form-text text-muted\">Incident severity</small>
                </div>
            </div>
            <div class=\"form-row\">
                <div class=\"col col-md-3\">
                    <input type=\"text\" min=\"0\" max=\"1\" id=\"acsReasonCode\" class=\"form-control\" placeholder=\"Reason code\" aria-describedby=\"acsReasonCodeHelp\">
                    <small id=\"acsReasonCodeHelp\" class=\"form-text text-muted\">Reason code</small>
                </div>
                <div class=\"col col-md-9\">
                    <input type=\"text\" min=\"0\" max=\"1\" id=\"acsReasonMessage\" class=\"form-control\" placeholder=\"Reason message\" aria-describedby=\"acsReasonMessageHelp\">
                    <small id=\"acsReasonMessageHelp\" class=\"form-text text-muted\">Reason message</small>
                </div>
            </div>
        </div>
        <div class=\"card-footer text-muted\">
            <div class=\"btn-group float-right\" role=\"group\" aria-label=\"Basic example\">
                <button id=\"acsLoad\" class=\"btn-primary btn\">
                    <i id=\"acsCall\" class=\"fas fa-sign-in-alt\"></i>&nbsp;Call ACS service
                </button>
                <button id=\"acsReset\" class=\"btn-secondary btn\">
                    <i class=\"fas fa-undo\"></i>&nbsp;Reset
                </button>
            </div>
        </div>
    </div>
    <div id=\"acsZone\"></div>
    <script>
        \$('#acsDatetimepicker').datetimepicker({
            format: 'YYYY-MM-DD HH:mm',
            allowInputToggle: true,
            buttons: {
                showToday: true,
                showClear: true,
                showClose: true
            }
        });

        \$(\"#acsLoad\").click(function(){
            \$.ajax({
                url: \"{{ path('tool_ajax_service_acs') }}\",
                method: \"POST\",
                data: {
                    registration: \"{{ token.registration.identifier }}\",
                    acsUrl: \$(\"#acsUrl\").val(),
                    acsAction: \$(\"#acsAction\").val(),
                    acsResourceLink: \$(\"#acsResourceLink\").val(),
                    acsIss: \$(\"#acsIss\").val(),
                    acsSub: \$(\"#acsSub\").val(),
                    acsAttemptNumber: \$(\"#acsAttemptNumber\").val(),
                    acsExtraTime: \$(\"#acsExtraTime\").val(),
                    acsDate: \$(\"#acsDate\").val(),
                    acsSeverity: \$(\"#acsSeverity\").val(),
                    acsReasonCode: \$(\"#acsReasonCode\").val(),
                    acsReasonMessage: \$(\"#acsReasonMessage\").val()
                },
                beforeSend: function(result){
                    \$(\"#acsCall\").removeClass(\"fa-sign-in-alt\");
                    \$(\"#acsCall\").addClass(\"fa-spinner fa-spin\");
                },
                success: function(result){
                    \$(\"#acsCall\").removeClass(\"fa-spinner fa-spin\");
                    \$(\"#acsCall\").addClass(\"fa-sign-in-alt\");
                    \$(\"#acsZone\").html(result);
                },
                error: function(result){
                    \$(\"#acsCall\").removeClass(\"fa-spinner fa-spin\");
                    \$(\"#acsCall\").addClass(\"fa-sign-in-alt\");
                    \$(\"#acsZone\").html(
                        '<br/><div class=\"card bg-light\">' +
                        '<div class=\"card-header\"><i class=\"fas fa-file-signature\"></i>&nbsp;ACS service response</div>' +
                        '<div class=\"card-body\">' +
                        '<h5 class=\"card-title\"></h5>' +
                        '<div class=\"alert alert-danger\" role=\"alert\">'+
                        '<i class=\"fas fa-exclamation-circle\"></i>&nbsp;Error ' +
                        result.responseJSON.code +
                        ': ' +
                        result.responseJSON.message +
                        '</div>' +
                        '</div>' +
                        '</div>'
                    );
                }
            });
        });

        \$(\"#acsReset\").click(function(){
            \$(\"#acsZone\").html(\"\");
            \$('#acsAction :nth-child(1)').prop('selected', true);
            \$(\"#acsResourceLink\").val(\"{{ token.payload.resourceLink.identifier }}\");
            \$(\"#acsIss\").val(\"{{ token.payload.token.claims.get('iss') }}\");
            \$(\"#acsSub\").val(\"{{ token.payload.token.claims.get('sub') }}\");
            \$(\"#acsAttemptNumber\").val(\"{{ token.payload.proctoringAttemptNumber }}\");
            \$(\"#acsDate\").val(\"\");
            \$(\"#acsExtraTime\").val(\"\");
            \$(\"#acsSeverity\").val(\"\");
            \$(\"#acsReasonCode\").val(\"\");
            \$(\"#acsReasonMessage\").val(\"\");
        });
    </script>
{% else %}
    <div class=\"alert alert-dark alert-no-margin-bottom\" role=\"alert\">
        <i class=\"fas fa-ban\"></i>&nbsp;No ACS claim provided in message
    </div>
{% endif %}", "launch/blocks/acs.html.twig", "C:\\wamp64\\www\\devkit-lti1p3-master-tool\\templates\\launch\\blocks\\acs.html.twig");
    }
}
