D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
tattooscyy
/
test
/
resources
/
views
/
includes
/
Filename :
payment2.blade.php
back
Copy
<script> document.forms["form1"].addEventListener("submit", () => { document.forms["form1"].reportValidity(); }); function call() { $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, }); var msg = $('#formx').serialize(); $.ajax({ type: "post", url: "ajax/payment/send", data: msg, beforeSend: function () { $('#payblock .modal-body').html('<p align="center"><img src="/img/loader.gif" class="loader"><div></div></p>'); }, success: function (data) { $('#payblock .modal-body').html(data); }, error: function (data) { console.log(data); } }); } $(function () { $('#readme').change(function () { checked(); }); $('#phone').on('input', function () { checked(); }); function checked() { let phone = $('#phone').val(); // Заменяем все буквы (латиницу и кириллицу) на пустую строку let cleanValue = phone.replace(/[^0-9\s\-\(\)\+]/g, ''); // Возвращаем очищенное значение в поле $('#phone').val(cleanValue); if ($('#readme').is(':checked')) { if (phone.length > 7) { $("#submit2").prop("disabled", false); } else { $("#submit2").prop("disabled", true); } } else { $("#submit2").prop("disabled", true); } } }) </script> <FORM METHOD="post" id=formx name=form1 class="phoneform phone_form"> <div> <div class="col-md-6"> <div class="form-group"> <h3>{{trans('client.payment.your_order')}}</h3> <p> {{trans('client.payment.order_number')}}: {{$one->id}}</p> <p> {{trans('client.services.service')}}: {!! $type !!}</p> @if(isset($putdate)) <p> {{trans('client.payment.time')}}: {{$putdate}}</p> @endif @if(isset($one->saloons)) <p> {{trans('client.salons.address')}}: {{$one->saloons->address}}</p> @endif @if($type != 'Gift card') <p>{{trans('client.payment.price')}}: {{$amount / 0.2}} €</p> @endif <h3>{{trans('client.payment.amount')}}: {{$amount}} €</h3> </div> </div> <div class="col-md-6"> <h3>{{trans('client.payment.your_info')}}</h3> @if(isset($one->user)) <p> {{trans('client.register.name')}}: {{$one->user->name}}</p> <p> Email: {{$one->user->email}}</p> @endif <div class="form-group"> <p>{{trans('client.payment.phone number')}}:</p> <input class="form-control headform user_phone" type="tel" pattern="[0-9 \-\(\)]{8,19}" required name="PHONE" id="phone" minlength="8" maxlength="19" /> <INPUT type="hidden" name="id" value="{{$one->id}}"> </div> <p> <input type="checkbox" name="readme" id="readme"> {{trans('client.payment.accept tc')}} <a href="{{asset('CONDITIONS GENERALES DE RESERVATION ABA.docx')}}" class="btn_terms"> {{trans('client.payment.terms and conditions')}} </a> </p> <br /> <input type="button" value=" {{trans('client.salons.confirm')}}" onclick="call()" disabled id=submit2 name=submit2 class="btn btn-block btn-warning"> </div> </div> </form> <br style="clear:both"/>