var/cache/dev/twig/21/2175405d42f933a30d9632008c52bf7043d3a453de298aa795f73309d0745e94.php line 192

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* ProductReview4/Resource/template/default/index.twig */
  14. class __TwigTemplate_2ba7a8fff4a654695348e3dad00cd77b4e7ab07604a739c8ef10bb5cef8b8e88 extends \Eccube\Twig\Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'stylesheet' => [$this'block_stylesheet'],
  24.             'javascript' => [$this'block_javascript'],
  25.             'main' => [$this'block_main'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 11
  31.         return "default_frame.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""ProductReview4/Resource/template/default/index.twig"));
  38.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""ProductReview4/Resource/template/default/index.twig"));
  40.         // line 13
  41.         $context["body_class"] = "product_review";
  42.         // line 15
  43.         $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); })()), [=> "Form/form_div_layout.twig"], true);
  44.         // line 11
  45.         $this->parent $this->loadTemplate("default_frame.twig""ProductReview4/Resource/template/default/index.twig"11);
  46.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  47.         
  48.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  49.         
  50.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  51.     }
  52.     // line 16
  53.     public function block_stylesheet($context, array $blocks = [])
  54.     {
  55.         $macros $this->macros;
  56.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  57.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  58.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  59.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  60.         // line 17
  61.         echo "    <link rel=\"stylesheet\" href=\"";
  62.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/css/fileupload/jquery.fileupload.css""admin"), "html"nulltrue);
  63.         echo "\">
  64.     <link rel=\"stylesheet\" href=\"";
  65.         // line 18
  66.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/css/fileupload/jquery.fileupload-ui.css""admin"), "html"nulltrue);
  67.         echo "\">
  68.     <link rel=\"stylesheet\" href=\"https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css\">
  69.     <style type=\"text/css\">
  70.         .c-form__fileUploadThumbnail,.c-form__fileUploadThumbnail2{
  71.                 display: inline-block;
  72.             width: 170px;
  73.             height: 170px;
  74.             background-color: #f5f6f8;
  75.             background-position: center;
  76.             background-repeat: no-repeat;
  77.             background-size: contain;
  78.             cursor: pointer;
  79.             position: relative;
  80.         }
  81.         .c-form__fileUploadThumbnail .delete-image, .c-form__fileUploadThumbnail2 .delete-image{
  82.     font-family: FontAwesome;
  83.     font-size: 18px;
  84.     line-height: 1;
  85.     color: #54687A;
  86.     padding: 5px;
  87.     background: #fff;
  88.     border-radius: 3px;
  89.     position: absolute;
  90.     top: 2px;
  91.     right: 2px;
  92.         }
  93.         .upload-zone{
  94.             margin:0;
  95.         }
  96.         #thumb, #thumb2{
  97.             line-height: 1 !important;
  98.         }
  99.     </style>
  100.     <style>
  101.         #product_review_recommend_level {
  102.             display: flex;
  103.             flex-direction: column;
  104.             flex-wrap: wrap;
  105.         }
  106.         #product_review_recommend_level label {
  107.             position: relative;
  108.             bottom: 18px;
  109.             left: 20px;
  110.             line-height: 0;
  111.         }
  112.     </style>
  113. ";
  114.         
  115.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  116.         
  117.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  118.     }
  119.     // line 66
  120.     public function block_javascript($context, array $blocks = [])
  121.     {
  122.         $macros $this->macros;
  123.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  124.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  125.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  126.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  127.         // line 67
  128.         echo "    <script src=\"";
  129.         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"nulltrue);
  130.         echo "\"></script>
  131.     <script src=\"";
  132.         // line 68
  133.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/vendor/fileupload/jquery.iframe-transport.js""admin"), "html"nulltrue);
  134.         echo "\"></script>
  135.     <script src=\"";
  136.         // line 69
  137.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/vendor/fileupload/jquery.fileupload.js""admin"), "html"nulltrue);
  138.         echo "\"></script>
  139.     <script src=\"";
  140.         // line 70
  141.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/vendor/fileupload/jquery.fileupload-process.js""admin"), "html"nulltrue);
  142.         echo "\"></script>
  143.     <script src=\"";
  144.         // line 71
  145.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/vendor/fileupload/jquery.fileupload-validate.js""admin"), "html"nulltrue);
  146.         echo "\"></script>
  147.     <script>var bootstrapTooltip = \$.fn.tooltip.noConflict();</script>
  148.     <script src=\"https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js\"></script>
  149.    <script>
  150.         \$(function() {
  151.             var hideThumbnail = function() {
  152.                 if (\$('#thumb div').length > 0) {
  153.                     \$('#icon_no_image').css('display', 'none');
  154.                 } else {
  155.                     \$('#icon_no_image').css('display', '');
  156.                 }
  157.             };
  158.             var proto_img = '<div class=\"c-form__fileUploadThumbnail\" style=\"background-image:url(\\'__path__\\');\">' +
  159.                 '<a class=\"delete-image\"><i class=\"fa fa-times\" aria-hidden=\"true\"></i></a>' +
  160.                 '</div>';
  161.             var upload_file = \$('#";
  162.         // line 87
  163.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse87), "vars", [], "any"falsefalsefalse87), "id", [], "any"falsefalsefalse87), "html"nulltrue);
  164.         echo "').val();
  165.             if (upload_file != '') {
  166.                 var filename = \$('#";
  167.         // line 89
  168.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse89), "vars", [], "any"falsefalsefalse89), "id", [], "any"falsefalsefalse89), "html"nulltrue);
  169.         echo "').val();
  170.                 if (upload_file == '";
  171.         // line 90
  172.         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"nulltrue);
  173.         echo "') {
  174.                     var path = '";
  175.         // line 91
  176.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("""save_image"), "html"nulltrue);
  177.         echo "' + filename;
  178.                 } else {
  179.                     var path = '";
  180.         // line 93
  181.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("""temp_image"), "html"nulltrue);
  182.         echo "' + filename;
  183.                 }
  184.                 var \$img = \$(proto_img.replace(/__path__/g, path));
  185.                 \$('#";
  186.         // line 96
  187.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse96), "vars", [], "any"falsefalsefalse96), "id", [], "any"falsefalsefalse96), "html"nulltrue);
  188.         echo "').val(filename);
  189.                 \$('#thumb').append(\$img);
  190.                 hideThumbnail();
  191.             }
  192.             hideThumbnail();
  193.             \$('#";
  194.         // line 103
  195.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse103), "vars", [], "any"falsefalsefalse103), "id", [], "any"falsefalsefalse103), "html"nulltrue);
  196.         echo "').fileupload({
  197.                 url: \"";
  198.         // line 104
  199.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_review_upload_file_add");
  200.         echo "\",
  201.                 type: 'post',
  202.                 dataType: 'json',
  203.                 dropZone: \$('#upload-zone'),
  204.                 done: function(e, data) {
  205.                     \$('.progress').hide();
  206.                     var path = '";
  207.         // line 110
  208.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("""temp_image"), "html"nulltrue);
  209.         echo "/' + data.result.filename;
  210.                     var \$img = \$(proto_img.replace(/__path__/g, path));
  211.                     \$('#";
  212.         // line 112
  213.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse112), "vars", [], "any"falsefalsefalse112), "id", [], "any"falsefalsefalse112), "html"nulltrue);
  214.         echo "').val(data.result.filename);
  215.                     \$('#thumb').append(\$img);
  216.                     hideThumbnail();
  217.                 },
  218.                 fail: function(e, data) {
  219.                     alert('";
  220.         // line 118
  221.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("admin.common.upload_error"), "html"nulltrue);
  222.         echo "');
  223.                 },
  224.                 always: function(e, data) {
  225.                     \$('.progress').hide();
  226.                     \$('.progress .progress-bar').width('0%');
  227.                 },
  228.                 start: function(e, data) {
  229.                     if (\$('.c-form__fileUploadThumbnail').length >= 1) {
  230.                         \$.each(\$('.delete-image'), function(index, delete_image) {
  231.                             delete_image.click();
  232.                         });
  233.                     }
  234.                     \$('.progress').show();
  235.                     \$('#thumb').find('div').remove();
  236.                     \$('#";
  237.         // line 132
  238.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse132), "vars", [], "any"falsefalsefalse132), "id", [], "any"falsefalsefalse132), "html"nulltrue);
  239.         echo "').val('');
  240.                 },
  241.                 acceptFileTypes: /(\\.|\\/)(gif|jpe?g|png)\$/i,
  242.                 maxFileSize: 10000000,
  243.                 maxNumberOfFiles: 1,
  244.                 progressall: function(e, data) {
  245.                     var progress = parseInt(data.loaded / data.total * 100, 10);
  246.                     \$('.progress .progress-bar').css(
  247.                         'width',
  248.                         progress + '%'
  249.                     );
  250.                 },
  251.                 processalways: function(e, data) {
  252.                     if (data.files.error) {
  253.                         alert(\"";
  254.         // line 146
  255.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("admin.common.upload_error"), "html"nulltrue);
  256.         echo "\");
  257.                     }
  258.                 }
  259.             });
  260.             \$('#thumb').on('click', '.delete-image', function() {
  261.                 \$('#";
  262.         // line 152
  263.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse152), "vars", [], "any"falsefalsefalse152), "id", [], "any"falsefalsefalse152), "html"nulltrue);
  264.         echo "').val('');
  265.                 var thumbnail = \$(this).parents('div.c-form__fileUploadThumbnail');
  266.                 \$(thumbnail).remove();
  267.                 hideThumbnail();
  268.             });
  269.             // 画像アップロード
  270.             // \$('#file_upload').on('click', function() {
  271.             //     \$('#";
  272.         // line 160
  273.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse160), "vars", [], "any"falsefalsefalse160), "id", [], "any"falsefalsefalse160), "html"nulltrue);
  274.         echo "').click();
  275.             // });
  276.         });
  277.     </script>
  278. ";
  279.         
  280.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  281.         
  282.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  283.     }
  284.     // line 168
  285.     public function block_main($context, array $blocks = [])
  286.     {
  287.         $macros $this->macros;
  288.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  289.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  290.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  291.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  292.         // line 169
  293.         echo "    <div class=\"ec-registerRole\">
  294.         <div class=\"ec-pageHeader\">
  295.             <h1>";
  296.         // line 171
  297.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("product_review.front.review.title"), "html"nulltrue);
  298.         echo "</h1>
  299.         </div>
  300.         <div class=\"ec-off1Grid\">
  301.             <div class=\"ec-off1Grid__cell\">
  302.                 <form method=\"post\" action=\"";
  303.         // line 175
  304.         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"falsefalsefalse175)]), "html"nulltrue);
  305.         echo "\">
  306.                     ";
  307.         // line 176
  308.         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"falsefalsefalse176), 'widget');
  309.         echo "
  310.                     <p class=\"ec-para-nomal\">";
  311.         // line 177
  312.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("product_review.front.review.description"), "html"nulltrue);
  313.         echo "</p>
  314.                     <div class=\"ec-borderedDefs\">
  315.                         ";
  316.         // line 180
  317.         echo "                        <dl>
  318.                             <dt>
  319.                                 <label class=\"ec-label\">";
  320.         // line 182
  321.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("product_review.front.review.product_name"), "html"nulltrue);
  322.         echo "</label>
  323.                             </dt>
  324.                             <dd>
  325.                                 <div class=\"ec-input\">
  326.                                     ";
  327.         // line 186
  328.         echo twig_escape_filter($this->envtwig_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"falsefalsefalse186), "html"nulltrue);
  329.         echo "
  330.                                 </div>
  331.                             </dd>
  332.                         </dl>
  333.                         ";
  334.         // line 191
  335.         echo "                        <dl>
  336.                             <dt>
  337.                                 ";
  338.         // line 193
  339.         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"falsefalsefalse193), 'label', ["label_attr" => ["class" => "ec-label"]]);
  340.         echo "
  341.                             </dt>
  342.                             <dd>
  343.                                 <div class=\"ec-input";
  344.         // line 196
  345.         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"falsefalsefalse196))) ? (" error") : (""));
  346.         echo "\">
  347.                                     ";
  348.         // line 197
  349.         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"falsefalsefalse197), 'widget');
  350.         echo "
  351.                                     ";
  352.         // line 198
  353.         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"falsefalsefalse198), 'errors');
  354.         echo "
  355.                                 </div>
  356.                             </dd>
  357.                         </dl>
  358.                         ";
  359.         // line 203
  360.         echo "                        <dl>
  361.                             <dt>
  362.                                 ";
  363.         // line 205
  364.         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"falsefalsefalse205), 'label', ["label_attr" => ["class" => "ec-label"]]);
  365.         echo "
  366.                             </dt>
  367.                             <dd>
  368.                                 <div class=\"ec-input";
  369.         // line 208
  370.         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"falsefalsefalse208))) ? (" error") : (""));
  371.         echo "\">
  372.                                     ";
  373.         // line 209
  374.         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"falsefalsefalse209), 'widget');
  375.         echo "
  376.                                     ";
  377.         // line 210
  378.         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"falsefalsefalse210), 'errors');
  379.         echo "
  380.                                 </div>
  381.                             </dd>
  382.                         </dl>
  383.                         ";
  384.         // line 215
  385.         echo "                        <dl>
  386.                             <dt>
  387.                                 ";
  388.         // line 217
  389.         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"falsefalsefalse217), 'label', ["label_attr" => ["class" => "ec-label"], "label" => "common.gender"]);
  390.         echo "
  391.                             </dt>
  392.                             <dd>
  393.                                 <div class=\"ec-radio";
  394.         // line 220
  395.         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"falsefalsefalse220))) ? (" error") : (""));
  396.         echo "\">
  397.                                     ";
  398.         // line 221
  399.         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"falsefalsefalse221), 'widget');
  400.         echo "
  401.                                     ";
  402.         // line 222
  403.         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"falsefalsefalse222), 'errors');
  404.         echo "
  405.                                 </div>
  406.                             </dd>
  407.                         </dl>
  408.                         ";
  409.         // line 227
  410.         echo "                        <dl>
  411.                             <dt>
  412.                                 ";
  413.         // line 229
  414.         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"falsefalsefalse229), 'label', ["label_attr" => ["class" => "ec-label"]]);
  415.         echo "
  416.                             </dt>
  417.                             <dd>
  418.                                 <div class=\"ec-radio";
  419.         // line 232
  420.         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"falsefalsefalse232))) ? (" error") : (""));
  421.         echo "\">
  422.                                     ";
  423.         // line 233
  424.         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"falsefalsefalse233), 'widget');
  425.         echo "
  426.                                     ";
  427.         // line 234
  428.         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"falsefalsefalse234), 'errors');
  429.         echo "
  430.                                 </div>
  431.                             </dd>
  432.                         </dl>
  433.                         ";
  434.         // line 239
  435.         echo "                        <dl>
  436.                             <dt>
  437.                                 ";
  438.         // line 241
  439.         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"falsefalsefalse241), 'label', ["label_attr" => ["class" => "ec-label"]]);
  440.         echo "
  441.                             </dt>
  442.                             <dd>
  443.                                 <div class=\"ec-input";
  444.         // line 244
  445.         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"falsefalsefalse244))) ? (" error") : (""));
  446.         echo "\">
  447.                                     ";
  448.         // line 245
  449.         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"falsefalsefalse245), 'widget');
  450.         echo "
  451.                                     ";
  452.         // line 246
  453.         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"falsefalsefalse246), 'errors');
  454.         echo "
  455.                                 </div>
  456.                             </dd>
  457.                         </dl>
  458.                         ";
  459.         // line 251
  460.         echo "                        <dl>
  461.                             <dt>
  462.                                 ";
  463.         // line 253
  464.         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"falsefalsefalse253), 'label', ["label_attr" => ["class" => "ec-label"]]);
  465.         echo "
  466.                             </dt>
  467.                             <dd>
  468.                                 <div class=\"ec-input";
  469.         // line 256
  470.         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"falsefalsefalse256))) ? (" error") : (""));
  471.         echo "\">
  472.                                     ";
  473.         // line 257
  474.         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"falsefalsefalse257), 'widget');
  475.         echo "
  476.                                     ";
  477.         // line 258
  478.         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"falsefalsefalse258), 'errors');
  479.         echo "
  480.                                 </div>
  481.                             </dd>
  482.                         </dl>
  483.                          <dl>
  484.                             <dt>
  485.                                 ";
  486.         // line 266
  487.         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"falsefalsefalse266), 'label', ["label_attr" => ["class" => "ec-label"], "label" => "图片"]);
  488.         echo "
  489.                             </dt>
  490.                             <dd>
  491.                                 <div class=\"col mb-2\">
  492.                                     <div class=\"progress\" style=\"display: none;\">
  493.                                         <div class=\"progress-bar progress-bar-striped progress-bar-animated\" role=\"progressbar\" aria-valuenow=\"0\" aria-valuemin=\"0\" aria-valuemax=\"100\"></div>
  494.                                     </div>
  495.                                     <div id=\"thumb\" class=\"c-form__fileUploadThumbnails clearfix\"></div>
  496.                                     ";
  497.         // line 274
  498.         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"falsefalsefalse274), 'widget', ["attr" => ["style" => "display:none;"]]);
  499.         echo "
  500.                                     <div id=\"upload-zone\" class=\"media py-5 border-ec-dashed mb-2 rounded\">
  501.                                         <div class=\"media-body\">
  502.                                             <i class=\"fa fa-cloud-upload fa-3x text-ec-lightGray mx-3 align-middle\" aria-hidden=\"true\"></i>
  503.                                             ";
  504.         // line 278
  505.         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"falsefalsefalse278), 'widget', ["attr" => ["accept" => "image/*""style" => "display:none;"]]);
  506.         echo "
  507.                                             ";
  508.         // line 279
  509.         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"falsefalsefalse279), 'errors');
  510.         echo "
  511.                                             <a class=\"btn btn-ec-regular mr-2\" onclick=\"\$('#product_review_upload_file_file').click()\">
  512.                                                 ";
  513.         // line 281
  514.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("admin.common.file_select"), "html"nulltrue);
  515.         echo "
  516.                                             </a>
  517.                                         </div><!-- /.media-body -->
  518.                                     </div><!-- /.media -->
  519.                                 </div>
  520.                             </dd>
  521.                         </dl>
  522.                     </div>
  523.                     <div class=\"ec-registerRole__actions\">
  524.                         <div class=\"ec-off4Grid\">
  525.                             <div class=\"ec-off4Grid__cell\">
  526.                                 <button class=\"ec-blockBtn--action\" type=\"submit\" name=\"mode\"
  527.                                         value=\"confirm\">";
  528.         // line 298
  529.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("product_review.front.review.confirm"), "html"nulltrue);
  530.         echo "</button>
  531.                                 <a class=\"ec-blockBtn--cancel\"
  532.                                    href=\"";
  533.         // line 300
  534.         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"falsefalsefalse300)]), "html"nulltrue);
  535.         echo "\">";
  536.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("product_review.front.review.back"), "html"nulltrue);
  537.         echo "</a>
  538.                             </div>
  539.                         </div>
  540.                     </div>
  541.                 </form>
  542.             </div>
  543.         </div>
  544.     </div>
  545. ";
  546.         
  547.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  548.         
  549.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  550.     }
  551.     public function getTemplateName()
  552.     {
  553.         return "ProductReview4/Resource/template/default/index.twig";
  554.     }
  555.     public function isTraitable()
  556.     {
  557.         return false;
  558.     }
  559.     public function getDebugInfo()
  560.     {
  561.         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,);
  562.     }
  563.     public function getSourceContext()
  564.     {
  565.         return new Source("{#
  566. This file is part of EC-CUBE
  567. Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
  568. http://www.lockon.co.jp/
  569. For the full copyright and license information, please view the LICENSE
  570. file that was distributed with this source code.
  571. #}
  572. {% extends 'default_frame.twig' %}
  573. {% set body_class = 'product_review' %}
  574. {% form_theme form 'Form/form_div_layout.twig' %}
  575. {% block stylesheet %}
  576.     <link rel=\"stylesheet\" href=\"{{ asset('assets/css/fileupload/jquery.fileupload.css', 'admin') }}\">
  577.     <link rel=\"stylesheet\" href=\"{{ asset('assets/css/fileupload/jquery.fileupload-ui.css', 'admin') }}\">
  578.     <link rel=\"stylesheet\" href=\"https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css\">
  579.     <style type=\"text/css\">
  580.         .c-form__fileUploadThumbnail,.c-form__fileUploadThumbnail2{
  581.                 display: inline-block;
  582.             width: 170px;
  583.             height: 170px;
  584.             background-color: #f5f6f8;
  585.             background-position: center;
  586.             background-repeat: no-repeat;
  587.             background-size: contain;
  588.             cursor: pointer;
  589.             position: relative;
  590.         }
  591.         .c-form__fileUploadThumbnail .delete-image, .c-form__fileUploadThumbnail2 .delete-image{
  592.     font-family: FontAwesome;
  593.     font-size: 18px;
  594.     line-height: 1;
  595.     color: #54687A;
  596.     padding: 5px;
  597.     background: #fff;
  598.     border-radius: 3px;
  599.     position: absolute;
  600.     top: 2px;
  601.     right: 2px;
  602.         }
  603.         .upload-zone{
  604.             margin:0;
  605.         }
  606.         #thumb, #thumb2{
  607.             line-height: 1 !important;
  608.         }
  609.     </style>
  610.     <style>
  611.         #product_review_recommend_level {
  612.             display: flex;
  613.             flex-direction: column;
  614.             flex-wrap: wrap;
  615.         }
  616.         #product_review_recommend_level label {
  617.             position: relative;
  618.             bottom: 18px;
  619.             left: 20px;
  620.             line-height: 0;
  621.         }
  622.     </style>
  623. {% endblock stylesheet %}
  624. {% block javascript %}
  625.     <script src=\"{{ asset('assets/js/vendor/fileupload/vendor/jquery.ui.widget.js', 'admin') }}\"></script>
  626.     <script src=\"{{ asset('assets/js/vendor/fileupload/jquery.iframe-transport.js', 'admin') }}\"></script>
  627.     <script src=\"{{ asset('assets/js/vendor/fileupload/jquery.fileupload.js', 'admin') }}\"></script>
  628.     <script src=\"{{ asset('assets/js/vendor/fileupload/jquery.fileupload-process.js', 'admin') }}\"></script>
  629.     <script src=\"{{ asset('assets/js/vendor/fileupload/jquery.fileupload-validate.js', 'admin') }}\"></script>
  630.     <script>var bootstrapTooltip = \$.fn.tooltip.noConflict();</script>
  631.     <script src=\"https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js\"></script>
  632.    <script>
  633.         \$(function() {
  634.             var hideThumbnail = function() {
  635.                 if (\$('#thumb div').length > 0) {
  636.                     \$('#icon_no_image').css('display', 'none');
  637.                 } else {
  638.                     \$('#icon_no_image').css('display', '');
  639.                 }
  640.             };
  641.             var proto_img = '<div class=\"c-form__fileUploadThumbnail\" style=\"background-image:url(\\'__path__\\');\">' +
  642.                 '<a class=\"delete-image\"><i class=\"fa fa-times\" aria-hidden=\"true\"></i></a>' +
  643.                 '</div>';
  644.             var upload_file = \$('#{{ form.upload_file.vars.id }}').val();
  645.             if (upload_file != '') {
  646.                 var filename = \$('#{{ form.upload_file.vars.id }}').val();
  647.                 if (upload_file == '{{ oldUploadFile }}') {
  648.                     var path = '{{ asset('', 'save_image') }}' + filename;
  649.                 } else {
  650.                     var path = '{{ asset('', 'temp_image') }}' + filename;
  651.                 }
  652.                 var \$img = \$(proto_img.replace(/__path__/g, path));
  653.                 \$('#{{ form.upload_file.vars.id }}').val(filename);
  654.                 \$('#thumb').append(\$img);
  655.                 hideThumbnail();
  656.             }
  657.             hideThumbnail();
  658.             \$('#{{ form.upload_file_file.vars.id }}').fileupload({
  659.                 url: \"{{ url('product_review_upload_file_add') }}\",
  660.                 type: 'post',
  661.                 dataType: 'json',
  662.                 dropZone: \$('#upload-zone'),
  663.                 done: function(e, data) {
  664.                     \$('.progress').hide();
  665.                     var path = '{{ asset('', 'temp_image') }}/' + data.result.filename;
  666.                     var \$img = \$(proto_img.replace(/__path__/g, path));
  667.                     \$('#{{ form.upload_file.vars.id }}').val(data.result.filename);
  668.                     \$('#thumb').append(\$img);
  669.                     hideThumbnail();
  670.                 },
  671.                 fail: function(e, data) {
  672.                     alert('{{ 'admin.common.upload_error'|trans }}');
  673.                 },
  674.                 always: function(e, data) {
  675.                     \$('.progress').hide();
  676.                     \$('.progress .progress-bar').width('0%');
  677.                 },
  678.                 start: function(e, data) {
  679.                     if (\$('.c-form__fileUploadThumbnail').length >= 1) {
  680.                         \$.each(\$('.delete-image'), function(index, delete_image) {
  681.                             delete_image.click();
  682.                         });
  683.                     }
  684.                     \$('.progress').show();
  685.                     \$('#thumb').find('div').remove();
  686.                     \$('#{{ form.upload_file.vars.id }}').val('');
  687.                 },
  688.                 acceptFileTypes: /(\\.|\\/)(gif|jpe?g|png)\$/i,
  689.                 maxFileSize: 10000000,
  690.                 maxNumberOfFiles: 1,
  691.                 progressall: function(e, data) {
  692.                     var progress = parseInt(data.loaded / data.total * 100, 10);
  693.                     \$('.progress .progress-bar').css(
  694.                         'width',
  695.                         progress + '%'
  696.                     );
  697.                 },
  698.                 processalways: function(e, data) {
  699.                     if (data.files.error) {
  700.                         alert(\"{{ 'admin.common.upload_error'|trans }}\");
  701.                     }
  702.                 }
  703.             });
  704.             \$('#thumb').on('click', '.delete-image', function() {
  705.                 \$('#{{ form.upload_file.vars.id }}').val('');
  706.                 var thumbnail = \$(this).parents('div.c-form__fileUploadThumbnail');
  707.                 \$(thumbnail).remove();
  708.                 hideThumbnail();
  709.             });
  710.             // 画像アップロード
  711.             // \$('#file_upload').on('click', function() {
  712.             //     \$('#{{ form.upload_file_file.vars.id }}').click();
  713.             // });
  714.         });
  715.     </script>
  716. {% endblock javascript %}
  717. {% block main %}
  718.     <div class=\"ec-registerRole\">
  719.         <div class=\"ec-pageHeader\">
  720.             <h1>{{ 'product_review.front.review.title'|trans }}</h1>
  721.         </div>
  722.         <div class=\"ec-off1Grid\">
  723.             <div class=\"ec-off1Grid__cell\">
  724.                 <form method=\"post\" action=\"{{ url('product_review_index', { id: Product.id }) }}\">
  725.                     {{ form_widget(form._token) }}
  726.                     <p class=\"ec-para-nomal\">{{ 'product_review.front.review.description'|trans }}</p>
  727.                     <div class=\"ec-borderedDefs\">
  728.                         {# 商品名 #}
  729.                         <dl>
  730.                             <dt>
  731.                                 <label class=\"ec-label\">{{ 'product_review.front.review.product_name'|trans }}</label>
  732.                             </dt>
  733.                             <dd>
  734.                                 <div class=\"ec-input\">
  735.                                     {{ Product.name }}
  736.                                 </div>
  737.                             </dd>
  738.                         </dl>
  739.                         {# 投稿者名 #}
  740.                         <dl>
  741.                             <dt>
  742.                                 {{ form_label(form.reviewer_name, '', {'label_attr': {'class': 'ec-label'}}) }}
  743.                             </dt>
  744.                             <dd>
  745.                                 <div class=\"ec-input{{ has_errors(form.reviewer_name) ? ' error' }}\">
  746.                                     {{ form_widget(form.reviewer_name) }}
  747.                                     {{ form_errors(form.reviewer_name) }}
  748.                                 </div>
  749.                             </dd>
  750.                         </dl>
  751.                         {# 投稿者URL #}
  752.                         <dl>
  753.                             <dt>
  754.                                 {{ form_label(form.reviewer_url, '', {'label_attr': {'class': 'ec-label'}}) }}
  755.                             </dt>
  756.                             <dd>
  757.                                 <div class=\"ec-input{{ has_errors(form.reviewer_url) ? ' error' }}\">
  758.                                     {{ form_widget(form.reviewer_url) }}
  759.                                     {{ form_errors(form.reviewer_url) }}
  760.                                 </div>
  761.                             </dd>
  762.                         </dl>
  763.                         {# 性別 #}
  764.                         <dl>
  765.                             <dt>
  766.                                 {{ form_label(form.sex, 'common.gender', {'label_attr': {'class': 'ec-label'}}) }}
  767.                             </dt>
  768.                             <dd>
  769.                                 <div class=\"ec-radio{{ has_errors(form.sex) ? ' error' }}\">
  770.                                     {{ form_widget(form.sex) }}
  771.                                     {{ form_errors(form.sex) }}
  772.                                 </div>
  773.                             </dd>
  774.                         </dl>
  775.                         {# おすすめレベル #}
  776.                         <dl>
  777.                             <dt>
  778.                                 {{ form_label(form.recommend_level, '', {'label_attr': {'class': 'ec-label'}}) }}
  779.                             </dt>
  780.                             <dd>
  781.                                 <div class=\"ec-radio{{ has_errors(form.recommend_level) ? ' error' }}\">
  782.                                     {{ form_widget(form.recommend_level) }}
  783.                                     {{ form_errors(form.recommend_level) }}
  784.                                 </div>
  785.                             </dd>
  786.                         </dl>
  787.                         {# タイトル #}
  788.                         <dl>
  789.                             <dt>
  790.                                 {{ form_label(form.title, '', {'label_attr': {'class': 'ec-label'}}) }}
  791.                             </dt>
  792.                             <dd>
  793.                                 <div class=\"ec-input{{ has_errors(form.title) ? ' error' }}\">
  794.                                     {{ form_widget(form.title) }}
  795.                                     {{ form_errors(form.title) }}
  796.                                 </div>
  797.                             </dd>
  798.                         </dl>
  799.                         {# コメント #}
  800.                         <dl>
  801.                             <dt>
  802.                                 {{ form_label(form.comment, '', {'label_attr': {'class': 'ec-label'}}) }}
  803.                             </dt>
  804.                             <dd>
  805.                                 <div class=\"ec-input{{ has_errors(form.comment) ? ' error' }}\">
  806.                                     {{ form_widget(form.comment) }}
  807.                                     {{ form_errors(form.comment) }}
  808.                                 </div>
  809.                             </dd>
  810.                         </dl>
  811.                          <dl>
  812.                             <dt>
  813.                                 {{ form_label(form.upload_file, '图片', { 'label_attr': { 'class': 'ec-label' }}) }}
  814.                             </dt>
  815.                             <dd>
  816.                                 <div class=\"col mb-2\">
  817.                                     <div class=\"progress\" style=\"display: none;\">
  818.                                         <div class=\"progress-bar progress-bar-striped progress-bar-animated\" role=\"progressbar\" aria-valuenow=\"0\" aria-valuemin=\"0\" aria-valuemax=\"100\"></div>
  819.                                     </div>
  820.                                     <div id=\"thumb\" class=\"c-form__fileUploadThumbnails clearfix\"></div>
  821.                                     {{ form_widget(form.upload_file, { attr : { style : 'display:none;' } }) }}
  822.                                     <div id=\"upload-zone\" class=\"media py-5 border-ec-dashed mb-2 rounded\">
  823.                                         <div class=\"media-body\">
  824.                                             <i class=\"fa fa-cloud-upload fa-3x text-ec-lightGray mx-3 align-middle\" aria-hidden=\"true\"></i>
  825.                                             {{ form_widget(form.upload_file_file, { attr : { accept : 'image/*', style : 'display:none;' } }) }}
  826.                                             {{ form_errors(form.upload_file) }}
  827.                                             <a class=\"btn btn-ec-regular mr-2\" onclick=\"\$('#product_review_upload_file_file').click()\">
  828.                                                 {{ 'admin.common.file_select'|trans }}
  829.                                             </a>
  830.                                         </div><!-- /.media-body -->
  831.                                     </div><!-- /.media -->
  832.                                 </div>
  833.                             </dd>
  834.                         </dl>
  835.                     </div>
  836.                     <div class=\"ec-registerRole__actions\">
  837.                         <div class=\"ec-off4Grid\">
  838.                             <div class=\"ec-off4Grid__cell\">
  839.                                 <button class=\"ec-blockBtn--action\" type=\"submit\" name=\"mode\"
  840.                                         value=\"confirm\">{{ 'product_review.front.review.confirm'|trans }}</button>
  841.                                 <a class=\"ec-blockBtn--cancel\"
  842.                                    href=\"{{ url('product_detail', { id: Product.id }) }}\">{{ 'product_review.front.review.back'|trans }}</a>
  843.                             </div>
  844.                         </div>
  845.                     </div>
  846.                 </form>
  847.             </div>
  848.         </div>
  849.     </div>
  850. {% endblock %}
  851. ""ProductReview4/Resource/template/default/index.twig""/home/r4078784/public_html/eigajp.com/app/template/default/ProductReview4/Resource/template/default/index.twig");
  852.     }
  853. }