SHARE
TWEET

Untitled

a guest Aug 21st, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <aura:component controller="googleAddressAutofill" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickActionWithoutHeader" access="global">
  2.     <aura:attribute name="location" type="string" default="" />
  3.     <aura:attribute name="predictions" type="List" default="[]" />
  4.     <aura:attribute name="city" type="string" default="" />
  5.     <aura:attribute name="country" type="string" default="" />
  6.     <aura:attribute name="state" type="string" default="" />
  7.     <aura:attribute name="street" type="string" default="" />
  8.     <aura:attribute name="zip" type="string" default="" />
  9.     <aura:attribute name="boolean" type="boolean" default="false" />
  10.  
  11.     <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
  12.  
  13.     <!--  <aura:if isTrue="{!v.boolean}">  -->
  14.     <article class="slds-card">
  15.         <div class="slds-card__header slds-grid">
  16.             <header class="slds-media slds-media_center slds-has-flexi-truncate">
  17.                 <div class="slds-media__figure">
  18.                     <span class="slds-icon_container slds-icon-standard-account" title="address">
  19.                             <lightning:icon iconName="standard:address" alternativeText="address" />
  20.  
  21.                             <span class="slds-assistive-text">Address</span>
  22.                     </span>
  23.                 </div>
  24.  
  25.                 <div class="slds-media__body">
  26.                     <h2 class="slds-card__header-title">
  27.                             <a href="javascript:void(0);" class="slds-card__header-link slds-truncate" title="Accounts">
  28.                                 <span>Address</span>
  29.                             </a>
  30.                         </h2>
  31.                 </div>
  32.                 <div class="slds-no-flex">
  33.                     <lightning:button class="button" variant="Neutral action" label="Save Address" title="Brand action" onclick="{! c.handleClick }" />
  34.                 </div>
  35.             </header>
  36.         </div>
  37.         <div class="slds-card__body slds-card__body_inner">
  38.  
  39.             <lightning:input label="Location" name="location" aura:id="location" value="{!v.location}" onchange="{!c.getCities}" placeholder="Enter address here" />
  40.  
  41.             <aura:if isTrue="{!v.predictions.length > 0}">
  42.                 <ul class="city_predictions">
  43.                     <aura:iteration items="{!v.predictions}" var="prediction">
  44.                         <li class="slds-listbox__item">
  45.                             <a onclick="{!c.getCityDetails}" data-placeid="{!prediction.place_id}">{!prediction.description}</a>
  46.                         </li>
  47.                     </aura:iteration>
  48.                 </ul>
  49.             </aura:if>
  50.  
  51.             <lightning:input label="City" name="city" aura:id="city" value="{!v.city}" />
  52.  
  53.             <lightning:input label="Province" name="state" aura:id="state" value="{!v.state}" />
  54.  
  55.             <lightning:input label="Country" name="country" aura:id="country" value="{!v.country}" />
  56.  
  57.             <lightning:input label="Postal Code" name="zip" aura:id="zip" value="{!v.zip}" />
  58.  
  59.         </div>
  60.  
  61.     </article>
  62.     <!--   </aura:if>  -->
  63. </aura:component>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top