diff --git a/config.py b/config.py index 6e1b3f8..77ca50a 100644 --- a/config.py +++ b/config.py @@ -14,7 +14,6 @@ item_attributes = [ textAttribute( attrib_name="assettag", display_name="Asset Tag", - html_input_type="text", required=True, unique=True, primary=True, @@ -24,7 +23,6 @@ item_attributes = [ textAttribute( attrib_name="hostname", display_name="Host Name", - html_input_type="text", required=True, unique=True, allowed_chars="abcdefghijklmnopqrstuvwxyz0123456789.-_", # Lowercase letters, numbers, dots, underscores, hyphens @@ -32,14 +30,12 @@ item_attributes = [ dateAttribute( attrib_name="warrantyfrom", display_name="Warranty From", - html_input_type="date", default_val="2020-03-09", required=True ), selectAttribute( attrib_name="status", display_name="Status", - html_input_type="select", required=True, options=["Active", "Inactive"], # Allowed values default_val="Active" @@ -47,7 +43,6 @@ item_attributes = [ intAttribute( attrib_name="staffnum", display_name="Staff No.", - html_input_type="number", required=True, min_val=100000, # 6 digits max_val=99999999, # 8 digits diff --git a/definitions/attribute.py b/definitions/attribute.py index cdf367c..6e34cef 100644 --- a/definitions/attribute.py +++ b/definitions/attribute.py @@ -10,7 +10,7 @@ class Attribute: """Base class for all attribute types.""" attrib_name: str display_name: str - html_input_type: str + html_input_type: Optional[str] = "text" required: bool = False unique: bool = False primary: bool = False