Skip to content

Commit 3ddafd6

Browse files
authored
Merge pull request #208 from MultinetInteractive/master
- add: Better civregno-check for contact persons if the course requir…
2 parents dbb4e57 + f3937e2 commit 3ddafd6

5 files changed

Lines changed: 11 additions & 3 deletions

File tree

content/script/frontendjs.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ var eduBookingView = {
66
ContactPerson: null,
77
Participants: [],
88
SingleParticipant: false,
9+
ForceContactCivicRegNo: false,
910
MaxParticipants: 0,
1011
CurrentParticipants: 0,
1112
DiscountPercent: 0,
@@ -104,6 +105,9 @@ var eduBookingView = {
104105
document.querySelector('.contactMobile').value = cMobile;
105106
var tCivReg = document.querySelector('.contactCivReg');
106107
if (tCivReg) {
108+
if(this.ForceContactCivicRegNo) {
109+
tCivReg.required = true;
110+
}
107111
tCivReg.value = document.getElementById('edu-contactCivReg').value;
108112
}
109113

content/template/bookingTemplate/participants/contact-participant.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<?php esc_html_e( 'Civic Registration Number', 'eduadmin-booking' ); ?>
4141
</div>
4242
<div class="inputHolder">
43-
<input type="text" readonly class="contactCivReg" placeholder="<?php esc_attr_e( 'Civic Registration Number', 'eduadmin-booking' ); ?>"/>
43+
<input type="text" readonly data-required="true" class="contactCivReg" placeholder="<?php esc_attr_e( 'Civic Registration Number', 'eduadmin-booking' ); ?>"/>
4444
</div>
4545
</label>
4646
<?php } ?>

content/template/bookingTemplate/template_A.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@
225225
title = title.replace('<?php echo esc_js( $original_title ); ?>', '<?php echo esc_js( $new_title ); ?>');
226226
document.title = title;
227227
eduBookingView.ProgrammeBooking = false;
228+
eduBookingView.ForceContactCivicRegNo = <?php echo( $selected_course['RequireCivicRegistrationNumber'] ? 'true' : 'false' ); ?>;
228229
eduBookingView.MaxParticipants = <?php echo esc_js( intval( $event['ParticipantNumberLeft'] ) ); ?>;
229230
<?php echo get_option( 'eduadmin-singlePersonBooking', false ) ? 'eduBookingView.SingleParticipant = true;' : ''; ?>
230231
eduBookingView.AddParticipant();

eduadmin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Plugin URI: https://www.eduadmin.se
1010
* Description: EduAdmin plugin to allow visitors to book courses at your website
1111
* Tags: booking, participants, courses, events, eduadmin, lega online
12-
* Version: 2.0.26
12+
* Version: 2.0.27
1313
* GitHub Plugin URI: multinetinteractive/eduadmin-wordpress
1414
* GitHub Plugin URI: https://github.com/multinetinteractive/eduadmin-wordpress
1515
* Requires at least: 4.7

readme.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: mnchga
33
Tags: booking, participants, courses, events, eduadmin, lega online
44
Requires at least: 4.7
55
Tested up to: 4.9
6-
Stable tag: 2.0.26
6+
Stable tag: 2.0.27
77
Requires PHP: 5.2
88
License: GPL3
99
License-URI: https://www.gnu.org/licenses/gpl-3.0.en.html
@@ -37,6 +37,9 @@ If you notice that your API key doesn't work any more, you have to contact us.
3737

3838
== Changelog ==
3939

40+
### 2.0.27
41+
- add: Better civregno-check for contact persons if the course requires it.
42+
4043
### 2.0.26
4144
- add: Adding automatic pruning of transients that are expired. (Only from EduAdmin)
4245

0 commit comments

Comments
 (0)