mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-22 21:32:23 -06:00
* Add background_job toggle to BulkEditForm * Account for bug fix in v4.3.4 * Enable background jobs for bulk edit & bulk delete * Move background_job field to a mixin * Cosmetic improvements * Misc cleanup * Fix BackgroundJobMixin
This commit is contained in:
@@ -6,11 +6,20 @@ from django.core.validators import MaxValueValidator, MinValueValidator
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
__all__ = (
|
||||
'BackgroundJobMixin',
|
||||
'CheckLastUpdatedMixin',
|
||||
'DistanceValidationMixin',
|
||||
)
|
||||
|
||||
|
||||
class BackgroundJobMixin(forms.Form):
|
||||
background_job = forms.BooleanField(
|
||||
label=_('Background job'),
|
||||
help_text=_("Execute this task via a background job"),
|
||||
required=False,
|
||||
)
|
||||
|
||||
|
||||
class CheckLastUpdatedMixin(forms.Form):
|
||||
"""
|
||||
Checks whether the object being saved has been updated since the form was initialized. If so, validation fails.
|
||||
|
||||
Reference in New Issue
Block a user