Skip to content

Commit

Permalink
Fix an issue with getValue of disabled radio
Browse files Browse the repository at this point in the history
  • Loading branch information
dynamicscode committed Jul 21, 2020
1 parent b132c8e commit 47ea09b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Xrm.Portal.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ Xrm.Portal = {
return this.controlType.Checkbox;
} else if (c.attr("type") == "hidden") {
return this.controlType.Lookup;
} else if (c.attr("class") != null && (c.attr("class").startsWith("boolean-radio") || c.attr("class").startsWith("picklist horizontal") || c.attr("class").startsWith("picklist vertical"))) {
} else if (c.attr("class") != null && (c.attr("class").indexOf("boolean-radio") > -1 || c.attr("class").indexOf("picklist horizontal") > -1 || c.attr("class").indexOf("picklist vertical") > -1)) {
return this.controlType.Radio;
} else {
return this.controlType.Control;
Expand Down Expand Up @@ -502,7 +502,7 @@ Xrm.Portal = {
this.vg = "";

this.getValue = function () {
return this.c.children(":checked").val();
return this.c.find("input:checked").val();
};
this.setValue = function (value) {
this.c.children("[value*=" + value + "]").attr("checked", true);
Expand Down

0 comments on commit 47ea09b

Please sign in to comment.