Skip to content

Commit

Permalink
Merge pull request #125 from djhoward12/djhoward12-naaps-122-exclude-…
Browse files Browse the repository at this point in the history
…form-fields

adding exclude to floorplantile form
  • Loading branch information
joewesch authored Sep 18, 2024
2 parents be6e94b + b6d0d30 commit a6b695b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions changes/122.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Excluded internal `allocation_type` and `on_group_tile` fields from Floor Plan Tile add/edit form.
1 change: 1 addition & 0 deletions changes/125.housekeeping
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Removed import button from Navigation bar.
1 change: 1 addition & 0 deletions nautobot_floor_plan/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ class Meta:

model = models.FloorPlanTile
fields = "__all__"
exclude = ["allocation_type", "on_group_tile"] # pylint: disable=modelform-uses-exclude

def __init__(self, *args, **kwargs):
"""Overwrite the constructor to define grid numbering style."""
Expand Down
6 changes: 1 addition & 5 deletions nautobot_floor_plan/navigation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Menu items."""

from nautobot.apps.ui import NavMenuAddButton, NavMenuGroup, NavMenuImportButton, NavMenuItem, NavMenuTab
from nautobot.apps.ui import NavMenuAddButton, NavMenuGroup, NavMenuItem, NavMenuTab

menu_items = (
NavMenuTab(
Expand All @@ -19,10 +19,6 @@
link="plugins:nautobot_floor_plan:floorplan_add",
permissions=["nautobot_floor_plan.add_floorplan"],
),
NavMenuImportButton(
link="plugins:nautobot_floor_plan:floorplan_import",
permissions=["nautobot_floor_plan.add_floorplan"],
),
),
),
),
Expand Down
10 changes: 10 additions & 0 deletions nautobot_floor_plan/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ class Meta(BaseTable.Meta):
"x_size",
"y_size",
"x_origin_seed",
"x_axis_step",
"y_origin_seed",
"y_axis_step",
"tile_width",
"tile_depth",
"tags",
Expand All @@ -54,6 +56,14 @@ class Meta(BaseTable.Meta):
"pk",
"floor_plan",
"location",
"x_size",
"y_size",
"x_origin_seed",
"x_axis_step",
"y_origin_seed",
"y_axis_step",
"tile_width",
"tile_depth",
"tags",
"actions",
)
Expand Down

0 comments on commit a6b695b

Please sign in to comment.