app/template/unishop/Entry/school_certification.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. {% set body_class = 'registration_page' %}
  19. {% block javascript %}
  20.     <script>
  21.         {% for school in Schools %}
  22.             $('#School option[value="{{ school.school_id }}"]').attr('data-key-visible', {{ school.visible_school_key ? 1 : 0 }});
  23.         {% endfor %}
  24.         $('#School').change(function(){
  25.             if($('option:selected', $(this)).data('key-visible')) {
  26.                 $('#top_box__name').show();
  27.             }
  28.             else {
  29.                 $('#top_box__name').hide();
  30.             }
  31.         });
  32.         $('#top_box__body').submit(function(){
  33.             $('#top_box__name .form-group .error').remove();
  34.             if($('#top_box__name').is(":visible") && !$('#school_key').val()) {
  35.                 $('#top_box__name .form-group').append('<p class="red error">入力してください</p>');
  36.                 return false;
  37.             }
  38.         });
  39.     </script>
  40. {% endblock javascript %}
  41. {% block stylesheet %}
  42. <style>
  43. .input_School select{
  44.     width: 48% !important;
  45. }
  46. </style>
  47. {% endblock stylesheet %}
  48. {% block main %}
  49. <h1 class="title_bar nikke">学校情報認証</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.         {% if School is null or School.visible %}
  54.             {% if school_not_found %}
  55.                 <p>※ 学校コードに該当していないので、ご確認お願い致します。</p>
  56.             {% else %}
  57.                 <form method="post" action="{{ url('entry', { gcd : gcd }) }}">
  58.                     {{ form_widget(form._token) }}
  59.                     <div id="top_box__body_inner" class="dl_table">
  60.                         {% if School is null %}
  61.                             <dl id="top_box__School">
  62.                                 <dt>{{ form_label(form.School) }}</dt>
  63.                                 <dd class="form-group input_School">
  64.                                     {{ form_widget(form.School) }}
  65.                                     {{ form_errors(form.School) }}
  66.                                 </dd>
  67.                             </dl>
  68.                         {% else %}
  69.                             <dl id="top_box__kana">
  70.                                 <dt></dt>
  71.                                 <dd class="form-group input_name">
  72.                                     {{ School.school_name }}
  73.                                 </dd>
  74.                             </dl>
  75.                         {% endif %}
  76.                         {% if School and School.visible_school_key != 1 %}
  77.                             <div style="display:none">
  78.                                 {{ form_widget(form.school_key, {'attr': {'value': School.school_key}}) }}
  79.                                 {{ form_errors(form.school_key) }}
  80.                             </div>
  81.                         {% else %}
  82.                             <dl id="top_box__name">
  83.                                 <dt></dt>
  84.                                 <dd class="form-group input_name">
  85.                                     {{ form_widget(form.school_key) }}
  86.                                     {{ form_errors(form.school_key) }}
  87.                                     {% if certification_error_flg == 1 %}
  88.                                     <span>※認証に失敗しました。</span>
  89.                                     {% endif %}
  90.                                 </dd>
  91.                             </dl>
  92.                         {% endif %}
  93.                         <input id="top_box__hidden_mode" type="hidden" name="mode" value="certify">
  94.                     </div>
  95.                     <div id="top_box__footer" class="row no-padding">
  96.                         <div id="top_box__button_menu" class="btn_group col-sm-offset-4 col-sm-4">
  97.                             <p>
  98.                                 <button type="submit" class="btn btn-primary btn-block def_btn ya radius1">生徒情報の登録へ</button>
  99.                             </p>
  100.                         </div>
  101.                     </div>
  102.                 </form>
  103.             {% endif %}
  104.         {% else %}
  105.             <p style="text-align: center">この学校URLは現在非公開となっています。</p>
  106.         {% endif %}
  107.         </div>
  108.         <!-- /.col -->
  109.     </div>
  110.     <!-- /.row -->
  111. </div>
  112. {% endblock %}