This file contains 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 theArray = []; | |
try{ | |
var theDate = moment(datepicker1613080063009.value); | |
var theMonth = theDate.format('M'); | |
var theMonthInt = parseInt(theMonth); |
This file contains 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
alphanumeric(this.value); | |
function alphanumeric(inputtxt) { | |
var letterNumber = /^[0-9a-zA-Z]+$/; | |
if(inputtxt.match(letterNumber)) { | |
return true; | |
} else { | |
return false; | |
} | |
} |
This file contains 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 theValue = this.value; | |
var theRegex = /[^a-zA-Z0-9 \#\@\$\!\+//]/; | |
if(theValue){ | |
if(!theRegex.test(theValue)){ | |
true; | |
} else { | |
false; | |
} | |
} else { | |
true; |
This file contains 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
isValidDate(this.value); | |
function isValidDate(dateString) { | |
var regEx = /^[0-9]{4}(\/){1}[0-9]{2}(\/){1}[0-9]{2}/; | |
if(dateString.match(regEx)){ | |
var d = new Date(dateString); | |
var dNum = d.getTime(); | |
if(!dNum && dNum !== 0){ |
This file contains 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
div[data-mandatory*="true"] .guideFieldLabel label::after { | |
content: "*"; | |
color: red; | |
} |
This file contains 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
[ | |
"AD=Andorra", | |
"AE=United Arab Emirates", | |
"AF=Afghanistan", | |
"AG=Antigua and Barbuda", | |
"AI=Anguilla", | |
"AL=Albania", | |
"AM=Armenia", | |
"AO=Angola", | |
"AQ=Antarctica", |
This file contains 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
<sly data-sly-template.card="${ @ title, style, value}"> | |
<div class="col-xl-3 col-md-6 mb-4"> | |
<div class="card border-left-success shadow h-100 py-2"> | |
<div class="card-body"> | |
<div class="row no-gutters align-items-center"> | |
<div class="col mr-2"> | |
<div class="text-xs font-weight-bold ${style} text-uppercase mb-1">${title}</div> | |
<div class="h5 mb-0 font-weight-bold text-gray-800">${value}</div> | |
</div> | |
<div class="col-auto"> |
This file contains 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 currentInstanceNumber = this.parent.parent.instanceIndex + 1; | |
this.value = "Line Number " + currentInstanceNumber; | |
/* The repeating panel in this case is 2 levels above. The field is inside a panel, that is inside another panel. */ |
This file contains 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 component = attachmentA; // Field whose value has changed | |
var fileItems = $('#'+component.parent.id).find(".guide-fu-fileItem"); | |
for (i = 0;i<fileItems.length;i++) { | |
var filename = $(fileItems[i]).find(".guide-fu-fileName").text(); | |
//check whether it is previously attached file or a newly attached one | |
console.log("filename: "+ filename); | |
if(filename!="helloworld.pdf"){ | |
alert("You must correct your file name before submitting"); |