diff --git a/logs/forms.py b/logs/forms.py index b8c8b010..c98bd282 100644 --- a/logs/forms.py +++ b/logs/forms.py @@ -114,28 +114,28 @@ def classes_for_action_type(action_type): class ActionsSearchForm(Form): """Form used to do an advanced search through the logs.""" - u = forms.ModelChoiceField( + user = forms.ModelChoiceField( label=_("Performed by"), queryset=users.models.User.objects.all(), required=False, ) - t = forms.MultipleChoiceField( + action_type = forms.MultipleChoiceField( label=_("Action type"), required=False, widget=forms.CheckboxSelectMultiple, choices=CHOICES_ACTION_TYPE, initial=[i[0] for i in CHOICES_ACTION_TYPE], ) - s = forms.DateField(required=False, label=_("Start date")) - e = forms.DateField(required=False, label=_("End date")) + start_date = forms.DateField(required=False, label=_("Start date")) + end_date = forms.DateField(required=False, label=_("End date")) def __init__(self, *args, **kwargs): super(ActionsSearchForm, self).__init__(*args, **kwargs) - self.fields["s"].help_text = get_input_formats_help_text( - self.fields["s"].input_formats + self.fields["start_date"].help_text = get_input_formats_help_text( + self.fields["start_date"].input_formats ) - self.fields["e"].help_text = get_input_formats_help_text( - self.fields["e"].input_formats + self.fields["end_date"].help_text = get_input_formats_help_text( + self.fields["end_date"].input_formats ) diff --git a/logs/models.py b/logs/models.py index 8790f46e..aa5d7822 100644 --- a/logs/models.py +++ b/logs/models.py @@ -600,10 +600,10 @@ class ActionsSearch: Returns: The QuerySet of Revision objects corresponding to the search. """ - user = params.get("u", None) - start = params.get("s", None) - end = params.get("e", None) - action_types = params.get("t", None) + user = params.get("user", None) + start = params.get("start_date", None) + end = params.get("end_date", None) + action_types = params.get("action_type", None) query = Q()