Commit d09d309b by Kálmán Viktor

request: fix resources request form

parent 9cf54290
...@@ -86,5 +86,7 @@ class LeaseRequestForm(InitialFromFileMixin, Form): ...@@ -86,5 +86,7 @@ class LeaseRequestForm(InitialFromFileMixin, Form):
initial_template = "request/initials/lease.html" initial_template = "request/initials/lease.html"
class ResourceRequestForm(VmResourcesForm): class ResourceRequestForm(InitialFromFileMixin, VmResourcesForm):
message = CharField(widget=forms.Textarea) message = CharField(widget=forms.Textarea)
initial_template = "request/initials/resources.html"
...@@ -227,6 +227,7 @@ class ResourceRequestView(VmRequestMixin, FormView): ...@@ -227,6 +227,7 @@ class ResourceRequestView(VmRequestMixin, FormView):
def get_form_kwargs(self): def get_form_kwargs(self):
kwargs = super(ResourceRequestView, self).get_form_kwargs() kwargs = super(ResourceRequestView, self).get_form_kwargs()
kwargs['can_edit'] = True kwargs['can_edit'] = True
kwargs['instance'] = self.get_vm()
return kwargs return kwargs
def get_initial(self): def get_initial(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment