function setCurrentValue()

in Webapp/SDAF/wwwroot/js/site.js [302:320]


function setCurrentValue(id) {
    var currentValue = model[id];
    if (typeof currentValue == "boolean") {
        $("#" + id).prop('checked', currentValue);
        $("#" + id).trigger('change');
    }
    else if (currentValue) {
        if (Array.isArray(currentValue)) {
            populateListData(id, currentValue);
        }
        else if (azureResourceIds.indexOf(id) > 0) {
            populateListData(id, [currentValue]);
        }
        $("#" + id).val(currentValue);
        if (id != "workload_zone") {
            $("#" + id).trigger('change');
        }
    }
}