app/template/default/Contact/index.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  4. http://www.ec-cube.co.jp/
  5. For the full copyright and license information, please view the LICENSE
  6. file that was distributed with this source code.
  7. #}
  8. {% extends 'default_frame.twig' %}
  9. {% form_theme form 'Form/form_div_layout.twig' %}
  10. {% set productCodeVal = productCode %}
  11. {% block javascript %}
  12.     <script src="//yubinbango.github.io/yubinbango/yubinbango.js" charset="UTF-8"></script>
  13.     
  14.     <script>
  15.         $(function() {
  16.             const contensId = document.getElementById("contensId");
  17.             if(contensId.value == '' || contensId.value == null){
  18.                 const value = '{{productCodeVal}}';
  19.                 if (value != '' && value != null){
  20.                     contensId.value = '【照会番号:' + value + '】\n------------------------------------------';
  21.                 }
  22.             }
  23.                 
  24.         });
  25.     </script>
  26. {% endblock javascript %}
  27. {% block main %}
  28.     <div class="ec-contactRole">
  29.         <div class="ec-pageHeader">
  30.             <h1>{{ 'お問い合わせ'|trans }}</h1>
  31.         </div>
  32.         <div class="ec-off1Grid">
  33.             <div class="ec-off1Grid__cell">
  34.                 <form method="post" action="{{ url('contact') }}" class="h-adr" novalidate>
  35.                     <span class="p-country-name" style="display:none;">Japan</span>
  36.                     {{ form_widget(form._token) }}
  37.                     <p class="ec-para-normal">{{ '内容によっては回答をさしあげるのにお時間をいただくこともございます。
  38. また、休業日は翌営業日以降の対応となりますのでご了承ください。
  39. '|trans|nl2br }}</p>
  40.                     <div class="ec-borderedDefs">
  41.                     <!–会社名–>
  42.                         <dl>
  43.                         <dt>
  44.                         {{ form_label(form.company_name,  '会社名', {  'label_attr': { 'class': 'ec-label' }}) }}
  45.                         </dt>
  46.                         <dd>
  47.                         <div class=”ec-halfInput{{ has_errors(form.company_name) ? 'error'}}”>
  48.                         {{ form_widget(form.company_name, {'attr': { 'placeholder': '会社名' }}) }}
  49.                         {{ form_errors(form.company_name) }}
  50.                         </div>
  51.                         </dd>
  52.                         </dl>
  53.                     <!–会社名–>
  54.                         <dl>
  55.                             <dt>
  56.                                 {{ form_label(form.name, 'お名前', { 'label_attr': { 'class': 'ec-label' }}) }}
  57.                             </dt>
  58.                             <dd>
  59.                                 <div class="ec-halfInput{{ has_errors(form.name.name01, form.name.name02) ? ' error' }}">
  60.                                     {{ form_widget(form.name.name01, {'attr': { 'placeholder': '姓' }}) }}
  61.                                     {{ form_widget(form.name.name02, {'attr': { 'placeholder': '名' }}) }}
  62.                                     {{ form_errors(form.name.name01) }}
  63.                                     {{ form_errors(form.name.name02) }}
  64.                                 </div>
  65.                             </dd>
  66.                         </dl>
  67.                         <dl>
  68.                             <dt>
  69.                                 {{ form_label(form.kana, 'お名前(カナ)', {'label_attr': {'class': 'ec-label'}}) }}
  70.                             </dt>
  71.                             <dd>
  72.                                 <div class="ec-halfInput{{ has_errors(form.kana.kana01, form.kana.kana02) ? ' error' }}">
  73.                                     {{ form_widget(form.kana.kana01, {'attr': { 'placeholder': 'セイ' }}) }}
  74.                                     {{ form_widget(form.kana.kana02, {'attr': { 'placeholder': 'メイ' }}) }}
  75.                                     {{ form_errors(form.kana.kana01) }}
  76.                                     {{ form_errors(form.kana.kana02) }}
  77.                                 </div>
  78.                             </dd>
  79.                         </dl>
  80.                         <dl>
  81.                             <dt>
  82.                                 {{ form_label(form.address, '住所', { 'label_attr': { 'class': 'ec-label' }}) }}
  83.                             </dt>
  84.                             <dd>
  85.                                 <div class="ec-zipInput{{ has_errors(form.postal_code) ? ' error' }}">
  86.                                     <span>{{ '〒'|trans }}</span>
  87.                                     {{ form_widget(form.postal_code) }}
  88.                                     <div class="ec-zipInputHelp">
  89.                                         <div class="ec-zipInputHelp__icon">
  90.                                             <div class="ec-icon"><img
  91.                                                     src="{{ asset('assets/icon/question-white.svg') }}" alt="">
  92.                                             </div>
  93.                                         </div><a href="https://www.post.japanpost.jp/zipcode/" target="_blank"><span>{{ '郵便番号検索'|trans }}</span></a>
  94.                                     </div>
  95.                                     {{ form_errors(form.postal_code) }}
  96.                                 </div>
  97.                                 <div class="ec-select{{ has_errors(form.address.pref) ? ' error' }}">
  98.                                     {{ form_widget(form.address.pref) }}
  99.                                     {{ form_errors(form.address.pref) }}
  100.                                 </div>
  101.                                 <div class="ec-input{{ has_errors(form.address.addr01) ? ' error' }}">
  102.                                     {{ form_widget(form.address.addr01, { 'attr': { 'placeholder': '市区町村名(例:大阪市北区)' }}) }}
  103.                                     {{ form_errors(form.address.addr01) }}
  104.                                 </div>
  105.                                 <div class="ec-input{{ has_errors(form.address.addr02) ? ' error' }}">
  106.                                     {{ form_widget(form.address.addr02,  { 'attr': { 'placeholder': '番地・ビル名(例:西梅田1丁目6-8)' }}) }}
  107.                                     {{ form_errors(form.address.addr02) }}
  108.                                 </div>
  109.                             </dd>
  110.                         </dl>
  111.                         <dl>
  112.                             <dt>
  113.                                 {{ form_label(form.phone_number, '電話番号', { 'label_attr': { 'class': 'ec-label' }}) }}
  114.                             </dt>
  115.                             <dd>
  116.                                 <div class="ec-telInput{{ has_errors(form.phone_number) ? ' error' }}">
  117.                                     {{ form_widget(form.phone_number) }}
  118.                                     {{ form_errors(form.phone_number) }}
  119.                                 </div>
  120.                             </dd>
  121.                         </dl>
  122.                         <dl>
  123.                             <dt>
  124.                                 {{ form_label(form.email, 'メールアドレス', { 'label_attr': { 'class': 'ec-label' }}) }}
  125.                             </dt>
  126.                             <dd>
  127.                                 <div class="ec-input{{ has_errors(form.email) ? ' error' }}">
  128.                                     {{ form_widget(form.email) }}
  129.                                     {{ form_errors(form.email) }}
  130.                                 </div>
  131.                             </dd>
  132.                         </dl>
  133.                         <dl>
  134.                             <dt>
  135.                                 {{ form_label(form.contents,'お問い合わせ内容', { 'label_attr': { 'class': 'ec-label'}}) }}
  136.                             </dt>
  137.                             <dd>
  138.                                 <div class="ec-input{{ has_errors(form.contents) ? ' error' }}">
  139.                                     {{ form_widget(form.contents, {id : 'contensId'}) }}
  140.                                     {{ form_errors(form.contents) }}
  141.                                 </div>
  142.                                 <p>{{ 'ご注文に関するお問い合わせには、必ず「ご注文番号」をご記入くださいますようお願いいたします。'|trans }}</p>
  143.                             </dd>
  144.                         </dl>
  145.                         {# エンティティ拡張の自動出力 #}
  146.                         {% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
  147.                             {% if f.vars.eccube_form_options.form_theme %}
  148.                                 {% form_theme f f.vars.eccube_form_options.form_theme %}
  149.                                 {{ form_row(f) }}
  150.                             {% else %}
  151.                                 <dl>
  152.                                     <dt>
  153.                                         {{ form_label(f) }}
  154.                                     </dt>
  155.                                     <dd>
  156.                                         <div class="{{ f.vars.eccube_form_options.style_class }}{{ has_errors(f) ? ' error' }}">
  157.                                             {{ form_widget(f) }}
  158.                                             {{ form_errors(f) }}
  159.                                         </div>
  160.                                     </dd>
  161.                                 </dl>
  162.                             {% endif %}
  163.                         {% endfor %}
  164.                     </div>
  165.                     <div class="ec-RegisterRole__actions">
  166.                         <div class="ec-off4Grid">
  167.                             <div class="ec-off4Grid__cell">
  168.                                 <button type="submit" class="ec-blockBtn--action" name="mode" value="confirm">{{ '確認ページへ'|trans }}
  169.                                 </button>
  170.                             </div>
  171.                         </div>
  172.                     </div>
  173.                 </form>
  174.             </div>
  175.         </div>
  176.     </div>
  177. {% endblock %}