{#
This file is part of EC-CUBE
Copyright(c) 2000-2015 LOCKON CO.,LTD. All Rights Reserved.
http://www.lockon.co.jp/
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#}
{% extends 'default_frame.twig' %}
{% block javascript %}
<script src="//ajaxzip3.github.io/ajaxzip3.js" charset="UTF-8"></script>
<script>
$(function() {
$('#zip-search').click(function() {
AjaxZip3.zip2addr('contact[zip][zip01]', 'contact[zip][zip02]', 'contact[address][pref]', 'contact[address][addr01]');
});
});
</script>
{% endblock javascript %}
{% block stylesheet %}
<style type="text/css">
.ec-zipInput, .ec-zipInputHelp, .ec-zipInputHelp .ec-zipInputHelp__icon, .ec-zipInputHelp .ec-icon{
display: inline-block;
}
.ec-zipInputHelp__icon .ec-icon img{
width: 15px;
background: #ccc;
border-radius: 100%;
margin-right: 5px;
}
#top_box__address_detail dd>div{
margin-bottom: 15px;
}
</style>
{% endblock %}
{% block main %}
<div id="contents" class="main_only">
<div class="container-fluid inner no-padding">
<div id="main">
<div class="complete_all">
<h1 class="title_bar">お問い合わせ</h1>
<div id="top_wrap" class="container-fluid">
<div id="top_box" class="row">
<div id="top_box__body" class="col-md-10 col-md-offset-1">
<p>内容によっては回答をさしあげるのにお時間をいただくこともございます。<br/>
また、休業日は翌営業日以降の対応となりますのでご了承ください。</p>
<form name="form1" id="form1" method="post" action="{{ url('contact') }}">
{{ form_widget(form._token) }}
<div id="top_box__body_inner" class="dl_table">
<dl id="top_box__name">
<dt>{{ form_label(form.name) }}</dt>
<dd class="form-group input_name">
{{ form_widget(form.name.name01) }}
{{ form_widget(form.name.name02) }}
{{ form_errors(form.name.name01) }}
{{ form_errors(form.name.name02) }}
</dd>
</dl>
<dl id="top_box__kana">
<dt>{{ form_label(form.kana) }}</dt>
<dd class="form-group input_name">
{{ form_widget(form.kana.kana01) }}
{{ form_widget(form.kana.kana02) }}
{{ form_errors(form.kana.kana01) }}
{{ form_errors(form.kana.kana02) }}
</dd>
</dl>
<dl id="top_box__address_detail">
<dt>{{ form_label(form.address) }}</dt>
<dd>
<div class="ec-zipInput{{ has_errors(form.postal_code) ? ' error' }}">
<span>{{ '〒'|trans }}</span>
{{ form_widget(form.postal_code) }}
{{ form_errors(form.postal_code) }}
</div>
<div class="ec-zipInputHelp">
<div class="ec-zipInputHelp__icon">
<div class="ec-icon"><img
src="{{ asset('assets/icon/question-white.svg') }}" alt="">
</div>
</div><a href="https://www.post.japanpost.jp/zipcode/" target="_blank"><span>{{ '郵便番号検索'|trans }}</span></a>
</div>
{{ form_errors(form.postal_code) }}
<div class="ec-select{{ has_errors(form.address.pref) ? ' error' }}">
{{ form_widget(form.address.pref) }}
{{ form_errors(form.address.pref) }}
</div>
<div class="ec-input{{ has_errors(form.address.addr01) ? ' error' }}">
{{ form_widget(form.address.addr01, { 'attr': { 'placeholder': '市区町村名(例:大阪市北区)' }}) }}
{{ form_errors(form.address.addr01) }}
</div>
<div class="ec-input{{ has_errors(form.address.addr02) ? ' error' }}">
{{ form_widget(form.address.addr02, { 'attr': { 'placeholder': '番地・ビル名(例:西梅田1丁目6-8)' }}) }}
{{ form_errors(form.address.addr02) }}
</div>
</dd>
</dl>
<dl id="top_box__tel">
<dt>{{ form_label(form.phone_number) }}</dt>
<dd>
<div class="form-inline form-group input_tel">
{{ form_widget(form.phone_number, {attr : {class : 'short'}}) }}
{{ form_errors(form.phone_number) }}
</div>
</dd>
</dl>
<dl id="top_box__email">
<dt>{{ form_label(form.email) }}</dt>
<dd>
<div class="form-group">
{{ form_widget(form.email) }}
{{ form_errors(form.email) }}
</div>
</dd>
</dl>
<dl id="top_box__school">
<dt>{{ form_label(form.school) }}</dt>
<dd>
<div class="form-inline form-group input_school">
{% if app.user %}
{% set brother_school_ids = [] %}
{% for brother in app.user.visible_brothers %}
{% if brother.school %}
{% set brother_school_ids = brother_school_ids|merge([brother.school.school_id]) %}
{% endif %}
{% endfor %}
<select id="contact_school" name="contact[school]" class="short form-control">
<option value="">選択してください</option>
{% for school_data in form.school.vars.choices %}
{% set school = school_data.data %}
{% if school.visible %}
{% if school.school_id == app.user.school.school_id or school.school_id in brother_school_ids %}
<option value="{{ school.school_id }}"{% if school.school_id == app.user.school.school_id %}selected{% endif %}>{{ school.school_name }}</option>
{% endif %}
{% endif %}
{% endfor %}
</select>
{% else %}
{{ form_widget(form.school) }}
{% endif %}
{{ form_errors(form.school) }}
</div>
</dd>
</dl>
<dl id="top_box__school_year">
<dt>{{ form_label(form.school_year) }}</dt>
<dd>
<div class="form-inline form-group input_school_year">
{{ form_widget(form.school_year, {attr : {class : 'short'}}) }}
{{ form_errors(form.school_year) }}
</div>
</dd>
</dl>
<dl id="top_box__school_class">
<dt>{{ form_label(form.school_class) }}</dt>
<dd>
<div class="form-inline form-group input_school_class">
{{ form_widget(form.school_class, {attr : {class : 'short'}}) }}
{{ form_errors(form.school_class) }}
</div>
</dd>
</dl>
<dl id="top_box__contents">
<dt>{{ form_label(form.contents) }}</dt>
<dd>
<div class="column">
{{ form_widget(form.contents) }}
{{ form_errors(form.contents) }}
</div>
</dd>
</dl>
</div>
<input id="top_box__hidden_mode" type="hidden" name="mode" value="confirm">
{% for f in form %}
{% if f.vars.name matches '[^plg*]' %}
<div class="extra-form dl_table">
{{ form_row(f) }}
</div>
{% endif %}
{% endfor %}
<div id="top_box__footer" class="row no-padding">
<div id="top_box__confirm_button" class="btn_group col-sm-offset-4 col-sm-4">
<p><button type="submit" class="def_button3">確認ページへ</button></p>
</div>
</div>
</form>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
</div>
</div>
</div>
</div>
{% endblock %}