{"id":9470,"date":"2025-01-18T16:01:39","date_gmt":"2025-01-18T16:01:39","guid":{"rendered":"https:\/\/discoverpuerto.es\/nouveau-lieu\/"},"modified":"2026-01-17T21:21:52","modified_gmt":"2026-01-17T21:21:52","slug":"nouveau-lieu","status":"publish","type":"page","link":"https:\/\/discoverpuerto.es\/fr\/nouveau-lieu\/","title":{"rendered":"Nouveau lieu"},"content":{"rendered":"\r\n<section class=\"golo-place-multi-step \">\r\n        <div class=\"golo-steps\">\r\n        <div class=\"listing-menu nav-scroll\">\r\n            <ul>\r\n                \r\n                                            <li class=\"active\">\r\n                            <a href=\"#general\" title=\"General\">\r\n                                <span class=\"icon\"><i class=\"la la-cog\"><\/i><\/span>\r\n                                <span>General<\/span>\r\n                            <\/a>\r\n                        <\/li>\r\n                    \r\n                \r\n                                            <li >\r\n                            <a href=\"#hightlights\" title=\"Highlights\">\r\n                                <span class=\"icon\"><i class=\"la la-wifi\"><\/i><\/span>\r\n                                <span>Highlights<\/span>\r\n                            <\/a>\r\n                        <\/li>\r\n                    \r\n                \r\n                    \r\n                \r\n                                            <li >\r\n                            <a href=\"#location\" title=\"Location\">\r\n                                <span class=\"icon\"><i class=\"la la-map-marker\"><\/i><\/span>\r\n                                <span>Location<\/span>\r\n                            <\/a>\r\n                        <\/li>\r\n                    \r\n                \r\n                                            <li >\r\n                            <a href=\"#contact\" title=\"Contact info\">\r\n                                <span class=\"icon\"><i class=\"la la-phone\"><\/i><\/span>\r\n                                <span>Contact info<\/span>\r\n                            <\/a>\r\n                        <\/li>\r\n                    \r\n                \r\n                    \r\n                \r\n                                            <li >\r\n                            <a href=\"#socials\" title=\"Social networks\">\r\n                                <span class=\"icon\"><i class=\"la la-link\"><\/i><\/span>\r\n                                <span>Social networks<\/span>\r\n                            <\/a>\r\n                        <\/li>\r\n                    \r\n                \r\n                                            <li >\r\n                            <a href=\"#time-opening\" title=\"Opening hours\">\r\n                                <span class=\"icon\"><i class=\"la la-business-time\"><\/i><\/span>\r\n                                <span>Opening hours<\/span>\r\n                            <\/a>\r\n                        <\/li>\r\n                    \r\n                \r\n                                            <li >\r\n                            <a href=\"#media\" title=\"Media\">\r\n                                <span class=\"icon\"><i class=\"la la-image\"><\/i><\/span>\r\n                                <span>Media<\/span>\r\n                            <\/a>\r\n                        <\/li>\r\n                    \r\n                \r\n                    \r\n                \r\n                    \r\n                \r\n                                            <li >\r\n                            <a href=\"#coupon\" title=\"Coupon\">\r\n                                <span class=\"icon\"><i class=\"la la-ticket-alt\"><\/i><\/span>\r\n                                <span>Coupon<\/span>\r\n                            <\/a>\r\n                        <\/li>\r\n                    \r\n                            <\/ul>\r\n        <\/div>\r\n    <\/div>\r\n\r\n    <div class=\"golo-steps-content\">\r\n        <h2>Add new place<\/h2>\r\n\r\n        \r\n            <form action=\"#\" method=\"post\" id=\"submit_place_form\" class=\"place-manager-form\" enctype=\"multipart\/form-data\" data-titleerror=\"Please enter place name\" data-deserror=\"Please enter place description\" data-caterror=\"Please choosen category\" data-typeerror=\"Please choosen type\" data-maperror=\"Please enter place address\" data-imgerror=\"Please upload featured image\">\r\n                \r\n                                            <div class=\"group-field\" id=\"general\">\r\n                            <h3>General<\/h3>\r\n                            \r\n    <div class=\"place-fields-wrap\">\r\n        <div class=\"place-fields-title\">\r\n            <h3>Place Name*<\/h3>\r\n        <\/div>\r\n        <div class=\"place-fields place-title\">\r\n            <div class=\"form-group\">\r\n                <input type=\"text\" id=\"place_title\" class=\"form-control\" name=\"place_title\" placeholder=\"What the name of place\" \/>\r\n            <\/div>\r\n        <\/div>\r\n    <\/div>\r\n\r\n\r\n    <div class=\"place-fields-wrap\">\r\n        <div class=\"place-fields-title\">\r\n            <h3>Description<\/h3>\r\n        <\/div>\r\n        <div class=\"place-fields place-description\">\r\n            <div class=\"form-group\">\r\n                <div id=\"wp-place_des-wrap\" class=\"wp-core-ui wp-editor-wrap tmce-active\"><link rel='stylesheet' id='dashicons-css' href='https:\/\/discoverpuerto.es\/wp-includes\/css\/dashicons.min.css?ver=6.9.4' type='text\/css' media='all' \/>\n<link rel='stylesheet' id='editor-buttons-css' href='https:\/\/discoverpuerto.es\/wp-includes\/css\/editor.min.css?ver=6.9.4' type='text\/css' media='all' \/>\n<div id=\"wp-place_des-editor-tools\" class=\"wp-editor-tools hide-if-no-js\"><div class=\"wp-editor-tabs\"><button type=\"button\" id=\"place_des-tmce\" aria-pressed=\"true\" class=\"wp-switch-editor switch-tmce\" data-wp-editor-id=\"place_des\">Visuel<\/button>\n<button type=\"button\" id=\"place_des-html\" class=\"wp-switch-editor switch-html\" data-wp-editor-id=\"place_des\">Code<\/button>\n<\/div>\n<\/div>\n<div id=\"wp-place_des-editor-container\" class=\"wp-editor-container\"><div id=\"qt_place_des_toolbar\" class=\"quicktags-toolbar hide-if-no-js\"><\/div><textarea class=\"wp-editor-area\" rows=\"6\" autocomplete=\"off\" cols=\"40\" name=\"place_des\" id=\"place_des\"><\/textarea><\/div>\n<\/div>\n\n            <\/div>\r\n        <\/div>\r\n    <\/div>\r\n\r\n    <div class=\"place-fields-wrap\">\r\n        <div class=\"place-fields-title\">\r\n            <h3>Category*<\/h3>\r\n        <\/div>\r\n        <div class=\"place-fields place-categories\">\r\n            <div class=\"form-group form-select\">\r\n                <select data-placeholder=\"Select categories\" multiple=\"multiple\" class=\"golo-select2 form-control\" name=\"place_categories\">\r\n                    <option value=\"327\">Achats<\/option><option value=\"310\">Culture<\/option><option value=\"326\">Gastronomie<\/option><option value=\"363\">Informations<\/option><option value=\"332\">S\u00e9jour<\/option><option value=\"302\">Soleil et plage<\/option><option value=\"292\">Voir et faire<\/option>                <\/select>\r\n                <i class=\"la la-angle-down small\"><\/i>\r\n            <\/div>\r\n        <\/div>\r\n    <\/div>\r\n\r\n                        <\/div>\r\n                    \r\n                \r\n                                            <div class=\"group-field\" id=\"hightlights\">\r\n                            <h3>Highlights<\/h3>\r\n                            \r\n<div class=\"place-fields-wrap\">\r\n    <div class=\"place-fields place-amenities\">\r\n        <div class=\"form-group form-check\">\r\n            <ul class=\"custom-scrollbar\">\r\n                                        <li>\r\n                            <input type=\"checkbox\" id=\"golo_parking\" class=\"custom-checkbox input-control\" name=\"place_amenities\" value=\"330\" \/>\r\n                            <label for=\"golo_parking\">Parking<\/label>\r\n                        <\/li>\r\n                                            <li>\r\n                            <input type=\"checkbox\" id=\"golo_reservations\" class=\"custom-checkbox input-control\" name=\"place_amenities\" value=\"331\" \/>\r\n                            <label for=\"golo_reservations\">R\u00e9servations<\/label>\r\n                        <\/li>\r\n                                            <li>\r\n                            <input type=\"checkbox\" id=\"golo_accessible\" class=\"custom-checkbox input-control\" name=\"place_amenities\" value=\"339\" \/>\r\n                            <label for=\"golo_accessible\">Accessible<\/label>\r\n                        <\/li>\r\n                                            <li>\r\n                            <input type=\"checkbox\" id=\"golo_climatisation\" class=\"custom-checkbox input-control\" name=\"place_amenities\" value=\"358\" \/>\r\n                            <label for=\"golo_climatisation\">Climatisation<\/label>\r\n                        <\/li>\r\n                                            <li>\r\n                            <input type=\"checkbox\" id=\"golo_piscine\" class=\"custom-checkbox input-control\" name=\"place_amenities\" value=\"371\" \/>\r\n                            <label for=\"golo_piscine\">Piscine<\/label>\r\n                        <\/li>\r\n                                                <\/ul>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>                        <\/div>\r\n                    \r\n                \r\n                    \r\n                \r\n                                            <div class=\"group-field\" id=\"location\">\r\n                            <h3>Location<\/h3>\r\n                            \r\n<div class=\"place-fields-wrap\">\r\n    <div class=\"place-fields place-city\">\r\n        <div class=\"form-group row\">\r\n                            <div class=\"col-sm-4\">\r\n                    <div class=\"form-group form-select golo-loading-ajax-wrap\">\r\n                        <label class=\"place-fields-title\" for=\"city\">City \/ Town*<\/label>\r\n                        <select name=\"place_city\" id=\"city\" class=\"golo-place-city-ajax form-control nice-select wide\">\r\n                            <option value=\"\">Select City \/ Town<\/option>\r\n                            <option value=\"casillas-del-angel\">Casillas del \u00c1ngel<\/option><option value=\"el-matorral\">El Matorral<\/option><option value=\"guisguey\">Guisguey<\/option><option value=\"la-ampuyenta\">La Ampuyenta<\/option><option value=\"la-asomada\">La Asomada<\/option><option value=\"la-matilla\">La Matilla<\/option><option value=\"le-temps\">Le temps<\/option><option value=\"les-intrigues\">Les intrigues<\/option><option value=\"llanos-de-la-concepcion\">Llanos de la Concepci\u00f3n<\/option><option value=\"los-molinos\">Los Molinos<\/option><option value=\"magasins-de-tabac\">Magasins de tabac<\/option><option value=\"puerto-del-rosario\">Puerto del Rosario<\/option><option value=\"puerto-lajas\">Puerto Lajas<\/option><option value=\"tefia\">Tef\u00eda<\/option><option value=\"tesjuate\">Tesjuate<\/option><option value=\"tetir\">Tetir<\/option>                        <\/select>\r\n                    <\/div>\r\n                <\/div>\r\n            \r\n                        \r\n            \r\n        <\/div>\r\n    <\/div>\r\n<\/div>\r\n\r\n    <div class=\"place-fields-wrap\">\r\n        <div class=\"place-fields place-address\">\r\n            <div class=\"form-group\">\r\n                <label class=\"place-fields-title\" for=\"search-location\">Place Address*<\/label>\r\n                <div class=\"input-area\">\r\n                    <input type=\"text\" id=\"search-location\" class=\"form-control\" name=\"place_map_address\" placeholder=\"Full Address\" autocomplete=\"off\">\r\n                    <a class=\"my-location\" href=\"#\"><i class='fas fa-location'><\/i><\/a>\r\n                <\/div>\r\n                <input type=\"hidden\" class=\"form-control place-map-location\" name=\"place_map_location\" \/>\r\n                <div id=\"geocoder\" class=\"geocoder\"><\/div>\r\n            <\/div>\r\n        <\/div>\r\n    <\/div>\r\n\r\n    <div class=\"place-fields-wrap place-fields-map\">\r\n        <div class=\"place-fields-title\">\r\n            <h3>Set Location on Map<\/h3>\r\n            <div class=\"control-marker\">\r\n                <a href=\"#\" id=\"unlock-pin\">\r\n                    <i class=\"la la-unlock medium\"><\/i>\r\n                    <span>Unlock Pin Location<\/span>\r\n                <\/a>\r\n                <a href=\"#\" id=\"lock-pin\">\r\n                    <i class=\"la la-lock medium\"><\/i>\r\n                    <span>Lock Pin Location<\/span>\r\n                <\/a>\r\n            <\/div>\r\n        <\/div>\r\n        <div class=\"place-fields place-map\">\r\n                            <div class=\"map_canvas maptype\" id=\"map\" data-maptype=\"google_map\" style=\"height: 300px\"><\/div>\r\n                    <\/div>\r\n    <\/div>\r\n\r\n    <script>\r\n        jQuery(document).ready(function() {\r\n            function checkGoogleMapsLoaded() {\r\n                var maptype = jQuery( '.maptype' ).data( 'maptype' );\r\n\t            if (maptype == 'mapbox' || maptype == 'openstreetmap' || (typeof google !== 'undefined' && google.maps && google.maps.Map)) {\r\n\r\n                    if (maptype == 'google_map') {\r\n\r\n                        var styles, google_map_style;\r\n                        var bounds = new google.maps.LatLngBounds();\r\n                        var silver = [{\r\n                                elementType: 'geometry',\r\n                                stylers: [{\r\n                                    color: '#f5f5f5'\r\n                                }]\r\n                            },\r\n                            {\r\n                                elementType: 'labels.icon',\r\n                                stylers: [{\r\n                                    visibility: 'off'\r\n                                }]\r\n                            },\r\n                            {\r\n                                elementType: 'labels.text.fill',\r\n                                stylers: [{\r\n                                    color: '#616161'\r\n                                }]\r\n                            },\r\n                            {\r\n                                elementType: 'labels.text.stroke',\r\n                                stylers: [{\r\n                                    color: '#f5f5f5'\r\n                                }]\r\n                            },\r\n                            {\r\n                                featureType: 'administrative.land_parcel',\r\n                                elementType: 'labels.text.fill',\r\n                                stylers: [{\r\n                                    color: '#bdbdbd'\r\n                                }]\r\n                            },\r\n                            {\r\n                                featureType: 'poi',\r\n                                elementType: 'geometry',\r\n                                stylers: [{\r\n                                    color: '#eeeeee'\r\n                                }]\r\n                            },\r\n                            {\r\n                                featureType: 'poi',\r\n                                elementType: 'labels.text.fill',\r\n                                stylers: [{\r\n                                    color: '#757575'\r\n                                }]\r\n                            },\r\n                            {\r\n                                featureType: 'poi.park',\r\n                                elementType: 'geometry',\r\n                                stylers: [{\r\n                                    color: '#e5e5e5'\r\n                                }]\r\n                            },\r\n                            {\r\n                                featureType: 'poi.park',\r\n                                elementType: 'labels.text.fill',\r\n                                stylers: [{\r\n                                    color: '#9e9e9e'\r\n                                }]\r\n                            },\r\n                            {\r\n                                featureType: 'road',\r\n                                elementType: 'geometry',\r\n                                stylers: [{\r\n                                    color: '#ffffff'\r\n                                }]\r\n                            },\r\n                            {\r\n                                featureType: 'road.arterial',\r\n                                elementType: 'labels.text.fill',\r\n                                stylers: [{\r\n                                    color: '#757575'\r\n                                }]\r\n                            },\r\n                            {\r\n                                featureType: 'road.highway',\r\n                                elementType: 'geometry',\r\n                                stylers: [{\r\n                                    color: '#dadada'\r\n                                }]\r\n                            },\r\n                            {\r\n                                featureType: 'road.highway',\r\n                                elementType: 'labels.text.fill',\r\n                                stylers: [{\r\n                                    color: '#616161'\r\n                                }]\r\n                            },\r\n                            {\r\n                                featureType: 'road.local',\r\n                                elementType: 'labels.text.fill',\r\n                                stylers: [{\r\n                                    color: '#9e9e9e'\r\n                                }]\r\n                            },\r\n                            {\r\n                                featureType: 'transit.line',\r\n                                elementType: 'geometry',\r\n                                stylers: [{\r\n                                    color: '#e5e5e5'\r\n                                }]\r\n                            },\r\n                            {\r\n                                featureType: 'transit.station',\r\n                                elementType: 'geometry',\r\n                                stylers: [{\r\n                                    color: '#eeeeee'\r\n                                }]\r\n                            },\r\n                            {\r\n                                featureType: 'water',\r\n                                elementType: 'geometry',\r\n                                stylers: [{\r\n                                    color: '#9dcaef'\r\n                                }]\r\n                            },\r\n                            {\r\n                                featureType: 'water',\r\n                                elementType: 'labels.text.fill',\r\n                                stylers: [{\r\n                                    color: '#9e9e9e'\r\n                                }]\r\n                            }\r\n                        ];\r\n\r\n                        styles = silver;\r\n\r\n                        google_map_style = \"\";\r\n\r\n                        if (google_map_style) {\r\n                            styles = JSON.parse(google_map_style);\r\n                        }\r\n\r\n                                                    var lat = parseFloat('28.4988181'),\r\n                                lng = parseFloat('-13.8597594');\r\n                        \r\n                        var marker;\r\n                        var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\r\n                        var isDraggable = w > 1024;\r\n                        var mapOptions = {\r\n                            zoom: 14,\r\n                            center: {\r\n                                lat: lat,\r\n                                lng: lng\r\n                            },\r\n                            mapTypeId: 'satellite',\r\n                            draggable: isDraggable,\r\n                            \/\/ styles: styles,\r\n                            mapTypeControl: false,\r\n                            streetViewControl: false,\r\n                            rotateControl: false,\r\n                            zoomControl: true,\r\n                            fullscreenControl: true,\r\n                            mapId: \"DEMO_MAP_ID\"\r\n                        };\r\n                        var map = new google.maps.Map(document.getElementById('map'), mapOptions);\r\n\r\n                        marker = new google.maps.marker.AdvancedMarkerElement({\r\n                            map: map,\r\n                            draggable: true,\r\n                            position: {\r\n                                lat: lat,\r\n                                lng: lng\r\n                            },\r\n                        });\r\n\r\n                        var geocoder = new google.maps.Geocoder;\r\n\r\n                        var infowindow = new google.maps.InfoWindow({\r\n                            maxWidth: 370,\r\n                        });\r\n\r\n                        initAutocomplete();\r\n                        controlMarker();\r\n                        golo_my_location(map);\r\n\r\n                        function controlMarker() {\r\n                            \/\/ This event listener will call addMarker() when the map is clicked.\r\n                            map.addListener('click', function(event) {\r\n                                if (jQuery('body .lock-marker').length == 0) {\r\n                                    \/\/ marker.setPosition(event.latLng);\r\n                                    marker.position = event.latLng;\r\n                                    geocodeLatLng(geocoder, map, infowindow, event.latLng);\r\n                                    jQuery('#submit_place_form').find('input[name=\"place_map_location\"]').val(event.latLng.lat() + ',' + event.latLng.lng());\r\n                                }\r\n                            });\r\n\r\n                            google.maps.event.addListener(marker, 'dragend', function(event) {\r\n                                geocodeLatLng(geocoder, map, infowindow, event.latLng);\r\n                                jQuery('#submit_place_form').find('input[name=\"place_map_location\"]').val(event.latLng.lat() + ',' + event.latLng.lng());\r\n                            });\r\n\r\n                            google.maps.event.addListener(marker, 'click', function(event) {\r\n                                infowindow.open(map, marker);\r\n                                jQuery('#submit_place_form').find('input[name=\"place_map_location\"]').val(event.latLng.lat() + ',' + event.latLng.lng());\r\n                            });\r\n                        }\r\n\r\n                        function geocodeLatLng(geocoder, map, infowindow, latlng) {\r\n                            var findResult = function(results) {\r\n                                var result = _.find(results, function(obj) {\r\n                                    return obj.types[0] == 'locality' && obj.types[1] == \"political\";\r\n                                });\r\n                                if (!result) {\r\n                                    var result = _.find(results, function(obj) {\r\n                                        return obj.types[0] == 'administrative_area_level_1' && obj.types[1] == \"political\";\r\n                                    });\r\n                                }\r\n                                return result ? result.short_name : null;\r\n                            };\r\n\r\n                            geocoder.geocode({\r\n                                'location': latlng\r\n                            }, function(results, status) {\r\n                                if (status === 'OK') {\r\n                                    if (results[0]) {\r\n                                        \/\/ marker.setPosition(latlng);\r\n                                        marker.position = latlng;\r\n                                        \r\n                                        var scale = Math.pow(2, map.getZoom()),\r\n                                            offsety = ((50 \/ scale) || 0),\r\n                                            projection = map.getProjection(),\r\n                                            \/\/ markerPosition = marker.getPosition(),\r\n                                            markerPosition = marker.position,\r\n                                            markerScreenPosition = projection.fromLatLngToPoint(markerPosition),\r\n                                            pointHalfScreenAbove = new google.maps.Point(markerScreenPosition.x, markerScreenPosition.y - offsety),\r\n                                            aboveMarkerLatLng = projection.fromPointToLatLng(pointHalfScreenAbove);\r\n                                        map.panTo(aboveMarkerLatLng);\r\n\r\n                                        infowindow.close();\r\n                                        infowindow.setContent(results[0].formatted_address);\r\n                                        infowindow.open(map, marker);\r\n\r\n                                        var city = findResult(results[0].address_components);\r\n\r\n                                        document.getElementById('search-location').value = results[0].formatted_address;\r\n                                    } else {\r\n                                        window.alert('No results found');\r\n                                    }\r\n                                } else {\r\n                                    window.alert('Geocoder failed due to: ' + status);\r\n                                }\r\n                            });\r\n                        }\r\n\r\n                        function golo_my_location(map) {\r\n\r\n                            var my_location = {};\r\n                            var my_lat = '';\r\n                            var my_lng = '';\r\n\r\n                            if (navigator.geolocation) {\r\n                                navigator.geolocation.getCurrentPosition(function(position) {\r\n                                    var pos = {\r\n                                        lat: position.coords.latitude,\r\n                                        lng: position.coords.longitude\r\n                                    };\r\n\r\n                                    my_lat = position.coords.latitude;\r\n                                    my_lng = position.coords.longitude;\r\n\r\n                                    my_location = {\r\n                                        lat: parseFloat(my_lat),\r\n                                        lng: parseFloat(my_lng)\r\n                                    };\r\n\r\n                                }, function() {\r\n                                    handleLocationError(true, infowindow, map.getCenter());\r\n                                });\r\n                            } else {\r\n                                \/\/ Browser doesn't support Geolocation\r\n                                handleLocationError(false, infowindow, map.getCenter());\r\n                            }\r\n\r\n                            function CenterControl(controlDiv, map) {\r\n\r\n                                \/\/ Set CSS for the control border.\r\n                                const controlUI = document.createElement(\"div\");\r\n                                controlUI.style.backgroundColor = \"#fff\";\r\n                                controlUI.style.border = \"2px solid #fff\";\r\n                                controlUI.style.borderRadius = \"3px\";\r\n                                controlUI.style.boxShadow = \"0 2px 6px rgba(0,0,0,.3)\";\r\n                                controlUI.style.cursor = \"pointer\";\r\n                                controlUI.style.width = \"40px\";\r\n                                controlUI.style.height = \"40px\";\r\n                                controlUI.style.margin = \"10px\";\r\n                                controlUI.style.textAlign = \"center\";\r\n                                controlUI.title = \"My location\";\r\n                                controlDiv.appendChild(controlUI);\r\n\r\n                                \/\/ Set CSS for the control interior.\r\n                                const controlText = document.createElement(\"div\");\r\n                                controlText.style.fontSize = \"18px\";\r\n                                controlText.style.lineHeight = \"37px\";\r\n                                controlText.style.paddingLeft = \"5px\";\r\n                                controlText.style.paddingRight = \"5px\";\r\n                                controlText.innerHTML = \"<i class='fas fa-location'><\/i>\";\r\n                                controlUI.appendChild(controlText);\r\n\r\n                                \/\/ Setup the click event listeners: simply set the map to Chicago.\r\n                                controlUI.addEventListener('click', () => {\r\n                                    map.panTo(my_location);\r\n                                    geocodeLatLng(geocoder, map, infowindow, my_location);\r\n                                    jQuery('#submit_place_form').find('input[name=\"place_map_location\"]').val(parseFloat(my_lat) + ',' + parseFloat(my_lng));\r\n                                });\r\n\r\n                                jQuery('.my-location').on('click', function(e) {\r\n                                    e.preventDefault();\r\n                                    map.panTo(my_location);\r\n                                    geocodeLatLng(geocoder, map, infowindow, my_location);\r\n                                    jQuery('#submit_place_form').find('input[name=\"place_map_location\"]').val(parseFloat(my_lat) + ',' + parseFloat(my_lng));\r\n                                });\r\n                            }\r\n\r\n                            const centerControlDiv = document.createElement(\"div\");\r\n                            CenterControl(centerControlDiv, map);\r\n\r\n                            centerControlDiv.index = 1;\r\n                            map.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(centerControlDiv);\r\n\r\n                            function handleLocationError(browserHasGeolocation, infowindow, pos) {\r\n                                infowindow.setPosition(pos);\r\n                                infowindow.setContent(browserHasGeolocation ? 'Error: The Geolocation service failed.' : 'Error: Your browser doesn\\'t support geolocation.');\r\n                                infowindow.open(map);\r\n                            }\r\n\r\n                        };\r\n\r\n                        jQuery('body').on('click', '.control-marker', function(e) {\r\n                            e.preventDefault();\r\n                            jQuery(this).toggleClass('lock-marker');\r\n                            jQuery('.place-map').toggleClass('lock-marker');\r\n                            if (jQuery(this).hasClass('lock-marker')) {\r\n                                jQuery('#search-location').prop('disabled', true);\r\n                            } else {\r\n                                jQuery('#search-location').prop('disabled', false);\r\n                            }\r\n                        });\r\n\r\n                        function setMapOnAll(map) {\r\n                            marker.setMap(map);\r\n                        }\r\n\r\n                        function clearMarkers() {\r\n                            setMapOnAll(null);\r\n                        }\r\n\r\n                        function showMarkers() {\r\n                            setMapOnAll(map);\r\n                        }\r\n\r\n                        function initAutocomplete() {\r\n\r\n                            \/\/ Create the search box and link it to the UI element.\r\n                            var input = document.getElementById('search-location');\r\n                            var autocomplete = new google.maps.places.Autocomplete(input);\r\n\r\n                            var options = {\r\n                                types: ['(cities)'],\r\n                            };\r\n\r\n                            var input_city = document.getElementById('search-city');\r\n                            var autocomplete_city = new google.maps.places.Autocomplete(input_city, options);\r\n\r\n                            autocomplete.bindTo('bounds', map);\r\n\r\n                            autocomplete.setFields(['address_components', 'geometry', 'icon', 'name']);\r\n\r\n                            var findResult = function(results) {\r\n                                var result = _.find(results, function(obj) {\r\n                                    return obj.types[0] == 'locality' && obj.types[1] == \"political\";\r\n                                });\r\n                                if (!result) {\r\n                                    var result = _.find(results, function(obj) {\r\n                                        return obj.types[0] == 'administrative_area_level_1' && obj.types[1] == \"political\";\r\n                                    });\r\n                                }\r\n                                return result ? result.short_name : null;\r\n                            };\r\n\r\n                            autocomplete_city.addListener('place_changed', function() {\r\n                                var place = autocomplete_city.getPlace();\r\n                                var city = findResult(place.address_components);\r\n\r\n                                if (!place.geometry) {\r\n                                    \/\/ User entered the name of a Place that was not suggested and\r\n                                    \/\/ pressed the Enter key, or the Place Details request failed.\r\n                                    window.alert(\"No details available for input: '\" + place.name + \"'\");\r\n                                    return;\r\n                                }\r\n\r\n                                var address = '';\r\n                                if (place.address_components) {\r\n                                    address = [\r\n                                        (place.address_components[0] && place.address_components[0].short_name || ''),\r\n                                        (place.address_components[1] && place.address_components[1].short_name || ''),\r\n                                        (place.address_components[2] && place.address_components[2].short_name || '')\r\n                                    ].join(' ');\r\n                                }\r\n\r\n                                jQuery('#submit_place_form').find('input[name=\"custom_place_city\"]').val(city);\r\n                                jQuery('#submit_place_form').find('input[name=\"custom_place_city_location\"]').val(place.geometry.location.lat() + ',' + place.geometry.location.lng());\r\n                                jQuery('#submit_place_form').find('input[name=\"new_place_city\"]').val(address);\r\n                            });\r\n\r\n                            autocomplete.addListener('place_changed', function() {\r\n                                infowindow.close();\r\n                                \/\/ marker.setVisible(false);\r\n                                marker.map = null;\r\n                                var place = autocomplete.getPlace();\r\n                                if (!place.geometry) {\r\n                                    \/\/ User entered the name of a Place that was not suggested and\r\n                                    \/\/ pressed the Enter key, or the Place Details request failed.\r\n                                    window.alert(\"No details available for input: '\" + place.name + \"'\");\r\n                                    return;\r\n                                }\r\n\r\n                                \/\/ If the place has a geometry, then present it on a map.\r\n                                if (place.geometry.viewport) {\r\n                                    map.fitBounds(place.geometry.viewport);\r\n                                } else {\r\n                                    map.setCenter(place.geometry.location);\r\n                                    map.setZoom(12); \/\/ Why 17? Because it looks good.\r\n                                }\r\n                                \/\/ marker.setPosition(place.geometry.location);\r\n                                marker.position = place.geometry.location;\r\n                                \/\/ marker.setVisible(true);\r\n                                marker.map = map;\r\n\r\n                                var address = '';\r\n                                if (place.address_components) {\r\n                                    address = [\r\n                                        (place.address_components[0] && place.address_components[0].short_name || ''),\r\n                                        (place.address_components[1] && place.address_components[1].short_name || ''),\r\n                                        (place.address_components[2] && place.address_components[2].short_name || '')\r\n                                    ].join(' ');\r\n                                }\r\n\r\n                                jQuery('#submit_place_form').find('input[name=\"place_map_location\"]').val(place.geometry.location.lat() + ',' + place.geometry.location.lng());\r\n\r\n                                infowindow.setContent(address);\r\n                                infowindow.open(map, marker);\r\n                            });\r\n                        }\r\n\r\n\r\n                    } else if (maptype == 'openstreetmap') {\r\n\r\n                                                    var lat = parseFloat('28.4988181'),\r\n                                lng = parseFloat('-13.8597594');\r\n                        \r\n                                                    var zoom = 15;\r\n                        \r\n                        var osm_api = jQuery('#openstreetmap_location').data('key');\r\n\r\n                        var map_location = new L.map('openstreetmap_location');\r\n\r\n                        map_location.setView([lat, lng], zoom);\r\n\r\n                        var titleLayer_id = 'mapbox\/';\r\n\r\n                        L.tileLayer('https:\/\/api.mapbox.com\/styles\/v1\/{id}\/tiles\/{z}\/{x}\/{y}?access_token=' + osm_api, {\r\n                            attribution: 'Map data &copy; <a href=\"https:\/\/www.openstreetmap.org\/copyright\">OpenStreetMap<\/a>',\r\n                            id: titleLayer_id,\r\n                            tileSize: 512,\r\n                            zoomOffset: -1,\r\n                            accessToken: osm_api\r\n                        }).addTo(map_location);\r\n\r\n                        var osm_marker = new L.marker([lat, lng], {\r\n                            draggable: 'true'\r\n                        });\r\n\r\n                        map_location.addLayer(osm_marker);\r\n\r\n                        var searchControl = L.esri.Geocoding.geosearch().addTo(map_location);\r\n\r\n                        var results = L.layerGroup().addTo(map_location);\r\n\r\n                        searchControl.on('results', function(data) {\r\n                            results.clearLayers();\r\n                            for (var i = data.results.length - 1; i >= 0; i--) {\r\n                                results.addLayer(osm_marker.setLatLng(new L.LatLng(data.results[i].latlng['lat'], data.results[i].latlng['lng']), {\r\n                                    draggable: 'true'\r\n                                }));\r\n                                jQuery('#submit_place_form').find('input[name=\"place_map_location\"]').val(data.results[i].latlng['lat'] + ',' + data.results[i].latlng['lng']);\r\n                                jQuery('#submit_place_form').find('input[name=\"custom_place_city\"]').val(data.results[i].properties['City']);\r\n                                jQuery('#submit_place_form').find('input[name=\"custom_place_city_location\"]').val(data.results[i].properties['DisplayY'] + ',' + data.results[i].properties['DisplayX']);\r\n                                jQuery('#submit_place_form').find('input[name=\"new_place_city\"]').val(data.results[i].properties['City']);\r\n                                jQuery('#submit_place_form').find('input[name=\"place_map_address\"]').val(data.results[i].text);\r\n                            }\r\n                        });\r\n\r\n                        osm_marker.on('dragend', function(event) {\r\n                            var latlng = event.target.getLatLng();\r\n                            osm_marker.setLatLng(new L.LatLng(latlng.lat, latlng.lng), {\r\n                                draggable: 'true'\r\n                            });\r\n                            jQuery('#submit_place_form').find('input[name=\"place_map_location\"]').val(latlng.lat + ',' + latlng.lng);\r\n                        });\r\n\r\n                        map_location.on('click', function(e) {\r\n\r\n                            osm_marker.setLatLng(new L.LatLng(e.latlng.lat, e.latlng.lng), {\r\n                                draggable: 'true'\r\n                            }).addTo(map_location);\r\n\r\n                            jQuery('#submit_place_form').find('input[name=\"place_map_location\"]').val(e.latlng.lat + ',' + e.latlng.lng);\r\n                        });\r\n\r\n                    } else {\r\n\r\n                        var mapbox_api = jQuery('#mapbox_location').data('key');\r\n                        mapboxgl.accessToken = mapbox_api;\r\n\r\n                        var map_location = new mapboxgl.Map({\r\n                            container: 'mapbox_location',\r\n                            style: 'mapbox:\/\/styles\/mapbox\/',\r\n                            zoom: 15,\r\n                            center: [-13.8597594, 28.4988181],\r\n                        });\r\n\r\n                        var geocoder = new MapboxGeocoder({\r\n                            accessToken: mapboxgl.accessToken,\r\n                            mapboxgl: mapboxgl\r\n                        });\r\n\r\n\r\n                        document.getElementById('geocoder').appendChild(\r\n                            geocoder.onAdd(map_location)\r\n                        );\r\n\r\n                        jQuery('#search-location').each(function() {\r\n                            var val = jQuery(this).attr('placeholder');\r\n                            jQuery(this).attr('placeholder', '');\r\n                            jQuery('.mapboxgl-ctrl-geocoder--input').attr('placeholder', val);\r\n                            jQuery('.mapboxgl-ctrl-geocoder--input').attr('autocomplete', 'off');\r\n                        });\r\n\r\n                        jQuery('.mapboxgl-ctrl-geocoder--input').change(function() {\r\n                            var val = jQuery(this).val();\r\n                            if (val != '') {\r\n                                jQuery('#search-location-error').hide();\r\n                                jQuery('input[name=\"place_map_address\"]').val(val);\r\n                            }\r\n                        });\r\n\r\n                        var marker_location = new mapboxgl.Marker({\r\n                                draggable: true\r\n                            })\r\n                            .setLngLat([-13.8597594, 28.4988181])\r\n                            .addTo(map_location);\r\n\r\n                        controlMarker();\r\n                        golo_my_location(map_location);\r\n\r\n                        function controlMarker() {\r\n                            \/\/ This event listener will call addMarker() when the map is clicked.\r\n                            map_location.on('click', function(event) {\r\n                                if (jQuery('body .lock-marker').length == 0) {\r\n                                    var lngLat = marker_location.getLngLat();\r\n                                    marker_location.setLngLat(event.lngLat).addTo(map_location);\r\n                                    jQuery('#submit_place_form').find('input[name=\"place_map_location\"]').val(lngLat.lat + ',' + lngLat.lng);\r\n                                }\r\n                            });\r\n\r\n                            function onDragEnd() {\r\n                                var lngLat = marker_location.getLngLat();\r\n                                marker_location.setLngLat([lngLat.lng, lngLat.lat]);\r\n                                jQuery('#submit_place_form').find('input[name=\"place_map_location\"]').val(lngLat.lat + ',' + lngLat.lng);\r\n                            }\r\n\r\n                            marker_location.on('dragend', onDragEnd);\r\n                        }\r\n\r\n                        function golo_my_location(map) {\r\n\r\n                            var my_location = {};\r\n                            var my_lat = '';\r\n                            var my_lng = '';\r\n\r\n                            if (navigator.geolocation) {\r\n                                navigator.geolocation.getCurrentPosition(function(position) {\r\n                                    var pos = {\r\n                                        lat: position.coords.latitude,\r\n                                        lng: position.coords.longitude\r\n                                    };\r\n\r\n                                    my_lat = position.coords.latitude;\r\n                                    my_lng = position.coords.longitude;\r\n\r\n                                    my_location = {\r\n                                        lat: parseFloat(my_lat),\r\n                                        lng: parseFloat(my_lng)\r\n                                    };\r\n\r\n                                }, function() {\r\n                                    handleLocationError(true, infowindow, map.getCenter());\r\n                                });\r\n                            } else {\r\n                                \/\/ Browser doesn't support Geolocation\r\n                                handleLocationError(false, infowindow, map.getCenter());\r\n                            }\r\n\r\n                            function CenterControl(controlDiv, map) {\r\n\r\n                                \/\/ Set CSS for the control border.\r\n                                const controlUI = document.createElement(\"div\");\r\n                                controlUI.style.backgroundColor = \"#fff\";\r\n                                controlUI.style.border = \"2px solid #fff\";\r\n                                controlUI.style.borderRadius = \"3px\";\r\n                                controlUI.style.boxShadow = \"0 2px 6px rgba(0,0,0,.3)\";\r\n                                controlUI.style.cursor = \"pointer\";\r\n                                controlUI.style.width = \"40px\";\r\n                                controlUI.style.height = \"40px\";\r\n                                controlUI.style.margin = \"10px\";\r\n                                controlUI.style.textAlign = \"center\";\r\n                                controlUI.title = \"My location\";\r\n                                controlDiv.appendChild(controlUI);\r\n\r\n                                \/\/ Set CSS for the control interior.\r\n                                const controlText = document.createElement(\"div\");\r\n                                controlText.style.fontSize = \"18px\";\r\n                                controlText.style.lineHeight = \"37px\";\r\n                                controlText.style.paddingLeft = \"5px\";\r\n                                controlText.style.paddingRight = \"5px\";\r\n                                controlText.innerHTML = \"<i class='fas fa-location'><\/i>\";\r\n                                controlUI.appendChild(controlText);\r\n\r\n                                \/\/ Setup the click event listeners: simply set the map to Chicago.\r\n                                controlUI.addEventListener('click', () => {\r\n                                    jQuery('#submit_place_form').find('input[name=\"place_map_location\"]').val(parseFloat(my_lat) + ',' + parseFloat(my_lng));\r\n                                });\r\n\r\n                                jQuery('.my-location').on('click', function(e) {\r\n                                    e.preventDefault();\r\n\r\n                                    marker_location.setLngLat([parseFloat(my_lng), parseFloat(my_lat)]).addTo(map_location);\r\n\r\n                                    map_location.flyTo({\r\n                                        center: [\r\n                                            parseFloat(my_lng),\r\n                                            parseFloat(my_lat)\r\n                                        ],\r\n                                        essential: true\r\n                                    });\r\n\r\n                                    jQuery('#submit_place_form').find('input[name=\"place_map_location\"]').val(parseFloat(my_lat) + ',' + parseFloat(my_lng));\r\n                                });\r\n                            }\r\n\r\n                            const centerControlDiv = document.createElement(\"div\");\r\n                            CenterControl(centerControlDiv, map);\r\n\r\n                            centerControlDiv.index = 1;\r\n\r\n                        };\r\n\r\n                        jQuery('body').on('click', '.control-marker', function(e) {\r\n                            e.preventDefault();\r\n                            jQuery(this).toggleClass('lock-marker');\r\n                            jQuery('.place-map').toggleClass('lock-marker');\r\n                            if (jQuery(this).hasClass('lock-marker')) {\r\n                                jQuery('#search-location').prop('disabled', true);\r\n                            } else {\r\n                                jQuery('#search-location').prop('disabled', false);\r\n                            }\r\n                        });\r\n\r\n                        geocoder.on('result', function(ev) {\r\n\r\n                            jQuery('#submit_place_form').find('input[name=\"place_map_location\"]').val(ev.result.geometry['coordinates'][1] + ',' + ev.result.geometry['coordinates'][0]);\r\n                            jQuery('.mapboxgl-marker:last-child').remove();\r\n\r\n                            if (ev.result.context) {\r\n                                ev.result.context.map(function(idx, ele) {\r\n\r\n                                    if (idx['id'].split('.').shift() === 'region') {\r\n                                        jQuery('#submit_place_form').find('input[name=\"custom_place_city\"]').val(idx['text']);\r\n                                        jQuery('#submit_place_form').find('input[name=\"custom_place_city_location\"]').val(ev.result.geometry['coordinates'][1] + ',' + ev.result.geometry['coordinates'][0]);\r\n                                        jQuery('#submit_place_form').find('input[name=\"new_place_city\"]').val(idx['text']);\r\n\r\n                                        marker_location.setLngLat(ev.result.geometry['coordinates']).addTo(map_location);\r\n                                    }\r\n                                });\r\n                            }\r\n                        });\r\n\r\n                    }\r\n\r\n                } else {\r\n                    setTimeout(checkGoogleMapsLoaded, 100);\r\n                }\r\n            }\r\n            checkGoogleMapsLoaded();\r\n        });\r\n    <\/script>\r\n                        <\/div>\r\n                    \r\n                \r\n                                            <div class=\"group-field\" id=\"contact\">\r\n                            <h3>Contact info<\/h3>\r\n                            \r\n<div class=\"place-fields-wrap\">\r\n    <div class=\"place-fields-title\">\r\n        <h3>Email<\/h3>\r\n    <\/div>\r\n    <div class=\"place-fields place-email\">\r\n        <div class=\"form-group\">\r\n            <input type=\"email\" class=\"form-control\" name=\"place_email\" placeholder=\"Your email address\" \/>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\r\n\r\n<div class=\"place-fields-wrap\">\r\n    <div class=\"place-fields-title\">\r\n        <h3>Phone number 1 (optional)<\/h3>\r\n    <\/div>\r\n    <div class=\"place-fields place-phone\">\r\n        <div class=\"form-group\">\r\n            <input type=\"text\" class=\"form-control\" name=\"place_phone\" placeholder=\"Your phone 1 number\" \/>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\r\n<div class=\"place-fields-wrap\">\r\n    <div class=\"place-fields-title\">\r\n        <h3>Phone number 2 (optional)<\/h3>\r\n    <\/div>\r\n    <div class=\"place-fields place-phone\">\r\n        <div class=\"form-group\">\r\n            <input type=\"text\" class=\"form-control\" name=\"place_phone2\" placeholder=\"Your phone 2 number\" \/>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\r\n\r\n                        <\/div>\r\n                    \r\n                \r\n                    \r\n                \r\n                                            <div class=\"group-field\" id=\"socials\">\r\n                            <h3>Social networks<\/h3>\r\n                            \r\n<div class=\"place-fields-wrap\">\r\n    <div class=\"place-fields-title\">\r\n        <h3>Facebook<\/h3>\r\n    <\/div>\r\n    <div class=\"place-fields place-facebook\">\r\n        <div class=\"form-group\">\r\n            <input type=\"text\" class=\"form-control\" name=\"place_facebook\" placeholder=\"Facebook URL\" \/>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\r\n\r\n<div class=\"place-fields-wrap\">\r\n    <div class=\"place-fields-title\">\r\n        <h3>Instagram<\/h3>\r\n    <\/div>\r\n    <div class=\"place-fields place-instagram\">\r\n        <div class=\"form-group\">\r\n            <input type=\"text\" class=\"form-control\" name=\"place_instagram\" placeholder=\"Instagram URL\" \/>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\r\n\r\n                        <\/div>\r\n                    \r\n                \r\n                                            <div class=\"group-field\" id=\"time-opening\">\r\n                            <h3>Opening hours<\/h3>\r\n                            \r\n<div class=\"place-fields-wrap\">\r\n    <div class=\"place-fields place-time-opening row\">\r\n        <div class=\"col-sm-5\">\r\n            <div class=\"form-group\">\r\n                <input type=\"text\" class=\"form-control\" name=\"opening_monday\" value=\"Monday\" \/>\r\n            <\/div>\r\n        <\/div>\r\n        <div class=\"col-sm-5\">\r\n            <div class=\"form-group\">\r\n                <input type=\"text\" class=\"form-control\" name=\"opening_monday_time\" placeholder=\"9:00 - 17:00 OR 9:00 - 11:00 &amp; 14:00 - 17:00\" \/>\r\n            <\/div>\r\n        <\/div>\r\n        <div class=\"col-sm-2\">\r\n            <div class=\"form-group\">\r\n                <div class=\"allday-checkbox\">\r\n                    <input type=\"checkbox\" id=\"golo_monday_allday\" class=\"custom-checkbox input-control\" name=\"monday_allday\" value=\"1\"\/>\r\n                    <label for=\"golo_monday_allday\">All Day<\/label>\r\n                <\/div>\r\n            <\/div>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\r\n\r\n<div class=\"place-fields-wrap\">\r\n    <div class=\"place-fields place-time-opening row\">\r\n        <div class=\"col-sm-5\">\r\n            <div class=\"form-group\">\r\n                <input type=\"text\" class=\"form-control\" name=\"opening_tuesday\" value=\"Tuesday\" \/>\r\n            <\/div>\r\n        <\/div>\r\n        <div class=\"col-sm-5\">\r\n            <div class=\"form-group\">\r\n                <input type=\"text\" class=\"form-control\" name=\"opening_tuesday_time\" placeholder=\"9:00 - 17:00 OR 9:00 - 11:00 &amp; 14:00 - 17:00\" \/>\r\n            <\/div>\r\n        <\/div>\r\n        <div class=\"col-sm-2\">\r\n            <div class=\"form-group\">\r\n                <div class=\"allday-checkbox\">\r\n                    <input type=\"checkbox\" id=\"golo_tuesday_allday\" class=\"custom-checkbox input-control\" name=\"tuesday_allday\" value=\"1\"\/>\r\n                    <label for=\"golo_tuesday_allday\">All Day<\/label>\r\n                <\/div>\r\n            <\/div>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\r\n\r\n<div class=\"place-fields-wrap\">\r\n    <div class=\"place-fields place-time-opening row\">\r\n        <div class=\"col-sm-5\">\r\n            <div class=\"form-group\">\r\n                <input type=\"text\" class=\"form-control\" name=\"opening_wednesday\" value=\"Wednesday\" \/>\r\n            <\/div>\r\n        <\/div>\r\n        <div class=\"col-sm-5\">\r\n            <div class=\"form-group\">\r\n                <input type=\"text\" class=\"form-control\" name=\"opening_wednesday_time\" placeholder=\"9:00 - 17:00 OR 9:00 - 11:00 &amp; 14:00 - 17:00\" \/>\r\n            <\/div>\r\n        <\/div>\r\n        <div class=\"col-sm-2\">\r\n            <div class=\"form-group\">\r\n                <div class=\"allday-checkbox\">\r\n                    <input type=\"checkbox\" id=\"golo_wednesday_allday\" class=\"custom-checkbox input-control\" name=\"wednesday_allday\" value=\"1\"\/>\r\n                    <label for=\"golo_wednesday_allday\">All Day<\/label>\r\n                <\/div>\r\n            <\/div>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\r\n\r\n<div class=\"place-fields-wrap\">\r\n    <div class=\"place-fields place-time-opening row\">\r\n        <div class=\"col-sm-5\">\r\n            <div class=\"form-group\">\r\n                <input type=\"text\" class=\"form-control\" name=\"opening_thursday\" value=\"Thursday\" \/>\r\n            <\/div>\r\n        <\/div>\r\n        <div class=\"col-sm-5\">\r\n            <div class=\"form-group\">\r\n                <input type=\"text\" class=\"form-control\" name=\"opening_thursday_time\" placeholder=\"9:00 - 17:00 OR 9:00 - 11:00 &amp; 14:00 - 17:00\" \/>\r\n            <\/div>\r\n        <\/div>\r\n        <div class=\"col-sm-2\">\r\n            <div class=\"form-group\">\r\n                <div class=\"allday-checkbox\">\r\n                    <input type=\"checkbox\" id=\"golo_thursday_allday\" class=\"custom-checkbox input-control\" name=\"thursday_allday\" value=\"1\"\/>\r\n                    <label for=\"golo_thursday_allday\">All Day<\/label>\r\n                <\/div>\r\n            <\/div>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\r\n\r\n<div class=\"place-fields-wrap\">\r\n    <div class=\"place-fields place-time-opening row\">\r\n        <div class=\"col-sm-5\">\r\n            <div class=\"form-group\">\r\n                <input type=\"text\" class=\"form-control\" name=\"opening_friday\" value=\"Friday\" \/>\r\n            <\/div>\r\n        <\/div>\r\n        <div class=\"col-sm-5\">\r\n            <div class=\"form-group\">\r\n                <input type=\"text\" class=\"form-control\" name=\"opening_friday_time\" placeholder=\"9:00 - 17:00 OR 9:00 - 11:00 &amp; 14:00 - 17:00\" \/>\r\n            <\/div>\r\n        <\/div>\r\n        <div class=\"col-sm-2\">\r\n            <div class=\"form-group\">\r\n                <div class=\"allday-checkbox\">\r\n                    <input type=\"checkbox\" id=\"golo_friday_allday\" class=\"custom-checkbox input-control\" name=\"friday_allday\" value=\"1\"\/>\r\n                    <label for=\"golo_friday_allday\">All Day<\/label>\r\n                <\/div>\r\n            <\/div>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\r\n\r\n<div class=\"place-fields-wrap\">\r\n    <div class=\"place-fields place-time-opening row\">\r\n        <div class=\"col-sm-5\">\r\n            <div class=\"form-group\">\r\n                <input type=\"text\" class=\"form-control\" name=\"opening_saturday\" value=\"Saturday\" \/>\r\n            <\/div>\r\n        <\/div>\r\n        <div class=\"col-sm-5\">\r\n            <div class=\"form-group\">\r\n                <input type=\"text\" class=\"form-control\" name=\"opening_saturday_time\" placeholder=\"9:00 - 17:00 OR 9:00 - 11:00 &amp; 14:00 - 17:00\" \/>\r\n            <\/div>\r\n        <\/div>\r\n        <div class=\"col-sm-2\">\r\n            <div class=\"form-group\">\r\n                <div class=\"allday-checkbox\">\r\n                    <input type=\"checkbox\" id=\"golo_saturday_allday\" class=\"custom-checkbox input-control\" name=\"saturday_allday\" value=\"1\"\/>\r\n                    <label for=\"golo_saturday_allday\">All Day<\/label>\r\n                <\/div>\r\n            <\/div>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\r\n\r\n<div class=\"place-fields-wrap\">\r\n    <div class=\"place-fields place-time-opening row\">\r\n        <div class=\"col-sm-5\">\r\n            <div class=\"form-group\">\r\n                <input type=\"text\" class=\"form-control\" name=\"opening_sunday\" value=\"Sunday\" \/>\r\n            <\/div>\r\n        <\/div>\r\n        <div class=\"col-sm-5\">\r\n            <div class=\"form-group\">\r\n                <input type=\"text\" class=\"form-control\" name=\"opening_sunday_time\" placeholder=\"Closed\" \/>\r\n            <\/div>\r\n        <\/div>\r\n        <div class=\"col-sm-2\">\r\n            <div class=\"form-group\">\r\n                <div class=\"allday-checkbox\">\r\n                    <input type=\"checkbox\" id=\"golo_sunday_allday\" class=\"custom-checkbox input-control\" name=\"sunday_allday\" value=\"1\"\/>\r\n                    <label for=\"golo_sunday_allday\">All Day<\/label>\r\n                <\/div>\r\n            <\/div>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\r\n                        <\/div>\r\n                    \r\n                \r\n                                            <div class=\"group-field\" id=\"media\">\r\n                            <h3>Media<\/h3>\r\n                            \r\n<div class=\"place-fields-wrap place-fields-media\">\r\n    <div class=\"place-fields-title\">\r\n        <h3>Featured image<\/h3>\r\n    <\/div>\r\n    <div class=\"place-fields place-fields-file place-featured-image\">\r\n        <div class=\"form-group\">\r\n            <div id=\"featured_image_errors_log\" class=\"errors-log\"><\/div>\r\n            <div id=\"featured_image_plupload_container\" class=\"file-upload-block preview\">\r\n                <div id=\"golo_place_featured_image_view\"><\/div>\r\n                <button type=\"button\" id=\"golo_select_featured_image\" title=\"Choose image\" class=\"golo_featured_image golo-add-image\">\r\n                    <i class=\"la la-upload large\"><\/i>\r\n                <\/button>\r\n                <input type=\"hidden\" class=\"featured_image_url form-control\" name=\"place_featured_image_url\" value=\"\" id=\"featured_image_url\">\r\n                <input type=\"hidden\" class=\"featured_image_id\" name=\"place_featured_image_id\" value=\"\" id=\"featured_image_id\"\/>\r\n            <\/div>\r\n            <div class=\"field-note\">Maximum file size: 3000kb.<\/div>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\r\n\r\n<div class=\"place-fields-wrap place-fields-media\">\r\n    <div class=\"place-fields-title\">\r\n        <h3>Gallery Images (optional)<\/h3>\r\n    <\/div>\r\n    <div class=\"place-fields place-fields-file place-gallery-image\">\r\n        <div class=\"form-group\">\r\n            <div class=\"media-gallery\">\r\n                <div id=\"place_gallery_thumbs_container\"><\/div>\r\n            <\/div>\r\n            <div id=\"golo_gallery_errors_log\" class=\"errors-log\"><\/div>\r\n            <div class=\"golo-place-gallery\">\r\n                <div id=\"golo_gallery_plupload_container\" class=\"media-drag-drop\">\r\n                    <h4>\r\n                        <i class=\"la la-upload large\"><\/i>\r\n                        Drag and drop file here                    <\/h4>\r\n                    <span>or<\/span>\r\n                    <button type=\"button\" id=\"golo_select_gallery_images\" class=\"btn btn-primary\">Select Images<\/button>\r\n                <\/div>\r\n            <\/div>\r\n            <div class=\"field-note\">Maximum file size: 3000kb.<\/div>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\r\n\r\n<div class=\"place-fields-wrap\">\r\n    <div class=\"place-fields-title\">\r\n        <h3>Video (optional)<\/h3>\r\n    <\/div>\r\n    <div class=\"place-fields place-video\">\r\n        <div class=\"form-group\">\r\n            <input type=\"text\" id=\"place_video_url\" class=\"form-control\" name=\"place_video_url\" placeholder=\"Youtube video url\" \/>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\r\n\r\n<script>\r\n    (function($) {\r\n    \"use strict\";\r\n        jQuery(document).ready(function () {\r\n            window.handleMediaImageUploadError = function(errorId, errorCode, errorMessage) {\r\n                const errorElement = document.getElementById(errorId);\r\n                if (errorElement) {\r\n                    errorElement.innerHTML += \"Error #\" + errorCode + \": \" + errorMessage + \"<br\/>\";\r\n                }\r\n            };\r\n            var featured_image = function () {\r\n                var uploader_featured_image = new plupload.Uploader({\r\n                    browse_button: 'golo_select_featured_image',\r\n                    file_data_name: 'place_upload_file',\r\n                    container: 'featured_image_plupload_container',\r\n                    url: 'https:\/\/discoverpuerto.es\/wp-admin\/admin-ajax.php' + \"?action=golo_place_img_upload_ajax&nonce=\" + 'df8196949e',\r\n                    filters: {\r\n                        mime_types: [\r\n                            {title: 'Valid file formats', extensions: \"jpg,jpeg,gif,png\"}\r\n                        ],\r\n                        max_file_size: '3000kb',\r\n                        prevent_duplicates: true\r\n                    }\r\n                });\r\n                uploader_featured_image.init();\r\n\r\n                uploader_featured_image.bind('UploadProgress', function (up, file) {\r\n                    document.getElementById(\"golo_select_featured_image\").innerHTML = '<span><i class=\"la la-circle-notch la-spin large\"><\/i><\/span>';\r\n                });\r\n\r\n                uploader_featured_image.bind('FilesAdded', function (up, files) {\r\n                    var maxfiles = 1;\r\n                    up.refresh();\r\n                    uploader_featured_image.start();\r\n                });\r\n                uploader_featured_image.bind('Error', function (up, err) {\r\n                    window.handleMediaImageUploadError('featured_image_errors_log', err.code, err.message);\r\n                });\r\n                uploader_featured_image.bind('FileUploaded', function (up, file, ajax_response) {\r\n                    document.getElementById(\"golo_select_featured_image\").innerHTML = '<i class=\"la la-upload large\"><\/i>';\r\n                    var response = $.parseJSON(ajax_response.response);\r\n\r\n                    if (response.success) {\r\n\r\n                        $('.featured_image_url').val(response.full_image);\r\n                        $('.featured_image_id').val(response.attachment_id);\r\n                        var $html =\r\n                            '<figure class=\"media-thumb media-thumb-wrap\">' +\r\n                            '<img decoding=\"async\" src=\"' + response.full_image + '\">' +\r\n                            '<div class=\"media-item-actions\">' +\r\n                            '<a class=\"icon icon-delete\" data-place-id=\"0\"  data-attachment-id=\"' + response.attachment_id + '\" href=\"#\" ><i class=\"la la-trash-alt large\"><\/i><\/a>' +\r\n                            '<span style=\"display: none;\" class=\"icon icon-loader\"><i class=\"la la-circle-notch la-spin large\"><\/i><\/span>' +\r\n                            '<\/div>' +\r\n                            '<\/figure>';\r\n                            console.log($html);\r\n                        $('#golo_place_featured_image_view').html($html);\r\n                        golo_place_gallery_event('thumb');\r\n\r\n                        $('#featured_image_url-error').hide();\r\n                    }\r\n                });\r\n            };\r\n            featured_image();\r\n\r\n            \/\/ Place Thumbnails\r\n            var golo_place_gallery_event = function ($type) {\r\n                $('body').on('click', '.icon-delete', function (e) {\r\n                    e.preventDefault();\r\n                    var $this         = $(this),\r\n                        icon_delete   = $this,\r\n                        thumbnail     = $this.closest('.media-thumb-wrap'),\r\n                        place_id      = $this.data('place-id'),\r\n                        attachment_id = $this.data('attachment-id');\r\n\r\n                    icon_delete.html('<i class=\"la la-circle-notch la-spin large\"><\/i>');\r\n\r\n                    $.ajax({\r\n                        type: 'post',\r\n                        url: 'https:\/\/discoverpuerto.es\/wp-admin\/admin-ajax.php',\r\n                        dataType: 'json',\r\n                        data: {\r\n                            'action': 'remove_place_img_ajax',\r\n                            'place_id': place_id,\r\n                            'attachment_id': attachment_id,\r\n                            'type': $type,\r\n                            'removeNonce': 'df8196949e'\r\n                        },\r\n                        success: function (response) {\r\n                            if (response.success) {\r\n                                thumbnail.remove();\r\n                                thumbnail.hide();\r\n\r\n                                $('#featured_image_url-error').show();\r\n                            }\r\n                            icon_delete.html('<i class=\"la la-circle-notch la-spin large\"><\/i>');\r\n                        },\r\n                        error: function () {\r\n                            icon_delete.html('<i class=\"la la-trash-alt large\"><\/i>');\r\n                        }\r\n                    });\r\n                });\r\n            }\r\n\r\n            golo_place_gallery_event('gallery');\r\n\r\n            \/\/ Place Gallery images\r\n            var golo_place_gallery_images = function () {\r\n\r\n                $(\"#place_gallery_thumbs_container\").sortable();\r\n\r\n                \/* initialize uploader *\/\r\n                var uploader = new plupload.Uploader({\r\n                    browse_button: 'golo_select_gallery_images',\r\n                    file_data_name: 'place_upload_file',\r\n                    container: 'golo_gallery_plupload_container',\r\n                    drop_element: 'golo_gallery_plupload_container',\r\n                    multi_selection: true,\r\n                    url: \"https:\/\/discoverpuerto.es\/wp-admin\/admin-ajax.php?action=golo_place_img_upload_ajax&nonce=df8196949e\",\r\n                    filters: {\r\n                        mime_types: [\r\n                            {title: 'Valid file formats', extensions: \"jpg,jpeg,gif,png\"}\r\n                        ],\r\n                        max_file_size: '3000kb',\r\n                        prevent_duplicates: true\r\n                    }\r\n                });\r\n                uploader.init();\r\n\r\n                uploader.bind('FilesAdded', function (up, files) {\r\n                    var placeThumb = \"\";\r\n                    var maxfiles = '5';\r\n                    if (up.files.length > maxfiles) {\r\n                        up.splice(maxfiles);\r\n                        alert('no more than ' + maxfiles + ' file(s)');\r\n                        return;\r\n                    }\r\n                    plupload.each(files, function (file) {\r\n                        placeThumb += '<div id=\"holder-' + file.id + '\" class=\"col-sm-2 media-thumb-wrap\"><\/div>';\r\n                    });\r\n                    document.getElementById('place_gallery_thumbs_container').innerHTML += placeThumb;\r\n                    up.refresh();\r\n                    uploader.start();\r\n                });\r\n\r\n                uploader.bind('UploadProgress', function (up, file) {\r\n                    document.getElementById(\"holder-\" + file.id).innerHTML = '<span><i class=\"la la-circle-notch la-spin large\"><\/i><\/span>';\r\n                });\r\n\r\n                uploader.bind('Error', function (up, err) {\r\n                    window.handleMediaImageUploadError('golo_gallery_errors_log', err.code, err.message);\r\n                });\r\n\r\n                uploader.bind('FileUploaded', function (up, file, ajax_response) {\r\n                    var response = $.parseJSON(ajax_response.response);\r\n                    if (response.success) {\r\n                        var $html =\r\n                            '<figure class=\"media-thumb\">' +\r\n                            '<img decoding=\"async\" src=\"' + response.url + '\"\/>' +\r\n                            '<div class=\"media-item-actions\">' +\r\n                            '<a class=\"icon icon-delete\" data-place-id=\"0\"  data-attachment-id=\"' + response.attachment_id + '\" href=\"#\" ><i class=\"la la-trash-alt large\"><\/i><\/a>' +\r\n                            '<input type=\"hidden\" class=\"place_image_ids\" name=\"place_image_ids[]\" value=\"' + response.attachment_id + '\"\/>' +\r\n                            '<span style=\"display: none;\" class=\"icon icon-loader\"><i class=\"la la-circle-notch la-spin large\"><\/i><\/span>' +\r\n                            '<\/div>' +\r\n                            '<\/figure>';\r\n\r\n                        document.getElementById(\"holder-\" + file.id).innerHTML = $html;\r\n                        golo_place_gallery_event('gallery');\r\n                    }\r\n                });\r\n            };\r\n            golo_place_gallery_images();\r\n        });\r\n    })(jQuery);\r\n<\/script>\r\n                        <\/div>\r\n                    \r\n                \r\n                    \r\n                \r\n                    \r\n                \r\n                                            <div class=\"group-field\" id=\"coupon\">\r\n                            <h3>Coupon<\/h3>\r\n                            \r\n<div class=\"place-fields-wrap\">\r\n    <div class=\"place-fields-title\">\r\n        <h3>Coupon Name<\/h3>\r\n    <\/div>\r\n    <div class=\"place-fields place-title\">\r\n        <div class=\"form-group\">\r\n            <input type=\"text\" class=\"form-control\" name=\"tag_name\" value=\"\" placeholder=\"Enter coupon name\">\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\r\n\r\n<div class=\"place-fields-wrap\">\r\n    <div class=\"place-fields-title\">\r\n        <h3>Discount Type<\/h3>\r\n    <\/div>\r\n    <div class=\"place-fields place-title\">\r\n        <div class=\"form-group\">\r\n            <select name=\"coupon_type\" id=\"coupon_type_add\" class=\"form-control\" onchange=\"goloToggleCouponInputFrontend(this)\">\r\n                <option value=\"percent\">Percent (%)<\/option>\r\n                <option value=\"fixed\">Fixed Amount<\/option>\r\n            <\/select>\r\n            <p class=\"description\">Choose discount type for this coupon.<\/p>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\r\n\r\n<div class=\"place-fields-wrap\">\r\n    <div class=\"place-fields-title\">\r\n        <h3>Discount Value<\/h3>\r\n    <\/div>\r\n    <div class=\"place-fields place-title\">\r\n        <div class=\"form-group\">\r\n            <input type=\"number\" step=\"0.01\" min=\"0\" class=\"form-control\" name=\"coupon_amount\" id=\"coupon_amount_add\" value=\"\">\r\n            <p class=\"description\" id=\"coupon_value_desc_frontend\">\r\n                Enter percent value (e.g. 10 for 10%)            <\/p>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\r\n\r\n<script>\r\nfunction goloToggleCouponInputFrontend(sel) {\r\n    var desc = document.getElementById('coupon_value_desc_frontend');\r\n    if (sel.value === 'percent') {\r\n        desc.innerText = 'Enter percent value (e.g. 10 for 10%)';\r\n    } else {\r\n        desc.innerText = 'Enter fixed amount (e.g. 100000 for 100.000\u20ab)';\r\n    }\r\n}\r\n<\/script>\r\n                        <\/div>\r\n                    \r\n                \r\n                                                                                <div class=\"btn-submit-place golo-button account logged-out\">\r\n                            <a href=\"#popup-form\" class=\"btn-login\">Login to Submit<\/a>\r\n                        <\/div>\r\n                    \r\n                \r\n                <input type=\"hidden\" id=\"golo_submit_place_nonce_field\" name=\"golo_submit_place_nonce_field\" value=\"6bd4b777ec\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/fr\/wp-json\/wp\/v2\/pages\/9470\" \/>\r\n                <input type=\"hidden\" name=\"place_form\" value=\"submit-place\" \/>\r\n                <input type=\"hidden\" name=\"place_action\" value=\"add_place\" \/>\r\n            <\/form>\r\n\r\n            <\/div>\r\n<\/section>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"footnotes":""},"class_list":["post-9470","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/discoverpuerto.es\/fr\/wp-json\/wp\/v2\/pages\/9470","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/discoverpuerto.es\/fr\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/discoverpuerto.es\/fr\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/discoverpuerto.es\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/discoverpuerto.es\/fr\/wp-json\/wp\/v2\/comments?post=9470"}],"version-history":[{"count":1,"href":"https:\/\/discoverpuerto.es\/fr\/wp-json\/wp\/v2\/pages\/9470\/revisions"}],"predecessor-version":[{"id":10473,"href":"https:\/\/discoverpuerto.es\/fr\/wp-json\/wp\/v2\/pages\/9470\/revisions\/10473"}],"wp:attachment":[{"href":"https:\/\/discoverpuerto.es\/fr\/wp-json\/wp\/v2\/media?parent=9470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}