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

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) 2000-2015 LOCKON CO.,LTD. All Rights Reserved.
  4. http://www.lockon.co.jp/
  5. This program is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License
  7. as published by the Free Software Foundation; either version 2
  8. of the License, or (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  16. #}
  17. {% extends 'default_frame.twig' %}
  18. {% block javascript %}
  19. <script src="//ajaxzip3.github.io/ajaxzip3.js" charset="UTF-8"></script>
  20. <script>
  21.     $(function() {
  22.         $('#zip-search').click(function() {
  23.             AjaxZip3.zip2addr('contact[zip][zip01]', 'contact[zip][zip02]', 'contact[address][pref]', 'contact[address][addr01]');
  24.         });
  25.     });
  26. </script>
  27. {% endblock javascript %}
  28. {% block stylesheet %}
  29.     <style type="text/css">
  30.     .ec-zipInput, .ec-zipInputHelp, .ec-zipInputHelp .ec-zipInputHelp__icon, .ec-zipInputHelp .ec-icon{
  31.         display: inline-block;
  32.     }
  33.     .ec-zipInputHelp__icon .ec-icon img{
  34.         width: 15px;
  35.         background: #ccc;
  36.         border-radius: 100%;
  37.         margin-right: 5px;
  38.     }
  39.     #top_box__address_detail dd>div{
  40.         margin-bottom: 15px;
  41.     }
  42.     </style>
  43. {% endblock %}
  44. {% block main %}
  45. <div id="contents" class="main_only">
  46.     <div class="container-fluid inner no-padding">
  47.         <div id="main">
  48. <div class="complete_all">
  49.             <h1 class="title_bar">お問い合わせ</h1>
  50.             <div id="top_wrap" class="container-fluid">
  51.                 <div id="top_box" class="row">
  52.                     <div id="top_box__body" class="col-md-10 col-md-offset-1">
  53.                         <p>内容によっては回答をさしあげるのにお時間をいただくこともございます。<br/>
  54.                             また、休業日は翌営業日以降の対応となりますのでご了承ください。</p>
  55.                         <form name="form1" id="form1" method="post" action="{{ url('contact') }}">
  56.                             {{ form_widget(form._token) }}
  57.                             <div id="top_box__body_inner" class="dl_table">
  58.                                 <dl id="top_box__name">
  59.                                     <dt>{{ form_label(form.name) }}</dt>
  60.                                     <dd class="form-group input_name">
  61.                                         {{ form_widget(form.name.name01) }}
  62.                                         {{ form_widget(form.name.name02) }}
  63.                                         {{ form_errors(form.name.name01) }}
  64.                                         {{ form_errors(form.name.name02) }}
  65.                                     </dd>
  66.                                 </dl>
  67.                                 <dl id="top_box__kana">
  68.                                     <dt>{{ form_label(form.kana) }}</dt>
  69.                                     <dd class="form-group input_name">
  70.                                         {{ form_widget(form.kana.kana01) }}
  71.                                         {{ form_widget(form.kana.kana02) }}
  72.                                         {{ form_errors(form.kana.kana01) }}
  73.                                         {{ form_errors(form.kana.kana02) }}
  74.                                     </dd>
  75.                                 </dl>
  76.                                 <dl id="top_box__address_detail">
  77.                                     <dt>{{ form_label(form.address) }}</dt>
  78.                                     <dd>
  79.                                         <div class="ec-zipInput{{ has_errors(form.postal_code) ? ' error' }}">
  80.                                             <span>{{ '〒'|trans }}</span>
  81.                                             {{ form_widget(form.postal_code) }}
  82.                                             {{ form_errors(form.postal_code) }}
  83.                                         </div>
  84.                                         <div class="ec-zipInputHelp">
  85.                                             <div class="ec-zipInputHelp__icon">
  86.                                                 <div class="ec-icon"><img
  87.                                                             src="{{ asset('assets/icon/question-white.svg') }}" alt="">
  88.                                                 </div>
  89.                                             </div><a href="https://www.post.japanpost.jp/zipcode/" target="_blank"><span>{{ '郵便番号検索'|trans }}</span></a>
  90.                                         </div>
  91.                                         {{ form_errors(form.postal_code) }}
  92.                                         <div class="ec-select{{ has_errors(form.address.pref) ? ' error' }}">
  93.                                             {{ form_widget(form.address.pref) }}
  94.                                             {{ form_errors(form.address.pref) }}
  95.                                         </div>
  96.                                         <div class="ec-input{{ has_errors(form.address.addr01) ? ' error' }}">
  97.                                             {{ form_widget(form.address.addr01, { 'attr': { 'placeholder': '市区町村名(例:大阪市北区)' }}) }}
  98.                                             {{ form_errors(form.address.addr01) }}
  99.                                         </div>
  100.                                         <div class="ec-input{{ has_errors(form.address.addr02) ? ' error' }}">
  101.                                             {{ form_widget(form.address.addr02,  { 'attr': { 'placeholder': '番地・ビル名(例:西梅田1丁目6-8)' }}) }}
  102.                                             {{ form_errors(form.address.addr02) }}
  103.                                         </div>
  104.                                     </dd>
  105.                                 </dl>
  106.                                 <dl id="top_box__tel">
  107.                                     <dt>{{ form_label(form.phone_number) }}</dt>
  108.                                     <dd>
  109.                                         <div class="form-inline form-group input_tel">
  110.                                             {{ form_widget(form.phone_number, {attr : {class : 'short'}}) }}
  111.                                             {{ form_errors(form.phone_number) }}
  112.                                         </div>
  113.                                     </dd>
  114.                                 </dl>
  115.                                 <dl id="top_box__email">
  116.                                     <dt>{{ form_label(form.email) }}</dt>
  117.                                     <dd>
  118.                                         <div class="form-group">
  119.                                             {{ form_widget(form.email) }}
  120.                                             {{ form_errors(form.email) }}
  121.                                         </div>
  122.                                     </dd>
  123.                                 </dl>
  124.                                 <dl id="top_box__school">
  125.                                     <dt>{{ form_label(form.school) }}</dt>
  126.                                     <dd>
  127.                                         <div class="form-inline form-group input_school">
  128.                                             {% if app.user %}
  129.                                                 {% set brother_school_ids = [] %}
  130.                                                     {% for brother in app.user.visible_brothers %}
  131.                                                         {% if brother.school %}
  132.                                                             {% set brother_school_ids = brother_school_ids|merge([brother.school.school_id]) %}
  133.                                                         {% endif %}
  134.                                                     {% endfor %}
  135.                                                 <select id="contact_school" name="contact[school]" class="short form-control">
  136.                                                     <option value="">選択してください</option>
  137.                                                     {% for school_data in form.school.vars.choices %}
  138.                                                         {% set school = school_data.data %}
  139.                                                         {% if school.visible %}
  140.                                                             {% if school.school_id == app.user.school.school_id or school.school_id in brother_school_ids %}
  141.                                                             <option value="{{ school.school_id }}"{% if school.school_id == app.user.school.school_id %}selected{% endif %}>{{ school.school_name }}</option>
  142.                                                             {% endif %}
  143.                                                         {% endif %}
  144.                                                     {% endfor %}
  145.                                                 </select>
  146.                                             {% else %}
  147.                                                 {{ form_widget(form.school) }}
  148.                                             {% endif %}
  149.                                             {{ form_errors(form.school) }}
  150.                                         </div>
  151.                                     </dd>
  152.                                 </dl>
  153.                                 <dl id="top_box__school_year">
  154.                                     <dt>{{ form_label(form.school_year) }}</dt>
  155.                                     <dd>
  156.                                         <div class="form-inline form-group input_school_year">
  157.                                             {{ form_widget(form.school_year, {attr : {class : 'short'}}) }}
  158.                                             {{ form_errors(form.school_year) }}
  159.                                         </div>
  160.                                     </dd>
  161.                                 </dl>
  162.                                 <dl id="top_box__school_class">
  163.                                     <dt>{{ form_label(form.school_class) }}</dt>
  164.                                     <dd>
  165.                                         <div class="form-inline form-group input_school_class">
  166.                                             {{ form_widget(form.school_class, {attr : {class : 'short'}}) }}
  167.                                             {{ form_errors(form.school_class) }}
  168.                                         </div>
  169.                                     </dd>
  170.                                 </dl>
  171.                                 <dl id="top_box__contents">
  172.                                     <dt>{{ form_label(form.contents) }}</dt>
  173.                                     <dd>
  174.                                         <div class="column">
  175.                                             {{ form_widget(form.contents) }}
  176.                                             {{ form_errors(form.contents) }}
  177.                                         </div>
  178.                                     </dd>
  179.                                 </dl>
  180.                             </div>
  181.                             <input id="top_box__hidden_mode" type="hidden" name="mode" value="confirm">
  182.                             {% for f in form %}
  183.                                 {% if f.vars.name matches '[^plg*]' %}
  184.                                     <div class="extra-form dl_table">
  185.                                         {{ form_row(f) }}
  186.                                     </div>
  187.                                 {% endif %}
  188.                             {% endfor %}
  189.                             <div id="top_box__footer" class="row no-padding">
  190.                                 <div id="top_box__confirm_button" class="btn_group col-sm-offset-4 col-sm-4">
  191.                                     <p><button type="submit" class="def_button3">確認ページへ</button></p>
  192.                                 </div>
  193.                             </div>
  194.                         </form>
  195.                     </div>
  196.                     <!-- /.col -->
  197.                 </div>
  198.                 <!-- /.row -->
  199.             </div>
  200.             </div>
  201.         </div>
  202.     </div>
  203. </div>
  204. {% endblock %}