File tree 9 files changed +47
-8
lines changed
9 files changed +47
-8
lines changed Original file line number Diff line number Diff line change @@ -110,13 +110,13 @@ def _clean_benefits(self, cleaned_data):
110
110
if not package :
111
111
raise forms .ValidationError (
112
112
_ (
113
- "The application has 1 or more package only benefits and no package."
113
+ "The application has 1 or more package only benefits and no sponsor package."
114
114
)
115
115
)
116
116
elif not benefit .packages .filter (id = package .id ).exists ():
117
117
raise forms .ValidationError (
118
118
_ (
119
- "The application has 1 or more package only benefits but wrong package."
119
+ "The application has 1 or more package only benefits but wrong sponsor package."
120
120
)
121
121
)
122
122
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ class Meta(OrderedModel.Meta):
32
32
33
33
def has_user_customization (self , benefits ):
34
34
"""
35
- Given a list of benefits this method checks if it exclusively matches the package benefits
35
+ Given a list of benefits this method checks if it exclusively matches the sponsor package benefits
36
36
"""
37
37
pkg_benefits_with_conflicts = set (self .benefits .with_conflicts ())
38
38
@@ -113,7 +113,7 @@ class SponsorshipBenefit(OrderedModel):
113
113
)
114
114
package_only = models .BooleanField (
115
115
default = False ,
116
- verbose_name = "Package Only Benefit" ,
116
+ verbose_name = "Sponsor Package Only Benefit" ,
117
117
help_text = "If a benefit is only available via a sponsorship package, select this option." ,
118
118
)
119
119
new = models .BooleanField (
@@ -158,7 +158,7 @@ class SponsorshipBenefit(OrderedModel):
158
158
)
159
159
160
160
NEW_MESSAGE = "New benefit this year!"
161
- PACKAGE_ONLY_MESSAGE = "This benefit is only available with packages "
161
+ PACKAGE_ONLY_MESSAGE = "Benefit only available as part of a sponsor package "
162
162
NO_CAPACITY_MESSAGE = "This benefit is currently at capacity"
163
163
164
164
@property
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ def test_package_only_benefit_without_package_should_not_validate(self):
101
101
form = SponsorshiptBenefitsForm (data = data )
102
102
self .assertFalse (form .is_valid ())
103
103
self .assertIn (
104
- "The application has 1 or more package only benefits and no package." ,
104
+ "The application has 1 or more package only benefits and no sponsor package." ,
105
105
form .errors ["__all__" ],
106
106
)
107
107
@@ -118,7 +118,7 @@ def test_package_only_benefit_with_wrong_package_should_not_validate(self):
118
118
form = SponsorshiptBenefitsForm (data = data )
119
119
self .assertFalse (form .is_valid ())
120
120
self .assertIn (
121
- "The application has 1 or more package only benefits but wrong package." ,
121
+ "The application has 1 or more package only benefits but wrong sponsor package." ,
122
122
form .errors ["__all__" ],
123
123
)
124
124
Original file line number Diff line number Diff line change @@ -65,4 +65,9 @@ $(document).ready(function(){
65
65
}
66
66
} ) ;
67
67
} ) ;
68
+
69
+ $ ( document ) . tooltip ( {
70
+ show : { effect : "blind" , duration : 0 } ,
71
+ hide : false
72
+ } ) ;
68
73
} ) ;
Original file line number Diff line number Diff line change @@ -3618,13 +3618,18 @@ span.highlighted {
3618
3618
font-style : italic; }
3619
3619
3620
3620
/* ! ===== SPONSORSHIP APP ===== */
3621
+ .ui-tooltip-content {
3622
+ font-size : 75% ; }
3623
+
3621
3624
# sponsorship_application_container {
3622
3625
display : block;
3623
3626
text-align : center;
3624
3627
display : block;
3625
3628
text-align : center; }
3626
3629
# sponsorship_application_container form {
3627
3630
margin-bottom : 0 ; }
3631
+ # sponsorship_application_container form .package_only_label {
3632
+ color : # 666666 ; }
3628
3633
# sponsorship_application_container # package_selection {
3629
3634
display : inline-block; }
3630
3635
# sponsorship_application_container # package_selection li {
Original file line number Diff line number Diff line change @@ -2395,12 +2395,21 @@ span.highlighted {
2395
2395
@import " fonts" ;
2396
2396
2397
2397
/* ! ===== SPONSORSHIP APP ===== */
2398
+ .ui-tooltip-content {
2399
+ font-size : 75% ;
2400
+ }
2401
+
2398
2402
#sponsorship_application_container {
2403
+
2399
2404
display : block ;
2400
2405
text-align : center ;
2401
2406
2402
2407
form {
2403
2408
margin-bottom : 0 ;
2409
+
2410
+ .package_only_label {
2411
+ color : $grey ;
2412
+ }
2404
2413
}
2405
2414
2406
2415
#package_selection {
Original file line number Diff line number Diff line change 9
9
< meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
10
10
11
11
< link rel ="prefetch " href ="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js ">
12
+ < link rel ="prefetch " href ="//ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js ">
12
13
13
14
< meta name ="application-name " content ="{{ SITE_INFO.site_name }} ">
14
15
< meta name ="msapplication-tooltip " content ="{{ SITE_INFO.site_descript }} ">
37
38
{# equivalent to: #}
38
39
{#<link rel="stylesheet" href="{{ STATIC_URL }}stylesheets/no-mq.css" media="screen">#}
39
40
<![endif]-->
41
+ < link rel ="stylesheet " href ="//ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css ">
40
42
41
43
{# Place icon files in the root if possible (let browsers look for them where they expect them to be) #}
42
44
< link rel ="icon " type ="image/x-icon " href ="{{ STATIC_URL }}favicon.ico ">
@@ -327,6 +329,8 @@ <h1 class="site-headline">
327
329
{% block javascript %}
328
330
< script src ="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js "> </ script >
329
331
< script > window . jQuery || document . write ( '<script src="{{ STATIC_URL }}js/libs/jquery-1.8.2.min.js"><\/script>' ) </ script >
332
+ < script src ="//ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js "> </ script >
333
+ < script > window . jQuery || document . write ( '<script src="{{ STATIC_URL }}js/libs/jquery-ui-1.12.1.min.js"><\/script>' ) </ script >
330
334
331
335
< script src ="{{ STATIC_URL }}js/libs/masonry.pkgd.min.js "> </ script >
332
336
< script src ="{{ STATIC_URL }}js/libs/html-includes.js "> </ script >
Original file line number Diff line number Diff line change 41
41
< div >
42
42
< span > < i class ="fa fa-cubes "> </ i > {{ benefit_model.PACKAGE_ONLY_MESSAGE }}</ span >
43
43
{% if capacities_met %}< span > < i class ="fa fa-close "> </ i > {{ benefit_model.NO_CAPACITY_MESSAGE }}</ span > {% endif %}
44
+ < br />
45
+ < span > < i class ="fa fa-info "> </ i > Hover over benefit for details</ span >
44
46
</ div >
45
47
</ div >
46
48
@@ -53,7 +55,8 @@ <h3 class="title">{{ field.label }}</h3>
53
55
< li class ="{% cycle '' 'highlight' %} ">
54
56
< label for ="id_{{field.name}}_{{ forloop.counter0 }} " benefit_id ="{{ benefit.id }} ">
55
57
< 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 %} >
56
- < span {% if benefit.description %}title ="{{ benefit.description }} "{% endif %} > {{ benefit.name }}</ span >
58
+ < span {% if benefit.package_only %} class ='package_only_label '{% endif %} > {{ benefit.name }}</ span >
59
+ {% if benefit.description %}< i class ="fa fa-info " title ="{{ benefit.description }} "> </ i > {% endif %}
57
60
{% if benefit.package_only %}< i class ="fa fa-cubes " title ="{{ benefit_model.PACKAGE_ONLY_MESSAGE }} "> </ i > {% endif %}
58
61
{% if not benefit.has_capacity %}< i class ="fa fa-close " title ="{{ benefit_model.NO_CAPACITY_MESSAGE }} "> </ i > {% endif %}
59
62
</ label >
You can’t perform that action at this time.
0 commit comments