Changeset 2472099
- Timestamp:
- 02/10/2021 03:01:46 AM (5 years ago)
- Location:
- ebecas
- Files:
-
- 1 added
- 6 edited
-
assets/screenshot-2.png (modified) (previous)
-
trunk/admin/Eit_Ebecas_Settings.php (modified) (8 diffs)
-
trunk/eit-ebecas.php (modified) (3 diffs)
-
trunk/includes/Eit_Ebecas_App.php (added)
-
trunk/includes/Eit_Ebecas_Controller.php (modified) (4 diffs)
-
trunk/public/Eit_Ebecas_Student_Portal.php (modified) (6 diffs)
-
trunk/readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ebecas/trunk/admin/Eit_Ebecas_Settings.php
r2469343 r2472099 102 102 'type' => 'text', 103 103 'placeholder' => '', 104 'default' => '', 104 105 ), 105 106 array( … … 109 110 'type' => 'text', 110 111 'placeholder' => '', 112 'default' => '', 111 113 ), 112 114 array( … … 116 118 'type' => 'text', 117 119 'placeholder' => '', 120 'default' => '', 118 121 ), 119 122 array( … … 123 126 'type' => 'text', 124 127 'placeholder' => '', 128 'default' => '', 125 129 ), 126 130 array( … … 138 142 'type' => 'text', 139 143 'placeholder' => '', 144 'default' => '', 140 145 ), 141 146 array( … … 145 150 'type' => 'text', 146 151 'placeholder' => '', 152 'default' => '', 147 153 ), 148 154 array( … … 156 162 ), 157 163 'default' => 'up', 164 ), 165 array( 166 'uid' => EIT_EBECAS_OPTION_PREFIX . 'application_type', 167 'label' => 'Application Type', 168 'section' => 'eit_ebecas_other_setting_section', 169 'type' => 'radio', 170 'options' => array( 171 'personal' => 'Personal Details - Only collect student\'s personal details.', 172 'complete' => 'Complete Application - Personal details with all available products (course, insurance, accommodation, etc.).', 173 ), 174 'default' => 'complete', 158 175 ), 159 176 array( … … 181 198 public function eit_ebecas_field_callback( $arguments ) { 182 199 $value = get_option( $arguments['uid'] ); // Get the current value, if there is one 200 if ( ! $value ) { 201 $value = $arguments['default']; // If no value exists, Set to our default 202 } 183 203 184 204 switch ( $arguments['type'] ) { -
ebecas/trunk/eit-ebecas.php
r2469375 r2472099 5 5 Plugin URI: https://ebecas.com.au/wordpress-plugin 6 6 Description: Using this plugin students can submit online application directly from school/college website. Submitted application with student details along with course and other products will be recorded in eBecas for further processing. 7 Version: 3.0. 07 Version: 3.0.1 8 8 Requires at least: 5.3 9 9 Requires PHP: 7.0 … … 35 35 define( 'EIT_EBECAS_PLUGIN', __FILE__ ); 36 36 37 define( 'EIT_EBECAS_VERSION', '3.0. 0' );37 define( 'EIT_EBECAS_VERSION', '3.0.1' ); 38 38 39 39 define( 'EIT_EBECAS_REQUIRED_WP_VERSION', '5.3' ); … … 80 80 require_once EIT_EBECAS_PLUGIN_INCLUDES_DIR . '/Eit_Ebecas_Email_Verification.php'; 81 81 82 // ebecas app general class 83 require_once EIT_EBECAS_PLUGIN_INCLUDES_DIR . '/Eit_Ebecas_App.php'; 84 82 85 // admin option settings 83 86 require_once EIT_EBECAS_PLUGIN_ADMIN_DIR . '/Eit_Ebecas_Settings.php'; -
ebecas/trunk/includes/Eit_Ebecas_Controller.php
r2467608 r2472099 141 141 '<p>Below are your application details for future reference.<br/></p>' . 142 142 '<p>Student ID: ' . $offer['StudentId'] . '<br/>' . 143 'Application Number: ' . $offer['OfferId'] . '</p>' . 144 '<table border="1" class = "eit_ebecas_th_des"><thead><tr>' . 143 'Application Number: ' . $offer['OfferId'] . '</p>'; 144 145 $table = '<table border="1" class = "eit_ebecas_th_des"><thead><tr>' . 145 146 '<th>Description</th>' . 146 147 '<th>Amount</th>' . … … 151 152 $tax += $item['Tax']; 152 153 153 $ html.= '<tr>' .154 $table .= '<tr>' . 154 155 '<td>' . $item['Description'] . '<br/><small><i>' . $item['ValidationMessage'] . '</i></small></td>' . 155 156 '<td>$' . $item['Amount'] . '</td>' . … … 158 159 159 160 $tax_description = $tax ? '(Includes $' . $tax . ' Tax)' : ''; 160 $ html.= '<tr>' .161 $table .= '<tr>' . 161 162 '<td>Application Total ' . $tax_description . '</td>' . 162 163 '<td>$' . $amount . '</td>' . 163 164 '</tr>' . 164 165 '</tbody></table>'; 166 167 if ($amount) { 168 $html .= $table; 169 } 165 170 166 171 return $html; … … 203 208 $dob = sanitize_text_field( $_POST["eit_ebecas_dob"] ); 204 209 $mobile = sanitize_text_field( $_POST["eit_ebecas_mobile"] ); 205 $course = (int) filter_var( $_POST["eit_ebecas_course"], FILTER_SANITIZE_NUMBER_INT ); 206 207 if ( empty( $first_name ) || empty( $last_name ) || empty( $email ) || empty($dob) || empty($mobile) || empty( $course ) ) { 210 211 if ( empty( $first_name ) || empty( $last_name ) || empty( $email ) || empty($dob) || empty($mobile) ) { 208 212 $reg_errors->add( 'field', 'Required form fields are missing.' ); 209 213 } -
ebecas/trunk/public/Eit_Ebecas_Student_Portal.php
r2467512 r2472099 9 9 class Eit_Ebecas_Student_Portal { 10 10 private $eit_ebecas_api = null; 11 const APPLICATION_STATUS_UP = 'up'; 12 const APPLICATION_STATUS_DOWN = 'down'; 11 public $type = null; 13 12 14 13 public function __construct() { … … 22 21 //get the attribute_escape 23 22 $atts = shortcode_atts( 24 array( ),23 array( 'type' => Eit_Ebecas_App::application_type() ), 25 24 $atts, 26 25 EIT_EBECAS_SHORTCODE 27 26 ); 27 28 // personal or complete 29 $this->type = $atts['type']; 28 30 29 31 ob_start(); … … 37 39 // 'up' - Allowing students to submit application. 38 40 // 'down' - Unavailable 39 if ( get_option( EIT_EBECAS_OPTION_PREFIX . 'application_status' ) == self::APPLICATION_STATUS_UP) {41 if ( Eit_Ebecas_App::is_application_status_up() ) { 40 42 $courses_exist = $this->check_courses(); 41 43 $api_status = $this->eit_ebecas_api->is_api_up(); 42 if ( ! $courses_exist && $api_status ) {43 echo $message;44 }45 44 46 45 if ( ! $api_status ) { … … 50 49 "Please check back soon." . 51 50 "</p>"; 51 52 return ob_get_clean(); 52 53 } 53 54 54 if ( $courses_exist && $api_status ) { 55 $this->get_form_html(); 55 // if it's a complete application then we need published courses 56 if ( $this->type == Eit_Ebecas_App::APPLICATION_TYPE_COMPLETE && ! $courses_exist ) { 57 echo $message; 58 59 return ob_get_clean(); 56 60 } 57 } else { 58 echo $message; 59 } 61 62 // get the html application form 63 $this->get_form_html(); 64 65 return ob_get_clean(); 66 } 67 68 echo $message; 60 69 61 70 return ob_get_clean(); … … 156 165 157 166 protected function get_form_html() { 158 $locationSelect = $this->get_locations_select();159 167 $countrySelect = $this->get_country_select(); 160 168 $languageSelect = $this->get_language_select(); … … 213 221 . '<p id="eit_ebecas_country">' . $countrySelect . '</p>' 214 222 215 . '<p id="eit_ebecas_language">' . $languageSelect . '</p>' 216 217 . '<p id="eit-location-select">' . $locationSelect . '</p>' 218 219 . '<p id="eit_ebecas_course"></p>' 220 221 . '<p id="eit_ebecas_insurance"></p>' 222 223 . '<p id="eit_ebecas_accommodation"></p>' 224 225 . '<p id="eit_ebecas_arrangement"></p>' 226 227 . '<p id="eit_ebecas_airport_pickup"></p>' 228 229 . '<p id="eit_ebecas_airport_dropoff"></p>' 230 231 . '<p id="eit_ebecas_others"></p>' 232 233 .'<div class = "wrap-eit-ebecas-input bg1">' 234 . '<label for="eit_ebecas_application_details">Additional Application Details</label>' 223 . '<p id="eit_ebecas_language">' . $languageSelect . '</p>'; 224 225 if ( $this->type == Eit_Ebecas_App::APPLICATION_TYPE_COMPLETE ) { 226 $form .= '<p id="eit-location-select">' . $this->get_locations_select() . '</p>' 227 228 . '<p id="eit_ebecas_course"></p>' 229 230 . '<p id="eit_ebecas_insurance"></p>' 231 232 . '<p id="eit_ebecas_accommodation"></p>' 233 234 . '<p id="eit_ebecas_arrangement"></p>' 235 236 . '<p id="eit_ebecas_airport_pickup"></p>' 237 238 . '<p id="eit_ebecas_airport_dropoff"></p>' 239 240 . '<p id="eit_ebecas_others"></p>'; 241 } 242 243 $form .= '<div class = "wrap-eit-ebecas-input bg1">' 244 . '<label for="eit_ebecas_application_details">Additional Details</label>' 235 245 . '<textarea name="eit_ebecas_application_details" rows="5"></textarea>' 236 246 .'</div>' -
ebecas/trunk/readme.txt
r2469375 r2472099 5 5 Requires at least: 5.3 6 6 Tested up to: 5.6 7 Stable tag: 3.0. 07 Stable tag: 3.0.1 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 34 34 1. Register a new site by clicking on the "+" sign in the Admin Console. 35 35 1. Fill the form, select "reCAPTCHA v3" as reCAPTCHA Type and add your website in the Domains Section, then click on Submit button. 36 1. Copy "Site Key" and "Secret Key" in the eBecas plugin integration page "reCAPTCHA Settings" section.36 1. Copy "Site Key" and "Secret Key" in "reCAPTCHA Settings" section in eBECAS plugin integration page 37 37 38 38 = How to temporary stop accepting online application? = … … 41 41 42 42 When you are ready to start accepting online application you can set the "Application Status" flag to "Up - Allowing students to submit application". 43 44 = Personal Details or Complete Application type selection? = 45 46 In the eBecas integration page you can set the "Application Type" flag to 47 1. "Personal Details - Only collect student's personal details." or 48 1. "Complete Application - Personal details with all available products (course, insurance, accommodation, etc.)" 43 49 44 50 = Can i share my eBecas API Key and API Secret with others? = … … 71 77 == Installation == 72 78 73 1. Upload the entire `e it-ebecas` folder to the `/wp-content/plugins/` directory.79 1. Upload the entire `ebecas` folder to the `/wp-content/plugins/` directory. 74 80 1. Activate the plugin through the **Plugins** screen (**Plugins > Installed Plugins**). 75 81 … … 113 119 114 120 == Changelog == 121 = 3.0.1 = 122 * Added option to choose between 'Personal Details only' or 'Complete Application' type 115 123 116 124 = 3.0.0 =
Note: See TracChangeset
for help on using the changeset viewer.