%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/ugotscom/public_html/maputilities/
Upload File :
Create Path :
Current File : /home/ugotscom/public_html/maputilities/too4l4.php

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1.0" name="viewport">

  <title>Maputilities</title>
  <meta content="" name="descriptison">
  <meta content="" name="keywords">

  <!-- Favicons -->
  <link href="assets/img/favicon.png" rel="icon">
  <link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon">

  <!-- Google Fonts -->
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">

  <!-- Vendor CSS Files -->
  <link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  <link href="assets/vendor/icofont/icofont.min.css" rel="stylesheet">
  <link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
  <link href="assets/vendor/venobox/venobox.css" rel="stylesheet">
  <link href="assets/vendor/animate.css/animate.min.css" rel="stylesheet">
  <link href="assets/vendor/remixicon/remixicon.css" rel="stylesheet">
  <link href="assets/vendor/owl.carousel/assets/owl.carousel.min.css" rel="stylesheet">
  <link href="assets/vendor/bootstrap-datepicker/css/bootstrap-datepicker.min.css" rel="stylesheet">

  <!-- Template Main CSS File -->
  <link href="assets/css/style.css" rel="stylesheet">

  <!-- =======================================================
  * Template Name: Medilab - v2.0.0
  * Template URL: https://bootstrapmade.com/medilab-free-medical-bootstrap-theme/
  * Author: BootstrapMade.com
  * License: https://bootstrapmade.com/license/
  ======================================================== -->
  <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
  <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>

<body>

<?php include('header.php');?>

 
 <div class="container">
 
 <form action="" id="app" class="comparisonform">
 
 <section v-if="step==1">
 <h3>Get your Quote</h3>
 <p>We'll use your address to find the best deals in your area.</p>

 <label for="postcode">Post Code</label>
 <input type="text" class="form-control" v-model="form.postcode">
 <label for="Address">Address</label>
 <select v-model="form.address" class="form-control" :value="getAddress">
  <option v-for="user in users.result" >
    {{ user.line_1 + ", " + user.line_2}}
  </option>
</select>
<label for="Email">Email</label>
 <input type="text" class="form-control" v-model="form.email">
 <input type="checkbox" name="terms" >  I Agree Terms & Coditions

 </section>
 <section v-if="step==2">
 <h3>step 2</h3>
 <div class="energyblock">
 <h3>How much energy do you use?</h3> 
  <label>
  <input type="radio" name="radio" checked/>
  <div class="front-end box">
    <span>Front-end</span>
  </div>
</label>

  <label>
  <input type="radio" name="radio"/>
  <div class="back-end box">
    <span>Back-end</span>
  </div>
</label>

</div>
<h2>Checkboxes</h2>
  <div class="inputGroup">
    <input id="option1" name="option1" type="checkbox"/>
    <label for="option1">Option One</label>
  </div>
  
  <div class="inputGroup">
    <input id="option2" name="option2" type="checkbox"/>
    <label for="option2">Option Two</label>
  </div>
  
  <h2>Radio Buttons</h2>
  <div class="inputGroup">
    <input id="radio1" name="radio" type="radio"/>
    <label for="radio1">Yes</label>
  </div>
  <div class="inputGroup">
    <input id="radio2" name="radio" type="radio"/>
    <label for="radio2">No</label>
  </div>
 </section>
 <section v-if="step==3">
 <h3>step 3</h3>
 <div class="middle">
 <h3>How big is your home?</h3> 
  <label>
  <input type="radio" name="radio" checked/>
  <div class="front-end box">
    <span>Front-end</span>
  </div>
</label>

  <label>
  <input type="radio" name="radio"/>
  <div class="back-end box">
    <span>Back-end</span>
  </div>
</label>
</div>
 </section>
 <section v-if="step==4">
 <h3>step 4</h3>

 <label for="energy">How much energy you use</label>
 <input type="text" class="form-control" v-model="form.energy">
 <div class="d-flex" v-for="quote in quotes.tariffs">
 
 <div class="p-2 flex-fill"><img :src=quote.supplierLogoUrl class="supplier-logo"></div>
  <div class="p-2  flex-fill">{{quote.tariffName}}</div>
  
  <div class="p-2  flex-fill">{{quote.supplierName}}</div>

  <div class="p-2  flex-fill">{{quote.annualCost}}</div>
  
</div>
 </section>
 <button v-if="step != 1" @click.prevent="prevStep" id="button1">Previous Step</button>
 <button v-if="step != totalsteps" @click.prevent="nextStep" id="button1">Next Step</button>
 <button v-if="step == 5" @click.prevent="sendEnquiry" id="button1">Send Enquiry</button>
 </form>
 
 </div>


  <?php include ('footer.php'); ?>

  <div id="preloader"></div>
  <a href="#" class="back-to-top"><i class="icofont-simple-up"></i></a>

  <!-- Vendor JS Files -->
  <script src="assets/vendor/jquery/jquery.min.js"></script>
  <script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>

  <!-- Template Main JS File -->
  <script src="assets/js/main.js"></script>
  <script>
  const App =new Vue({
      el:"#app",
      
      data: {
            step:1,
            totalsteps:5,
            form:{
                postcode:null,
                email:null,
                energy:null,
                address:null,

            },
            selected:null,
            users:[],
            quotes:[],

      },
      methods:{
                nextStep:function(){
                  this.step++;
                  
                  if(this.step == 2){
                    this.form.energy=580;
                    axios.post('https://api-staging.switchcraft.co.uk/api/v1/energy/quote', {
                      hasUserAcceptedTermsAndConditions:true,
                    address:{
                                postcode:this.form.postcode,
                                addressLine1:this.form.address
                              },
                    currentElecSpendPerMonth:33,
                    }, {
                      headers: {
                        'Authorization': 'znergi-test-key'  
                      }
                    }).then(response => {
                this.quotes = response.data
                  })
                  }
                },
                prevStep:function(){
                   this.step--;
                },
                sendEnquiry:function(){
                  alert('dfgdgd');
                },
                         
      },
      computed: {
                 getAddress: function() {
                  axios.get('https://api.ideal-postcodes.co.uk/v1/postcodes/'+this.form.postcode+'?api_key=iddqd') .then(response => {
                this.users = response.data
                  })
                     }
        },

  });
  </script>

</body>

</html>

Zerion Mini Shell 1.0