<?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;
/* ProductReview4/Resource/template/default/index.twig */
class __TwigTemplate_2ba7a8fff4a654695348e3dad00cd77b4e7ab07604a739c8ef10bb5cef8b8e88 extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'stylesheet' => [$this, 'block_stylesheet'],
'javascript' => [$this, 'block_javascript'],
'main' => [$this, 'block_main'],
];
}
protected function doGetParent(array $context)
{
// line 11
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", "ProductReview4/Resource/template/default/index.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "ProductReview4/Resource/template/default/index.twig"));
// line 13
$context["body_class"] = "product_review";
// line 15
$this->env->getRuntime("Symfony\\Component\\Form\\FormRenderer")->setTheme((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 15, $this->source); })()), [0 => "Form/form_div_layout.twig"], true);
// line 11
$this->parent = $this->loadTemplate("default_frame.twig", "ProductReview4/Resource/template/default/index.twig", 11);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 16
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 17
echo " <link rel=\"stylesheet\" href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/css/fileupload/jquery.fileupload.css", "admin"), "html", null, true);
echo "\">
<link rel=\"stylesheet\" href=\"";
// line 18
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/css/fileupload/jquery.fileupload-ui.css", "admin"), "html", null, true);
echo "\">
<link rel=\"stylesheet\" href=\"https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css\">
<style type=\"text/css\">
.c-form__fileUploadThumbnail,.c-form__fileUploadThumbnail2{
display: inline-block;
width: 170px;
height: 170px;
background-color: #f5f6f8;
background-position: center;
background-repeat: no-repeat;
background-size: contain;
cursor: pointer;
position: relative;
}
.c-form__fileUploadThumbnail .delete-image, .c-form__fileUploadThumbnail2 .delete-image{
font-family: FontAwesome;
font-size: 18px;
line-height: 1;
color: #54687A;
padding: 5px;
background: #fff;
border-radius: 3px;
position: absolute;
top: 2px;
right: 2px;
}
.upload-zone{
margin:0;
}
#thumb, #thumb2{
line-height: 1 !important;
}
</style>
<style>
#product_review_recommend_level {
display: flex;
flex-direction: column;
flex-wrap: wrap;
}
#product_review_recommend_level label {
position: relative;
bottom: 18px;
left: 20px;
line-height: 0;
}
</style>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 66
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 67
echo " <script src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/vendor/fileupload/vendor/jquery.ui.widget.js", "admin"), "html", null, true);
echo "\"></script>
<script src=\"";
// line 68
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/vendor/fileupload/jquery.iframe-transport.js", "admin"), "html", null, true);
echo "\"></script>
<script src=\"";
// line 69
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/vendor/fileupload/jquery.fileupload.js", "admin"), "html", null, true);
echo "\"></script>
<script src=\"";
// line 70
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/vendor/fileupload/jquery.fileupload-process.js", "admin"), "html", null, true);
echo "\"></script>
<script src=\"";
// line 71
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/vendor/fileupload/jquery.fileupload-validate.js", "admin"), "html", null, true);
echo "\"></script>
<script>var bootstrapTooltip = \$.fn.tooltip.noConflict();</script>
<script src=\"https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js\"></script>
<script>
\$(function() {
var hideThumbnail = function() {
if (\$('#thumb div').length > 0) {
\$('#icon_no_image').css('display', 'none');
} else {
\$('#icon_no_image').css('display', '');
}
};
var proto_img = '<div class=\"c-form__fileUploadThumbnail\" style=\"background-image:url(\\'__path__\\');\">' +
'<a class=\"delete-image\"><i class=\"fa fa-times\" aria-hidden=\"true\"></i></a>' +
'</div>';
var upload_file = \$('#";
// line 87
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["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 87, $this->source); })()), "upload_file", [], "any", false, false, false, 87), "vars", [], "any", false, false, false, 87), "id", [], "any", false, false, false, 87), "html", null, true);
echo "').val();
if (upload_file != '') {
var filename = \$('#";
// line 89
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["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 89, $this->source); })()), "upload_file", [], "any", false, false, false, 89), "vars", [], "any", false, false, false, 89), "id", [], "any", false, false, false, 89), "html", null, true);
echo "').val();
if (upload_file == '";
// line 90
echo twig_escape_filter($this->env, (isset($context["oldUploadFile"]) || array_key_exists("oldUploadFile", $context) ? $context["oldUploadFile"] : (function () { throw new RuntimeError('Variable "oldUploadFile" does not exist.', 90, $this->source); })()), "html", null, true);
echo "') {
var path = '";
// line 91
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("", "save_image"), "html", null, true);
echo "' + filename;
} else {
var path = '";
// line 93
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("", "temp_image"), "html", null, true);
echo "' + filename;
}
var \$img = \$(proto_img.replace(/__path__/g, path));
\$('#";
// line 96
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["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 96, $this->source); })()), "upload_file", [], "any", false, false, false, 96), "vars", [], "any", false, false, false, 96), "id", [], "any", false, false, false, 96), "html", null, true);
echo "').val(filename);
\$('#thumb').append(\$img);
hideThumbnail();
}
hideThumbnail();
\$('#";
// line 103
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["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 103, $this->source); })()), "upload_file_file", [], "any", false, false, false, 103), "vars", [], "any", false, false, false, 103), "id", [], "any", false, false, false, 103), "html", null, true);
echo "').fileupload({
url: \"";
// line 104
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_review_upload_file_add");
echo "\",
type: 'post',
dataType: 'json',
dropZone: \$('#upload-zone'),
done: function(e, data) {
\$('.progress').hide();
var path = '";
// line 110
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("", "temp_image"), "html", null, true);
echo "/' + data.result.filename;
var \$img = \$(proto_img.replace(/__path__/g, path));
\$('#";
// line 112
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["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 112, $this->source); })()), "upload_file", [], "any", false, false, false, 112), "vars", [], "any", false, false, false, 112), "id", [], "any", false, false, false, 112), "html", null, true);
echo "').val(data.result.filename);
\$('#thumb').append(\$img);
hideThumbnail();
},
fail: function(e, data) {
alert('";
// line 118
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("admin.common.upload_error"), "html", null, true);
echo "');
},
always: function(e, data) {
\$('.progress').hide();
\$('.progress .progress-bar').width('0%');
},
start: function(e, data) {
if (\$('.c-form__fileUploadThumbnail').length >= 1) {
\$.each(\$('.delete-image'), function(index, delete_image) {
delete_image.click();
});
}
\$('.progress').show();
\$('#thumb').find('div').remove();
\$('#";
// line 132
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["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 132, $this->source); })()), "upload_file", [], "any", false, false, false, 132), "vars", [], "any", false, false, false, 132), "id", [], "any", false, false, false, 132), "html", null, true);
echo "').val('');
},
acceptFileTypes: /(\\.|\\/)(gif|jpe?g|png)\$/i,
maxFileSize: 10000000,
maxNumberOfFiles: 1,
progressall: function(e, data) {
var progress = parseInt(data.loaded / data.total * 100, 10);
\$('.progress .progress-bar').css(
'width',
progress + '%'
);
},
processalways: function(e, data) {
if (data.files.error) {
alert(\"";
// line 146
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("admin.common.upload_error"), "html", null, true);
echo "\");
}
}
});
\$('#thumb').on('click', '.delete-image', function() {
\$('#";
// line 152
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["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 152, $this->source); })()), "upload_file", [], "any", false, false, false, 152), "vars", [], "any", false, false, false, 152), "id", [], "any", false, false, false, 152), "html", null, true);
echo "').val('');
var thumbnail = \$(this).parents('div.c-form__fileUploadThumbnail');
\$(thumbnail).remove();
hideThumbnail();
});
// 画像アップロード
// \$('#file_upload').on('click', function() {
// \$('#";
// line 160
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["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 160, $this->source); })()), "upload_file_file", [], "any", false, false, false, 160), "vars", [], "any", false, false, false, 160), "id", [], "any", false, false, false, 160), "html", null, true);
echo "').click();
// });
});
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 168
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 169
echo " <div class=\"ec-registerRole\">
<div class=\"ec-pageHeader\">
<h1>";
// line 171
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("product_review.front.review.title"), "html", null, true);
echo "</h1>
</div>
<div class=\"ec-off1Grid\">
<div class=\"ec-off1Grid__cell\">
<form method=\"post\" action=\"";
// line 175
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_review_index", ["id" => twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 175, $this->source); })()), "id", [], "any", false, false, false, 175)]), "html", null, true);
echo "\">
";
// line 176
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 176, $this->source); })()), "_token", [], "any", false, false, false, 176), 'widget');
echo "
<p class=\"ec-para-nomal\">";
// line 177
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("product_review.front.review.description"), "html", null, true);
echo "</p>
<div class=\"ec-borderedDefs\">
";
// line 180
echo " <dl>
<dt>
<label class=\"ec-label\">";
// line 182
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("product_review.front.review.product_name"), "html", null, true);
echo "</label>
</dt>
<dd>
<div class=\"ec-input\">
";
// line 186
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 186, $this->source); })()), "name", [], "any", false, false, false, 186), "html", null, true);
echo "
</div>
</dd>
</dl>
";
// line 191
echo " <dl>
<dt>
";
// line 193
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 193, $this->source); })()), "reviewer_name", [], "any", false, false, false, 193), 'label', ["label_attr" => ["class" => "ec-label"]]);
echo "
</dt>
<dd>
<div class=\"ec-input";
// line 196
echo (($this->extensions['Eccube\Twig\Extension\EccubeExtension']->hasErrors(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.', 196, $this->source); })()), "reviewer_name", [], "any", false, false, false, 196))) ? (" error") : (""));
echo "\">
";
// line 197
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 197, $this->source); })()), "reviewer_name", [], "any", false, false, false, 197), 'widget');
echo "
";
// line 198
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 198, $this->source); })()), "reviewer_name", [], "any", false, false, false, 198), 'errors');
echo "
</div>
</dd>
</dl>
";
// line 203
echo " <dl>
<dt>
";
// line 205
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 205, $this->source); })()), "reviewer_url", [], "any", false, false, false, 205), 'label', ["label_attr" => ["class" => "ec-label"]]);
echo "
</dt>
<dd>
<div class=\"ec-input";
// line 208
echo (($this->extensions['Eccube\Twig\Extension\EccubeExtension']->hasErrors(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.', 208, $this->source); })()), "reviewer_url", [], "any", false, false, false, 208))) ? (" error") : (""));
echo "\">
";
// line 209
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 209, $this->source); })()), "reviewer_url", [], "any", false, false, false, 209), 'widget');
echo "
";
// line 210
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 210, $this->source); })()), "reviewer_url", [], "any", false, false, false, 210), 'errors');
echo "
</div>
</dd>
</dl>
";
// line 215
echo " <dl>
<dt>
";
// line 217
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 217, $this->source); })()), "sex", [], "any", false, false, false, 217), 'label', ["label_attr" => ["class" => "ec-label"], "label" => "common.gender"]);
echo "
</dt>
<dd>
<div class=\"ec-radio";
// line 220
echo (($this->extensions['Eccube\Twig\Extension\EccubeExtension']->hasErrors(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.', 220, $this->source); })()), "sex", [], "any", false, false, false, 220))) ? (" error") : (""));
echo "\">
";
// line 221
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 221, $this->source); })()), "sex", [], "any", false, false, false, 221), 'widget');
echo "
";
// line 222
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 222, $this->source); })()), "sex", [], "any", false, false, false, 222), 'errors');
echo "
</div>
</dd>
</dl>
";
// line 227
echo " <dl>
<dt>
";
// line 229
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 229, $this->source); })()), "recommend_level", [], "any", false, false, false, 229), 'label', ["label_attr" => ["class" => "ec-label"]]);
echo "
</dt>
<dd>
<div class=\"ec-radio";
// line 232
echo (($this->extensions['Eccube\Twig\Extension\EccubeExtension']->hasErrors(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.', 232, $this->source); })()), "recommend_level", [], "any", false, false, false, 232))) ? (" error") : (""));
echo "\">
";
// line 233
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 233, $this->source); })()), "recommend_level", [], "any", false, false, false, 233), 'widget');
echo "
";
// line 234
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 234, $this->source); })()), "recommend_level", [], "any", false, false, false, 234), 'errors');
echo "
</div>
</dd>
</dl>
";
// line 239
echo " <dl>
<dt>
";
// line 241
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 241, $this->source); })()), "title", [], "any", false, false, false, 241), 'label', ["label_attr" => ["class" => "ec-label"]]);
echo "
</dt>
<dd>
<div class=\"ec-input";
// line 244
echo (($this->extensions['Eccube\Twig\Extension\EccubeExtension']->hasErrors(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.', 244, $this->source); })()), "title", [], "any", false, false, false, 244))) ? (" error") : (""));
echo "\">
";
// line 245
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 245, $this->source); })()), "title", [], "any", false, false, false, 245), 'widget');
echo "
";
// line 246
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 246, $this->source); })()), "title", [], "any", false, false, false, 246), 'errors');
echo "
</div>
</dd>
</dl>
";
// line 251
echo " <dl>
<dt>
";
// line 253
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 253, $this->source); })()), "comment", [], "any", false, false, false, 253), 'label', ["label_attr" => ["class" => "ec-label"]]);
echo "
</dt>
<dd>
<div class=\"ec-input";
// line 256
echo (($this->extensions['Eccube\Twig\Extension\EccubeExtension']->hasErrors(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.', 256, $this->source); })()), "comment", [], "any", false, false, false, 256))) ? (" error") : (""));
echo "\">
";
// line 257
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 257, $this->source); })()), "comment", [], "any", false, false, false, 257), 'widget');
echo "
";
// line 258
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 258, $this->source); })()), "comment", [], "any", false, false, false, 258), 'errors');
echo "
</div>
</dd>
</dl>
<dl>
<dt>
";
// line 266
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 266, $this->source); })()), "upload_file", [], "any", false, false, false, 266), 'label', ["label_attr" => ["class" => "ec-label"], "label" => "图片"]);
echo "
</dt>
<dd>
<div class=\"col mb-2\">
<div class=\"progress\" style=\"display: none;\">
<div class=\"progress-bar progress-bar-striped progress-bar-animated\" role=\"progressbar\" aria-valuenow=\"0\" aria-valuemin=\"0\" aria-valuemax=\"100\"></div>
</div>
<div id=\"thumb\" class=\"c-form__fileUploadThumbnails clearfix\"></div>
";
// line 274
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 274, $this->source); })()), "upload_file", [], "any", false, false, false, 274), 'widget', ["attr" => ["style" => "display:none;"]]);
echo "
<div id=\"upload-zone\" class=\"media py-5 border-ec-dashed mb-2 rounded\">
<div class=\"media-body\">
<i class=\"fa fa-cloud-upload fa-3x text-ec-lightGray mx-3 align-middle\" aria-hidden=\"true\"></i>
";
// line 278
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 278, $this->source); })()), "upload_file_file", [], "any", false, false, false, 278), 'widget', ["attr" => ["accept" => "image/*", "style" => "display:none;"]]);
echo "
";
// line 279
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 279, $this->source); })()), "upload_file", [], "any", false, false, false, 279), 'errors');
echo "
<a class=\"btn btn-ec-regular mr-2\" onclick=\"\$('#product_review_upload_file_file').click()\">
";
// line 281
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("admin.common.file_select"), "html", null, true);
echo "
</a>
</div><!-- /.media-body -->
</div><!-- /.media -->
</div>
</dd>
</dl>
</div>
<div class=\"ec-registerRole__actions\">
<div class=\"ec-off4Grid\">
<div class=\"ec-off4Grid__cell\">
<button class=\"ec-blockBtn--action\" type=\"submit\" name=\"mode\"
value=\"confirm\">";
// line 298
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("product_review.front.review.confirm"), "html", null, true);
echo "</button>
<a class=\"ec-blockBtn--cancel\"
href=\"";
// line 300
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_detail", ["id" => twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 300, $this->source); })()), "id", [], "any", false, false, false, 300)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("product_review.front.review.back"), "html", null, true);
echo "</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "ProductReview4/Resource/template/default/index.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 573 => 300, 568 => 298, 548 => 281, 543 => 279, 539 => 278, 532 => 274, 521 => 266, 510 => 258, 506 => 257, 502 => 256, 496 => 253, 492 => 251, 485 => 246, 481 => 245, 477 => 244, 471 => 241, 467 => 239, 460 => 234, 456 => 233, 452 => 232, 446 => 229, 442 => 227, 435 => 222, 431 => 221, 427 => 220, 421 => 217, 417 => 215, 410 => 210, 406 => 209, 402 => 208, 396 => 205, 392 => 203, 385 => 198, 381 => 197, 377 => 196, 371 => 193, 367 => 191, 360 => 186, 353 => 182, 349 => 180, 344 => 177, 340 => 176, 336 => 175, 329 => 171, 325 => 169, 315 => 168, 298 => 160, 287 => 152, 278 => 146, 261 => 132, 244 => 118, 235 => 112, 230 => 110, 221 => 104, 217 => 103, 207 => 96, 201 => 93, 196 => 91, 192 => 90, 188 => 89, 183 => 87, 164 => 71, 160 => 70, 156 => 69, 152 => 68, 147 => 67, 137 => 66, 80 => 18, 75 => 17, 65 => 16, 54 => 11, 52 => 15, 50 => 13, 37 => 11,);
}
public function getSourceContext()
{
return new Source("{#
This file is part of EC-CUBE
Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
http://www.lockon.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends 'default_frame.twig' %}
{% set body_class = 'product_review' %}
{% form_theme form 'Form/form_div_layout.twig' %}
{% block stylesheet %}
<link rel=\"stylesheet\" href=\"{{ asset('assets/css/fileupload/jquery.fileupload.css', 'admin') }}\">
<link rel=\"stylesheet\" href=\"{{ asset('assets/css/fileupload/jquery.fileupload-ui.css', 'admin') }}\">
<link rel=\"stylesheet\" href=\"https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css\">
<style type=\"text/css\">
.c-form__fileUploadThumbnail,.c-form__fileUploadThumbnail2{
display: inline-block;
width: 170px;
height: 170px;
background-color: #f5f6f8;
background-position: center;
background-repeat: no-repeat;
background-size: contain;
cursor: pointer;
position: relative;
}
.c-form__fileUploadThumbnail .delete-image, .c-form__fileUploadThumbnail2 .delete-image{
font-family: FontAwesome;
font-size: 18px;
line-height: 1;
color: #54687A;
padding: 5px;
background: #fff;
border-radius: 3px;
position: absolute;
top: 2px;
right: 2px;
}
.upload-zone{
margin:0;
}
#thumb, #thumb2{
line-height: 1 !important;
}
</style>
<style>
#product_review_recommend_level {
display: flex;
flex-direction: column;
flex-wrap: wrap;
}
#product_review_recommend_level label {
position: relative;
bottom: 18px;
left: 20px;
line-height: 0;
}
</style>
{% endblock stylesheet %}
{% block javascript %}
<script src=\"{{ asset('assets/js/vendor/fileupload/vendor/jquery.ui.widget.js', 'admin') }}\"></script>
<script src=\"{{ asset('assets/js/vendor/fileupload/jquery.iframe-transport.js', 'admin') }}\"></script>
<script src=\"{{ asset('assets/js/vendor/fileupload/jquery.fileupload.js', 'admin') }}\"></script>
<script src=\"{{ asset('assets/js/vendor/fileupload/jquery.fileupload-process.js', 'admin') }}\"></script>
<script src=\"{{ asset('assets/js/vendor/fileupload/jquery.fileupload-validate.js', 'admin') }}\"></script>
<script>var bootstrapTooltip = \$.fn.tooltip.noConflict();</script>
<script src=\"https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js\"></script>
<script>
\$(function() {
var hideThumbnail = function() {
if (\$('#thumb div').length > 0) {
\$('#icon_no_image').css('display', 'none');
} else {
\$('#icon_no_image').css('display', '');
}
};
var proto_img = '<div class=\"c-form__fileUploadThumbnail\" style=\"background-image:url(\\'__path__\\');\">' +
'<a class=\"delete-image\"><i class=\"fa fa-times\" aria-hidden=\"true\"></i></a>' +
'</div>';
var upload_file = \$('#{{ form.upload_file.vars.id }}').val();
if (upload_file != '') {
var filename = \$('#{{ form.upload_file.vars.id }}').val();
if (upload_file == '{{ oldUploadFile }}') {
var path = '{{ asset('', 'save_image') }}' + filename;
} else {
var path = '{{ asset('', 'temp_image') }}' + filename;
}
var \$img = \$(proto_img.replace(/__path__/g, path));
\$('#{{ form.upload_file.vars.id }}').val(filename);
\$('#thumb').append(\$img);
hideThumbnail();
}
hideThumbnail();
\$('#{{ form.upload_file_file.vars.id }}').fileupload({
url: \"{{ url('product_review_upload_file_add') }}\",
type: 'post',
dataType: 'json',
dropZone: \$('#upload-zone'),
done: function(e, data) {
\$('.progress').hide();
var path = '{{ asset('', 'temp_image') }}/' + data.result.filename;
var \$img = \$(proto_img.replace(/__path__/g, path));
\$('#{{ form.upload_file.vars.id }}').val(data.result.filename);
\$('#thumb').append(\$img);
hideThumbnail();
},
fail: function(e, data) {
alert('{{ 'admin.common.upload_error'|trans }}');
},
always: function(e, data) {
\$('.progress').hide();
\$('.progress .progress-bar').width('0%');
},
start: function(e, data) {
if (\$('.c-form__fileUploadThumbnail').length >= 1) {
\$.each(\$('.delete-image'), function(index, delete_image) {
delete_image.click();
});
}
\$('.progress').show();
\$('#thumb').find('div').remove();
\$('#{{ form.upload_file.vars.id }}').val('');
},
acceptFileTypes: /(\\.|\\/)(gif|jpe?g|png)\$/i,
maxFileSize: 10000000,
maxNumberOfFiles: 1,
progressall: function(e, data) {
var progress = parseInt(data.loaded / data.total * 100, 10);
\$('.progress .progress-bar').css(
'width',
progress + '%'
);
},
processalways: function(e, data) {
if (data.files.error) {
alert(\"{{ 'admin.common.upload_error'|trans }}\");
}
}
});
\$('#thumb').on('click', '.delete-image', function() {
\$('#{{ form.upload_file.vars.id }}').val('');
var thumbnail = \$(this).parents('div.c-form__fileUploadThumbnail');
\$(thumbnail).remove();
hideThumbnail();
});
// 画像アップロード
// \$('#file_upload').on('click', function() {
// \$('#{{ form.upload_file_file.vars.id }}').click();
// });
});
</script>
{% endblock javascript %}
{% block main %}
<div class=\"ec-registerRole\">
<div class=\"ec-pageHeader\">
<h1>{{ 'product_review.front.review.title'|trans }}</h1>
</div>
<div class=\"ec-off1Grid\">
<div class=\"ec-off1Grid__cell\">
<form method=\"post\" action=\"{{ url('product_review_index', { id: Product.id }) }}\">
{{ form_widget(form._token) }}
<p class=\"ec-para-nomal\">{{ 'product_review.front.review.description'|trans }}</p>
<div class=\"ec-borderedDefs\">
{# 商品名 #}
<dl>
<dt>
<label class=\"ec-label\">{{ 'product_review.front.review.product_name'|trans }}</label>
</dt>
<dd>
<div class=\"ec-input\">
{{ Product.name }}
</div>
</dd>
</dl>
{# 投稿者名 #}
<dl>
<dt>
{{ form_label(form.reviewer_name, '', {'label_attr': {'class': 'ec-label'}}) }}
</dt>
<dd>
<div class=\"ec-input{{ has_errors(form.reviewer_name) ? ' error' }}\">
{{ form_widget(form.reviewer_name) }}
{{ form_errors(form.reviewer_name) }}
</div>
</dd>
</dl>
{# 投稿者URL #}
<dl>
<dt>
{{ form_label(form.reviewer_url, '', {'label_attr': {'class': 'ec-label'}}) }}
</dt>
<dd>
<div class=\"ec-input{{ has_errors(form.reviewer_url) ? ' error' }}\">
{{ form_widget(form.reviewer_url) }}
{{ form_errors(form.reviewer_url) }}
</div>
</dd>
</dl>
{# 性別 #}
<dl>
<dt>
{{ form_label(form.sex, 'common.gender', {'label_attr': {'class': 'ec-label'}}) }}
</dt>
<dd>
<div class=\"ec-radio{{ has_errors(form.sex) ? ' error' }}\">
{{ form_widget(form.sex) }}
{{ form_errors(form.sex) }}
</div>
</dd>
</dl>
{# おすすめレベル #}
<dl>
<dt>
{{ form_label(form.recommend_level, '', {'label_attr': {'class': 'ec-label'}}) }}
</dt>
<dd>
<div class=\"ec-radio{{ has_errors(form.recommend_level) ? ' error' }}\">
{{ form_widget(form.recommend_level) }}
{{ form_errors(form.recommend_level) }}
</div>
</dd>
</dl>
{# タイトル #}
<dl>
<dt>
{{ form_label(form.title, '', {'label_attr': {'class': 'ec-label'}}) }}
</dt>
<dd>
<div class=\"ec-input{{ has_errors(form.title) ? ' error' }}\">
{{ form_widget(form.title) }}
{{ form_errors(form.title) }}
</div>
</dd>
</dl>
{# コメント #}
<dl>
<dt>
{{ form_label(form.comment, '', {'label_attr': {'class': 'ec-label'}}) }}
</dt>
<dd>
<div class=\"ec-input{{ has_errors(form.comment) ? ' error' }}\">
{{ form_widget(form.comment) }}
{{ form_errors(form.comment) }}
</div>
</dd>
</dl>
<dl>
<dt>
{{ form_label(form.upload_file, '图片', { 'label_attr': { 'class': 'ec-label' }}) }}
</dt>
<dd>
<div class=\"col mb-2\">
<div class=\"progress\" style=\"display: none;\">
<div class=\"progress-bar progress-bar-striped progress-bar-animated\" role=\"progressbar\" aria-valuenow=\"0\" aria-valuemin=\"0\" aria-valuemax=\"100\"></div>
</div>
<div id=\"thumb\" class=\"c-form__fileUploadThumbnails clearfix\"></div>
{{ form_widget(form.upload_file, { attr : { style : 'display:none;' } }) }}
<div id=\"upload-zone\" class=\"media py-5 border-ec-dashed mb-2 rounded\">
<div class=\"media-body\">
<i class=\"fa fa-cloud-upload fa-3x text-ec-lightGray mx-3 align-middle\" aria-hidden=\"true\"></i>
{{ form_widget(form.upload_file_file, { attr : { accept : 'image/*', style : 'display:none;' } }) }}
{{ form_errors(form.upload_file) }}
<a class=\"btn btn-ec-regular mr-2\" onclick=\"\$('#product_review_upload_file_file').click()\">
{{ 'admin.common.file_select'|trans }}
</a>
</div><!-- /.media-body -->
</div><!-- /.media -->
</div>
</dd>
</dl>
</div>
<div class=\"ec-registerRole__actions\">
<div class=\"ec-off4Grid\">
<div class=\"ec-off4Grid__cell\">
<button class=\"ec-blockBtn--action\" type=\"submit\" name=\"mode\"
value=\"confirm\">{{ 'product_review.front.review.confirm'|trans }}</button>
<a class=\"ec-blockBtn--cancel\"
href=\"{{ url('product_detail', { id: Product.id }) }}\">{{ 'product_review.front.review.back'|trans }}</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
{% endblock %}
", "ProductReview4/Resource/template/default/index.twig", "/home/r4078784/public_html/eigajp.com/app/template/default/ProductReview4/Resource/template/default/index.twig");
}
}