changeset 2788:a4bcbcda23f7

#133 Added to specification.js (encoder)
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Sat, 22 Apr 2017 17:48:48 +0100
parents 28bc4e90e026
children 3c14e0b6c9ff
files js/specification.js
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/js/specification.js	Sat Apr 22 17:47:09 2017 +0100
+++ b/js/specification.js	Sat Apr 22 17:48:48 2017 +0100
@@ -479,6 +479,11 @@
                 var child = doc.createElement("interfaceoption");
                 child.setAttribute("type", option.type);
                 child.setAttribute("name", option.name);
+                if (option.type == "check" && option.errorMessage !== undefined) {
+                    var errorMessage = doc.createElement("errormessage");
+                    errorMessage.textContent = option.errorMessage;
+                    child.appendChild(errorMessage);
+                }
                 node.appendChild(child);
             });
             if (typeof this.image == "string" && this.image.length !== 0) {