mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 03:56:43 +00:00
- Ajax modals now return the URL of the item they are operating on - passing {follow: true} to the modal caller will go to that URL on success - footable'd company list
54 lines
1.2 KiB
Python
54 lines
1.2 KiB
Python
from django import forms
|
|
from crispy_forms.helper import FormHelper
|
|
from crispy_forms.layout import Submit
|
|
|
|
from .models import Company
|
|
|
|
|
|
"""
|
|
class EditSupplierOrderForm(forms.ModelForm):
|
|
|
|
def __init__(self, *args, **kwargs):
|
|
super(EditSupplierOrderForm, self).__init__(*args, **kwargs)
|
|
self.helper = FormHelper()
|
|
|
|
self.helper.form_id = 'id-edit-part-form'
|
|
self.helper.form_class = 'blueForms'
|
|
self.helper.form_method = 'post'
|
|
|
|
self.helper.add_input(Submit('submit', 'Submit'))
|
|
|
|
class Meta:
|
|
model = SupplierOrder
|
|
fields = [
|
|
'internal_ref',
|
|
'supplier',
|
|
'notes',
|
|
'issued_date',
|
|
]
|
|
"""
|
|
|
|
|
|
class EditCompanyForm(forms.ModelForm):
|
|
|
|
def __init__(self, *args, **kwargs):
|
|
super(EditCompanyForm, self).__init__(*args, **kwargs)
|
|
self.helper = FormHelper()
|
|
self.helper.form_tag = False
|
|
|
|
class Meta:
|
|
model = Company
|
|
fields = [
|
|
'name',
|
|
'description',
|
|
'website',
|
|
'address',
|
|
'phone',
|
|
'email',
|
|
'contact',
|
|
'image',
|
|
'is_customer',
|
|
'is_supplier',
|
|
'notes'
|
|
]
|