Skip to content

Commit

Permalink
Fix search form label alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Jan 24, 2025
1 parent 106e939 commit ae9f7f5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions workbench/logbook/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class LoggedHoursSearchForm(Form):
)
date_from = forms.DateField(widget=DateInput, required=False, label="")
date_until = forms.DateField(
widget=DateInput, required=False, label=mark_safe("– ")
widget=DateInput, required=False, label=mark_safe("–")
)
service = forms.ModelChoiceField(
queryset=Service.objects.all(),
Expand Down Expand Up @@ -230,7 +230,7 @@ class LoggedCostSearchForm(Form):
expenses = forms.BooleanField(required=False, label=_("expenses"))
date_from = forms.DateField(widget=DateInput, required=False, label="")
date_until = forms.DateField(
widget=DateInput, required=False, label=mark_safe("– ")
widget=DateInput, required=False, label=mark_safe("–")
)
service = forms.ModelChoiceField(
queryset=Service.objects.all(),
Expand Down
8 changes: 8 additions & 0 deletions workbench/static/workbench/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,18 @@ tbody th > a {
align-items: flex-start;
margin-bottom: 1rem;
}

.form-search input,
.form-search select {
max-width: 10em;
}

.form-search .form-group {
display: flex;
align-items: center;
gap: 4px;
}

.form-search > * {
margin-left: 0.25rem;
}
Expand Down
2 changes: 2 additions & 0 deletions workbench/templates/logbook/loggedhours_list.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{% extends "generic/object_list.html" %}

{% load django_bootstrap5 i18n workbench %}

{% block search-form-buttons %}
{% if request.GET and request.user.features.CONTROLLING %}
<a href="{% querystring export='xlsx' %}" class="btn btn-primary">
Expand Down

0 comments on commit ae9f7f5

Please sign in to comment.