B #4241: Fix visibility of RDP button on the VM (#4253)

(cherry picked from commit deefae0963)
This commit is contained in:
Sergio Betanzos authored and Tino Vazquez committed 2020-02-25 11:00:40 +01:00
1 parent c80e7b6a3c
commit a2018bcf08
2 files changed
+8 -4

No files matched your search

+4 -2
View File
@@ -875,8 +875,10 @@ define(function(require) {
function isRDPSupported(element) {
return ( element.TEMPLATE &&
element.TEMPLATE.NIC &&
element.TEMPLATE.NIC.length > 0 &&
element.TEMPLATE.NIC.filter(nic => nic.RDP && nic.RDP == "YES")
Array.isArray(element.TEMPLATE.NIC) &&
element.TEMPLATE.NIC.some(function(nic) {
return nic.RDP && nic.RDP == "YES"
})
);
}
@@ -52,8 +52,10 @@ define(function(require) {
return templateJSON;
}
function _retrieveInput(input) {
return TemplateUtils.escapeDoubleQuotes( input.val() );
function _retrieveInput(value) {
return (value instanceof $)
? value.val()
: TemplateUtils.escapeDoubleQuotes( value );
}
// TODO: wizard_field_64 for fill method