Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix datepicker modal spacings

Benjamin Bädorfdcc31ec352d7
diff --git a/frontend/src/app/shared/components/datepicker/styles/datepicker.modal.sass b/frontend/src/app/shared/components/datepicker/styles/datepicker.modal.sass
index bf92f983d28..f8188a4f367 100644
--- a/frontend/src/app/shared/components/datepicker/styles/datepicker.modal.sass
+++ b/frontend/src/app/shared/components/datepicker/styles/datepicker.modal.sass
@@ -1,6 +1,8 @@
@import '../../app/spot/styles/sass/variables'
.op-datepicker-modal
+ display: flex
+ flex-direction: column
min-height: 200px
width: 100vw
// Basically the width of the two calendars next to each other + spacings
@@ -10,6 +12,9 @@
&_wide
max-width: 600px
+ &--banner
+ margin-bottom: $spot-spacing-1
+
&--toggle-actions-container
display: grid
grid-template-columns: auto auto 1fr
diff --git a/frontend/src/app/shared/components/datepicker/wp-multi-date-form/wp-multi-date-form.component.html b/frontend/src/app/shared/components/datepicker/wp-multi-date-form/wp-multi-date-form.component.html
index b5f6b068eb7..f0c9f05ab9f 100644
--- a/frontend/src/app/shared/components/datepicker/wp-multi-date-form/wp-multi-date-form.component.html
+++ b/frontend/src/app/shared/components/datepicker/wp-multi-date-form/wp-multi-date-form.component.html
@@ -1,6 +1,7 @@
<form
data-qa-selector="op-datepicker-modal"
[attr.id]="htmlId"
+ class="op-datepicker-modal op-datepicker-modal_wide"
#modalContainer
data-indicator-name="modal"
tabindex="0"
@@ -9,9 +10,12 @@
[cdkTrapFocusAutoCapture]="true"
(submit)="doSave($event)"
>
- <op-datepicker-banner [scheduleManually]="scheduleManually"></op-datepicker-banner>
+ <op-datepicker-banner
+ [scheduleManually]="scheduleManually"
+ class="op-datepicker-modal--banner"
+ ></op-datepicker-banner>
- <div class="spot-container op-datepicker-modal op-datepicker-modal_wide">
+ <div class="spot-container">
<div class="op-datepicker-modal--toggle-actions-container">
<op-datepicker-scheduling-toggle
name="scheduleManually"
diff --git a/frontend/src/app/shared/components/datepicker/wp-single-date-form/wp-single-date-form.component.html b/frontend/src/app/shared/components/datepicker/wp-single-date-form/wp-single-date-form.component.html
index f956236efe2..f71676f8e4a 100644
--- a/frontend/src/app/shared/components/datepicker/wp-single-date-form/wp-single-date-form.component.html
+++ b/frontend/src/app/shared/components/datepicker/wp-single-date-form/wp-single-date-form.component.html
@@ -1,5 +1,5 @@
<form
- class="spot-container"
+ class="op-datepicker-modal"
data-qa-selector="op-datepicker-modal"
[attr.id]="htmlId"
#modalContainer
@@ -10,16 +10,21 @@
cdkTrapFocus
[cdkTrapFocusAutoCapture]="true"
>
- <op-datepicker-banner></op-datepicker-banner>
+ <op-datepicker-banner
+ [scheduleManually]="scheduleManually"
+ class="op-datepicker-modal--banner"
+ ></op-datepicker-banner>
<div class="spot-container">
<op-datepicker-scheduling-toggle
+ class="spot-form-field"
name="scheduleManually"
[(ngModel)]="scheduleManually"
(ngModelChange)="changeSchedulingMode()"
></op-datepicker-scheduling-toggle>
<op-datepicker-working-days-toggle
+ class="spot-form-field"
name="ignoreNonWorkingDays"
[(ngModel)]="ignoreNonWorkingDays"
(ngModelChange)="changeNonWorkingDays()"