app/template/default/Entry/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. {% set body_class = 'registration_page' %}
  10. {% form_theme form 'Form/form_div_layout.twig' %}
  11. {% block javascript %}
  12. <script src="//yubinbango.github.io/yubinbango/yubinbango.js" charset="UTF-8"></script>
  13. {% endblock javascript %}
  14. {% block main %}
  15.     <div class="ec-registerRole">
  16.         <div class="ec-pageHeader">
  17.             <h1 class="km_pagetitle">{{ 'front.entry.title'|trans }}</h1>
  18.         </div>
  19.         <div class="ec-off1Grid">
  20.             <div class="ec-off1Grid__cell">
  21.                 <form method="post" action="{{ url('entry') }}" novalidate class="h-adr">
  22.                     <span class="p-country-name" style="display:none;">Japan</span>
  23.                     {{ form_widget(form._token) }}
  24.                     <div class="ec-borderedDefs">
  25.                         <dl>
  26.                             <dt>
  27.                                 {{ form_label(form.User.name, 'common.name', { 'label_attr': { 'class': 'ec-label' }}) }}
  28.                             </dt>
  29.                             <dd>
  30.                                 <div class="ec-halfInput{{ has_errors(form.User.name.name01, form.User.name.name02) ? ' error'}}">
  31.                                     {{ form_widget(form.User.name.name01, { 'attr': { 'placeholder': 'common.last_name' }}) }}
  32.                                     {{ form_widget(form.User.name.name02, { 'attr': { 'placeholder': 'common.first_name' }}) }}
  33.                                     {{ form_errors(form.User.name.name01) }}
  34.                                     {{ form_errors(form.User.name.name02) }}
  35.                                 </div>
  36.                             </dd>
  37.                         </dl>
  38.                         <dl style="display: none;">
  39.                             {{ form_widget(form.kana.kana01) }}
  40.                             {{ form_widget(form.kana.kana02) }}
  41.                             {{ form_widget(form.User.kana.kana01) }}
  42.                             {{ form_widget(form.User.kana.kana02) }}
  43.                         </dl>
  44.                         <dl>
  45.                             <dt>
  46.                                 {{ form_label(form.User.phone_number, 'common.phone_number', { 'label_attr': { 'class': 'ec-label' }}) }}
  47.                             </dt>
  48.                             <dd>
  49.                                 <div class="ec-telInput{{ has_errors(form.User.phone_number) ? ' error' }}">
  50.                                     {{ form_widget(form.User.phone_number) }}
  51.                                     {{ form_errors(form.User.phone_number) }}
  52.                                 </div>
  53.                             </dd>
  54.                         </dl>
  55.                         <dl>
  56.                             <dt>
  57.                                 {{ form_label(form.email, 'common.mail_address', { 'label_attr': { 'class': 'ec-label' }}) }}
  58.                             </dt>
  59.                             <dd>
  60.                                 <div class="ec-input{{ has_errors(form.email.first) ? ' error' }}">
  61.                                     {{ form_widget(form.email.first, { 'attr': { 'placeholder': 'common.mail_address_sample' }}) }}
  62.                                     {{ form_errors(form.email.first) }}
  63.                                 </div>
  64.                                 <div class="ec-input{{ has_errors(form.email.second) ? ' error' }}">
  65.                                     {{ form_widget(form.email.second, { 'attr': { 'placeholder': 'common.repeated_confirm' }}) }}
  66.                                     {{ form_errors(form.email.second) }}
  67.                                 </div>
  68.                             </dd>
  69.                         </dl>
  70.                         <dl>
  71.                             <dt>
  72.                                 {{ form_label(form.plain_password, 'common.password', { 'label_attr': {'class': 'ec-label' }}) }}
  73.                             </dt>
  74.                             <dd>
  75.                                 <div class="ec-input{{ has_errors(form.plain_password.first) ? ' error' }}">
  76.                                     {{ form_widget(form.plain_password.first, {
  77.                                         'attr': { 'placeholder': 'common.password_sample'|trans({ '%min%': eccube_config.eccube_password_min_len, '%max%': eccube_config.eccube_password_max_len }) },
  78.                                         'type': 'password'
  79.                                     }) }}
  80.                                     {{ form_errors(form.plain_password.first) }}
  81.                                 </div>
  82.                                 <div class="ec-input{{ has_errors(form.plain_password.second) ? ' error' }}">
  83.                                     {{ form_widget(form.plain_password.second, {
  84.                                         'attr': { 'placeholder': 'common.repeated_confirm'|trans },
  85.                                         'type': 'password'
  86.                                     }) }}
  87.                                     {{ form_errors(form.plain_password.second) }}
  88.                                 </div>
  89.                             </dd>
  90.                         </dl>
  91.                         <dl>
  92.                             <dt>
  93.                                 {{ form_label(form.User.SearchingPrefs, 'common.searching_prefectures', { 'label_attr': {'class': 'ec-label' }}) }}
  94.                             </dt>
  95.                             <dd>
  96.                                 <div class="col">
  97.                                     <div class="d-flex flex-wrap">
  98.                                         {% for checkbox in form.User.SearchingPrefs %}
  99.                                             <div class="me-3">
  100.                                                 {{ form_widget(checkbox) }}
  101.                                                 {{ form_label(checkbox) }}
  102.                                             </div>
  103.                                             {% if loop.index is divisible by(3) and not loop.last %}
  104.                                                 </div><div class="d-flex flex-wrap">
  105.                                             {% endif %}
  106.                                         {% endfor %}
  107.                                     </div>
  108.                                 </div>
  109.                             </dd>
  110.                         </dl>
  111.                         {# モードを hidden で設定 #}
  112.                         {{ form_widget(form.mode, { 'attr': { 'style': 'display: none;' }, 'value': 'register_confirm' }) }}
  113.                         {# これがないとエラーにフォームのバリデーションが動いてしまうので、ダミーのフィールドを出力 #}
  114.                         {{ form_widget(form.User.EmergencyContact.kana.kana01, {'attr': {'style': 'display: none;'}}) }}
  115.                         {{ form_widget(form.User.EmergencyContact.kana.kana02, {'attr': {'style': 'display: none;'}}) }}
  116.                         {# エンティティ拡張の自動出力 #}
  117.                         {% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
  118.                             {% if f.vars.eccube_form_options.form_theme %}
  119.                                 {% form_theme f f.vars.eccube_form_options.form_theme %}
  120.                                 {{ form_row(f) }}
  121.                             {% else %}
  122.                                 <dl>
  123.                                     <dt>
  124.                                         {% set label_class =  f.vars.label_attr.class is defined ? f.vars.label_attr.class : '' %}
  125.                                         {{ form_label(f, f.vars.label, { 'label_attr': {'class': label_class ~ ' ec-label' }}) }}
  126.                                     </dt>
  127.                                     <dd>
  128.                                         <div class="{{ f.vars.eccube_form_options.style_class }}{{ has_errors(f) ? ' error' }}">
  129.                                             {{ form_widget(f) }}
  130.                                             {{ form_errors(f) }}
  131.                                         </div>
  132.                                     </dd>
  133.                                 </dl>
  134.                             {% endif %}
  135.                         {% endfor %}
  136.                     </div>
  137.                     <div class="ec-registerRole__actions">
  138.                         <div class="ec-off4Grid">
  139.                             <div class="ec-off4Grid__cell">
  140.                                 <button class="ec-blockBtn--action" type="submit" name="mode" value="confirm">{{ 'common.confirm'|trans }}</button>
  141.                             </div>
  142.                         </div>
  143.                     </div>
  144.                 </form>
  145.             </div>
  146.         </div>
  147.     </div>
  148. {% endblock %}