diff --git a/AKScheduling/forms.py b/AKScheduling/forms.py index 47a19f7857c3c9e68d2c6e2b59cecf0d79fbcebf..5eff1fcaa65515ac2f14ccc6a5b3c0eaef151b61 100644 --- a/AKScheduling/forms.py +++ b/AKScheduling/forms.py @@ -24,7 +24,8 @@ class AKAddSlotForm(forms.Form): start = forms.CharField(label=_("Start"), disabled=True) end = forms.CharField(label=_("End"), disabled=True) duration = forms.CharField(label=_("Duration"), disabled=True) - room = forms.IntegerField(label=_("Room"), disabled=True) + room = forms.IntegerField(label=_("Room"), disabled=True, widget=forms.HiddenInput()) + room_name = forms.CharField(label=_("Room"), disabled=True) def __init__(self, event): super().__init__() diff --git a/AKScheduling/templates/admin/AKScheduling/scheduling.html b/AKScheduling/templates/admin/AKScheduling/scheduling.html index 8d592aecba3cab360c8fb944715ffe0ec36fecf8..437043cd64b347191a418e4c8424e93a01db1591 100644 --- a/AKScheduling/templates/admin/AKScheduling/scheduling.html +++ b/AKScheduling/templates/admin/AKScheduling/scheduling.html @@ -157,6 +157,7 @@ $('#id_start').val(info.startStr); $('#id_end').val(info.endStr); $('#id_room').val(info.resource._resource.id); + $('#id_room_name').val(info.resource._resource.title); $('#id_duration').val(Math.abs(info.end-info.start)/1000/60/60); $('#id_ak').val(""); $('#newAKSlotModal').modal('show');