Skip to content

Commit 7847bda

Browse files
author
Chris Gårdenberg
committed
fix(Booking page): Fixed so that price recalculation will be done when you click a Discount Card.
fixes #479
1 parent 8cdb8f8 commit 7847bda

11 files changed

Lines changed: 53 additions & 54 deletions

File tree

PLUGIN-CHECKSUM

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7aa718b0dc544ce119e56f705a764880
1+
8cb9d57b0c0acede024cd8c7cc7e3776

content/style/compiled/frontend/bookingPage.css

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@
2222
}
2323
.eduadmin.booking-page form .title .notUserCheck {
2424
text-align: center;
25-
color: hsl(0deg, 0%, 40%);
25+
color: hsl(0, 0%, 40%);
2626
margin: 0 0 56px;
2727
font-size: 0.95rem;
2828
}
2929
.eduadmin.booking-page form .title .notUserCheck a {
3030
margin: 0 0 0 8px;
31-
color: hsl(0deg, 0%, 40%);
31+
color: hsl(0, 0%, 40%);
3232
}
3333
.eduadmin.booking-page form h2 {
34-
color: hsl(0deg, 0%, 20%);
34+
color: hsl(0, 0%, 20%);
3535
font-weight: 600;
3636
margin: 0 0 24px 0;
3737
}
@@ -57,7 +57,7 @@
5757
.eduadmin.booking-page form div.fakeLabel .inputLabel {
5858
display: none;
5959
margin: 0 0 8px;
60-
color: hsl(0deg, 0%, 20%);
60+
color: hsl(0, 0%, 20%);
6161
}
6262
.eduadmin.booking-page form label .inputLabel.noHide,
6363
.eduadmin.booking-page form div.fakeLabel .inputLabel.noHide {
@@ -120,10 +120,10 @@
120120
display: flex;
121121
justify-content: space-between;
122122
align-items: baseline;
123-
color: hsl(0deg, 0%, 20%);
123+
color: hsl(0, 0%, 20%);
124124
}
125125
.eduadmin.booking-page form .participantView h3 .removeParticipant {
126-
color: hsl(0deg, 0%, 40%);
126+
color: hsl(0, 0%, 40%);
127127
font-size: 1rem;
128128
}
129129
.eduadmin.booking-page form .participantView h3 .removeParticipant:hover {
@@ -164,13 +164,13 @@
164164
display: block;
165165
margin: unset;
166166
padding: 10px 20px;
167-
border: 1px solid hsl(0deg, 0%, 67%);
167+
border: 1px solid hsl(0, 0%, 67%);
168168
border-radius: 5px;
169169
cursor: pointer;
170170
text-align: center;
171171
}
172172
.eduadmin.booking-page form .paymentMethodsView li input[type=radio]:checked + label {
173-
background-color: hsl(0deg, 0%, 95%);
173+
background-color: hsl(0, 0%, 95%);
174174
}
175175
.eduadmin.booking-page form .recaptchaView {
176176
margin: 0 0 48px 0;
@@ -192,10 +192,10 @@
192192
display: none;
193193
width: 100%;
194194
padding: 8px 16px;
195-
color: hsl(5deg, 80%, 50%);
195+
color: hsl(5, 80%, 50%);
196196
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
197197
order: -1;
198-
background: hsl(6deg, 100%, 94%);
198+
background: hsl(6, 100%, 94%);
199199
margin: 0 0 16px 0;
200200
border-radius: 3px;
201201
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
@@ -247,13 +247,13 @@
247247
border-bottom-right-radius: 0;
248248
border-bottom-left-radius: 5px;
249249
border-right: 0;
250-
border-bottom: 1px solid hsl(0deg, 0%, 67%);
250+
border-bottom: 1px solid hsl(0, 0%, 67%);
251251
}
252252
.eduadmin.booking-page form .paymentMethodsView li:last-child label {
253253
border-top-left-radius: 0;
254254
border-top-right-radius: 5px;
255255
border-bottom-left-radius: 0;
256256
border-left: 0;
257-
border-top: 1px solid hsl(0deg, 0%, 67%);
257+
border-top: 1px solid hsl(0, 0%, 67%);
258258
}
259259
}

