Skip to content

Commit ac97dd5

Browse files
authored
Fixed indentation
1 parent 97bde9e commit ac97dd5

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Catalog Client Script/Currency Validation/currency_validation.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ function onChange(control, oldValue, newValue, isLoading) {
22
if (isLoading || newValue == '') {
33
return;
44
}
5-
5+
66
var cost = g_form.getValue('variable_name'); //update variable name used for currency
77
cost = cost.trim();
88
// first character should be dollar sign
99
var firstChar = cost.substring(0, 1);
1010
if (firstChar != '$') {
11-
validationAlert(oldValue);
11+
validationAlert(oldValue);
1212
}
1313

1414
// characters after the $ sign should be numerics
@@ -26,15 +26,15 @@ function onChange(control, oldValue, newValue, isLoading) {
2626
// there must be 2 digits only after the decimal
2727
var decNum = num.substring(num.indexOf('.') + 1, num.length);
2828
if (decNum.length != 2) {
29-
validationAlert(oldValue);
29+
validationAlert(oldValue);
3030
}
3131
}
3232

3333
function validationAlert(oldValue) {
34-
g_form.setValue("variable_name", oldValue);
35-
var gm = new GlideModal("glide_warn");
36-
gm.setTitle("Currency formatting problem");
37-
gm.setPreference("title", "Please enter cost in $0.00 format");
38-
gm.render();
39-
return;
34+
g_form.setValue("variable_name", oldValue);
35+
var gm = new GlideModal("glide_warn");
36+
gm.setTitle("Currency formatting problem");
37+
gm.setPreference("title", "Please enter cost in $0.00 format");
38+
gm.render();
39+
return;
4040
}

0 commit comments

Comments
 (0)