From 3723bb60c7d9d76c43b3d7c29b4807cce347aaaa Mon Sep 17 00:00:00 2001 From: Yaw Anokwa Date: Fri, 20 Dec 2019 10:19:01 -0800 Subject: [PATCH] select is not a valid bind type --- pyxform/question.py | 2 +- pyxform/question_type_dictionary.py | 12 ++++++------ .../example_xls/spec_test_expected_output.xml | 2 +- pyxform/tests/example_xls/widgets.xml | 16 ++++++++-------- pyxform/tests/fixtures/strings.ini | 2 +- .../attribute_columns_test.xml | 2 +- .../test_expected_output/flat_xlsform_test.xml | 2 +- .../tests/test_expected_output/table-list.xml | 6 +++--- pyxform/tests/test_expected_output/widgets.xml | 16 ++++++++-------- .../test_expected_output/xlsform_spec_test.xml | 2 +- 10 files changed, 31 insertions(+), 31 deletions(-) diff --git a/pyxform/question.py b/pyxform/question.py index c25eff794..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", "string", "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 d3e739e1d..000ecf505 100644 --- a/pyxform/question_type_dictionary.py +++ b/pyxform/question_type_dictionary.py @@ -49,7 +49,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"}, @@ -61,7 +61,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": { @@ -136,7 +136,7 @@ def generate_new_dict(): "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", @@ -152,7 +152,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", @@ -175,7 +175,7 @@ def generate_new_dict(): } }, "q barcode": {"control": {"tag": "input"}, "bind": {"type": "barcode"}}, - "q select": {"control": {"tag": "select"}, "bind": {"type": "select"}}, + "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": { @@ -236,7 +236,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": { diff --git a/pyxform/tests/example_xls/spec_test_expected_output.xml b/pyxform/tests/example_xls/spec_test_expected_output.xml index 33dddd9ea..c8dfe612a 100644 --- a/pyxform/tests/example_xls/spec_test_expected_output.xml +++ b/pyxform/tests/example_xls/spec_test_expected_output.xml @@ -636,7 +636,7 @@ - + diff --git a/pyxform/tests/example_xls/widgets.xml b/pyxform/tests/example_xls/widgets.xml index eddbec7a8..ed039194f 100644 --- a/pyxform/tests/example_xls/widgets.xml +++ b/pyxform/tests/example_xls/widgets.xml @@ -115,7 +115,7 @@ - + @@ -127,7 +127,7 @@ - + @@ -138,13 +138,13 @@ - - - + + + - - - + + + diff --git a/pyxform/tests/fixtures/strings.ini b/pyxform/tests/fixtures/strings.ini index 75c32b7ad..a46e9cded 100644 --- a/pyxform/tests/fixtures/strings.ini +++ b/pyxform/tests/fixtures/strings.ini @@ -14,7 +14,7 @@ test_simple_date_question_type_multilingual_binding =