| 1 |
<?php |
| 2 |
if(!defined('ABSPATH')){ |
| 3 |
exit; |
| 4 |
} |
| 5 |
|
| 6 |
class booking_package_HTMLElement { |
| 7 |
|
| 8 |
public $prefix = null; |
| 9 |
|
| 10 |
public $plugin_name = null; |
| 11 |
|
| 12 |
public $accountKey = null; |
| 13 |
|
| 14 |
public $visitorSubscriptionForStripe = null; |
| 15 |
|
| 16 |
public $currencies = array(); |
| 17 |
|
| 18 |
public $managementUsersV2 = 1; |
| 19 |
|
| 20 |
public function __construct($prefix, $pluginName, $currencies){ |
| 21 |
|
| 22 |
$this->prefix = $prefix; |
| 23 |
$this->plugin_name = $pluginName; |
| 24 |
$this->currencies = $currencies; |
| 25 |
$this->visitorSubscriptionForStripe = 1; |
| 26 |
|
| 27 |
} |
| 28 |
|
| 29 |
public function setManagementUsersV2($managementUsersV2) { |
| 30 |
|
| 31 |
$this->managementUsersV2 = $managementUsersV2; |
| 32 |
|
| 33 |
} |
| 34 |
|
| 35 |
public function setVisitorSubscriptionForStripe($visitorSubscriptionForStripe){ |
| 36 |
|
| 37 |
$this->visitorSubscriptionForStripe = $visitorSubscriptionForStripe; |
| 38 |
|
| 39 |
} |
| 40 |
|
| 41 |
public function subscription_form($calendarAccount, $memberSetting){ |
| 42 |
|
| 43 |
global $wpdb; |
| 44 |
$pluginName = $this->plugin_name; |
| 45 |
$stripe_active = intval(get_option($this->prefix."stripe_active", 0)); |
| 46 |
if($stripe_active == 0 || intval($calendarAccount['enableSubscriptionForStripe']) == 0){ |
| 47 |
|
| 48 |
#wp_localize_script('booking_app_js', $this->prefix.'subscriptions', array('status' => 0)); |
| 49 |
$html = '<script type="text/javascript">' . "\n"; |
| 50 |
$html .= 'var ' . $this->prefix . 'subscriptions = ' . json_encode(array('status' => 0)) . ';' . "\n"; |
| 51 |
$html .= '</script>' . "\n"; |
| 52 |
return $html; |
| 53 |
|
| 54 |
} |
| 55 |
|
| 56 |
$product = $calendarAccount["subscriptionIdForStripe"]; |
| 57 |
$secret = get_option($this->prefix."stripe_secret_key", 0); |
| 58 |
|
| 59 |
$schedule = new booking_package_schedule($this->prefix, $this->plugin_name, $this->currencies); |
| 60 |
#$subscription = $schedule->getProductForStripe($secret, $product); |
| 61 |
$subscription = $schedule->getProductForStripe($secret, explode(",", $product)); |
| 62 |
|
| 63 |
$items = array(); |
| 64 |
if (isset($memberSetting['subscription_list'])) { |
| 65 |
|
| 66 |
$items = $memberSetting['subscription_list']; |
| 67 |
|
| 68 |
} |
| 69 |
|
| 70 |
foreach ((array) $items as $key => $value) { |
| 71 |
|
| 72 |
$item = $items[$key]; |
| 73 |
if($subscription['product'] == $key && $subscription['product'] == $product){ |
| 74 |
|
| 75 |
$plans = $item['items']; |
| 76 |
for($i = 0; $i < count($plans); $i++){ |
| 77 |
|
| 78 |
if(array_search($plans[$i]['id'], $subscription['planKeys']) !== false){ |
| 79 |
|
| 80 |
$subscription['subscribed'] = 1; |
| 81 |
break; |
| 82 |
|
| 83 |
} |
| 84 |
|
| 85 |
} |
| 86 |
|
| 87 |
} |
| 88 |
|
| 89 |
} |
| 90 |
|
| 91 |
$name = null; |
| 92 |
$amount = null; |
| 93 |
if(is_array($subscription)){ |
| 94 |
|
| 95 |
$name = $subscription['name']; |
| 96 |
$amount = $subscription['amount']; |
| 97 |
#wp_localize_script('booking_app_js', $this->prefix.'subscriptions', $subscription); |
| 98 |
echo '<script type="text/javascript">' . "\n"; |
| 99 |
echo 'var ' . $this->prefix . 'subscriptions = ' . json_encode($subscription) . ';' . "\n"; |
| 100 |
echo '</script>' . "\n"; |
| 101 |
|
| 102 |
}else{ |
| 103 |
|
| 104 |
#wp_localize_script('booking_app_js', $this->prefix.'subscriptions', array('status' => 0)); |
| 105 |
echo '<script type="text/javascript">' . "\n"; |
| 106 |
echo 'var ' . $this->prefix . 'subscriptions = ' . json_encode(array('status' => 0)) . ';' . "\n"; |
| 107 |
echo '</script>' . "\n"; |
| 108 |
|
| 109 |
} |
| 110 |
|
| 111 |
$text = array( |
| 112 |
"Subscription" => 'Subscription', |
| 113 |
"Subscribed_items" => 'Subscribed items', |
| 114 |
"agreeToOur1" => 'By proceeding you agree to our %s.', |
| 115 |
"agreeToOur2" => 'By proceeding you agree to our %s and %s.', |
| 116 |
"termsOfService" => 'Terms of Service', |
| 117 |
"privacyPolicy" => 'Privacy Policy', |
| 118 |
"amount" => '%s per month', |
| 119 |
"Return" => 'Return', |
| 120 |
|
| 121 |
); |
| 122 |
|
| 123 |
$agree = ""; |
| 124 |
if(intval($calendarAccount['enableTermsOfServiceForSubscription']) == 1 && intval($calendarAccount['enablePrivacyPolicyForSubscription']) == 0){ |
| 125 |
|
| 126 |
$termsOfService = '<a target="_blank" href="'.$calendarAccount['termsOfServiceForSubscription'].'">'.$text['termsOfService'].'</a>'; |
| 127 |
$agree = sprintf($text['agreeToOur1'], $termsOfService); |
| 128 |
|
| 129 |
}else if(intval($calendarAccount['enableTermsOfServiceForSubscription']) == 0 && intval($calendarAccount['enablePrivacyPolicyForSubscription']) == 1){ |
| 130 |
|
| 131 |
$privacyPolicy = '<a target="_blank" href="'.$calendarAccount['privacyPolicyForSubscription'].'">'.$text['privacyPolicy'].'</a>'; |
| 132 |
$agree = sprintf($text['agreeToOur1'], $privacyPolicy); |
| 133 |
|
| 134 |
}else if(intval($calendarAccount['enableTermsOfServiceForSubscription']) == 1 && intval($calendarAccount['enablePrivacyPolicyForSubscription']) == 1){ |
| 135 |
|
| 136 |
$termsOfService = '<a target="_blank" href="'.$calendarAccount['termsOfServiceForSubscription'].'">'.$text['termsOfService'].'</a>'; |
| 137 |
$privacyPolicy = '<a target="_blank" href="'.$calendarAccount['privacyPolicyForSubscription'].'">'.$text['privacyPolicy'].'</a>'; |
| 138 |
$agree = sprintf($text['agreeToOur2'], $termsOfService, $privacyPolicy); |
| 139 |
|
| 140 |
} |
| 141 |
|
| 142 |
$html .= <<< EOT |
| 143 |
|
| 144 |
<div id="booking-package-subscription_form" class="hidden_panel"> |
| 145 |
<div class="subscription">{$text["Subscription"]}</div> |
| 146 |
<div id="booking-package-select_subscription"> |
| 147 |
<div class="name">$name</div> |
| 148 |
<div id="booking-package-subscription_amount" class="amount" data-amount="$amount">{$text['amount']}</div> |
| 149 |
</div> |
| 150 |
<div id="booking-package-subscription_input_form"></div> |
| 151 |
<div id="booking-package-agree">$agree</div> |
| 152 |
</div> |
| 153 |
|
| 154 |
<div id="booking-package-subscribed_panel" class="hidden_panel"> |
| 155 |
<div class="titlePanel subscription"> |
| 156 |
<div class="title">{$text["Subscribed_items"]}</div> |
| 157 |
<div id="booking-package-subscribed_return_button" class="material-icons closeButton" style="font-family: 'Material Icons' !important;">close</div> |
| 158 |
</div> |
| 159 |
<div> |
| 160 |
<table> |
| 161 |
<tbody id="booking-package-subscribed_items"></tbody> |
| 162 |
</table> |
| 163 |
</div> |
| 164 |
<div> |
| 165 |
|
| 166 |
</div> |
| 167 |
</div> |
| 168 |
|
| 169 |
EOT; |
| 170 |
|
| 171 |
return $html; |
| 172 |
|
| 173 |
} |
| 174 |
|
| 175 |
public function member_form($user, $member_login_error, $dictionary){ |
| 176 |
|
| 177 |
$user_login = ""; |
| 178 |
$user_email = ""; |
| 179 |
if(isset($user['user_login']) && isset($user['user_email'])){ |
| 180 |
|
| 181 |
$user_login = $user['user_login']; |
| 182 |
$user_email = $user['user_email']; |
| 183 |
|
| 184 |
} |
| 185 |
|
| 186 |
$hidden_panel = ""; |
| 187 |
if($this->visitorSubscriptionForStripe != 1){ |
| 188 |
|
| 189 |
$hidden_panel = "hidden_panel"; |
| 190 |
|
| 191 |
} |
| 192 |
|
| 193 |
$permalink = get_permalink(); |
| 194 |
|
| 195 |
$text = array( |
| 196 |
'Sign Up' => __("Sign Up", 'booking-package'), |
| 197 |
'Username' => __("Username", 'booking-package'), |
| 198 |
'Email' => __("Email", 'booking-package'), |
| 199 |
'Password' => __("Password", 'booking-package'), |
| 200 |
'Registration confirmation will be emailed to you.' => '', |
| 201 |
'Register' => __("Register", 'booking-package'), |
| 202 |
'Return' => __("Return", 'booking-package'), |
| 203 |
'Profile' => __("Profile", 'booking-package'), |
| 204 |
'Status' => __("Status", 'booking-package'), |
| 205 |
'Approved' => __("Approved", 'booking-package'), |
| 206 |
'Change Password' => __("Change Password", 'booking-package'), |
| 207 |
'Update Profile' => __("Update Profile", 'booking-package'), |
| 208 |
'Delete' => __("Delete", 'booking-package'), |
| 209 |
'Subscribed items' => __("Subscribed items", 'booking-package'), |
| 210 |
); |
| 211 |
|
| 212 |
if (empty($dictionary) === false) { |
| 213 |
|
| 214 |
$text['Sign Up'] = $dictionary['Sign Up']; |
| 215 |
$text['Register'] = $dictionary['Register']; |
| 216 |
|
| 217 |
} |
| 218 |
|
| 219 |
if (isset($user['check_email_for_member']) && intval($user['check_email_for_member']) == 0) { |
| 220 |
|
| 221 |
$text['Registration confirmation will be emailed to you.'] = ''; |
| 222 |
|
| 223 |
} |
| 224 |
|
| 225 |
$addUserPanel = '<div id="booking-package-user-form" class="hidden_panel">'; |
| 226 |
$addUserPanel .= ' <div>'; |
| 227 |
$addUserPanel .= ' <div class="titlePanel">'; |
| 228 |
$addUserPanel .= ' <div class="title">' . $text["Sign Up"] . '</div>'; |
| 229 |
$addUserPanel .= ' <div id="booking-package-register_user_return_button" class="material-icons closeButton" style="font-family: \'Material Icons\' !important;">close</div>'; |
| 230 |
$addUserPanel .= ' </div>'; |
| 231 |
$addUserPanel .= ' <div id="addCustomFormFieldPanel" class="">'; |
| 232 |
|
| 233 |
/** |
| 234 |
if ($this->managementUsersV2 === 0) { |
| 235 |
|
| 236 |
$addUserPanel .= ' <div> <label>' . $text['Username'] . '</label> <input type="text" name="booking-package-user_login" id="booking-package-user_login" class="input" value="" size="20"> </div>'; |
| 237 |
$addUserPanel .= ' <div> <label>' . $text['Email'] . '</label> <input type="text" name="booking-package-user_email" id="booking-package-user_email" class="input" value="" size="20"> </div>'; |
| 238 |
$addUserPanel .= ' <div> <label>' . $text['Password'] . '</label> <input type="password" name="booking-package-user_pass" id="booking-package-user_pass" class="input" value="" size="20"> </div>'; |
| 239 |
|
| 240 |
} |
| 241 |
**/ |
| 242 |
|
| 243 |
$addUserPanel .= ' </div>'; |
| 244 |
$addUserPanel .= ' <div id="booking-package-user_regist_message">' . $text["Registration confirmation will be emailed to you."] . '</div>'; |
| 245 |
$addUserPanel .= ' <div id="booking-package-user_regist_error_message" class="login_error hidden_panel"></div>'; |
| 246 |
$addUserPanel .= ' <button id="booking-package-register_user_button" class="register_button">' . $text["Register"] . '</button>'; |
| 247 |
$addUserPanel .= ' </div>'; |
| 248 |
$addUserPanel .= '</div>'; |
| 249 |
|
| 250 |
$editUserPanel = '<div id="booking-package-user-edit-form" class="hidden_panel">'; |
| 251 |
$editUserPanel .= ' <div>'; |
| 252 |
$editUserPanel .= ' <div class="titlePanel">'; |
| 253 |
$editUserPanel .= ' <div class="title">' . $text["Profile"] . '</div>'; |
| 254 |
$editUserPanel .= ' <div id="booking-package-edit_user_return_button" class="material-icons closeButton" style="font-family: \'Material Icons\' !important">close</div>'; |
| 255 |
$editUserPanel .= ' </div>'; |
| 256 |
|
| 257 |
$editUserPanel .= ' <div id="booking-package-tabFrame" class="tabFrame hidden_panel">'; |
| 258 |
$editUserPanel .= ' <div class="menuList ' . $hidden_panel . '">'; |
| 259 |
$editUserPanel .= ' <div id="booking-package-user_profile_tab" class="menuItem active">' . $text["Profile"] . '</div>'; |
| 260 |
$editUserPanel .= ' <div id="booking-package-user_subscribed_tab" class="menuItem">' . $text["Subscribed items"] . '</div>'; |
| 261 |
$editUserPanel .= ' </div>'; |
| 262 |
$editUserPanel .= ' </div>'; |
| 263 |
|
| 264 |
$editUserPanel .= ' <div id="editCustomFormFieldPanel" class="">abc</div>'; |
| 265 |
|
| 266 |
$editUserPanel .= ' <div id="booking-package-user-profile" class="inputPanel">'; |
| 267 |
$editUserPanel .= ' <div> <label>' . $text['Username'] . '</label> <input type="text" name="booking-package-user_edit_login" id="booking-package-user_edit_login" class="input" value="' . $user_login . '" size="20" disabled> </div>'; |
| 268 |
$editUserPanel .= ' <div> <label>' . $text['Email'] . '</label> <input type="text" name="booking-package-user_edit_email" id="booking-package-user_edit_email" class="input" value="' . $user_email . '" size="20"> </div>'; |
| 269 |
$editUserPanel .= ' <div id="booking-package-user_status_field">'; |
| 270 |
$editUserPanel .= ' <label>' . $text["Status"] . '</label>'; |
| 271 |
$editUserPanel .= ' <label> <input type="checkbox" name="booking-package-user_edit_status" id="booking-package-user_edit_status" class="" value="1"> ' . $text["Approved"] . ' </label>'; |
| 272 |
$editUserPanel .= ' </div>'; |
| 273 |
$editUserPanel .= ' <div id="booking-package-edit_password_filed">'; |
| 274 |
$editUserPanel .= ' <label>' . $text["Password"] . '</label>'; |
| 275 |
$editUserPanel .= ' <button id="booking-package-user_edit_change_password_button" class="change_user_password_button">' . $text["Change Password"] . '</button>'; |
| 276 |
$editUserPanel .= ' <input type="password" name="booking-package-user_edit_pass" id="booking-package-user_edit_pass" class="input hidden_panel" value="" size="20">'; |
| 277 |
$editUserPanel .= ' </div>'; |
| 278 |
$editUserPanel .= ' </div>'; |
| 279 |
|
| 280 |
$editUserPanel .= ' <div id="booking-package-user-subscribed" class="inputPanel hidden_panel">'; |
| 281 |
$editUserPanel .= ' <table> <tbody id="booking-package-user_subscribed_tbody"></tbody> </table>'; |
| 282 |
$editUserPanel .= ' </div>'; |
| 283 |
$editUserPanel .= ' <div>'; |
| 284 |
$editUserPanel .= ' <button id="booking-package-edit_user_button" class="update_user_button">' . $text["Update Profile"] . '</button>'; |
| 285 |
$editUserPanel .= ' <button id="booking-package-edit_user_delete_button" class="delete_user_button">' . $text["Delete"] . '</button>'; |
| 286 |
$editUserPanel .= ' </div>'; |
| 287 |
$editUserPanel .= ' </div>'; |
| 288 |
$editUserPanel .= '</div>'; |
| 289 |
$editUserPanel .= '<input type="hidden" id="booking-package-permalink" value="' . $permalink . '">'; |
| 290 |
|
| 291 |
$html = ''; |
| 292 |
if (is_string($member_login_error)) { |
| 293 |
|
| 294 |
$html .= '<div class="member_login_error">'.$member_login_error.'</div>'; |
| 295 |
|
| 296 |
} |
| 297 |
$html .= $addUserPanel; |
| 298 |
$html .= $editUserPanel; |
| 299 |
|
| 300 |
$html .= <<< EOT |
| 301 |
|
| 302 |
<!-- |
| 303 |
<div id="booking-package-user-form" class="hidden_panel"> |
| 304 |
<div> |
| 305 |
<div class="titlePanel"> |
| 306 |
<div class="title">{$text["Sign Up"]}</div> |
| 307 |
<div id="booking-package-register_user_return_button" class="material-icons closeButton" style="font-family: 'Material Icons' !important;">close</div> |
| 308 |
</div> |
| 309 |
<div class="inputPanel"> |
| 310 |
|
| 311 |
<div> |
| 312 |
<label>{$text["Username"]}</label> |
| 313 |
<input type="text" name="booking-package-user_login" id="booking-package-user_login" class="input" value="" size="20"> |
| 314 |
</div> |
| 315 |
<div> |
| 316 |
<label>{$text["Email"]}</label> |
| 317 |
<input type="text" name="booking-package-user_email" id="booking-package-user_email" class="input" value="" size="20"> |
| 318 |
</div> |
| 319 |
<div> |
| 320 |
<label>{$text["Password"]}</label> |
| 321 |
<input type="password" name="booking-package-user_pass" id="booking-package-user_pass" class="input" value="" size="20"> |
| 322 |
</div> |
| 323 |
|
| 324 |
<div id='addCustomFormFieldPanel'></div> |
| 325 |
<div id="booking-package-user_regist_message">{$text["Registration confirmation will be emailed to you."]}</div> |
| 326 |
<div id="booking-package-user_regist_error_message" class="login_error hidden_panel"></div> |
| 327 |
|
| 328 |
</div> |
| 329 |
<button id="booking-package-register_user_button" class="register_button">{$text["Register"]}</button> |
| 330 |
</div> |
| 331 |
</div> |
| 332 |
--> |
| 333 |
|
| 334 |
<!-- |
| 335 |
<div id="booking-package-user-edit-form" class="hidden_panel"> |
| 336 |
<div> |
| 337 |
<div class="titlePanel"> |
| 338 |
<div class="title">{$text["Profile"]}</div> |
| 339 |
<div id="booking-package-edit_user_return_button" class="material-icons closeButton" style="font-family: 'Material Icons' !important">close</div> |
| 340 |
</div> |
| 341 |
<div id="booking-package-tabFrame" class="tabFrame hidden_panel"> |
| 342 |
<div class="menuList $hidden_panel"> |
| 343 |
<div id="booking-package-user_profile_tab" class="menuItem active">{$text["Profile"]}</div> |
| 344 |
<div id="booking-package-user_subscribed_tab" class="menuItem">{$text["Subscribed items"]}</div> |
| 345 |
</div> |
| 346 |
</div> |
| 347 |
<div id="booking-package-user-profile" class="inputPanel"> |
| 348 |
<div> |
| 349 |
<label>{$text["Username"]}</label> |
| 350 |
<input type="text" name="booking-package-user_edit_login" id="booking-package-user_edit_login" class="input" value="$user_login" size="20" disabled> |
| 351 |
</div> |
| 352 |
<div> |
| 353 |
<label>{$text["Email"]}</label> |
| 354 |
<input type="text" name="booking-package-user_edit_email" id="booking-package-user_edit_email" class="input" value="$user_email" size="20"> |
| 355 |
</div> |
| 356 |
<div id="booking-package-user_status_field"> |
| 357 |
<label>{$text["Status"]}</label> |
| 358 |
<label> |
| 359 |
<input type="checkbox" name="booking-package-user_edit_status" id="booking-package-user_edit_status" class="" value="1"> |
| 360 |
{$text["Approved"]} |
| 361 |
</label> |
| 362 |
</div> |
| 363 |
<div id="booking-package-edit_password_filed"> |
| 364 |
<label>{$text["Password"]}</label> |
| 365 |
<button id="booking-package-user_edit_change_password_button" class="change_user_password_button">{$text["Change Password"]}</button> |
| 366 |
<input type="password" name="booking-package-user_edit_pass" id="booking-package-user_edit_pass" class="input hidden_panel" value="" size="20"> |
| 367 |
</div> |
| 368 |
</div> |
| 369 |
<div id="booking-package-user-subscribed" class="inputPanel hidden_panel"> |
| 370 |
<table> |
| 371 |
<tbody id="booking-package-user_subscribed_tbody"></tbody> |
| 372 |
</table> |
| 373 |
</div> |
| 374 |
<div> |
| 375 |
<button id="booking-package-edit_user_button" class="update_user_button">{$text["Update Profile"]}</button> |
| 376 |
<button id="booking-package-edit_user_delete_button" class="delete_user_button">{$text["Delete"]}</button> |
| 377 |
|
| 378 |
</div> |
| 379 |
</div> |
| 380 |
</div> |
| 381 |
<input type="hidden" id="booking-package-permalink" value="$permalink"> |
| 382 |
--> |
| 383 |
|
| 384 |
EOT; |
| 385 |
|
| 386 |
return $html; |
| 387 |
|
| 388 |
} |
| 389 |
|
| 390 |
public function cancelBookingDetailsForVisitor_panel($dictionary) { |
| 391 |
|
| 392 |
$text = array( |
| 393 |
'Booking Details' => $dictionary["Booking Details"], |
| 394 |
'Return to Calendar' => __("Return to Calendar", 'booking-package'), |
| 395 |
'Cancel Booking' => $dictionary["Cancel Booking"], |
| 396 |
); |
| 397 |
|
| 398 |
$html = <<< EOT |
| 399 |
<div id="booking-package_myBookingDetailsFroVisitor" class="hidden_panel"> |
| 400 |
<div class="titlePanel"> |
| 401 |
<div class="title selectedDate">{$text["Booking Details"]}</div> |
| 402 |
</div> |
| 403 |
<div class="buttonPanel"> |
| 404 |
<div id="myPersonalDetails" class="myPersonalDetails row" style="border-width: 0;"></div> |
| 405 |
<!-- |
| 406 |
<button class="returnButton">{$text["Return to Calendar"]}</button> |
| 407 |
<button class="cancelButton">{$text["Cancel Booking"]}</button> |
| 408 |
--> |
| 409 |
</div> |
| 410 |
</div> |
| 411 |
|
| 412 |
EOT; |
| 413 |
|
| 414 |
return $html; |
| 415 |
|
| 416 |
} |
| 417 |
|
| 418 |
|
| 419 |
public function myBookingHistory_panel($dictionary) { |
| 420 |
|
| 421 |
$text = array( |
| 422 |
'Booking History' => $dictionary['Booking History'], |
| 423 |
'Return to Calendar' => __("Return to Calendar", 'booking-package'), |
| 424 |
'Cancel Booking' => __("Cancel Booking", 'booking-package'), |
| 425 |
'ID' => __("ID", 'booking-package'), |
| 426 |
"Booking Date" => $dictionary['Booking Date'], |
| 427 |
"Calendar" => $dictionary['Calendar'], |
| 428 |
"Status" => $dictionary['Status'], |
| 429 |
); |
| 430 |
|
| 431 |
$html = <<< EOT |
| 432 |
<div id="booking-package_myBookingHistory" class="hidden_panel"> |
| 433 |
<div class="titlePanel"> |
| 434 |
<div class="title">{$text["Booking History"]}</div> |
| 435 |
<div id="booking-package-bookingHistory_close_button" class="material-icons closeButton" style="font-family: 'Material Icons' !important;">close</div> |
| 436 |
</div> |
| 437 |
<div> |
| 438 |
<table id="booking-package_myBookingHistoryTable"> |
| 439 |
<tr data-head="th"> |
| 440 |
<th>{$text["ID"]}</th> |
| 441 |
<th>{$text["Booking Date"]}</th> |
| 442 |
<th>{$text["Calendar"]}</th> |
| 443 |
<th>{$text["Status"]}</th> |
| 444 |
</tr> |
| 445 |
</table> |
| 446 |
</div> |
| 447 |
<div class="buttonPanel"> |
| 448 |
|
| 449 |
<button id="booking-package-bookingHistory_returnButton" class="material-icons left_arrow_button" style="font-family: 'Material Icons' !important;">navigate_before</button> |
| 450 |
<button id="booking-package-bookingHistory_nextButton" class="material-icons right_arrow_button" style="font-family: 'Material Icons' !important;">navigate_next</button> |
| 451 |
|
| 452 |
</div> |
| 453 |
</div> |
| 454 |
|
| 455 |
EOT; |
| 456 |
|
| 457 |
return $html; |
| 458 |
|
| 459 |
} |
| 460 |
|
| 461 |
public function myBookingDetails_panel($dictionary) { |
| 462 |
|
| 463 |
$text = array( |
| 464 |
'Booking History' => $dictionary["Booking History"], |
| 465 |
'Return to Calendar' => __("Return to Calendar", 'booking-package'), |
| 466 |
'Cancel Booking' => $dictionary["Cancel Booking"], |
| 467 |
'Booking Details' => $dictionary["Booking Details"], |
| 468 |
'ID' => __("ID", 'booking-package'), |
| 469 |
"Booking Date" => __("Booking Date", 'booking-package'), |
| 470 |
"Status" => __("Status", 'booking-package'), |
| 471 |
"Return" => $dictionary["Return"], |
| 472 |
); |
| 473 |
|
| 474 |
$html = <<< EOT |
| 475 |
<div id="booking-package_myBookingDetails" class="hidden_panel"> |
| 476 |
<div class="titlePanel"> |
| 477 |
<div class="title">{$text["Booking Details"]}</div> |
| 478 |
<div id="booking-package-myBookingDetails_close_button" class="material-icons closeButton" style="font-family: 'Material Icons' !important;">close</div> |
| 479 |
</div> |
| 480 |
<div id="booking-package_myBookingDetails_panel"> |
| 481 |
|
| 482 |
</div> |
| 483 |
<div class="buttonPanel"> |
| 484 |
|
| 485 |
<button id="booking-package-myBookingDetails_returnButton" class="returnButton">{$text["Return"]}</button> |
| 486 |
<button id="booking-package-cancelThisBooking" class="cancel_user_booking_button">{$text["Cancel Booking"]}</button> |
| 487 |
|
| 488 |
</div> |
| 489 |
</div> |
| 490 |
|
| 491 |
EOT; |
| 492 |
|
| 493 |
return $html; |
| 494 |
|
| 495 |
} |
| 496 |
|
| 497 |
} |
| 498 |
|
| 499 |
?> |