# HG changeset patch # User Nicholas Jillings # Date 1458645705 0 # Node ID 9e4fb381944e5ba7a0f7e6b220385666bbc3e00f # Parent d63600ad574b084fee7c5b5410fa1a4328d63602 Fix Bug #1669, #1594. diff -r d63600ad574b -r 9e4fb381944e test_create/test_core.js --- a/test_create/test_core.js Mon Mar 21 16:22:49 2016 +0000 +++ b/test_create/test_core.js Tue Mar 22 11:21:45 2016 +0000 @@ -1203,52 +1203,72 @@ default: break; } - - this.input = document.createElement('input'); - switch(this.dataType) - { - case "boolean": - this.input.type = "checkbox"; - break; - case "negativeInteger": - case "positiveInteger": - case "nonNegativeInteger": - case "nonPositiveInteger": - case "integer": - case "short": - case "byte": - this.input.step = 1; - case "decimal": - this.input.type = "number"; - this.input.min = minVar; - this.input.max = maxVar; - break; - default: - break; + + this.enumeration = schema.getAllElementsByTagName("xs:enumeration"); + if (this.enumeration.length == 0) { + this.input = document.createElement('input'); + switch(this.dataType) + { + case "boolean": + this.input.type = "checkbox"; + break; + case "negativeInteger": + case "positiveInteger": + case "nonNegativeInteger": + case "nonPositiveInteger": + case "integer": + case "short": + case "byte": + this.input.step = 1; + case "decimal": + this.input.type = "number"; + this.input.min = minVar; + this.input.max = maxVar; + break; + default: + break; + } + } else { + this.input = document.createElement("select"); + for (var i=0; i