mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-28 02:28:43 +00:00
Modal form for part creation
This commit is contained in:
1 parent
d02b6f3583
commit
280f2c36cb
5 files changed
+34
-30
No files matched your search
@@ -41,7 +41,7 @@ class PartIndex(ListView):
|
||||
return context
|
||||
|
||||
|
||||
class PartCreate(CreateView):
|
||||
class PartCreate(AjaxCreateView):
|
||||
""" Create a new part
|
||||
- Optionally provide a category object as initial data
|
||||
"""
|
||||
@@ -49,6 +49,9 @@ class PartCreate(CreateView):
|
||||
form_class = EditPartForm
|
||||
template_name = 'part/create.html'
|
||||
|
||||
ajax_form_title = 'Create new part'
|
||||
ajax_template_name = 'modal_form.html'
|
||||
|
||||
def get_category_id(self):
|
||||
return self.request.GET.get('category', None)
|
||||
|
||||
|
||||
Reference in new issue
Block a user