app/template/plugin/CustomerReview42/post.twig line 1

Open in your IDE?
  1. {% extends 'default_frame.twig' %}
  2. {% set body_class = 'registration_page' %}
  3. {% form_theme form 'Form/form_div_layout.twig' %}
  4. {% block stylesheet %}
  5.     <style type="text/css">
  6.         .ec-borderedDefsReview {
  7.             width: 100%;
  8.             border-top: 1px dotted #ccc;
  9.             margin-bottom: 16px; }
  10.         .ec-borderedDefsReview dl {
  11.             display: -ms-flexbox;
  12.             display: flex;
  13.             border-bottom: 1px dotted #ccc;
  14.             margin: 0;
  15.             padding: 10px 0 0;
  16.             -ms-flex-wrap: wrap;
  17.                 flex-wrap: wrap; }
  18.         .ec-borderedDefsReview dt, .ec-borderedDefsReview dd {
  19.             padding: 0; }
  20.         .ec-borderedDefsReview dt {
  21.             font-weight: normal;
  22.             width: 100%;
  23.             padding-top: 0; }
  24.         .ec-borderedDefsReview dd {
  25.             padding: 0;
  26.             width: 100%;
  27.             line-height: 1.2; }
  28.         .ec-borderedDefsReview p {
  29.             line-height: 1.2; }
  30.     @media only screen and (min-width: 768px){
  31.         .ec-borderedDefsReview dl{
  32.             -ms-flex-wrap: nowrap;
  33.                 flex-wrap: nowrap;
  34.             padding: 15px 0 4px;
  35.         }
  36.         .ec-borderedDefsReview dt{
  37.             line-height: 1.2;
  38.             width: 30%;
  39.         }
  40.         .ec-borderedDefsReview dd{
  41.             width: 70%;
  42.             line-height: 1.2;
  43.         }
  44.     }
  45.     .ec-layoutRole .ec-layoutRole__contents{
  46.         max-width: unset;
  47.     }
  48.     .ec-pageHeader h1{
  49.         border-bottom: solid 1px #eb0000;
  50.         color: #000;
  51.         font-size: 28px;
  52.         font-weight: 400;
  53.         line-height: 68px;
  54.         margin: 0;
  55.         text-transform: none;
  56.         border-top:none;
  57.     }
  58.     
  59.     .ec-off1Grid .ec-off1Grid__cell{
  60.         margin: 20px 0 0 0;
  61.         width: 100%;
  62.     }
  63.     
  64.     .ec-off1Grid p{
  65.         font-size: 14px;
  66.         color: #303030;
  67.         line-height: 1.4em;
  68.         margin-bottom: 15px;
  69.         font-style: normal;
  70.         font-weight: normal;
  71.     }
  72.     
  73.     .ec-off1Grid .ec-label{
  74.         font-size: 14px;
  75.         color: #303030;
  76.         line-height: 1.4em;
  77.         margin-bottom: 15px;
  78.         font-style: normal;
  79.         font-weight: normal;
  80.     }
  81.     
  82.     .ec-off1Grid label.required:after, 
  83.     .ec-off1Grid span.required:after {
  84.         content: ' *';
  85.         color: red;
  86.         font-weight: normal;
  87.         font-family: "Helvetica Neue", Verdana, Arial, sans-serif;
  88.         font-size: 12px;
  89.     }
  90.     #product_review_recommend_level {
  91.         flex-direction: column;
  92.     }
  93.     #product_review_recommend_level label img {
  94.         width: auto;
  95.     }
  96.     #product_review_recommend_level .radio{
  97.         margin: 0 5px 5px 0;
  98.     }
  99.     #product_review_recommend_level .radio label{
  100.         margin: 0;
  101.     }
  102.     #product_review_recommend_level .radio input {
  103.         margin: 20px 10px 5px;
  104.     }
  105.     .ec-registerRole .ec-RegisterRole__actions{
  106.         text-align: right;
  107.     }
  108.     .ec-RegisterRole__actions .ec-blockBtn--action{
  109.         background: #ff0000;
  110.         color: #fff;
  111.         height: 33px;
  112.         line-height: 33px;
  113.         font-size: 12px;
  114.         padding: 0 10px;
  115.         margin: 5px;
  116.         transition: all 0.2s linear;
  117.         -moz-transition: all 0.2s linear;
  118.         -webkit-transition: all 0.2s linear;
  119.         box-sizing: content-box;
  120.         min-width: 140px;
  121.         cursor: pointer;
  122.         width: 140px;
  123.         display: inline-block;
  124.         border: none;
  125.     }
  126.     .ec-RegisterRole__actions .ec-blockBtn--action:hover,
  127.     .ec-RegisterRole__actions .ec-blockBtn--action:active,
  128.     .ec-RegisterRole__actions .ec-blockBtn--action:focus{
  129.         background: #cc0000;
  130.         color: #fff;
  131.         border: none;
  132.         outline: none;
  133.         box-shadow: none;
  134.     }
  135.     .ec-RegisterRole__actions .ec-blockBtn--cancel {
  136.         background-color: unset;
  137.         border: none;
  138.         color: #303030;
  139.         width: auto;
  140.         text-align: right;
  141.         font-weight: normal;
  142.     }
  143.     .ec-RegisterRole__actions .ec-blockBtn--cancel:hover,
  144.     .ec-RegisterRole__actions .ec-blockBtn--cancel:active,
  145.     .ec-RegisterRole__actions .ec-blockBtn--cancel:focus{
  146.         background-color: unset;
  147.         border: none;
  148.         color: #ff0000;
  149.         outline: none;
  150.         box-shadow: none;
  151.     }
  152.     
  153.     .ec-input input[type="text"],
  154.     .ec-input input[type="email"],
  155.     .ec-input textarea {
  156.         color: #393939;
  157.         border-color: #cfcfcf #ddd #e6e6e6;
  158.         border-style: solid;
  159.         border-width: 1px;
  160.         font-size: 16px;
  161.         padding: 5px 18px;
  162.         height: 40px;
  163.         outline: none;
  164.         background: #ebebeb;
  165.         border-radius: 0;
  166.         box-shadow: inset -2px 2px 5px -2px #ddd;
  167.         margin-bottom:10px;
  168.     }
  169.     .ec-borderedDefsReview .ec-required {
  170.         display: none;
  171.     }
  172.     
  173.     </style>
  174. {% endblock stylesheet %}
  175. {% block main %}
  176.     <div class="ec-registerRole">
  177.         <div class="ec-pageHeader">
  178.             <h1>{{ 'レビューを投稿'|trans }}</h1>
  179.         </div>
  180.         <div class="ec-off1Grid">
  181.             <div class="ec-off1Grid__cell">
  182.                 <div class="ec-imageGrid">
  183.                     <div class="ec-imageGrid__img">
  184.                         <img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}">
  185.                     </div>
  186.                     <div class="ec-imageGrid__content">
  187.                         <a href="{{ url('product_detail', {'id': Product.id}) }}">{{ Product.name }}</a>
  188.                     </div>
  189.                 </div>
  190.             </div>
  191.         </div>
  192.         <div class="ec-off1Grid">
  193.             <div class="ec-off1Grid__cell">
  194.                 <p class="ec-para-nomal">商品について、お客様のご意見、ご感想をどしどしお寄せください。</p>
  195.             </div>
  196.         </div>
  197.         <div class="ec-off1Grid">
  198.         {% if is_granted('ROLE_USER') or review_config.isLoginOnly == false %}
  199.             <div class="ec-off1Grid__cell">
  200.                 <form method="post" action="{{ url('review_post', {'id': Product.id}) }}" novalidate class="h-adr">
  201.                 {{ form_widget(form._token) }}
  202.                     <div class="ec-borderedDefsReview">
  203.                         {% if review_config.isGrantPointPurchase and is_granted('ROLE_USER') %}
  204.                         <dl>
  205.                             <dt></dt>
  206.                             <dd>
  207.                                 <p style="color:red; font-weight:bold;">※ポイント付与はこちらの商品をご購入頂いた会員様のみ対象となります。</p>
  208.                                 <p>商品を受け取っていない場合ポイントが付与されません。</p>
  209.                                 <p><a href="{{ url('mypage') }}">{{ 'ご注文履歴'|trans }}</a>から商品が「発送済み」になっていることを確認してください。</p>
  210.                             </dd>
  211.                         </dl>
  212.                         {% endif %}
  213.                         {% if review_config.isLoginOnly == false and review_config.getGrantPoint > 0 %}
  214.                         <dl>
  215.                             <dt>
  216.                                 <label class="ec-label">ログイン状態</label>
  217.                             </dt>
  218.                             <dd>
  219.                             {% if is_granted('ROLE_USER') %}
  220.                                 <div class="ec-font-bold">
  221.                                     <p>ログインしています。</p>
  222.                                 </div>
  223.                             {% else %}
  224.                                 <div class="ec-color-red ec-font-bold">
  225.                                     <p>ログインしていません。</p>
  226.                                     <p>ログインされない場合は投稿してもポイントが付与されません。</p>
  227.                                     <p>ログインは<a href="{{ url('mypage_login') }}">こちら</a> ・ 新規会員登録は<a href="{{ url('entry') }}">こちら</a></p>
  228.                                 </div>
  229.                             {% endif %}
  230.                             </dd>
  231.                         </dl>
  232.                         {% endif %}
  233.                         <dl>
  234.                             <dt>
  235.                                 {{ form_label(form.reviewer_name, 'レビュアー名', { 'label_attr': { 'class': 'ec-label' }}) }}
  236.                             </dt>
  237.                             <dd>
  238.                                 <div class="ec-input{{ has_errors(form.reviewer_name) ? ' error' }}">
  239.                                     {{ form_widget(form.reviewer_name) }}
  240.                                     {{ form_errors(form.reviewer_name) }}
  241.                                 </div>
  242.                             </dd>
  243.                         </dl>
  244.                         <dl>
  245.                             <dt>
  246.                                 {{ form_label(form.recommend_level, 'お勧め度', { 'label_attr': { 'class': 'ec-label' }}) }}
  247.                             </dt>
  248.                             <dd>
  249.                                 <div class="ec-select{{ has_errors(form.recommend_level) ? ' error' }}">
  250.                                     {{ form_widget(form.recommend_level) }}
  251.                                     {{ form_errors(form.recommend_level) }}
  252.                                 </div>
  253.                             </dd>
  254.                         </dl>
  255.                         <dl>
  256.                             <dt>
  257.                                 {{ form_label(form.title, 'タイトル', { 'label_attr': { 'class': 'ec-label' }}) }}
  258.                             </dt>
  259.                             <dd>
  260.                                 <div class="ec-input{{ has_errors(form.title) ? ' error' }}">
  261.                                     {{ form_widget(form.title) }}
  262.                                     {{ form_errors(form.title) }}
  263.                                 </div>
  264.                             </dd>
  265.                         </dl>
  266.                         <dl>
  267.                             <dt>
  268.                                 {{ form_label(form.comment, 'コメント', { 'label_attr': { 'class': 'ec-label' }}) }}
  269.                             </dt>
  270.                             <dd>
  271.                                 <div class="ec-input{{ has_errors(form.comment) ? ' error' }}">
  272.                                     {{ form_widget(form.comment, {'attr': {'rows': '6'}}) }}
  273.                                     {{ form_errors(form.comment) }}
  274.                                 </div>
  275.                             </dd>
  276.                         </dl>
  277.                     </div>
  278.                     <div class="ec-RegisterRole__actions">
  279.                         <button type="submit" class="ec-blockBtn--action" name="mode" value="confirm">{{ '確認ページへ'|trans }}
  280.                         </button>
  281.                         <a class="ec-blockBtn--cancel" href="{{ url('product_detail', {'id': Product.id}) }}"><small>« </small>戻る</a>
  282.                     </div>
  283.                 </form>
  284.             </div>
  285.         {% else %}
  286.             <div class="ec-off1Grid__cell">
  287.                 <div class="ec-borderedDefs">
  288.                     <div class="ec-reportHeading">
  289.                         <h2>投稿には<a href="{{ url('mypage_login') }}"><span class="ec-headerNav__itemLink">{{ 'ログイン'|trans }}</span></a>が必要です。</h2>
  290.                     </div>
  291.                 </div>
  292.                 </br>
  293.                 <div class="ec-RegisterRole__actions">
  294.                     <div class="ec-off4Grid">
  295.                         <div class="ec-off4Grid__cell">
  296.                             <a class="ec-blockBtn--cancel" href="{{ url('product_detail', {'id': Product.id}) }}">{{ '商品ページへ'|trans }}</a>
  297.                         </div>
  298.                     </div>
  299.                 </div>
  300.             </div>
  301.         {% endif %}
  302.         </div>
  303.     </div>
  304.     <div class="swooth-wrapper grey-swooth">
  305.     </div>
  306. {% endblock %}