Skip to content

Commit

Permalink
fix additional fields styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Vakmeth committed Jun 14, 2024
1 parent d8fd9a7 commit bfec160
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 0 additions & 2 deletions app/helpers/contactable_insieme_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ def contact_method_label_select(form)
translated = contact_method.class.translate_label(value)
OpenStruct.new(value: value, translated: translated)
end
content_tag(:div, class: 'col-2 d-inline') do
form.collection_select(:translated_label, options, :value, :translated, {},
class: 'form-select form-select-sm')
end
end
end
16 changes: 8 additions & 8 deletions app/views/contactable/_additional_email_fields.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
-# or later. See the COPYING file at the top-level directory or at
-# https://github.com/hitobito/hitobito_insieme.
%div.col-5.inline
= f.input_field(:email,
placeholder: t('.placeholder_value'))
= contact_method_label_select(f)

%div.col-2.d-inline.row
%div.d-flex.flex-wrap.w-100.align-items-center
%div.col-11.col-md-11.col-lg-5.col-xl-5.col-xxl-4.me-3
= f.input_field(:email,
placeholder: t('.placeholder_value'))
%div.col-11.col-md-11.col-lg-5.col-xl-5.col-xxl-3.d-flex.flex-row.me-3.mt-1
= contact_method_label_select(f)
- if entry.is_a?(Person)
= f.label(:mailings, class: 'checkbox d-inline') do
= f.label(:mailings, class: 'col-12 col-sm-2 col-md-12 col-lg-3 col-xl-3 col-xxl-2 mt-sm-2 mt-md-0') do
= f.check_box(:mailings)
%span{rel: 'tooltip', title: t('.tooltip_mailings')}
= t(:"activerecord.attributes.additional_emails.mailings")
%i.icon.icon-info-sign

= render 'contactable/public_check_box', f: f
= render 'contactable/public_check_box', f: f
8 changes: 5 additions & 3 deletions app/views/contactable/_phone_number_fields.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
-# or later. See the COPYING file at the top-level directory or at
-# https://github.com/hitobito/hitobito.
%div.col-4.inline
%div.d-flex.flex-wrap.w-100.align-items-center
%div.col-11.col-md-5.me-3.mb-1
= f.input_field(:number, placeholder: PhoneNumber.human_attribute_name(:number))
= contact_method_label_select(f)
= render 'contactable/public_check_box', f: f
%div.col-11.col-md-4.d-flex.flex-row.me-3
= contact_method_label_select(f)
= render 'contactable/public_check_box', f: f

0 comments on commit bfec160

Please sign in to comment.