← All changes
|
app/Services/Integrations/FluentForms/BookingElement.php
+3
-6
1.5.21
→
trunk
View file →
| @@ -15,8 +15,9 @@ | ||
| 15 | 15 | use FluentBooking\App\Services\PermissionManager; |
| 16 | 16 | use FluentBooking\App\Hooks\Handlers\FrontEndHandler; |
| 17 | 17 | use FluentForm\App\Services\FormBuilder\BaseFieldManager; |
| 18 | 18 | use FluentForm\Framework\Helpers\ArrayHelper; |
| 19 | +use FluentBooking\App\Vite; | |
| 19 | 20 | |
| 20 | 21 | class BookingElement extends BaseFieldManager |
| 21 | 22 | { |
| 22 | 23 | /** |
| @@ -154,16 +155,12 @@ | ||
| 154 | 155 | $localizeData['time_format'] = (Helper::getGlobalSettings())['time_format']; |
| 155 | 156 | |
| 156 | 157 | $assetUrl = App::getInstance('url.assets'); |
| 157 | 158 | |
| 158 | - wp_enqueue_script( | |
| 159 | - 'fluentform-calendar-public', | |
| 160 | - $assetUrl . 'public/js/fluentform.js', [], | |
| 161 | - FLUENT_BOOKING_ASSETS_VERSION, true | |
| 162 | - ); | |
| 159 | + Vite::enqueueScript('fluentform-calendar-public', 'ff_public', [], FLUENT_BOOKING_ASSETS_VERSION); | |
| 163 | 160 | |
| 164 | 161 | if (BookingFieldService::hasPhoneNumberField($localizeData['form_fields'])) { |
| 165 | - wp_enqueue_script('fluent-booking-phone-field', $assetUrl . 'public/js/phone-field.js', [], FLUENT_BOOKING_ASSETS_VERSION, true); | |
| 162 | + Vite::enqueueScript('fluent-booking-phone-field', 'phone_field', [], FLUENT_BOOKING_ASSETS_VERSION); | |
| 166 | 163 | ?> |
| 167 | 164 | <style> |
| 168 | 165 | .fcal_phone_wrapper .flag { |
| 169 | 166 | background: url(<?php echo esc_url($assetUrl.'images/flags_responsive.png'); ?>) no-repeat; |