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