{"id":1310,"date":"2019-04-08T17:49:13","date_gmt":"2019-04-09T01:49:13","guid":{"rendered":"https:\/\/www.realthickinc.com\/goal-diggers\/index.php\/add-job\/"},"modified":"2019-04-08T17:49:13","modified_gmt":"2019-04-09T01:49:13","slug":"add-job","status":"publish","type":"page","link":"https:\/\/www.realthickinc.com\/goal-diggers\/index.php\/add-job\/","title":{"rendered":"Add Job"},"content":{"rendered":"<p>[vc_row][vc_column]<style> \n.ui-datepicker{\n    float: left;\n}\n<\/style>\n<script >\n    var map = null;\n<\/script>\n<script >\n    var markers = [];\n    function getdepartments(src, val,themecall){\n        var themecall = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n    var ajaxurl = \"https:\/\/www.realthickinc.com\/goal-diggers\/wp-admin\/admin-ajax.php\";\n            jQuery.post(ajaxurl, {action: 'jsjobs_ajax', jsjobsme: 'departments', task: 'listdepartments', val: val,themecall:themecall,wpnoncecheck:common.wp_jm_nonce}, function(data){\n            if (data){\n                jQuery(\"#\" + src).html(data); \/\/retuen value                \n            }\n            });\n    }\n    function addMarkerOnMap(location){\n        if( location.latitude != undefined && location.latitude != '' && location.latitude != 0){\/\/ code is for adding a marker from data base lat lang.\n            var latlng = new google.maps.LatLng(String(location.latitude), String(location.longitude));\n            if(map != null){\n                addMarker(latlng,location.id);\n            } else {\n                alert(\"Something got wrong 1:\");\n            } \n        }else{ \/\/ this code for adding a marker from location name. \/\/ this code is redundant but leaving it here \n            var geocoder =  new google.maps.Geocoder();\n            geocoder.geocode( { 'address': location.name}, function(results, status) {\n                var latlng = new google.maps.LatLng(results[0].geometry.location.lat(), results[0].geometry.location.lng());\n                if (status == google.maps.GeocoderStatus.OK) {\n                    if(map != null){\n                        addMarker(latlng,location.id);\n                    }\n                } else {\n                    \/\/alert(\":\"+status);\n                }\n            }); \n        }\n        return;\n    }\n\n    function getTokenInput(multicities) {\n        var cityArray = 'https:\/\/www.realthickinc.com\/goal-diggers\/wp-admin\/admin.php?page=jsjobs_city&action=jsjobtask&task=getaddressdatabycityname';\n        var city = jQuery(\"#cityforedit\").val();\n    if (city != \"\") {\n        jQuery(\"#city\").tokenInput(cityArray, {\n            theme: \"jsjobs\",\n            preventDuplicates: true,\n            hintText: \"Type In A Search Term\",\n            noResultsText: \"No Results\",\n            searchingText: \"Searching\",\n            \/\/ tokenLimit: 1,\n            prePopulate: multicities,\n                            onResult: function(item) {\n                    if (jQuery.isEmptyObject(item)){\n                        return [{id:0, name: jQuery(\"tester\").text()}];\n                    } else {\n                        \/\/add the item at the top of the dropdown\n                        item.unshift({id:0, name: jQuery(\"tester\").text()});\n                        return item;\n                    }\n                },\n                onAdd: function(item) {\n                    if (item.id > 0){\n                                            return; \n                    }\n                    if (item.name.search(\",\") == - 1) {\n                        var input = jQuery(\"tester\").text();\n                        alert (\"Location Format Is Not Correct Please Enter City In This Format City Name Country Name Or City Name State Name Country Name\");\n                        jQuery(\"#city\").tokenInput(\"remove\", item);\n                        return false;\n                    } else{\n                        var ajaxurl = \"https:\/\/www.realthickinc.com\/goal-diggers\/wp-admin\/admin-ajax.php\";\n                        var location_data =  jQuery(\"tester\").text();\n                            \/\/alert(new_loction_lat);\n                            var n_latitude;\n                            var n_longitude;\n                            var geocoder =  new google.maps.Geocoder();\n                            geocoder.geocode( { 'address': location_data}, function(results, status) {\n                                if (status == google.maps.GeocoderStatus.OK) {\n                                    n_latitude = results[0].geometry.location.lat();\n                                    n_longitude = results[0].geometry.location.lng();\n                                } else {\n                                    alert(\"Something got wrong:\"+status);\n                                }\n                            }); \n                            setTimeout(function(){ \/\/ timout is required to make sure that lat lang has value.\n                                jQuery.post(ajaxurl, {action: 'jsjobs_ajax', jsjobsme: 'city', task: 'savetokeninputcity', citydata: location_data,latitude:n_latitude ,longitude:n_longitude,wpnoncecheck:common.wp_jm_nonce }, function(data){\n                                    if (data){\n                                        try {\n                                            var value = jQuery.parseJSON(data);\n                                            jQuery('#city').tokenInput('remove', item);\n                                            jQuery('#city').tokenInput('add', {id: value.id, name: value.name,latitude:value.latitude, longitude:value.longitude});\n                                        }\n                                        catch (err) {\n                                            jQuery(\"#city\").tokenInput(\"remove\", item);\n                                            alert(data);\n                                        }\n                                    }\n                                });\n                            },1500);\n                    }\n                },\n                onDelete: function(item){\n                    identifyMarkerForDelete(item);\/\/ delete marker associted with this token input value.\n                }\n                        });\n        } else {\n            jQuery(\"#city\").tokenInput(cityArray, {\n                theme: \"jsjobs\",\n                preventDuplicates: true,\n                hintText: \"Type In A Search Term\",\n                noResultsText: \"No Results\",\n                searchingText: \"Searching\",\n                \/\/ tokenLimit: 1,\n                                    onResult: function(item) {\n                        if (jQuery.isEmptyObject(item)){\n                            return [{id:0, name: jQuery(\"tester\").text()}];\n                        } else {\n                            \/\/add the item at the top of the dropdown\n                            item.unshift({id:0, name: jQuery(\"tester\").text()});\n                            return item;\n                        }\n                    },\n                    onAdd: function(item) {\n                    if (item.id > 0){\n                                            return; \n                    }\n                    if (item.name.search(\",\") == - 1) {\n                        var input = jQuery(\"tester\").text();\n                        alert (\"Location Format Is Not Correct Please Enter City In This Format City Name Country Name Or City Name State Name Country Name\");\n                        jQuery(\"#city\").tokenInput(\"remove\", item);\n                        return false;\n                    } else{\n                        var ajaxurl = \"https:\/\/www.realthickinc.com\/goal-diggers\/wp-admin\/admin-ajax.php\";\n                        var location_data =  jQuery(\"tester\").text();\n                            \/\/alert(new_loction_lat);\n                            var n_latitude;\n                            var n_longitude;\n                            var geocoder =  new google.maps.Geocoder();\n                            geocoder.geocode( { 'address': location_data}, function(results, status) {\n                                if (status == google.maps.GeocoderStatus.OK) {\n                                    n_latitude = results[0].geometry.location.lat();\n                                    n_longitude = results[0].geometry.location.lng();\n                                } else {\n                                    alert(\"Something got wrong:\"+status);\n                                }\n                            }); \n                            setTimeout(function(){ \/\/ timout is required to make sure that lat lang has value.\n                                jQuery.post(ajaxurl, {action: 'jsjobs_ajax', jsjobsme: 'city', task: 'savetokeninputcity', citydata: location_data,latitude:n_latitude ,longitude:n_longitude,wpnoncecheck:common.wp_jm_nonce }, function(data){\n                                    if (data){\n                                        try {\n                                            var value = jQuery.parseJSON(data);\n                                            jQuery('#city').tokenInput('remove', item);\n                                            jQuery('#city').tokenInput('add', {id: value.id, name: value.name,latitude:value.latitude, longitude:value.longitude});\n                                        }\n                                        catch (err) {\n                                            jQuery(\"#city\").tokenInput(\"remove\", item);\n                                            alert(data);\n                                        }\n                                    }\n                                });\n                            },1000);\n                    }\n                },\n                onDelete: function(item){\n                    identifyMarkerForDelete(item);\/\/ delete marker associted with this token input value.\n                }\n                            });\n        }\n    }\n\n    function getTokenInputTags(multitags) {\n        var tagArray = 'https:\/\/www.realthickinc.com\/goal-diggers\/wp-admin\/admin.php?page=jsjobs_tag&tagfor=1&action=jsjobtask&task=gettagsbytagname';\n        jQuery(\"#tags\").tokenInput(tagArray, {\n            theme: \"jsjobs\",\n            preventDuplicates: true,\n            hintText: \"Type In A Search Term\",\n            noResultsText: \"No Results\",\n            searchingText: \"Searching\",\n            tokenLimit: 5,\n            prePopulate: multitags,\n                            onResult: function(item) {\n                    if (jQuery.isEmptyObject(item)){\n                        return [{id: '', name: jQuery(\"tester\").text()}];\n                    } else {\n                        \/\/add the item at the top of the dropdown\n                        item.unshift({id: '', name: jQuery(\"tester\").text()});\n                        return item;\n                    }\n                },\n                onAdd: function(item) {\n                    if (item.id != ''){return; }\n                    var ajaxurl = \"https:\/\/www.realthickinc.com\/goal-diggers\/wp-admin\/admin-ajax.php\";\n                    jQuery.post(ajaxurl, {action: 'jsjobs_ajax', jsjobsme: 'tag', task: 'saveTokenInputTag', tagdata: jQuery(\"tester\").text(),wpnoncecheck:common.wp_jm_nonce}, function(data){\n                        if (data){\n                            try {\n                                var value = jQuery.parseJSON(data);\n                                jQuery('#tags').tokenInput('remove', item);\n                                jQuery('#tags').tokenInput('add', {id: value.id, name: value.name});\n                            }\n                            catch (err) {\n                                jQuery(\"#tags\").tokenInput(\"remove\", item);\n                                alert(data);\n                            }\n                        }\n                    });\n                }\n                    });\n    }\n\n    jQuery(document).ready(function ($) {\n        \/*job apply link start*\/\n        if (jQuery(\"input#jobapplylink1\").is(\":checked\")){\n        jQuery(\"div#input-text-joblink\").show();\n        }\n        jQuery(\"input#jobapplylink1\").click(function(){\n            if (jQuery(this).is(\":checked\")){\n                jQuery(\"div#input-text-joblink\").show();\n            } else{\n                jQuery(\"div#input-text-joblink\").hide();\n            }\n        });\n        \/*job apply link end*\/\n        $('.custom_date').datepicker({dateFormat: 'm\/d\/yy'});\n        $.validate();\n        \/\/Token Input\n        var multicities = '';\n        getTokenInput(multicities);\n        var jobtags = '';\n        getTokenInputTags(jobtags);\n\n        jQuery(\"form#job_form\").submit(function (e) {\n            var termsandcondtions = jQuery(\"div.jsjobs-terms-and-conditions-wrap\").attr(\"data-jsjobs-terms-and-conditions\");\n            if(termsandcondtions == 1){\n                if(!jQuery(\"input[name='termsconditions']\").is(\":checked\")){\n                    alert(common.terms_conditions);\n                    return false;\n                }\n            }\n        });\n\n    });\n    function getotherexp(id){\n        if (id == 1){\n            jQuery(\"span#experience\").show();\n            jQuery(\"span#experienceid\").hide();\n            jQuery(\"span#range-one\").show();\n            jQuery(\"span#range-exp\").hide();\n            jQuery(\"input#isexperienceminimax\").val(0);\n        }\n        if (id == 2){\n            jQuery(\"span#experience\").hide();\n            jQuery(\"span#experienceid\").show();\n            jQuery(\"span#range-exp\").show();\n            jQuery(\"span#range-one\").hide();\n            jQuery(\"input#isexperienceminimax\").val(1);\n        }\n    }\n    function getotheredu(id){\n        if (id == 1){\n            jQuery(\"span#education\").show();\n            jQuery(\"span#educationid\").hide();\n            jQuery(\"span#range-edu-one\").show();\n            jQuery(\"span#range-edu\").hide();\n            jQuery(\"input#iseducationminimax\").val(0);\n        }\n        if (id == 2){\n            jQuery(\"span#education\").hide();\n            jQuery(\"span#educationid\").show();\n            jQuery(\"span#range-edu\").show();\n            jQuery(\"span#range-edu-one\").hide();\n            jQuery(\"input#iseducationminimax\").val(1);\n        }\n    }\n<\/script>\n<div class=\"jsjb-jm-page-header-wrap\" style=\"background-image:url()\"><div class=\"container\"><div class=\"row\"><div class=\"col-md-12\"> <div class=\"jsjb-jm-page-heading-wrp\"><div class=\"jsjb-jm-heading-tit\"><div class=\"jsjb-jm-heading-left  jsjb-h-fullwidth \"><h2 class=\"jsjb-jm-heading-tit-text\">Add Job<\/h2><div class=\"jsjb-jm-page-breadcrumbs\"><ul class=\"breadcrumb jsjb-jm-breadcrumb\"><li><a href=\"https:\/\/www.realthickinc.com\/goal-diggers\" title=\"Homepage\">Home<\/a><\/li><\/ul><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div> <div class=\"jsjb-jm-page-content-wrap \">        \n\t\t\t        <div class=\"container\">\n\t\t\t            <div class=\"row\">\n\t\t\t                <div class=\"col-md-12\">\n\t\t\t                    <div class=\"jsjb-jm-error-messages-wrp\">\n\t\t\t                        <div class=\"jsjb-jm-error-messages-msg-image\">\n\t                                    <img decoding=\"async\" alt=\"Not logged in\" title=\"Not logged in\" src=\"https:\/\/www.realthickinc.com\/goal-diggers\/wp-content\/themes\/job-manager\/images\/not-login-icon.png\" \/>\n\t\t\t                        <\/div> \n\t\t\t                        <div class=\"jsjb-jm-error-messages-msg\">\n\t\t\t                            <div class=\"jsjb-jm-error-messages-msg-text-bold\">\n\t\t\t                                <h1 class=\"msg-txt\">\n\t\t\t                                   You are not logged in\n\t\t\t                                <\/h1>\n\t\t\t                            <\/div>\n\t\t\t                            <div class=\"jsjb-jm-error-messages-msg-txt no-margin\">\n\t\t\t                                <h4 class=\"msg-txt margin\"> Please Login To Access This Page <\/h4>\n\t\t\t                                <h4 class=\"msg-txt margin\"> Please Register If You Are Not A Registered Member<\/h4>\n\t\t\t                            <\/div><div class=\"jsjb-jm-error-messages-msg-button\">\n\t\t\t\t                                <a title=\"Login\" class=\"jsjb-jm-error-messages-msg-btn secondary-btn\" href=\"https:\/\/www.realthickinc.com\/goal-diggers\/index.php\/add-job\/jsjobs-login\/aHR0cHM6Ly93d3cucmVhbHRoaWNraW5jLmNvbS9nb2FsLWRpZ2dlcnMvaW5kZXgucGhwL2FkZC1qb2IvYWRkLWpvYg==\">Login<\/a> <a title=\"Register\" class=\"jsjb-jm-error-messages-msg-btn primary-btn\" href=\"https:\/\/www.realthickinc.com\/goal-diggers\/index.php\/add-job\/jobseeker-register\">Register<\/a> \n\t\t\t\t                            <\/div><\/div>\n\t\t\t                    <\/div>\n\t\t\t                <\/div>\n\t\t\t            <\/div>        \n\t\t\t        <\/div>\n\t\t\t    <\/div>\n\n[\/vc_column][\/vc_row]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[vc_row][vc_column][\/vc_column][\/vc_row]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"templates\/template-fullwidth.php","meta":{"footnotes":""},"class_list":["post-1310","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.realthickinc.com\/goal-diggers\/index.php\/wp-json\/wp\/v2\/pages\/1310","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.realthickinc.com\/goal-diggers\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.realthickinc.com\/goal-diggers\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.realthickinc.com\/goal-diggers\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.realthickinc.com\/goal-diggers\/index.php\/wp-json\/wp\/v2\/comments?post=1310"}],"version-history":[{"count":0,"href":"https:\/\/www.realthickinc.com\/goal-diggers\/index.php\/wp-json\/wp\/v2\/pages\/1310\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.realthickinc.com\/goal-diggers\/index.php\/wp-json\/wp\/v2\/media?parent=1310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}