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 displaying the hidden label on hourly rates rate, also make date picker to fill empty space in table

Dombi Attila65897a2fbf65
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 f8188a4f367..e8e04ddc990 100644
--- a/frontend/src/app/shared/components/datepicker/styles/datepicker.modal.sass
+++ b/frontend/src/app/shared/components/datepicker/styles/datepicker.modal.sass
@@ -12,6 +12,10 @@
&_wide
max-width: 600px
+ &_fill_space
+ .spot-drop-modal
+ display: block
+
&--banner
margin-bottom: $spot-spacing-1
diff --git a/lib/tabular_form_builder.rb b/lib/tabular_form_builder.rb
index 32c550393eb..de3a0c6f254 100644
--- a/lib/tabular_form_builder.rb
+++ b/lib/tabular_form_builder.rb
@@ -180,7 +180,11 @@ class TabularFormBuilder < ActionView::Helpers::FormBuilder
).freeze
def container_wrap_field(field_html, selector, options = {})
- ret = content_tag(:span, field_html, class: field_container_css_class(selector, options))
+ ret = if options.delete(:no_field_container)
+ field_html
+ else
+ content_tag(:span, field_html, class: field_container_css_class(selector, options))
+ end
prefix, suffix = options.values_at(:prefix, :suffix)
diff --git a/modules/costs/app/views/hourly_rates/_rate.html.erb b/modules/costs/app/views/hourly_rates/_rate.html.erb
index a33665a4fde..979ee2ec1e5 100644
--- a/modules/costs/app/views/hourly_rates/_rate.html.erb
+++ b/modules/costs/app/views/hourly_rates/_rate.html.erb
@@ -44,14 +44,17 @@ See COPYRIGHT and LICENSE files for more details.
<td>
<label class="hidden-for-sighted" for="<%= "#{id_prefix}_valid_from" %>"><%= Rate.human_attribute_name(:valid_from) %></label>
<%= rate_form.date_picker :valid_from,
- class: 'date costs-date-picker',
- no_label: true %>
+ class: 'date costs-date-picker op-datepicker-modal_fill_space',
+ no_label: true,
+ no_field_container: true %>
</td>
<td class="currency">
<span class="inline-label">
<label class="hidden-for-sighted" for="<%= "#{id_prefix}_rate" %>"><%= Rate.model_name.human %></label>
<%= rate_form.text_field :rate,
index: id_or_index,
+ no_label: true,
+ no_field_container: true,
value: rate.rate ? unitless_currency_number(rate.rate.round(2)) : "",
required: true %>
<span class="form-label">