Skip to content

Commit

Permalink
Put source and destination fields to the top again
Browse files Browse the repository at this point in the history
  • Loading branch information
medihack committed Nov 14, 2023
1 parent e4b91dd commit cf8797f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion adit/batch_query/forms.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from crispy_forms.layout import Layout, Submit
from django import forms
from django.conf import settings
from django.core.exceptions import ValidationError
Expand Down Expand Up @@ -71,6 +71,8 @@ def __init__(self, *args, **kwargs):
] = "onSendFinishedMailChange($event)"

self.helper = FormHelper(self)
self.helper.layout = Layout("source") # Make sure source is on top
self.helper.render_unmentioned_fields = True # and the rest of the fields below
self.helper.attrs["x-data"] = "batchQueryJobForm()"
self.helper.add_input(Submit("save", "Create Job"))

Expand Down
4 changes: 3 additions & 1 deletion adit/batch_transfer/forms.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from crispy_forms.layout import Layout, Submit
from django import forms
from django.conf import settings
from django.core.exceptions import ValidationError
Expand Down Expand Up @@ -98,6 +98,8 @@ def __init__(self, *args, **kwargs):
] = "onSendFinishedMailChange($event)"

self.helper = FormHelper(self)
self.helper.layout = Layout("source", "destination") # Make sure those fields are on top
self.helper.render_unmentioned_fields = True # and the rest of the fields below
self.helper.attrs["x-data"] = "batchTransferJobForm()"
self.helper.add_input(Submit("save", "Create Job"))

Expand Down

0 comments on commit cf8797f

Please sign in to comment.