forked from BalkishanKachawa/CurrencyConverterLightning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CurrencyConverterComponent.cmp
32 lines (26 loc) · 1.46 KB
/
CurrencyConverterComponent.cmp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!--created by Sandeep-->
<aura:component controller="bklightning.CurrencyConverterControllerClass" implements="force:appHostable">
<aura:attribute name="countries" type="bklightning.CurrencyInformation__c[]" />
<aura:attribute name="message" type="String" />
<aura:handler name="init" value="{!this}" action="{!c.doInit}" />
<form data-toggle="validator" role="form">
<div class="form-group">
<label for="source" class="control-label">Source Country</label>
<select class="form-control" id="source" required="required" >
<aura:iteration items="{!v.countries}" var="country">
<option value="{!country.bklightning__Code__c}">{!country.bklightning__Country__c}</option>
</aura:iteration>
</select>
</div>
<div class="form-group">
<label for="target" class="control-label">Target Country</label>
<select class="form-control" id="target" required="required" >
<aura:iteration items="{!v.countries}" var="cont">
<option value="{!cont.bklightning__Code__c}">{!cont.bklightning__Country__c}</option>
</aura:iteration>
</select>
</div>
<div class="msg" id="showmsg"><h4>{!v.message}</h4></div>
<button type="button" class="btn btn-default" onclick="{!c.calculateCurrency}">Calculate</button>
</form>
</aura:component>