MOON
Server: Apache
System: Linux e2e-78-16.ssdcloudindia.net 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
User: imensosw (1005)
PHP: 8.0.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/imensosw/liftcincy.imenso.co/resources/views/frontend/checkout.blade.php
@extends('frontend.layouts.layout_page')

@section("style")
    
@endsection
@section('pageTitle')
<title>{{ trans('panel.site_title') }} {{ trans('new.checkout') }}</title>
@endsection

@section('content')
    @include('frontend/include/notification')
    <section class="burger p-relative auth">
      <div class="ccontainer">

        <div class="crow g-0">
          <div class="ccol ccol-xl-4 ccol-lg-4 ccol-md-6 ccol-sm-6 ticket_area mx-auto py-0">

            <h2 class="heading_2 text-black"><!-- <span class="steps">1</span> -->{{trans('signup.create_profile')}}</h2>
            <hr class="mt-1 mb-2" />
            <!-- <div class="crow mx-0 g-0">
              <div class="ccol ccol-lg-8">
                <h3 class="heading_3 mb-0"><span class="steps">1</span>{{trans('signup.create_profile')}}</h3>
              </div>
            </div> -->
            
            <div class="crow mx-0 g-0">
              <!--<div class="ccol ccol-lg-4">
              </div>-->
              <div class="ccol ccol-lg-8">
                <form action="{{ route('frontend.volunteer.signup') }}" method="POST" enctype="multipart/form-data" autocomplete="off">
                  @csrf
                  <div class="crow">
                    <div class="ccol ccol-sm-4 pb-0">
                      <div class="form_fld">
                        <label>{{trans('signup.first_name')}}</label>
                        <input type="text" name="first_name" class="fld-control {{ $errors->has('first_name') ? 'has-error' : '' }}" value="{{ old('first_name', isset($user) ? $user->first_name : '') }}">
                        @if($errors->has('first_name'))
                          <p class="text-danger small">
                              {{ $errors->first('first_name') }}
                          </p>
                        @endif
                      </div>
                    </div>
                    <div class="ccol ccol-sm-4 pb-0">
                      <div class="form_fld">
                        <label>{{trans('signup.last_name')}}</label>
                        <input type="text" name="last_name" class="fld-control {{ $errors->has('first_name') ? 'has-error' : '' }}" value="{{ old('last_name', isset($user) ? $user->last_name : '') }}">
                        @if($errors->has('last_name'))
                          <p class="text-danger small">
                              {{ $errors->first('last_name') }}
                          </p>
                        @endif
                      </div>
                    </div>
                  </div>
                  <div class="crow">
                    <div class="ccol ccol-8 pb-0">
                      <div class="form_fld">
                        <label>{{trans('signup.email')}}</label>
                        <input type="email" name="email" class="fld-control {{ $errors->has('email') ? 'has-error' : '' }}" value="{{ old('email', isset($user) ? $user->email : '') }}">
                        @if($errors->has('email'))
                          <p class="text-danger small">
                              {{ $errors->first('email') }}
                          </p>
                        @endif
                      </div>
                    </div>
                  </div>
                  <div class="crow">
                    <div class="ccol ccol-sm-4 pb-0">
                      <div class="form_fld">
                        <label>{{trans('signup.dob')}}</label>
                        <input type="date" max="2010-01-01" name="dob" class="fld-control  {{ $errors->has('password_confirmation') ? 'has-error' : '' }}" value="{{ old('dob', isset($user) ? $user->dob : '') }}">
                        @if($errors->has('dob'))
                            <p class="text-danger small">
                                {{ $errors->first('dob') }}
                            </p>
                        @endif
                      </div>
                    </div>
                    <div class="ccol ccol-sm-4 pb-0">
                      <div class="form_fld">
                        <label>{{trans('signup.org_contact')}}</label>
                        <input type="tel" name="org_contact" class="fld-control {{ $errors->has('org_contact') ? 'has-error' : '' }}" value="{{ old('org_contact', isset($user) ? $user->org_contact : '') }}">
                        @if($errors->has('org_contact'))
                          <p class="text-danger small">
                              {{ $errors->first('org_contact') }}
                          </p>
                        @endif
                      </div>
                    </div>
                  </div>
                   
                  <div class="crow">
                    <div class="ccol ccol-sm-4 pb-0 ">
                      <div class="form_fld ">
                        <label>{{trans('signup.password')}}</label>
                        <input type="password" name="password" class="fld-control {{ $errors->has('password') ? 'has-error' : '' }}" >
                        @if($errors->has('password'))
                            <p class="text-danger small">
                                {{ $errors->first('password') }}
                            </p>
                        @endif
                      </div>
                    </div>
                    <div class="ccol ccol-sm-4 pb-0">
                      <div class="form_fld">
                        <label>{{trans('signup.password_confirmation')}}</label>
                        <input type="password" name="password_confirmation" class="fld-control {{ $errors->has('password_confirmation') ? 'has-error' : '' }}">
                        @if($errors->has('password_confirmation'))
                            <p class="text-danger small">
                                {{ $errors->first('password_confirmation') }}
                            </p>
                        @endif
                      </div>
                    </div>
                  </div>

                  <div class="crow">
                    <div class="ccol ccol-8 pb-0 mobilehide">
                      <div class="form_fld">
                        <label>Home Metro</label>
                          <select name="home_metro_id" class="fld-control home_metro {{ $errors->has('home_metro_id') ? 'has-error' : '' }}" value="{{ old('home_metro_id', isset($user) ? $user->home_metro_id : '') }}">
                                @if ($metros->count())
                                <option value="">Choose your Location</option>
                                    @foreach ($metros as $key => $metro)
                                        <option value="{{ $metro->id }}">
                                            {{ $metro->metro_name }}
                                            
                                        </option>
                                    @endforeach
                                @endif
                          </select>
                          @if($errors->has('home_metro_id'))
                          <p class="text-danger small">
                              {{ $errors->first('metro') }} 
                              {{-- The home metro field is required --}}
                          </p>
                        @endif
                      </div>
                    </div>
                  </div>

                  <div class="crow">
                    <div class="ccol ccol-8 pb-0 mobileshow " id="mobile_metro_view" >
                      <div class="form_fld">
                        <label>Home Metro</label>
                          <select name="home_metro_id" class="fld-control home_metro {{ $errors->has('home_metro_id') ? 'has-error' : '' }}" value="{{ old('home_metro_id', isset($user) ? $user->home_metro_id : '') }}">
                                @if ($metros->count())
                                    <option value="">Choose your Location</option>
                                    @foreach ($metros as $key => $metro)
                                    <option value="{{ $metro->id }}" >
                                       Greater {{ $metro->metro_name }} 
                                    </option>
                                @endforeach
                                @endif
                          </select>
                          @if($errors->has('home_metro_id'))
                          <p class="text-danger small">
                               {{ $errors->first('metro') }} 
                              {{-- The metro field is required --}}
                          </p>
                        @endif
                      </div>
                    </div>
                  </div>

                  <div class="crow">
                    <div class="ccol ccol-8 pb-0">
                      <div class="form_fld">
                        <label>{{trans('signup.address_location')}}</label>
                        <input type="text" name="address_location" id="address_location" class="fld-control {{ $errors->has('address_location') ? 'has-error' : '' }}" value="{{ old('address_location', isset($user) ? $user->address_location : '') }}" autocomplete="off" >
                        @if($errors->has('address_location'))
                            <p class="text-danger small">
                                {{ $errors->first('address_location') }}
                            </p>
                        @endif
                      </div>
                      <div class="form_fld">
                        <label>{{trans('signup.address_line1')}}</label>
                        <input type="text" name="address_line1" class="fld-control {{ $errors->has('address_line1') ? 'has-error' : '' }}" value="{{ old('address_line1', isset($user) ? $user->address_line1 : '') }}">
                      </div>
                      <div class="crow" style="opacity:0.25;">
                        <div class="ccol ccol-sm-4 pb-0">
                          <div class="form_fld">
                            <label>{{trans('signup.address_city')}}</label>
                            <input type="text" name="address_city" id="locality" class="fld-control {{ $errors->has('address_city') ? 'has-error' : '' }}" value="{{ old('address_city', isset($user) ? $user->address_city : '') }}">
                            @if($errors->has('address_city'))
                                <p class="text-danger small">
                                    {{ $errors->first('address_city') }}
                                </p>
                            @endif
                          </div>
                        </div>
                        <div class="ccol ccol-sm-4 pb-0">
                          <div class="form_fld">
                            <label>{{trans('signup.address_postcode')}}</label>
                            <input type="text" name="address_postcode" id="address_postcode" class="fld-control {{ $errors->has('address_postcode') ? 'has-error' : '' }}" value="{{ old('address_postcode', isset($user) ? $user->address_postcode : '') }}">
                            @if($errors->has('address_postcode'))
                                <p class="text-danger small">
                                    {{ $errors->first('address_postcode') }}
                                </p>
                            @endif
                          </div>
                        </div>

                      </div>
                      <div class="crow" style="opacity:0.25;">
                        <div class="ccol ccol-sm-4 pb-0">
                          <div class="form_fld">
                            <label>{{trans('signup.address_state')}}</label>
                            <input type="text" name="address_state" id="administrative_area_level_1" class="fld-control {{ $errors->has('address_state') ? 'has-error' : '' }}" value="{{ old('address_state', isset($user) ? $user->address_state : '') }}">
                            @if($errors->has('address_state'))
                                  <p class="text-danger small">
                                      {{ $errors->first('address_state') }}
                                  </p>
                              @endif
                          </div>
                        </div>
                        <div class="ccol ccol-sm-4 pb-0">
                          <div class="form_fld">
                            <label>{{trans('signup.country')}}</label>
                            <input type="hidden" id="country" name="country" class="form-control" value="" >
                            <input  type="text" id="country_code" name="address_country" class="fld-control" value="{{ old('address_country', isset($user) ? $user->address_country : '') }}" >
                            @if($errors->has('address_country'))
                                <p class="text-danger small">
                                    {{ $errors->first('address_country') }}
                                </p>
                            @endif
                          </div>
                        </div>
                      </div>
                      <div class="crow hide d-none" style="opacity:0.25;">
                        <div class="ccol ccol-sm-4 pb-0">
                          <div class="form_fld">
                            <label>Lat</label>
                            <input type="text" name="address_lat" id="lat" class="fld-control {{ $errors->has('address_lat') ? 'has-error' : '' }}" value="{{ old('address_lat', isset($user) ? $user->address_lat : '') }}">
                            @if($errors->has('address_lat'))
                                  <p class="text-danger small">
                                      {{ $errors->first('address_lat') }}
                                  </p>
                              @endif
                          </div>
                        </div>
                        <div class="ccol ccol-sm-4 pb-0">
                          <div class="form_fld">
                            <label>Long</label>
                            <input  type="text" id="lng" name="address_long" class="fld-control" value="{{ old('address_long', isset($user) ? $user->address_long : '') }}" >
                            @if($errors->has('address_long'))
                                <p class="text-danger small">
                                    {{ $errors->first('address_long') }}
                                </p>
                            @endif
                          </div>
                        </div>
                      </div>
                      <div class="form_fld">
                        <div class="d-flex">
                          <div><input type="checkbox" value="1" name="receive_update" required class="mr-1" /></div>
                          <label>{{trans('signup.email_update')}}</label>
                        </div>
                      </div>
                      <div class="form_fld">
                        <div class="d-flex">
                          <div><input type="checkbox" value="1" name="terms_check" required class="mr-1" /></div>
                          <label>I agree to the <a href="{{URL::asset('frontend/doc/TermsofUse.pdf')}}" target="_blank">Terms of Use</a>, <a href="{{URL::asset('frontend/doc/PrivacyPolicy.pdf')}}" target="_blank">Privacy Policy</a>, and <a href="{{URL::asset('frontend/doc/VolunteerWaiver.pdf')}}" target="_blank">Volunteer Waiver</a></label>
                        </div>
                      </div>
                      <div class="mt-3">
                        <button class="cbtn cbtn-primary" type="submit">{{trans('signup.create_profile')}} </button>
                      </div>
                    </div>
                  </div>
                </form>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
