Commit 0f29595a authored by Chad Barb's avatar Chad Barb

Modified acceptable input for string fields to reflect tcl behavior

parent e34dabfa
......@@ -80,13 +80,14 @@ class MagicTextField implements TextListener, FocusListener {
// alphaAllowed and its alphanumeric (or '-')
// (but not numeric or '-' if it is the first char)
// numAllowed and its numeric or "."
if (alphaAllowed && c == ' ') {
/* if (alphaAllowed && c == ' ') {
rep = rep.replace(' ', '-');
i++;
} else if ((alphaAllowed &&
(isAlphic( c ) || (i != 0 && (isNumeric(c) || c == '-')))) ||
} else */
if ((alphaAllowed &&
(isAlphic( c ) || (i != 0 && (isNumeric(c)/* || c == '-'*/)))) ||
(specialAllowed && i != 0 &&
(c == '_' || c == '+')) ||
(c == '_' || c == '-' || c == '+')) ||
(numAllowed &&
(isNumeric( c ) || c == '.'))) {
// legit.
......
......@@ -11,7 +11,7 @@ public class NodePropertiesArea extends PropertiesArea
{
super();
addProperty("name", "name:","", true, false);
addProperty("hardware", "hardware:","<auto>", true, false );
addProperty("hardware", "hardware:","<auto>", true, true );
addProperty("osid", "os id:","<auto>", true, true );
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment