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
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
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
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
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 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
jQuery(function($){ | |
var lastHeight = 0, curHeight = 0, $frame = $('iframe:eq(0)'); | |
setInterval(function(){ | |
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
public class CaseController { | |
public transient Attachment objAttachment; | |
public String message{get;set;} | |
public String messageType{get;set;} | |
public Boolean fileUploadProcessed{get;set;} | |
public Attachment getObjAttachment () { | |
objAttachment = new Attachment (); | |
return objAttachment; |
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
<iframe> | |
<html> | |
<head> | |
<script src='https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit' /> </script> | |
<script type="text/javascript"> | |
var callPostMethod = function (action, response) { | |
var hostURL = window.location.origin; | |
parent.postMessage({ action: action, response : response }, hostURL); | |
} | |
var onVerifyCallback = function () { |
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
function searchReport(searchInputId, searchTableId) | |
{ | |
var input, filter, table, tr, td, i; | |
input = document.getElementById(searchInputId); | |
filter = input.value.toUpperCase(); | |
table = document.getElementById(searchTableId); | |
tr = table.getElementsByTagName("tr"); | |
// Loop through all table rows, and hide those who don't match the search query | |
for (i = 0; i < tr.length; i++) { |