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.                                 {% if form.school is defined %}
  125.                                 <dl id="top_box__school">
  126.                                     <dt>{{ form_label(form.school) }}</dt>
  127.                                     <dd>
  128.                                         <div class="form-inline form-group input_school">
  129.                                             {% if app.user %}
  130.                                                 {% set brother_school_ids = [] %}
  131.                                                     {% for brother in app.user.visible_brothers %}
  132.                                                         {% if brother.school %}
  133.                                                             {% set brother_school_ids = brother_school_ids|merge([brother.school.school_id]) %}
  134.                                                         {% endif %}
  135.                                                     {% endfor %}
  136.                                                 <select id="contact_school" name="contact[school]" class="short form-control"{{ form.school.vars.required ? ' required="required"' : '' }}>
  137.                                                     <option value="">選択してください</option>
  138.                                                     {% for school_data in form.school.vars.choices %}
  139.                                                         {% set school = school_data.data %}
  140.                                                         {% if school.visible %}
  141.                                                             {% if school.school_id == app.user.school.school_id or school.school_id in brother_school_ids %}
  142.                                                             <option value="{{ school.school_id }}">{{ school.school_name }}</option>
  143.                                                             {% endif %}
  144.                                                         {% endif %}
  145.                                                     {% endfor %}
  146.                                                 </select>
  147.                                             {% else %}
  148.                                                 {{ form_widget(form.school) }}
  149.                                             {% endif %}
  150.                                             {{ form_errors(form.school) }}
  151.                                         </div>
  152.                                     </dd>
  153.                                 </dl>
  154.                                 {% endif %}
  155.                                 <dl id="top_box__school_year">
  156.                                     <dt>{{ form_label(form.school_year) }}</dt>
  157.                                     <dd>
  158.                                         <div class="form-inline form-group input_school_year">
  159.                                             {{ form_widget(form.school_year, {attr : {class : 'short'}}) }}
  160.                                             {{ form_errors(form.school_year) }}
  161.                                         </div>
  162.                                     </dd>
  163.                                 </dl>
  164.                                 <dl id="top_box__school_class">
  165.                                     <dt>{{ form_label(form.school_class) }}</dt>
  166.                                     <dd>
  167.                                         <div class="form-inline form-group input_school_class">
  168.                                             {{ form_widget(form.school_class, {attr : {class : 'short'}}) }}
  169.                                             {{ form_errors(form.school_class) }}
  170.                                         </div>
  171.                                     </dd>
  172.                                 </dl>
  173.                                 <dl id="top_box__contents">
  174.                                     <dt>{{ form_label(form.contents) }}</dt>
  175.                                     <dd>
  176.                                         <div class="column">
  177.                                             {{ form_widget(form.contents) }}
  178.                                             {{ form_errors(form.contents) }}
  179.                                         </div>
  180.                                     </dd>
  181.                                 </dl>
  182.                             </div>
  183.                             <input id="top_box__hidden_mode" type="hidden" name="mode" value="confirm">
  184.                             {% for f in form %}
  185.                                 {% if f.vars.name matches '[^plg*]' %}
  186.                                     <div class="extra-form dl_table">
  187.                                         {{ form_row(f) }}
  188.                                     </div>
  189.                                 {% endif %}
  190.                             {% endfor %}
  191.                             <div id="top_box__footer" class="row no-padding">
  192.                                 <div id="top_box__confirm_button" class="btn_group col-sm-offset-4 col-sm-4">
  193.                                     <p><button type="submit" class="def_button3">確認ページへ</button></p>
  194.                                 </div>
  195.                             </div>
  196.                         </form>
  197.                     </div>
  198.                     <!-- /.col -->
  199.                 </div>
  200.                 <!-- /.row -->
  201.             </div>
  202.             </div>
  203.         </div>
  204.     </div>
  205. </div>
  206. {% endblock %}