Codebase list ctdconverter / 04d21ef
Replace "Nothing selected" option with default value on select lists. Enable radio button for small lists. Clemens BlanK 7 years ago
1 changed file(s) with 6 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
991991
992992 if is_selection_parameter(param):
993993 param_type = "select"
994 if len(param.restrictions.choices) < 5:
995 param_node.attrib["display"] = "radio"
994996
995997 if is_boolean_parameter(param):
996998 param_type = "boolean"
10441046 raise InvalidModelException("Unrecognized restriction type [%(type)s] for parameter [%(name)s]"
10451047 % {"type": type(param.restrictions), "name": param.name})
10461048
1047 param_node.attrib["optional"] = str(not param.required)
1049 if param_type == "select" and param.default in param.restrictions.choices:
1050 param_node.attrib["optional"] = "False"
1051 else:
1052 param_node.attrib["optional"] = str(not param.required)
10481053
10491054 if param_type == "text":
10501055 # add size attribute... this is the length of a textbox field in Galaxy (it could also be 15x2, for instance)