@endsection

@section('scripts')
@section("script")
<script src="{{ asset('assets/plugins/select2/js/select2.min.js')}}"></script>
<script src="https://maps.googleapis.com/maps/api/js?libraries=places&key=AIzaSyC_yU9pJxAP7_h1YlGOpMPBHgZrpPkoc9k"></script>     

<script>
  $('.home_metro').on('change',function(){
    $('.home_metro').val($(this).val());

  });
  
</script>
<script>
    //new google.maps.places.Autocomplete(document.getElementById("address_location"));
    

    // This example displays an address form, using the autocomplete feature
    // of the Google Places API to help users fill in the information.

    function fillInAddress() {
      // Get the place details from the autocomplete object.
      var place = autocomplete.getPlace();

      for (var component in componentForm) {
        document.getElementById(component).value = '';
      }

      // Get each component of the address from the place details
      // and fill the corresponding field on the form.
      for (var i = 0; i < place.address_components.length; i++) {
        console.log(place.address_components[i]);
        var addressType = place.address_components[i].types[0];
        if (componentForm[addressType]) {
          var val = place.address_components[i][componentForm[addressType]];
          document.getElementById(addressType).value = val;
        }
        // for the country, get the country code (the "short name") also
        if (addressType == "country") {
          document.getElementById("country_code").value = place.address_components[i].short_name;
        }

        if (addressType == "postal_code") {
          document.getElementById("address_postcode").value = place.address_components[i].short_name;
        }
      }
    }

    var placeSearch, autocomplete;
    var componentForm = {
      locality: 'long_name',
      administrative_area_level_1: 'short_name',
      country: 'long_name',
    };

    function initAutocomplete() {
      // Create the autocomplete object, restricting the search to geographical
      // location types.
      autocomplete = new google.maps.places.Autocomplete(document.getElementById('address_location'));

      // When the user selects an address from the dropdown, populate the address
      // fields in the form.
      // Get Latitude and longitude
      google.maps.event.addListener(autocomplete, 'place_changed', function() {
        var place = autocomplete.getPlace();
        document.getElementById('lat').value = place.geometry.location.lat();
        document.getElementById('lng').value = place.geometry.location.lng();
        fillInAddress();
      });
    }
    google.maps.event.addDomListener(window, 'load', initAutocomplete);

</script>      
@endsection