diff --git a/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl b/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl index 20ed2c0d3..ab2958a66 100644 --- a/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl +++ b/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl @@ -628,56 +628,73 @@ - {if isset($hotel_selected_amenities)} -
- -
- -
+
+ +
+
- + } + } + + $(document).on('click', '#hotel-amenities-tree :input[type="checkbox"]', function () { + setTimeout(syncFeaturedSelect, 0); + }); + + $(document).on('click', '#check-all-hotel-amenities-tree, #uncheck-all-hotel-amenities-tree', function () { + setTimeout(syncFeaturedSelect, 0); + }); + + $('a[href="#hotel-features"]').on('shown.bs.tab', function () { + syncFeaturedSelect(); + if (!chosenReady) { + $select.chosen({ disable_search_threshold: 5, search_contains: true }); + chosenReady = true; + } else { + $select.trigger('chosen:updated'); + } + }); + + $(document).ready(function () { + syncFeaturedSelect(); + }); + }(jQuery)); + {/if} {elseif isset($hotel_info.id) && $hotel_info.id}
@@ -776,4 +793,4 @@ }); }); -{/block} +{/block} \ No newline at end of file