Skip to content

Commit

Permalink
chore: add tooltip for basic information
Browse files Browse the repository at this point in the history
  • Loading branch information
djs0109 committed Sep 6, 2022
1 parent 37b1f6c commit 23747df
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions app/Entirety/devices/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,33 @@


class DeviceBasic(forms.Form):
device_id = forms.CharField(label="Device ID", max_length=100, required=True)
entity_name = forms.CharField(label="Entity Name", max_length=100, required=True)
entity_type = forms.CharField(label="Entity Type", max_length=100, required=True)
device_id = forms.CharField(label="Device ID", max_length=100, required=True,
widget=forms.TextInput(
attrs={
"data-bs-toggle": "tooltip",
"data-bs-placement": "top ",
"title": "Deice id",
}
),
)
entity_name = forms.CharField(label="Entity Name", max_length=100, required=True,
widget=forms.TextInput(
attrs={
"data-bs-toggle": "tooltip",
"data-bs-placement": "top ",
"title": "Entity id",
}
),
)
entity_type = forms.CharField(label="Entity Type", max_length=100,
widget=forms.TextInput(
attrs={
"data-bs-toggle": "tooltip",
"data-bs-placement": "top ",
"title": "Entity type",
}
),
)

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
Expand Down

0 comments on commit 23747df

Please sign in to comment.