fix: Adds 'hidden' field to ActivityEditView form

Enables editing of the 'hidden' attribute in activity forms,
supporting the management of activity visibility in the UI.
This commit is contained in:
Kumi 2024-11-18 06:55:01 +01:00
parent a6025dee31
commit d522f23b55
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -177,7 +177,7 @@ class ActivityListView(LoginRequiredMixin, ListView):
class ActivityEditView(LoginRequiredMixin, UpdateView): class ActivityEditView(LoginRequiredMixin, UpdateView):
template_name = "mood/activity_edit.html" template_name = "mood/activity_edit.html"
model = Activity model = Activity
fields = ["name", "icon", "color"] fields = ["name", "icon", "color", "hidden"]
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs) context = super().get_context_data(**kwargs)