<?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;
/* Entry/school_certification.twig */
class __TwigTemplate_e5d3004e3dbe72b6d47d328218c62f7b13234b0c25a976e95ddf9406178253c0 extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'javascript' => [$this, 'block_javascript'],
'stylesheet' => [$this, 'block_stylesheet'],
'main' => [$this, 'block_main'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 22
return "default_frame.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Entry/school_certification.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Entry/school_certification.twig"));
// line 24
$context["body_class"] = "registration_page";
// line 22
$this->parent = $this->loadTemplate("default_frame.twig", "Entry/school_certification.twig", 22);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 26
public function block_javascript($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
// line 27
echo " <script>
";
// line 28
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["Schools"]) || array_key_exists("Schools", $context) ? $context["Schools"] : (function () { throw new RuntimeError('Variable "Schools" does not exist.', 28, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["school"]) {
// line 29
echo " \$('#School option[value=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["school"], "school_id", [], "any", false, false, true, 29), 29, $this->source), "html", null, true);
echo "\"]').attr('data-key-visible', ";
echo ((twig_get_attribute($this->env, $this->source, $context["school"], "visible_school_key", [], "any", false, false, true, 29)) ? (1) : (0));
echo ");
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['school'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 31
echo " \$('#School').change(function(){
if(\$('option:selected', \$(this)).data('key-visible')) {
\$('#top_box__name').show();
}
else {
\$('#top_box__name').hide();
}
});
\$('#top_box__body').submit(function(){
\$('#top_box__name .form-group .error').remove();
if(\$('#top_box__name').is(\":visible\") && !\$('#school_key').val()) {
\$('#top_box__name .form-group').append('<p class=\"red error\">入力してください</p>');
return false;
}
});
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 49
public function block_stylesheet($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheet"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheet"));
// line 50
echo "<style>
.input_School select{
width: 48% !important;
}
</style>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 57
public function block_main($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 58
echo "<h1 class=\"title_bar nikke\">学校情報認証</h1>
<div id=\"top_wrap\" class=\"container-fluid\">
<div id=\"top_box\" class=\"row\">
<div id=\"top_box__body\" class=\"col-md-10 col-md-offset-1\">
";
// line 63
if (((null === (isset($context["School"]) || array_key_exists("School", $context) ? $context["School"] : (function () { throw new RuntimeError('Variable "School" does not exist.', 63, $this->source); })())) || twig_get_attribute($this->env, $this->source, (isset($context["School"]) || array_key_exists("School", $context) ? $context["School"] : (function () { throw new RuntimeError('Variable "School" does not exist.', 63, $this->source); })()), "visible", [], "any", false, false, true, 63))) {
// line 64
echo " ";
if ((isset($context["school_not_found"]) || array_key_exists("school_not_found", $context) ? $context["school_not_found"] : (function () { throw new RuntimeError('Variable "school_not_found" does not exist.', 64, $this->source); })())) {
// line 65
echo " <p>※ 学校コードに該当していないので、ご確認お願い致します。</p>
";
} else {
// line 67
echo " <form method=\"post\" action=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("entry", ["gcd" => (isset($context["gcd"]) || array_key_exists("gcd", $context) ? $context["gcd"] : (function () { throw new RuntimeError('Variable "gcd" does not exist.', 67, $this->source); })())]), "html", null, true);
echo "\">
";
// line 69
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 69, $this->source); })()), "_token", [], "any", false, false, true, 69), 69, $this->source), 'widget');
echo "
<div id=\"top_box__body_inner\" class=\"dl_table\">
";
// line 71
if ((null === (isset($context["School"]) || array_key_exists("School", $context) ? $context["School"] : (function () { throw new RuntimeError('Variable "School" does not exist.', 71, $this->source); })()))) {
// line 72
echo " <dl id=\"top_box__School\">
<dt>";
// line 73
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 73, $this->source); })()), "School", [], "any", false, false, true, 73), 73, $this->source), 'label');
echo "</dt>
<dd class=\"form-group input_School\">
";
// line 75
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 75, $this->source); })()), "School", [], "any", false, false, true, 75), 75, $this->source), 'widget');
echo "
";
// line 76
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 76, $this->source); })()), "School", [], "any", false, false, true, 76), 76, $this->source), 'errors');
echo "
</dd>
</dl>
";
} else {
// line 80
echo " <dl id=\"top_box__kana\">
<dt></dt>
<dd class=\"form-group input_name\">
";
// line 83
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["School"]) || array_key_exists("School", $context) ? $context["School"] : (function () { throw new RuntimeError('Variable "School" does not exist.', 83, $this->source); })()), "school_name", [], "any", false, false, true, 83), 83, $this->source), "html", null, true);
echo "
</dd>
</dl>
";
}
// line 87
echo " ";
if (((isset($context["School"]) || array_key_exists("School", $context) ? $context["School"] : (function () { throw new RuntimeError('Variable "School" does not exist.', 87, $this->source); })()) && (twig_get_attribute($this->env, $this->source, (isset($context["School"]) || array_key_exists("School", $context) ? $context["School"] : (function () { throw new RuntimeError('Variable "School" does not exist.', 87, $this->source); })()), "visible_school_key", [], "any", false, false, true, 87) != 1))) {
// line 88
echo " <div style=\"display:none\">
";
// line 89
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 89, $this->source); })()), "school_key", [], "any", false, false, true, 89), 89, $this->source), 'widget', ["attr" => ["value" => twig_get_attribute($this->env, $this->source, (isset($context["School"]) || array_key_exists("School", $context) ? $context["School"] : (function () { throw new RuntimeError('Variable "School" does not exist.', 89, $this->source); })()), "school_key", [], "any", false, false, true, 89)]]);
echo "
";
// line 90
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 90, $this->source); })()), "school_key", [], "any", false, false, true, 90), 90, $this->source), 'errors');
echo "
</div>
";
} else {
// line 93
echo " <dl id=\"top_box__name\">
<dt></dt>
<dd class=\"form-group input_name\">
";
// line 96
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 96, $this->source); })()), "school_key", [], "any", false, false, true, 96), 96, $this->source), 'widget');
echo "
";
// line 97
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 97, $this->source); })()), "school_key", [], "any", false, false, true, 97), 97, $this->source), 'errors');
echo "
";
// line 98
if (((isset($context["certification_error_flg"]) || array_key_exists("certification_error_flg", $context) ? $context["certification_error_flg"] : (function () { throw new RuntimeError('Variable "certification_error_flg" does not exist.', 98, $this->source); })()) == 1)) {
// line 99
echo " <span>※認証に失敗しました。</span>
";
}
// line 101
echo " </dd>
</dl>
";
}
// line 104
echo " <input id=\"top_box__hidden_mode\" type=\"hidden\" name=\"mode\" value=\"certify\">
</div>
<div id=\"top_box__footer\" class=\"row no-padding\">
<div id=\"top_box__button_menu\" class=\"btn_group col-sm-offset-4 col-sm-4\">
<p>
<button type=\"submit\" class=\"btn btn-primary btn-block def_btn ya radius1\">生徒情報の登録へ</button>
</p>
</div>
</div>
</form>
";
}
// line 116
echo " ";
} else {
// line 117
echo " <p style=\"text-align: center\">この学校URLは現在非公開となっています。</p>
";
}
// line 119
echo " </div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "Entry/school_certification.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 275 => 119, 271 => 117, 268 => 116, 254 => 104, 249 => 101, 245 => 99, 243 => 98, 239 => 97, 235 => 96, 230 => 93, 224 => 90, 220 => 89, 217 => 88, 214 => 87, 207 => 83, 202 => 80, 195 => 76, 191 => 75, 186 => 73, 183 => 72, 181 => 71, 176 => 69, 170 => 67, 166 => 65, 163 => 64, 161 => 63, 154 => 58, 144 => 57, 129 => 50, 119 => 49, 93 => 31, 82 => 29, 78 => 28, 75 => 27, 65 => 26, 54 => 22, 52 => 24, 39 => 22,);
}
public function getSourceContext()
{
return new Source("{#
This file is part of EC-CUBE
Copyright(c) 2000-2015 LOCKON CO.,LTD. All Rights Reserved.
http://www.lockon.co.jp/
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#}
{% extends 'default_frame.twig' %}
{% set body_class = 'registration_page' %}
{% block javascript %}
<script>
{% for school in Schools %}
\$('#School option[value=\"{{ school.school_id }}\"]').attr('data-key-visible', {{ school.visible_school_key ? 1 : 0 }});
{% endfor %}
\$('#School').change(function(){
if(\$('option:selected', \$(this)).data('key-visible')) {
\$('#top_box__name').show();
}
else {
\$('#top_box__name').hide();
}
});
\$('#top_box__body').submit(function(){
\$('#top_box__name .form-group .error').remove();
if(\$('#top_box__name').is(\":visible\") && !\$('#school_key').val()) {
\$('#top_box__name .form-group').append('<p class=\"red error\">入力してください</p>');
return false;
}
});
</script>
{% endblock javascript %}
{% block stylesheet %}
<style>
.input_School select{
width: 48% !important;
}
</style>
{% endblock stylesheet %}
{% block main %}
<h1 class=\"title_bar nikke\">学校情報認証</h1>
<div id=\"top_wrap\" class=\"container-fluid\">
<div id=\"top_box\" class=\"row\">
<div id=\"top_box__body\" class=\"col-md-10 col-md-offset-1\">
{% if School is null or School.visible %}
{% if school_not_found %}
<p>※ 学校コードに該当していないので、ご確認お願い致します。</p>
{% else %}
<form method=\"post\" action=\"{{ url('entry', { gcd : gcd }) }}\">
{{ form_widget(form._token) }}
<div id=\"top_box__body_inner\" class=\"dl_table\">
{% if School is null %}
<dl id=\"top_box__School\">
<dt>{{ form_label(form.School) }}</dt>
<dd class=\"form-group input_School\">
{{ form_widget(form.School) }}
{{ form_errors(form.School) }}
</dd>
</dl>
{% else %}
<dl id=\"top_box__kana\">
<dt></dt>
<dd class=\"form-group input_name\">
{{ School.school_name }}
</dd>
</dl>
{% endif %}
{% if School and School.visible_school_key != 1 %}
<div style=\"display:none\">
{{ form_widget(form.school_key, {'attr': {'value': School.school_key}}) }}
{{ form_errors(form.school_key) }}
</div>
{% else %}
<dl id=\"top_box__name\">
<dt></dt>
<dd class=\"form-group input_name\">
{{ form_widget(form.school_key) }}
{{ form_errors(form.school_key) }}
{% if certification_error_flg == 1 %}
<span>※認証に失敗しました。</span>
{% endif %}
</dd>
</dl>
{% endif %}
<input id=\"top_box__hidden_mode\" type=\"hidden\" name=\"mode\" value=\"certify\">
</div>
<div id=\"top_box__footer\" class=\"row no-padding\">
<div id=\"top_box__button_menu\" class=\"btn_group col-sm-offset-4 col-sm-4\">
<p>
<button type=\"submit\" class=\"btn btn-primary btn-block def_btn ya radius1\">生徒情報の登録へ</button>
</p>
</div>
</div>
</form>
{% endif %}
{% else %}
<p style=\"text-align: center\">この学校URLは現在非公開となっています。</p>
{% endif %}
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
{% endblock %}", "Entry/school_certification.twig", "/home/nmtokyolad01/tokyoladies-onlinestore.com/public_html/app/template/unishop/Entry/school_certification.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 24, "for" => 28, "if" => 63);
static $filters = array("escape" => 29);
static $functions = array("url" => 67, "form_widget" => 69, "form_label" => 73, "form_errors" => 76);
try {
$this->sandbox->checkSecurity(
['set', 'for', 'if'],
['escape'],
['url', 'form_widget', 'form_label', 'form_errors']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}