Skip to content

Commit 1911074

Browse files
authored
fully handle css for active/package_only labels (#1689)
handle the css class on the same tag to avoid conflicts
1 parent 5d082f2 commit 1911074

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

static/sass/style.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3628,9 +3628,9 @@ span.highlighted {
36283628
text-align: center; }
36293629
#sponsorship_application_container form {
36303630
margin-bottom: 0; }
3631-
#sponsorship_application_container form {
3632-
.package_only_label { color: #666666; }
3633-
.active { color: #3776ab; } }
3631+
#sponsorship_application_container form .package_only { color: #666666; }
3632+
#sponsorship_application_container form .package_only.active { color: #3776ab; }
3633+
#sponsorship_application_container form .active { color: #3776ab; }
36343634
#sponsorship_application_container #package_selection {
36353635
display: inline-block; }
36363636
#sponsorship_application_container #package_selection li {

static/sass/style.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2407,9 +2407,12 @@ span.highlighted {
24072407
form {
24082408
margin-bottom: 0;
24092409

2410-
.package_only_label {
2410+
.package_only {
24112411
color: $grey;
24122412
}
2413+
.package_only.active {
2414+
color: $blue;
2415+
}
24132416
.active {
24142417
color: $blue;
24152418
}

templates/sponsors/sponsorship_benefits_form.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ <h3 class="title">{{ field.label }}</h3>
5353
<ul id="id_{{ field.name }}">
5454
{% for benefit in field.field.queryset %}
5555
<li class="{% cycle '' 'highlight' %}">
56-
<label for="id_{{field.name}}_{{ forloop.counter0 }}" benefit_id="{{ benefit.id }}">
56+
<label for="id_{{field.name}}_{{ forloop.counter0 }}" {% if benefit.package_only %} class='package_only'{% endif %} benefit_id="{{ benefit.id }}">
5757
<input id="id_{{field.name}}_{{ forloop.counter0 }}" name="{{ field.name }}" type="checkbox" value="{{ benefit.id }}" {% if benefit.unavailability_message %}disabled{% endif %} {% if benefit.id in field.initial %}checked{% endif %} {% if benefit.package_only %}package_only='true'{% endif %}>
58-
<span {% if benefit.package_only %} class='package_only_label'{% endif %}>{{ benefit.name }}</span>
58+
<span>{{ benefit.name }}</span>
5959
{% if benefit.description %}<i class="fa fa-info" title="{{ benefit.description }}"></i>{% endif %}
6060
{% if benefit.package_only %}<i class="fa fa-cubes" title="{{ benefit_model.PACKAGE_ONLY_MESSAGE }}"></i>{% endif %}
6161
{% if not benefit.has_capacity %}<i class="fa fa-close" title="{{ benefit_model.NO_CAPACITY_MESSAGE }}"></i>{% endif %}

0 commit comments

Comments
 (0)