Fixed requirement of html_input_type in config
This commit is contained in:
parent
de12a966d8
commit
71a3d957b1
@ -14,7 +14,6 @@ item_attributes = [
|
|||||||
textAttribute(
|
textAttribute(
|
||||||
attrib_name="assettag",
|
attrib_name="assettag",
|
||||||
display_name="Asset Tag",
|
display_name="Asset Tag",
|
||||||
html_input_type="text",
|
|
||||||
required=True,
|
required=True,
|
||||||
unique=True,
|
unique=True,
|
||||||
primary=True,
|
primary=True,
|
||||||
@ -24,7 +23,6 @@ item_attributes = [
|
|||||||
textAttribute(
|
textAttribute(
|
||||||
attrib_name="hostname",
|
attrib_name="hostname",
|
||||||
display_name="Host Name",
|
display_name="Host Name",
|
||||||
html_input_type="text",
|
|
||||||
required=True,
|
required=True,
|
||||||
unique=True,
|
unique=True,
|
||||||
allowed_chars="abcdefghijklmnopqrstuvwxyz0123456789.-_", # Lowercase letters, numbers, dots, underscores, hyphens
|
allowed_chars="abcdefghijklmnopqrstuvwxyz0123456789.-_", # Lowercase letters, numbers, dots, underscores, hyphens
|
||||||
@ -32,14 +30,12 @@ item_attributes = [
|
|||||||
dateAttribute(
|
dateAttribute(
|
||||||
attrib_name="warrantyfrom",
|
attrib_name="warrantyfrom",
|
||||||
display_name="Warranty From",
|
display_name="Warranty From",
|
||||||
html_input_type="date",
|
|
||||||
default_val="2020-03-09",
|
default_val="2020-03-09",
|
||||||
required=True
|
required=True
|
||||||
),
|
),
|
||||||
selectAttribute(
|
selectAttribute(
|
||||||
attrib_name="status",
|
attrib_name="status",
|
||||||
display_name="Status",
|
display_name="Status",
|
||||||
html_input_type="select",
|
|
||||||
required=True,
|
required=True,
|
||||||
options=["Active", "Inactive"], # Allowed values
|
options=["Active", "Inactive"], # Allowed values
|
||||||
default_val="Active"
|
default_val="Active"
|
||||||
@ -47,7 +43,6 @@ item_attributes = [
|
|||||||
intAttribute(
|
intAttribute(
|
||||||
attrib_name="staffnum",
|
attrib_name="staffnum",
|
||||||
display_name="Staff No.",
|
display_name="Staff No.",
|
||||||
html_input_type="number",
|
|
||||||
required=True,
|
required=True,
|
||||||
min_val=100000, # 6 digits
|
min_val=100000, # 6 digits
|
||||||
max_val=99999999, # 8 digits
|
max_val=99999999, # 8 digits
|
||||||
|
@ -10,7 +10,7 @@ class Attribute:
|
|||||||
"""Base class for all attribute types."""
|
"""Base class for all attribute types."""
|
||||||
attrib_name: str
|
attrib_name: str
|
||||||
display_name: str
|
display_name: str
|
||||||
html_input_type: str
|
html_input_type: Optional[str] = "text"
|
||||||
required: bool = False
|
required: bool = False
|
||||||
unique: bool = False
|
unique: bool = False
|
||||||
primary: bool = False
|
primary: bool = False
|
||||||
|
Loading…
Reference in New Issue
Block a user