# HG changeset patch # User Nicholas Jillings # Date 1458645705 0 # Node ID 6533f0c11d9aa25a5da643c0ce1268b4f7698986 # Parent 5946b03fffe56533472bdd5704a1ed5c6b1daf84 Fix Bug #1669, #1594. diff -r 5946b03fffe5 -r 6533f0c11d9a 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