content/style/compiled/frontend/detailView.css

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
padding: 16px 0;
55
}
66
.eduadmin div.title .courseTitle {
7-
color: hsl(0deg, 0%, 30%);
7+
color: hsl(0, 0%, 30%);
88
font-weight: 600;
99
margin: 0;
1010
padding: 0;
@@ -15,11 +15,11 @@
1515
margin: 0 16px 0 0;
1616
}
1717
.eduadmin .textblock {
18-
color: hsl(0deg, 0%, 35%);
18+
color: hsl(0, 0%, 35%);
1919
}
2020
.eduadmin .eventInformation {
2121
margin: 0 0 48px 0;
22-
color: hsl(0deg, 0%, 35%);
22+
color: hsl(0, 0%, 35%);
2323
}
2424
.eduadmin .event-table.eventDays .eventSeparator {
2525
margin-top: 1rem;
@@ -28,10 +28,10 @@
2828
}
2929
.eduadmin .eventItem {
3030
padding: 16px 0;
31-
border-bottom: 1px solid hsl(0deg, 0%, 95%);
31+
border-bottom: 1px solid hsl(0, 0%, 95%);
3232
}
3333
.eduadmin .eventItem:first-child {
34-
border-top: 1px solid hsl(0deg, 0%, 95%);
34+
border-top: 1px solid hsl(0, 0%, 95%);
3535
}
3636
.eduadmin .eventItem:last-child {
3737
border: none;
@@ -51,8 +51,8 @@
5151
align-items: center;
5252
}
5353
.eduadmin .eventItem .eventStatus,
54-
.eduadmin .eventItem .eventDate,
55-
.eduadmin .eventItem .eventCity {
54+
.eduadmin .eventItem .eventDate,
55+
.eduadmin .eventItem .eventCity {
5656
margin: 0;
5757
flex: auto;
5858
}

content/style/compiled/frontend/global.css

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
max-width: 100%;
1616
}
1717
.eduadmin h3 {
18-
color: hsl(0deg, 0%, 35%);
18+
color: hsl(0, 0%, 35%);
1919
font-weight: 600;
2020
}
2121
.eduadmin h1.courseTitle,
@@ -38,31 +38,31 @@
3838
display: inline-block;
3939
box-sizing: border-box;
4040
border-radius: 3px;
41-
border: 1px solid hsl(116deg, 33%, 55%);
42-
background: hsl(120deg, 33%, 50%);
43-
color: hsl(0deg, 0%, 100%);
41+
border: 1px solid hsl(116, 33%, 55%);
42+
background: hsl(120, 33%, 50%);
43+
color: hsl(0, 0%, 100%);
4444
}
4545
.eduadmin .cta-btn:hover {
46-
color: hsl(0deg, 0%, 100%);
47-
background: hsl(116deg, 33%, 55%);
46+
color: hsl(0, 0%, 100%);
47+
background: hsl(116, 33%, 55%);
4848
}
4949
.eduadmin .neutral-btn {
5050
padding: 8px 16px;
5151
display: inline-block;
5252
box-sizing: border-box;
5353
border-radius: 3px;
54-
color: hsl(0deg, 0%, 44%);
54+
color: hsl(0, 0%, 44%);
5555
font-weight: 400;
56-
border: 1px solid hsl(0deg, 0%, 67%);
56+
border: 1px solid hsl(0, 0%, 67%);
5757
background: transparent;
5858
box-shadow: unset;
5959
}
6060
.eduadmin .neutral-btn:hover {
61-
background: hsla(0deg, 0%, 95%, 0.88);
61+
background: hsla(0, 0%, 95%, 0.88);
6262
box-shadow: unset;
6363
}
6464
.eduadmin .neutral-btn.active {
65-
background: hsla(0deg, 0%, 95%, 0.88);
65+
background: hsla(0, 0%, 95%, 0.88);
6666
box-shadow: unset;
6767
}
6868
.eduadmin .search-form {
@@ -130,9 +130,9 @@
130130
.eduadmin .edu-modal.warning {
131131
width: 100%;
132132
padding: 8px 16px;
133-
color: hsl(5deg, 80%, 50%);
133+
color: hsl(5, 80%, 50%);
134134
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
135-
background: hsl(6deg, 100%, 94%);
135+
background: hsl(6, 100%, 94%);
136136
margin: 0 0 16px 0;
137137
border-radius: 3px;
138138
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
@@ -234,7 +234,7 @@
234234
.eduadmin div.fakeLabel .inputLabel {
235235
display: none;
236236
margin: 0 0 8px;
237-
color: hsl(0deg, 0%, 20%);
237+
color: hsl(0, 0%, 20%);
238238
}
239239
.eduadmin label .inputLabel.noHide,
240240
.eduadmin div.fakeLabel .inputLabel.noHide {
@@ -264,13 +264,13 @@
264264
}
265265
@media (min-width: 800px) {
266266
.eduadmin label .inputLabel,
267-
.eduadmin div.fakeLabel .inputLabel {
267+
.eduadmin div.fakeLabel .inputLabel {
268268
display: inherit;
269269
margin: 0;
270270
flex: auto;
271271
}
272272
.eduadmin label .inputHolder,
273-
.eduadmin div.fakeLabel .inputHolder {
273+
.eduadmin div.fakeLabel .inputHolder {
274274
width: 100%;
275275
max-width: 400px;
276276
}
@@ -302,7 +302,7 @@
302302
}
303303
.eduadmin.loginForm form .title .checkEmailForm h3 {
304304
font-weight: normal;
305-
color: hsl(0deg, 0%, 40%);
305+
color: hsl(0, 0%, 40%);
306306
font-style: italic;
307307
font-size: 16px;
308308
margin: 0 0 16px 0;

content/style/compiled/frontend/listProgrammeView.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616

1717
@media (min-width: 800px) {
1818
.eduadmin .programme-list-item,
19-
.eduadmin .programme-header {
19+
.eduadmin .programme-header {
2020
display: flex;
2121
flex-direction: row;
2222
justify-content: space-between;
2323
align-items: center;
2424
}
2525
.eduadmin .programme-list-item > div,
26-
.eduadmin .programme-header > div {
26+
.eduadmin .programme-header > div {
2727
min-width: 25%;
2828
}
2929
}

content/style/compiled/frontend/listView.css

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
.eduadmin .objectItem {
1212
padding: 24px 8px;
13-
border-bottom: 1px solid hsl(0deg, 0%, 95%);
13+
border-bottom: 1px solid hsl(0, 0%, 95%);
1414
}
1515
.eduadmin .objectItem:last-child .objectInfoHolder {
1616
border-bottom: none;
@@ -28,10 +28,10 @@
2828
margin: 0 0 16px 0;
2929
}
3030
.eduadmin .objectItem .objectName a {
31-
color: hsl(0deg, 0%, 30%);
31+
color: hsl(0, 0%, 30%);
3232
}
3333
.eduadmin .objectItem .objectDescription {
34-
color: hsl(0deg, 0%, 35%);
34+
color: hsl(0, 0%, 35%);
3535
margin: 0 0 16px 0;
3636
}
3737
.eduadmin .objectItem .objectDescription .eduadmin-dateText,
@@ -52,11 +52,11 @@
5252
margin: 0 16px 0 0;
5353
}
5454
.eduadmin .objectItem .objectBook a.readMoreButton:not(.cta-btn) {
55-
color: hsl(0deg, 0%, 40%);
55+
color: hsl(0, 0%, 40%);
5656
font-style: italic;
5757
}
5858
.eduadmin .objectItem .objectBook a.readMoreButton:not(.cta-btn):hover {
59-
color: hsl(0deg, 0%, 15%);
59+
color: hsl(0, 0%, 15%);
6060
}
6161
.eduadmin .objectBlock.brick {
6262
width: 100%;
@@ -66,7 +66,7 @@
6666
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
6767
padding: 16px;
6868
border-radius: 3px;
69-
background: hsl(0deg, 0%, 99.5%);
69+
background: hsl(0, 0%, 99.5%);
7070
display: inline-flex;
7171
flex-direction: column;
7272
justify-content: space-between;
@@ -84,10 +84,10 @@
8484
margin: 0 0 16px 0;
8585
}
8686
.eduadmin .objectBlock.brick .objectName a {
87-
color: hsl(0deg, 0%, 30%);
87+
color: hsl(0, 0%, 30%);
8888
}
8989
.eduadmin .objectBlock.brick .objectDescription {
90-
color: hsl(0deg, 0%, 35%);
90+
color: hsl(0, 0%, 35%);
9191
}
9292
.eduadmin .objectBlock.brick .objectDescription .spotsLeft {
9393
display: none;
@@ -135,7 +135,6 @@
135135
.eduadmin .objectItem .readMoreButton {
136136
width: 100%;
137137
}
138-
139138
.eduadmin .course-holder.tmpl_A .objectItem {
140139
align-items: center;
141140
}

content/style/compiled/frontend/profilePage.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.eduadmin .tab_container.tabhead {
2-
border-bottom: 1px solid hsl(0deg, 0%, 82%);
2+
border-bottom: 1px solid hsl(0, 0%, 82%);
33
}
44
.eduadmin .tab_container .tab_item {
55
padding: 5px 10px 4px 10px;
@@ -9,13 +9,13 @@
99
border: 1px solid rgba(0, 0, 0, 0);
1010
}
1111
.eduadmin .tab_container .tab_item:hover {
12-
border: 1px solid hsl(0deg, 0%, 72%);
12+
border: 1px solid hsl(0, 0%, 72%);
1313
border-bottom: 0;
1414
border-top-left-radius: 10px;
1515
border-top-right-radius: 10px;
1616
}
1717
.eduadmin .tab_container .tab_item.active {
18-
border: 1px solid hsl(0deg, 0%, 82%);
18+
border: 1px solid hsl(0, 0%, 82%);
1919
border-bottom: 0;
2020
border-top-left-radius: 10px;
2121
border-top-right-radius: 10px;

content/template/bookingTemplate/limited-discount-view.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
if ( 0 !== count( $c_cards ) ) {
1414
?>
1515
<h2><?php echo esc_html_x( 'Discount cards', 'frontend', 'eduadmin-booking' ); ?></h2>
16-
1716
<?php
1817
foreach ( $c_cards as $card ) {
1918
if ( $card['ValidForNumberOfParticipants'] > 0 ) {
@@ -25,7 +24,7 @@
2524
disabled readonly title="<?php echo esc_attr_x( 'Not enough uses left on this card.', 'frontend', 'eduadmin-booking' ); ?>"
2625
<?php endif; ?>
2726
value="<?php echo esc_attr( $card['VoucherId'] ); ?>"
28-
onchange="eduBookingView.UpdatePrice();" />
27+
onclick="eduBookingView.UpdatePrice();" />
2928
<?php echo esc_html( $card['Description'] ); ?>&nbsp;
3029
<i>(<?php echo esc_html( sprintf( _n( 'Valid for %s participant', 'Valid for %s participants', $card['ValidForNumberOfParticipants'], 'eduadmin-booking' ), $card['ValidForNumberOfParticipants'] ) ); ?>)</i>
3130
</label>

eduadmin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* GitHub Plugin URI: multinetinteractive/eduadmin-wordpress
1414
* GitHub Plugin URI: https://github.com/multinetinteractive/eduadmin-wordpress
1515
* Requires at least: 5.8
16-
* Tested up to: 6.0.0
16+
* Tested up to: 6.3.0
1717
* Requires PHP: 7.0
1818
* Author: Chris Gårdenberg, MultiNet Interactive AB
1919
* Author URI: https://www.multinet.com

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
},
2020
"devDependencies": {
2121
"@types/jquery": "^3.5.14",
22+
"@types/node": "^20.0.0",
2223
"concurrently": "^8.0.1",
2324
"sass": "^1.60.0",
2425
"standard-version": "^9.5.0",

0 commit comments

Comments
 (0)