Skip to content

Commit

Permalink
Refs #79. Fixed issues with TeraTestTypeForm
Browse files Browse the repository at this point in the history
  • Loading branch information
SBriere committed Apr 5, 2022
1 parent 5124b07 commit abc82c2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions teraserver/python/opentera/forms/TeraTestTypeForm.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class TeraTestTypeForm:

@staticmethod
def get_test_type_form(user_access: DBManagerTeraUserAccess):
form = TeraForm("session_type")
form = TeraForm("test_type")

# Building lists
services = user_access.get_accessible_services()
Expand All @@ -16,20 +16,20 @@ def get_test_type_form(user_access: DBManagerTeraUserAccess):
services_list.append(TeraFormValue(value_id=service.id_service, value=service.service_name))

# Sections
section = TeraFormSection("informations", gettext("Information"))
section = TeraFormSection("informations", "")
form.add_section(section)

# Items
section.add_item(TeraFormItem("id_test_type", gettext("Test Type ID"), "hidden", True))
section.add_item(TeraFormItem("id_service", gettext("Service"), "array", item_required=False,
section.add_item(TeraFormItem("test_type_name", gettext("Name"), "text", True))
section.add_item(TeraFormItem("id_service", gettext("Service"), "array", item_required=True,
item_values=services_list)
)
section.add_item(TeraFormItem("test_type_uuid", gettext("UUID"), "hidden", True))
section.add_item(TeraFormItem("test_type_name", gettext("Name"), "text", True))
section.add_item(TeraFormItem("test_type_description", gettext("Description"), "longtext", False))
section.add_item(TeraFormItem("test_type_key", gettext("Unique Key"), "text", False))
section.add_item(TeraFormItem("test_type_has_json_format", gettext("Expose JSON structure"), "boolean", False))
section.add_item(TeraFormItem("test_type_has_web_format", gettext("Expose Web interface"), "boolean", False))
section.add_item(TeraFormItem("test_type_has_web_editor", gettext("Expose Web editor"), "boolean", False))
section.add_item(TeraFormItem("test_type_description", gettext("Description"), "longtext", False))

return form.to_dict()

0 comments on commit abc82c2

Please sign in to comment.