Skip to content

Commit

Permalink
make right column clickable again in course canton fields
Browse files Browse the repository at this point in the history
  • Loading branch information
njaeggi committed Jan 23, 2024
1 parent 2eb9f71 commit eef13e9
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 15 deletions.
50 changes: 38 additions & 12 deletions app/assets/stylesheets/hitobito/customizable/_wagon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -147,23 +147,49 @@ form.report {
-ms-text-overflow: ellipsis;
}

.participation-canton-counts {
@include clearfix;
margin-bottom: 20px;
.participation-canton-counts .fields {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;

.fields div.row.mb-2 {
float: left;
width: 250px;
div label {
width: 43% !important;
}

.control-group {
display: grid;
grid-template-columns: 1fr 1fr;
}

.control-group label {
width: 100% !important;
}
}

@media screen and (max-width: 1012px) {
.participation-canton-counts .fields {
grid-template-columns: 1fr 1fr;
}
}

label {
width: 100px;
@media screen and (max-width: 767px) {
.participation-canton-counts .fields {
grid-template-columns: 1fr;

div label {
width: 20% !important;
text-align: end;
}

div.labeled {
margin-left: 240px;
width: 200px;
}

.control-group {
grid-template-columns: 1fr 5fr;

input {
width: 60px;
div.row {
width: 140px;
}
}
}
}
}
6 changes: 3 additions & 3 deletions app/views/event/course_records/_canton_fields.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
= f.help_inline(muted(t('event.course_records.form.according_to_list',
count: fnumber(suggestion))).html_safe)

.participation-canton-counts{id: "canton_counts_#{attr}", style: 'display: none;'}
.participation-canton-counts.mt-4.mb-5{id: "canton_counts_#{attr}", style: 'display: none;'}
= f.fields_for(cantons_attr) do |nf|
= nf.hidden_field(:id)
- Cantons::SHORT_NAMES.each do |a|
= nf.labeled_input_field(a, help_inline: muted(cantons_suggestion[a.to_s]))

= nf.content_tag(:div, class: 'control-group') do
= f.labeled(t('activerecord.attributes.event/participation_canton_count.undefined'))
= nf.labeled(t('activerecord.attributes.event/participation_canton_count.undefined'))
.controls
.inline  
= f.help_inline(muted(cantons_suggestion['undefined']))
= nf.help_inline(muted(cantons_suggestion['undefined']))

0 comments on commit eef13e9

Please sign in to comment.