This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Ui_PickListUtility { | |
public List<Values> values; | |
public static List<PickListValueWrapper> picklistValuesByRecordType (String objectName, String fieldName, String recordTypeId) { | |
List<PickListValueWrapper> result = new List<PickListValueWrapper> (); | |
result.add (new PickListValueWrapper ('--None--', '')); | |
try { | |
Http http = new Http (); | |
HttpRequest request = new HttpRequest (); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DependentPickListUtil { | |
public static Map<String, List<String>> getDependentMap(sObject objDetail, string contrfieldApiName,string depfieldApiName) { | |
String controllingField = contrfieldApiName.toLowerCase(); | |
String dependentField = depfieldApiName.toLowerCase(); | |
Map<String,List<String>> objResults = new Map<String,List<String>>(); | |
Schema.sObjectType objType = objDetail.getSObjectType(); | |
//System.debug('objType' + objType); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public with sharing class DataTableColumns { | |
@AuraEnabled | |
public String label {get;set;} | |
@AuraEnabled | |
public String fieldName {get;set;} | |
@AuraEnabled | |
public String type {get;set;} | |
public DataTableColumns(String label, String fieldName, String type){ | |
this.label = label; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static Boolean sendEmail (String[] toAddresses, String OTP) { | |
Messaging.SingleEmailMessage message = new Messaging.SingleEmailMessage(); | |
message.toAddresses = toAddresses; | |
message.optOutPolicy = 'FILTER'; | |
message.subject = 'OTP'; | |
message.optOutPolicy = 'FILTER'; | |
if (Label.UseOrgWideFromAddress != null && Label.UseOrgWideFromAddress == '1') { | |
message.setOrgWideEmailAddressId (Label.OrganizationEmailAddress); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
validateEmail : function(component, event, helper) { | |
var id = event.getSource().getLocalId(); | |
var emailInp = component.find(id); | |
var value = emailInp.get("v.value"); | |
var patt = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; | |
var res = patt.test(value); | |
var saveBtn = component.find("saveBtn"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes"> | |
<ltng:require scripts="{!join(',', | |
$Resource.jQuery_3_1_1)}" | |
afterScriptsLoaded="{!c.onScriptLoaded}"/> | |
<aura:attribute name="hasreCaptchaVerified" type="Boolean" default="false" /> | |
<aura:attribute name="hostUrl" type="String" /> | |
<aura:attribute name="recaptchaPageName" type="String" default="apex/reCaptcha"/> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page showHeader="false" applyBodyTag="false"> | |
<apex:includeScript value="{!$Resource.jQuery_3_1_1}"/> | |
<script src='{!$Setup.foolish__reCaptcha__c.foolish__libraryUrl__c}?onload=onloadCallback&render=explicit' type="application/javascript"/> | |
<style> | |
body, div{ | |
background:transparent !important; | |
} | |
html {overflow:hidden;} | |
.recaptcha { | |
transform: scale(0.74); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = $A.get("$Resource.sampleScript"); | |
var req = new XMLHttpRequest(); | |
req.open("GET", path); | |
req.addEventListener("load", $A.getCallback(function() { | |
$A.createComponent ('aura:unescapedHTML', {value: req.response}, | |
function(newComp, status, errorMessage ) { | |
if (status === 'SUCCESS') { | |
component.set ('v.scriptDataComp',newComp ); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var lastHeight = 0, curHeight = 0, iframe = $('.recaptchaFrame'); | |
iframe = iframe[0]; | |
setInterval(function(){ | |
// for lwciframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px'; | |
curHeight = $frame.contents().find('body').height(); | |
if ( curHeight != lastHeight ) { | |
$frame.css('height', (lastHeight = curHeight) + 'px' ); | |
} | |
},500); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.getScript( "https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" ) | |
.done(function( script, textStatus ) { | |
console.log( textStatus ); | |
}) | |
.fail(function( jqxhr, settings, exception ) { | |
$( "div.log" ).text( "Triggered ajaxError handler." ); | |
}); |