mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 17:26:10 -06:00
Merge ReturnURLForm into ConfirmationForm
This commit is contained in:
parent
8f6f3973b6
commit
7fd72477ab
@ -10,23 +10,23 @@ __all__ = (
|
|||||||
'ConfirmationForm',
|
'ConfirmationForm',
|
||||||
'CSVModelForm',
|
'CSVModelForm',
|
||||||
'FilterForm',
|
'FilterForm',
|
||||||
'ReturnURLForm',
|
|
||||||
'TableConfigForm',
|
'TableConfigForm',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class ReturnURLForm(forms.Form):
|
class ConfirmationForm(BootstrapMixin, forms.Form):
|
||||||
"""
|
"""
|
||||||
Provides a hidden return URL field to control where the user is directed after the form is submitted.
|
A generic confirmation form. The form is not valid unless the `confirm` field is checked.
|
||||||
"""
|
"""
|
||||||
return_url = forms.CharField(required=False, widget=forms.HiddenInput())
|
return_url = forms.CharField(
|
||||||
|
required=False,
|
||||||
|
widget=forms.HiddenInput()
|
||||||
class ConfirmationForm(BootstrapMixin, ReturnURLForm):
|
)
|
||||||
"""
|
confirm = forms.BooleanField(
|
||||||
A generic confirmation form. The form is not valid unless the confirm field is checked.
|
required=True,
|
||||||
"""
|
widget=forms.HiddenInput(),
|
||||||
confirm = forms.BooleanField(required=True, widget=forms.HiddenInput(), initial=True)
|
initial=True
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class BulkEditForm(BootstrapMixin, forms.Form):
|
class BulkEditForm(BootstrapMixin, forms.Form):
|
||||||
|
Loading…
Reference in New Issue
Block a user