diff --git a/pyxform/question.py b/pyxform/question.py index 7947692b0..7a852f0c5 100644 --- a/pyxform/question.py +++ b/pyxform/question.py @@ -134,7 +134,7 @@ def validate(self): choice.validate() def xml_control(self): - assert self.bind["type"] in ["select", "select1", "odk:rank"] + assert self.bind["type"] in ["string", "odk:rank"] survey = self.get_root() control_dict = self.control.copy() # Resolve field references in attributes diff --git a/pyxform/question_type_dictionary.py b/pyxform/question_type_dictionary.py index 49df1f07e..1611999f9 100644 --- a/pyxform/question_type_dictionary.py +++ b/pyxform/question_type_dictionary.py @@ -47,7 +47,7 @@ def generate_new_dict(): }, "add select multiple prompt using": { "control": {"tag": "select"}, - "bind": {"type": "select"}, + "bind": {"type": "string"}, }, "add note prompt": { "control": {"tag": "input"}, @@ -59,7 +59,7 @@ def generate_new_dict(): "text": {"control": {"tag": "input"}, "bind": {"type": "string"}}, "select all that apply from": { "control": {"tag": "select"}, - "bind": {"type": "select"}, + "bind": {"type": "string"}, }, "simserial": { "bind": { @@ -128,13 +128,13 @@ def generate_new_dict(): } }, "q location": {"control": {"tag": "input"}, "bind": {"type": "geopoint"}}, - "select one": {"control": {"tag": "select1"}, "bind": {"type": "select1"}}, + "select one": {"control": {"tag": "select1"}, "bind": {"type": "string"}}, "select one external": {"control": {"tag": "input"}, "bind": {"type": "string"}}, "add image prompt": { "control": {"tag": "upload", "mediatype": "image/*"}, "bind": {"type": "binary"}, }, - "select all that apply": {"control": {"tag": "select"}, "bind": {"type": "select"}}, + "select all that apply": {"control": {"tag": "select"}, "bind": {"type": "string"}}, "get end time": { "bind": { "jr:preload": "timestamp", @@ -150,7 +150,7 @@ def generate_new_dict(): "geopoint": {"control": {"tag": "input"}, "bind": {"type": "geopoint"}}, "geoshape": {"control": {"tag": "input"}, "bind": {"type": "geoshape"}}, "geotrace": {"control": {"tag": "input"}, "bind": {"type": "geotrace"}}, - "select multiple from": {"control": {"tag": "select"}, "bind": {"type": "select"}}, + "select multiple from": {"control": {"tag": "select"}, "bind": {"type": "string"}}, "end time": { "bind": { "jr:preload": "timestamp", @@ -173,8 +173,8 @@ def generate_new_dict(): } }, "q barcode": {"control": {"tag": "input"}, "bind": {"type": "barcode"}}, - "q select": {"control": {"tag": "select"}, "bind": {"type": "select"}}, - "select one using": {"control": {"tag": "select1"}, "bind": {"type": "select1"}}, + "q select": {"control": {"tag": "select"}, "bind": {"type": "string"}}, + "select one using": {"control": {"tag": "select1"}, "bind": {"type": "string"}}, "rank": {"control": {"tag": "odk:rank"}, "bind": {"type": "odk:rank"}}, "image": { "control": {"tag": "upload", "mediatype": "image/*"}, @@ -234,7 +234,7 @@ def generate_new_dict(): }, "int": {"control": {"tag": "input"}, "bind": {"type": "int"}}, "add barcode prompt": {"control": {"tag": "input"}, "bind": {"type": "barcode"}}, - "select multiple using": {"control": {"tag": "select"}, "bind": {"type": "select"}}, + "select multiple using": {"control": {"tag": "select"}, "bind": {"type": "string"}}, "q decimal": {"control": {"tag": "input"}, "bind": {"type": "decimal"}}, "end": { "bind": { @@ -272,7 +272,7 @@ def generate_new_dict(): "add integer prompt": {"control": {"tag": "input"}, "bind": {"type": "int"}}, "q dateTime": {"control": {"tag": "input"}, "bind": {"type": "dateTime"}}, "date": {"control": {"tag": "input"}, "bind": {"type": "date"}}, - "q select1": {"control": {"tag": "select1"}, "bind": {"type": "select1"}}, + "q select1": {"control": {"tag": "select1"}, "bind": {"type": "string"}}, "start time": { "bind": { "jr:preload": "timestamp", @@ -293,7 +293,7 @@ def generate_new_dict(): }, "add select one prompt using": { "control": {"tag": "select1"}, - "bind": {"type": "select1"}, + "bind": {"type": "string"}, }, "hidden": {"bind": {"type": "string"}}, "uri:subscriberid": { diff --git a/pyxform/tests/example_xls/instance_xmlns_test.xml b/pyxform/tests/example_xls/instance_xmlns_test.xml index 27b8a104c..c75defcb1 100644 --- a/pyxform/tests/example_xls/instance_xmlns_test.xml +++ b/pyxform/tests/example_xls/instance_xmlns_test.xml @@ -10,7 +10,7 @@ - + diff --git a/pyxform/tests/example_xls/spec_test_expected_output.xml b/pyxform/tests/example_xls/spec_test_expected_output.xml index 11e199df6..c8dfe612a 100644 --- a/pyxform/tests/example_xls/spec_test_expected_output.xml +++ b/pyxform/tests/example_xls/spec_test_expected_output.xml @@ -624,25 +624,25 @@ - + - - + + - - - - - - - + + + + + + + diff --git a/pyxform/tests/example_xls/widgets.xml b/pyxform/tests/example_xls/widgets.xml index 88ccb5200..ed039194f 100644 --- a/pyxform/tests/example_xls/widgets.xml +++ b/pyxform/tests/example_xls/widgets.xml @@ -115,8 +115,8 @@ - - + + @@ -126,25 +126,25 @@ - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - + + + diff --git a/pyxform/tests/fixtures/strings.ini b/pyxform/tests/fixtures/strings.ini index 8fc6fe41d..a46e9cded 100644 --- a/pyxform/tests/fixtures/strings.ini +++ b/pyxform/tests/fixtures/strings.ini @@ -6,7 +6,7 @@ test_answers_can_be_imported_from_xml =