Cidade, País
Ou
Cidade, State Name, País"; jQuery("#" + inputfor + "_city_"+sectionid).tokenInput("remove", item); jQuery("div#warn-message").find("span.text").html(msg).show(); jQuery("div#warn-message").show(); jQuery("div#black_wrapper_jobapply").show(); return false; } else { var location_data = jQuery("tester").text(); var geocoder = new google.maps.Geocoder(); geocoder.geocode( { 'address': location_data}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { var n_latitude = results[0].geometry.location.lat(); var n_longitude = results[0].geometry.location.lng(); jQuery.post("https://admhelp.com.br/index.php?option=com_jsjobs&task=cities.savecity&1f2a6d06774c5469f9dd1a1397f8241c=1", {citydata: location_data,latitude: n_latitude,longitude: n_longitude}, function (data) { if (data) { try { var value = jQuery.parseJSON(data); jQuery('#' + inputfor + '_city_'+sectionid).tokenInput('remove', item); jQuery('#' + inputfor + '_city_'+sectionid).tokenInput('add', {id: value.id, name: value.name,latitude:value.latitude,longitude:value.longitude}); } catch (e) { // string is not the json its the message come from server msg = data; jQuery("div#warn-message").find("span.text").html(msg).show(); jQuery("div#warn-message").show(); jQuery("div#black_wrapper_jobapply").show(); jQuery('#' + inputfor + '_city_'+sectionid).tokenInput('remove', item); } } }); } else { alert("Something got wrong"+status); } }); } } }); } else { jQuery("#" + inputfor + "_city_"+sectionid).tokenInput('https://admhelp.com.br/index.php?option=com_jsjobs&c=cities&task=getaddressdatabycityname', { theme: "jsjobs", preventDuplicates: true, hintText: "Insira uma busca", noResultsText: "Sem resultados", searchingText: "", tokenLimit: 1, onResult: function (item) { if (jQuery.isEmptyObject(item)) { return [{id: 0, name: jQuery("tester").text()}]; } else { //add the item at the top of the dropdown item.unshift({id: 0, name: jQuery("tester").text()}); return item; } }, onAdd: function (item) { if (item.id > 0) { return; } if (item.name.search(",") == -1) { var input = jQuery("tester").text(); msg = "Formato da localização não está correto, digite cidade neste formato
Cidade, País
Ou
Cidade, State Name, País"; jQuery("#" + inputfor + "_city_"+sectionid).tokenInput("remove", item); jQuery("div#warn-message").find("span.text").html(msg).show(); jQuery("div#warn-message").show(); jQuery("div#black_wrapper_jobapply").show(); return false; } else { var location_data = jQuery("tester").text(); var geocoder = new google.maps.Geocoder(); geocoder.geocode( { 'address': location_data}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { var n_latitude = results[0].geometry.location.lat(); var n_longitude = results[0].geometry.location.lng(); jQuery.post("https://admhelp.com.br/index.php?option=com_jsjobs&task=cities.savecity&1f2a6d06774c5469f9dd1a1397f8241c=1", {citydata: location_data,latitude: n_latitude,longitude: n_longitude}, function (data) { if (data) { try { var value = jQuery.parseJSON(data); jQuery('#' + inputfor + '_city_'+sectionid).tokenInput('remove', item); jQuery('#' + inputfor + '_city_'+sectionid).tokenInput('add', {id: value.id, name: value.name,latitude:value.latitude,longitude:value.longitude}); } catch (e) { // string is not the json its the message come from server msg = data; jQuery("div#warn-message").find("span.text").html(msg).show(); jQuery("div#warn-message").show(); jQuery("div#black_wrapper_jobapply").show(); jQuery('#' + inputfor + '_city_'+sectionid).tokenInput('remove', item); } } }); } else { alert("Something got wrong"+status); } }); } } }); } } function loadMap( sectionid ) { var default_latitude = "31.5166667"; var default_longitude = "74.3833333"; var latitude = document.getElementById('latitude_'+sectionid).value; var longitude = document.getElementById('longitude_'+sectionid).value; var marker_flag = 0; if ((latitude != '') && (longitude != '')) { default_latitude = latitude; default_longitude = longitude; marker_flag = 1; } var latlng = new google.maps.LatLng(default_latitude, default_longitude); zoom = 10; var myOptions = { zoom: zoom, center: latlng, scrollwheel: false, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_container_"+sectionid), myOptions); var lastmarker = new google.maps.Marker({ postiion: latlng, }); var marker = new google.maps.Marker({ position: latlng, }); if(marker_flag == 1){ marker.setMap(map); } lastmarker = marker; google.maps.event.addListener(map, "click", function (e) { var latLng = new google.maps.LatLng(e.latLng.lat(), e.latLng.lng()); geocoder = new google.maps.Geocoder(); geocoder.geocode({'latLng': latLng}, function (results, status) { if (status == google.maps.GeocoderStatus.OK) { if (lastmarker != '') lastmarker.setMap(null); var marker = new google.maps.Marker({ position: results[0].geometry.location, map: map, }); marker.setMap(map); lastmarker = marker; document.getElementById('latitude_'+sectionid).value = marker.position.lat(); document.getElementById('longitude_'+sectionid).value = marker.position.lng(); } else { alert("Geocode was not successful for the following reason: " + status); } }); }); } function showdiv(sectionid) { document.getElementById('map_'+sectionid).style.visibility = 'visible'; } function hidediv(sectionid) { document.getElementById('map_'+sectionid).style.visibility = 'hidden'; } function myValidate(f) { var msg = new Array(); if (document.formvalidator.isValid(f)) { f.check.value = '1f2a6d06774c5469f9dd1a1397f8241c'; } else { msg.push("Alguns valores não são aceitáveis, por favor tente novamente"); alert(msg.join('\n')); return false; } return true; }
Formulário de currículo
- Painel de controle
- Formulário de currículo