Skip to content

Commit

Permalink
Merge pull request #691 from nearbeach/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
robotichead authored Oct 16, 2024
2 parents cc4a5d8 + f9cf31a commit 6e3fa43
Show file tree
Hide file tree
Showing 57 changed files with 517 additions and 162 deletions.
65 changes: 65 additions & 0 deletions NearBeach/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1166,6 +1166,71 @@ class Meta:
]


class ScheduledObjectForm(forms.Form):
days_before = forms.IntegerField(
required=False,
)
day = forms.MultipleChoiceField(
required=False,
choices=(
("monday", "monday"),
("tuesday", "tuesday"),
("wednesday", "wednesday"),
("thursday", "thursday"),
("friday", "friday"),
("saturday", "saturday"),
("sunday", "sunday"),
),
)
number_of_repeats = forms.IntegerField(
required=False,
)
scheduler_frequency = forms.ChoiceField(
choices=SCHEDULED_OBJECT_FREQUENCY,
required=True,
)
scheduler_end_date = forms.DateField(
required=False,
)
scheduler_start_date = forms.DateField()
single_day = forms.CharField(
required=False,
max_length=50,
)
end_date_condition = forms.ChoiceField(
choices=(
("no-end-date", "no-end-date"),
("number-of-repeats", "number-of-repeats"),
("end-date", "end-date"),
),
required=True,
)
object_type = forms.ChoiceField(
choices=OBJECT_TEMPLATE_TYPE,
required=True,
)
object_title = forms.CharField(
required=True,
max_length=255,
)
object_description = forms.CharField()
object_start_date = forms.DateTimeField(
input_formats=["c"],
)
object_end_date = forms.DateTimeField(
input_formats=["c"],
)
group_list = forms.ModelMultipleChoiceField(
required=True,
queryset=Group.objects.filter(
is_deleted=False,
),
)
is_active = forms.BooleanField(
required=False,
)


class SearchForm(forms.Form):
# Just have a simple search field
search = forms.CharField(
Expand Down
Loading

0 comments on commit 6e3fa43

Please sign in to comment.