{#
Copyright(c) 2020 RACCOON HOLDINGS, Inc. All rights reserved.
https://paid.jp/
#}
<div hidden>
<div id="paid-h-adr" class="h-adr">
<span id="paid-p-country-name" class="p-country-name" style="display:none;">Japan</span>
<input id="paid-p-postal-code" type="text" class="p-postal-code" size="8" maxlength="8"><br>
{{ form_widget(form.paid_p_region) }}
<input id="paid-p-locality" type="text" class="p-locality p-street-address p-extended-address"/><br>
</div>
</div>
{% if is_paid_form_area %}
<div id="insert_area">
<div class="paid-form">
{{ form_widget(form.paid_register_check) }} <label >一緒に<a href="https://paid.jp/v/contents/pre/buyer/" target="_blank">Paid</a>決済の申込登録をする</label>
{{ form_errors(form.paid_register_check) }}
<div class="hidden_show">
{{ include('@Paid4/entry_form.twig', {'paid_form': form.PaidCustomer} ,ignore_missing=true) }}
{{ include('@Paid4/entry_copy_script.twig' ,ignore_missing=true) }}
</div>
</div>
</div>
{% block javascript %}
<script>
$(function () {
$('.ec-borderedDefs').append($('#insert_area').html());
$('#insert_area').remove();
});
function setZipCode() {
entry_PaidCustomer_zip_code = document.getElementById("entry_PaidCustomer_zip_code");
target = document.getElementById("paid-p-postal-code");
target.value = entry_PaidCustomer_zip_code.value;
var $eventObject = document.createEvent( "HTMLEvents" );
$eventObject.initEvent( "keyup", true, true );
target.dispatchEvent( $eventObject );
}
function getAddress() {
region = document.getElementById("entry_paid_p_region");
locality = document.getElementById("paid-p-locality");
entry_PaidCustomer_address_prefecture
= document.getElementById("entry_PaidCustomer_address_prefecture");
entry_PaidCustomer_address_address1
= document.getElementById("entry_PaidCustomer_address_address1");
entry_PaidCustomer_address_prefecture.value = region.value;
entry_PaidCustomer_address_address1.value = locality.value;
}
</script>
{% endblock javascript %}
<style type="text/css">
/*中身を非表示にしておく*/
.hidden_show {
height: 0;
padding: 0;
overflow: hidden;
opacity: 0;
transition: 0.8s;
}
#entry_paid_register_check:checked ~ .hidden_show {
padding: 10px 0;
height: auto;
opacity: 1;
}
</style>
{% endif %}