plugin updates

This commit is contained in:
Tony Volpe
2024-11-20 22:40:39 -05:00
parent 0238f0c4ca
commit 3362947c6e
434 changed files with 13405 additions and 9202 deletions

View File

@@ -29,9 +29,6 @@ function gf_apply_rules(formId, fields, isInit){
native: false,
data: { formId: formId, fields: fields, isInit: isInit },
} );
if(window["gformCalculateTotalPrice"]){
window["gformCalculateTotalPrice"](formId);
}
}
});
}
@@ -255,7 +252,7 @@ function gf_format_number( value, fieldNumberFormat ) {
decimalSeparator = '.';
if( fieldNumberFormat == 'currency' ) {
decimalSeparator = gformGetDecimalSeparator( 'currency' );
decimalSeparator = gform.Currency.getDecimalSeparator( 'currency' );
} else if( fieldNumberFormat == 'decimal_comma' ) {
decimalSeparator = ',';
} else if( fieldNumberFormat == 'decimal_dot' ) {
@@ -263,7 +260,7 @@ function gf_format_number( value, fieldNumberFormat ) {
}
// transform to a decimal dot number
value = gformCleanNumber( value, '', '', decimalSeparator );
value = gform.Currency.cleanNumber( value, '', '', decimalSeparator );
/**
* Looking at format specified by wp locale creates issues. When performing conditional logic, all numbers will be formatted to decimal dot and then compared that way. AC
@@ -292,7 +289,7 @@ function gf_try_convert_float(text){
var format = 'decimal_dot';
if( gformIsNumeric( text, format ) ) {
var decimal_separator = format == "decimal_comma" ? "," : ".";
return gformCleanNumber( text, "", "", decimal_separator );
return gform.Currency.cleanNumber( text, "", "", decimal_separator );
}
return text;
@@ -315,14 +312,14 @@ function gf_matches_operation(val1, val2, operation){
val1 = gf_try_convert_float(val1);
val2 = gf_try_convert_float(val2);
return gformIsNumber(val1) && gformIsNumber(val2) ? val1 > val2 : false;
return gform.utils.isNumber(val1) && gform.utils.isNumber(val2) ? val1 > val2 : false;
break;
case "<" :
val1 = gf_try_convert_float(val1);
val2 = gf_try_convert_float(val2);
return gformIsNumber(val1) && gformIsNumber(val2) ? val1 < val2 : false;
return gform.utils.isNumber(val1) && gform.utils.isNumber(val2) ? val1 < val2 : false;
break;
case "contains" :