Skip to content

Commit

Permalink
Improve display of inline form elements on narrow screen widths
Browse files Browse the repository at this point in the history
These got jumbled due to some unexpected CSS interactions which
prevented the add element button from working.

Fixes #1510
  • Loading branch information
mikesname committed Jul 22, 2024
1 parent 5424bf9 commit 9de1af7
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 24 deletions.
5 changes: 5 additions & 0 deletions modules/admin/app/assets/css/admin/_admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ body > .admin-content > .flash {
}
}

.inline-remove > a:hover {
text-decoration: none;
cursor: pointer;
}

.address-form,
.concept-description-form {
background-color: $gray-100;
Expand Down
24 changes: 13 additions & 11 deletions modules/admin/app/views/admin/concept/descriptionForm.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@

@views.html.admin.common.descriptionForm(desc, cls = "concept-description-form inline-element") {
<a class="close remove-inline-element" title="@Messages("item.field.remove")" aria-label="@Messages("item.field.remove")" tabindex="-1" href="#">&times;</a>
@choiceInput(desc, LANG_CODE, views.Helpers.languagePairList, '_blank -> true)
@choiceInput(desc, IDENTIFIER, views.Helpers.scriptPairList, '_blank -> true)
@formHelpers.lineInput(desc, PREFLABEL)
@formHelpers.inlineNameSet(desc, ALTLABEL)
@formHelpers.inlineNameSet(desc, HIDDENLABEL)
@formHelpers.inlineTextSet(desc, NOTE)
@formHelpers.inlineTextSet(desc, CHANGENOTE)
@formHelpers.inlineTextSet(desc, EDITORIALNOTE)
@formHelpers.inlineTextSet(desc, HISTORYNOTE)
@formHelpers.inlineTextSet(desc, SCOPENOTE)
@formHelpers.inlineTextSet(desc, DEFINITION, rows = 4)
<div class="concept-description-form-elements">
@choiceInput(desc, LANG_CODE, views.Helpers.languagePairList, '_blank -> true)
@choiceInput(desc, IDENTIFIER, views.Helpers.scriptPairList, '_blank -> true)
@formHelpers.lineInput(desc, PREFLABEL)
@formHelpers.inlineNameSet(desc, ALTLABEL)
@formHelpers.inlineNameSet(desc, HIDDENLABEL)
@formHelpers.inlineTextSet(desc, NOTE)
@formHelpers.inlineTextSet(desc, CHANGENOTE)
@formHelpers.inlineTextSet(desc, EDITORIALNOTE)
@formHelpers.inlineTextSet(desc, HISTORYNOTE)
@formHelpers.inlineTextSet(desc, SCOPENOTE)
@formHelpers.inlineTextSet(desc, DEFINITION, rows = 4)
</div>
}
27 changes: 15 additions & 12 deletions modules/admin/app/views/admin/repository/addressForm.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@

@import Isdiah._
@import views.html.formHelpers._
@import views.html.admin.repository.inlineGeoname

<div class="address-form inline-element">
@formHelpers.hiddenInput(field(Entity.ID))
<a class="close remove-inline-element" title="@Messages("item.field.remove")" aria-label="@Messages("item.field.remove")" tabindex="-1" href="#">&times;</a>
@formHelpers.lineInput(field, ADDRESS_NAME)
@formHelpers.lineInput(field, CONTACT_PERSON)
@inlineGeoname(field, CITY, "city")
@formHelpers.choiceInput(field, COUNTRY_CODE, views.Helpers.countryPairList, '_blank -> true)
@inlineGeoname(field, REGION, "region")
@inlineGeoname(field, POSTAL_CODE, "postal")
@inlineGeoname(field, STREET_ADDRESS, "address")
@inlineNameSet(field, EMAIL)
@inlineNameSet(field, TELEPHONE)
@inlineNameSet(field, FAX)
@inlineNameSet(field, URL)
<div class="address-form-elements">
@formHelpers.hiddenInput(field(Entity.ID))
@formHelpers.lineInput(field, ADDRESS_NAME)
@formHelpers.lineInput(field, CONTACT_PERSON)
@inlineGeoname(field, CITY, "city")
@formHelpers.choiceInput(field, COUNTRY_CODE, views.Helpers.countryPairList, '_blank -> true)
@inlineGeoname(field, REGION, "region")
@inlineGeoname(field, POSTAL_CODE, "postal")
@inlineGeoname(field, STREET_ADDRESS, "address")
@inlineNameSet(field, EMAIL)
@inlineNameSet(field, TELEPHONE)
@inlineNameSet(field, FAX)
@inlineNameSet(field, URL)
</div>
</div>
1 change: 0 additions & 1 deletion modules/portal/app/assets/css/portal/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ ul.pagination {
}

> .inline-remove {
@include make-col-ready();
@include make-col(1);
}
}
Expand Down

0 comments on commit 9de1af7

Please sign in to comment.