{"id":1314,"date":"2019-04-08T17:49:13","date_gmt":"2019-04-09T01:49:13","guid":{"rendered":"https:\/\/www.realthickinc.com\/goal-diggers\/index.php\/add-company\/"},"modified":"2019-04-08T17:49:13","modified_gmt":"2019-04-09T01:49:13","slug":"add-company","status":"publish","type":"page","link":"https:\/\/www.realthickinc.com\/goal-diggers\/index.php\/add-company\/","title":{"rendered":"Add Company"},"content":{"rendered":"<p>[vc_row][vc_column]<style>\n.ui-datepicker{\n    float: left;\n}\n<\/style>\n<script >\n    function removeLogo(id) {\n        var ajaxurl = \"https:\/\/www.realthickinc.com\/goal-diggers\/wp-admin\/admin-ajax.php\";\n        jQuery.post(ajaxurl, {action: 'jsjobs_ajax', jsjobsme: 'company', task: 'deletecompanylogo', companyid: id, wpnoncecheck:common.wp_jm_nonce}, function (data) {\n            if (data) {\n                jQuery(\"img#comp_logo\").css(\"display\", \"none\");\n                jQuery(\"span.remove-file\").css(\"display\", \"none\");\n                jQuery(\"form#jsjobs-form\").append('<input type=\"hidden\" name=\"company_logo_deleted\">');\n            } else {\n                jQuery(\"div.logo-container\").append('<span style=\"color:Red;\">Error Deleting Logo');\n            }\n        });\n    }\n    jQuery(document).ready(function ($) {\n        $('.custom_date').datepicker({dateFormat: 'm\/d\/yy'});\n        \/\/$.validate();\n        \/\/Token Input\n        var multicities = '';\n        getTokenInput(multicities);\n        jQuery(\"form#company_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    function checkUrl(obj) {\n        if (!obj.value.match(\/^http[s]?\\:\\\/\\\/\/))\n            obj.value = 'http:\/\/' + obj.value;\n    }\n    function validate_url() {\n        var value = jQuery(\"#url\").val();\n        if (typeof value != 'undefined') {\n            if (value != '' && value != 'http:\/\/' ) {\n                if (value.match(\/^(http|https|ftp)\\:\\\/\\\/\\w+([\\.\\-]\\w+)*\\.\\w{2,4}(\\:\\d+)*([\\\/\\.\\-\\?\\&\\%\\#]\\w+)*\\\/?$\/i) ||\n                        value.match(\/^mailto\\:\\w+([\\.\\-]\\w+)*\\@\\w+([\\.\\-]\\w+)*\\.\\w{2,4}$\/i))\n                {\n                    return true;\n                }\n                else {\n                    jQuery(\"#url\").addClass(\"invalid\");\n                    alert(\"Enter Correct Company Site\");\n                    return false;\n                }\n            }\n        }\n        return true;\n    }\n    var ajaxurl = \"https:\/\/www.realthickinc.com\/goal-diggers\/wp-admin\/admin-ajax.php\";\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\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});\n                                        }\n                                        catch (err) {\n                                            jQuery(\"#city\").tokenInput(\"remove\", item);\n                                            alert(data);\n                                        }\n                                        }\n                                });\n                            },1500);\n                    }\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\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                        jQuery.post(ajaxurl, {action: 'jsjobs_ajax', jsjobsme: 'city', task: 'savetokeninputcity', citydata: jQuery(\"tester\").text(),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});\n                                }\n                                catch (err) {\n                                    jQuery(\"#city\").tokenInput(\"remove\", item);\n                                    alert(data);\n                                }\n                            }\n                        });\n                    }\n                }\n                            });\n        }\n    }\n\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 Company<\/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-company\/jsjobs-login\/aHR0cHM6Ly93d3cucmVhbHRoaWNraW5jLmNvbS9nb2FsLWRpZ2dlcnMvaW5kZXgucGhwL2FkZC1jb21wYW55L2FkZC1jb21wYW55\">Login<\/a> <a title=\"Register\" class=\"jsjb-jm-error-messages-msg-btn primary-btn\" href=\"https:\/\/www.realthickinc.com\/goal-diggers\/index.php\/add-company\/employer-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>[\/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-1314","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.realthickinc.com\/goal-diggers\/index.php\/wp-json\/wp\/v2\/pages\/1314","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=1314"}],"version-history":[{"count":0,"href":"https:\/\/www.realthickinc.com\/goal-diggers\/index.php\/wp-json\/wp\/v2\/pages\/1314\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.realthickinc.com\/goal-diggers\/index.php\/wp-json\/wp\/v2\/media?parent=1314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}