/** * JobRoller Resume form * Function outputs the resume submit form * * * @version 1.4 * @author AppThemes * @package JobRoller * @copyright 2010 all rights reserved * */ function jr_submit_resume_form($resume_id = 0) { global $post, $posted; jr_geolocation_scripts(); ?> <form action="<?php if ($resume_id > 0) { echo add_query_arg('edit', $resume_id, get_permalink($post->ID)); } else { echo get_permalink($post->ID); } ?> " method="post" enctype="multipart/form-data" id="submit_form" class="submit_form main_form"> <p><?php _e('Enter your resume details below. Once saved you will be able to view your resume and optionally add links to your websites/social networks if you wish.', 'appthemes'); ?> </p> <fieldset> <legend><?php _e('Your Resume', 'appthemes'); ?> </legend> <p><label for="resume_name"><?php _e('Resume Title', 'appthemes'); ?> <span title="required">*</span></label> <input type="text" class="text" name="resume_name" id="resume_name" class="text" placeholder="<?php _e('e.g. Lead Developer', 'appthemes'); ?> " value="<?php if (isset($posted['resume_name'])) { echo $posted['resume_name']; } ?> " /></p> <p><label for="summary"><?php _e('Resume Summary', 'appthemes'); ?> <span title="required">*</span></label> <textarea rows="5" cols="30" name="summary" id="summary" placeholder="<?php _e('Briefly describe yourself.', 'appthemes'); ?> " class="short" style="height:100px;"><?php if (isset($posted['summary'])) { echo $posted['summary']; } ?> </textarea></p> <p class="optional"><label for="resume_cat"><?php _e('Resume Category', 'appthemes'); ?> </label> <?php $sel = 0; if (isset($posted['resume_cat']) && $posted['resume_cat'] > 0) { $sel = $posted['resume_cat']; } global $featured_job_cat_id; $args = array('orderby' => 'name', 'order' => 'ASC', 'name' => 'resume_cat', 'hierarchical' => 1, 'echo' => 0, 'class' => 'resume_cat', 'selected' => $sel, 'taxonomy' => 'resume_category', 'hide_empty' => false); $dropdown = wp_dropdown_categories($args); $dropdown = str_replace('class=\'resume_cat\' >', 'class=\'resume_cat\' ><option value="">' . __('Select a category…', 'appthemes') . '</option>', $dropdown); echo $dropdown; ?> </p> <p class="optional"><label for="your-photo"><?php _e('Resume Photo (.jpg, .gif or .png)', 'appthemes'); ?> </label> <input type="file" class="text" name="your-photo" id="your-photo" /></p> <p class="optional"><label for="desired_salary"><?php _e('Desired Salary', 'appthemes'); ?> </label> <input type="text" class="tags text" name="desired_salary" id="desired_salary" placeholder="<?php _e('e.g. $25,000', 'appthemes'); ?> " value="<?php if (isset($posted['desired_salary'])) { echo $posted['desired_salary']; } ?> " /></p> <p class="optional"><label for="desired_position"><?php _e('Desired Type of Position', 'appthemes'); ?> </label> <select name="desired_position" id="desired_position"> <option value=""><?php _e('Any', 'appthemes'); ?> </option> <?php $job_types = get_terms('resume_job_type', array('hide_empty' => '0')); if ($job_types && sizeof($job_types) > 0) { foreach ($job_types as $type) { ?> <option <?php if (isset($posted['desired_position']) && $posted['desired_position'] == $type->slug) { echo 'selected="selected"'; } ?> value="<?php echo $type->slug; ?> "><?php echo $type->name; ?> </option> <?php } } ?> </select></p> </fieldset> <fieldset> <legend><?php _e('Your Contact Details', 'appthemes'); ?> </legend> <p><?php _e('Optionally fill in your contact details below to have them appear on your resume. This is important if you want employers to be able to contact you!', 'appthemes'); ?> </p> <p class="optional"><label for="email_address"><?php _e('Email Address', 'appthemes'); ?> </label> <input type="text" class="text" name="email_address" value="<?php if (isset($posted['email_address'])) { echo $posted['email_address']; } ?> " id="email_address" placeholder="<?php _e('*****@*****.**', 'appthemes'); ?> " /></p> <p class="optional"><label for="tel"><?php _e('Telephone', 'appthemes'); ?> </label> <input type="text" class="text" name="tel" value="<?php if (isset($posted['tel'])) { echo $posted['tel']; } ?> " id="tel" placeholder="<?php _e('Telephone including area code', 'appthemes'); ?> " /></p> <p class="optional"><label for="mobile"><?php _e('Mobile', 'appthemes'); ?> </label> <input type="text" class="text" name="mobile" value="<?php if (isset($posted['mobile'])) { echo $posted['mobile']; } ?> " id="mobile" placeholder="<?php _e('Mobile number', 'appthemes'); ?> " /></p> </fieldset> <fieldset> <legend><?php _e('Resume Location', 'appthemes'); ?> </legend> <p><?php _e('Entering your location will help employers find you.', 'appthemes'); ?> </p> <div id="geolocation_box"> <p><label><input id="geolocation-load" type="button" class="button geolocationadd" value="<?php _e('Find Address/Location', 'appthemes'); ?> " /></label> <input type="text" class="text" name="jr_address" id="geolocation-address" value="<?php if (isset($posted['jr_address'])) { echo $posted['jr_address']; } ?> " /><input type="hidden" class="text" name="jr_geo_latitude" id="geolocation-latitude" value="<?php if (isset($posted['jr_geo_latitude'])) { echo $posted['jr_geo_latitude']; } ?> " /><input type="hidden" class="text" name="jr_geo_longitude" id="geolocation-longitude" value="<?php if (isset($posted['jr_geo_longitude'])) { echo $posted['jr_geo_longitude']; } ?> " /></p> <div id="map_wrap" style="border:solid 2px #ddd;"><div id="geolocation-map" style="width:100%;height:300px;"></div></div> </div> </fieldset> <fieldset> <legend><?php _e('Education', 'appthemes'); ?> </legend> <p><?php _e('Detail your education, including details on your qualifications and schools/universities attended.', 'appthemes'); ?> </p> <p><textarea rows="5" cols="30" name="education" id="education" class="mceEditor"><?php if (isset($posted['education'])) { echo $posted['education']; } ?> </textarea></p> </fieldset> <fieldset> <legend><?php _e('Experience', 'appthemes'); ?> </legend> <p><?php _e('Detail your work experience, including details on your employers and job roles and responsibilities.', 'appthemes'); ?> </p> <p><textarea rows="5" cols="30" name="experience" id="experience" class="mceEditor"><?php if (isset($posted['experience'])) { echo $posted['experience']; } ?> </textarea></p> </fieldset> <fieldset> <legend><?php _e('Skills & Specialities', 'appthemes'); ?> </legend> <p class="optional"><label for="skills"><?php _e('Skills <small>(one per line)</small>', 'appthemes'); ?> </label> <textarea rows="1" cols="30" name="skills" id="skills" class="short grow" placeholder="<?php _e('e.g. XHTML (5 years experience)', 'appthemes'); ?> "><?php if (isset($posted['skills'])) { echo $posted['skills']; } ?> </textarea></p> <p class="optional"><label for="specialities"><?php _e('Specialities <small>e.g. Public speaking, Team management</small>', 'appthemes'); ?> </label> <input type="text" class="tags text tag-input-commas" data-separator="," name="specialities" id="specialities" placeholder="<?php _e('e.g. Public Speaking, Team Management', 'appthemes'); ?> " value="<?php if (isset($posted['specialities'])) { echo $posted['specialities']; } ?> " /></p> <p class="optional"><label for="groups"><?php _e('Groups/Associations <small>e.g. IEEE, W3C</small>', 'appthemes'); ?> </label> <input type="text" class="text text tag-input-commas" data-separator="," name="groups" value="<?php if (isset($posted['groups'])) { echo $posted['groups']; } ?> " id="groups" placeholder="<?php _e('e.g. IEEE, W3C', 'appthemes'); ?> " /></p> <p class="optional" id="languages_wrap"><label for="languages"><?php _e('Spoken Languages <small>e.g. English, French</small>', 'appthemes'); ?> </label> <input type="text" class="text text tag-input-commas" data-separator="," name="languages" value="<?php if (isset($posted['languages'])) { echo $posted['languages']; } ?> " id="languages" placeholder="<?php _e('e.g. English, French', 'appthemes'); ?> " /></p> </fieldset> <p><input type="submit" class="submit" name="save_resume" value="<?php _e('Save →', 'appthemes'); ?> " /></p> <div class="clear"></div> </form> <script type="text/javascript"> jQuery(function(){ /* Auto Complete */ var availableTags = [ <?php $terms_array = array(); $terms = get_terms('resume_languages', 'hide_empty=0'); if ($terms) { foreach ($terms as $term) { $terms_array[] = '"' . $term->name . '"'; } } echo implode(',', $terms_array); ?> ]; function split( val ) { return val.split( /,\s*/ ); } function extractLast( term ) { return split( term ).pop(); } jQuery("#languages_wrap input").live( "keydown", function( event ) { if ( (event.keyCode === jQuery.ui.keyCode.TAB || event.keyCode === jQuery.ui.keyCode.COMMA) && jQuery( this ).data( "autocomplete" ).menu.active ) { event.preventDefault(); } }).autocomplete({ minLength: 0, source: function( request, response ) { // delegate back to autocomplete, but extract the last term response( jQuery.ui.autocomplete.filter( availableTags, extractLast( request.term ) ) ); }, focus: function() { jQuery('input.ui-autocomplete-input').val(''); // prevent value inserted on focus return false; }, select: function( event, ui ) { var terms = split( this.value ); // remove the current input terms.pop(); // add the selected item terms.push( ui.item.value ); // add placeholder to get the comma-and-space at the end terms.push( "" ); //this.value = terms.join( ", " ); this.value = terms.join( "" ); jQuery(this).blur(); jQuery(this).focus(); return false; } }); }); </script> <?php if (get_option('jr_html_allowed') == 'yes') { jr_tinymce(); } ?> <?php }
/** * JobRoller Edit Job form * Function outputs the job edit form * * * @version 1.0 * @author AppThemes * @package JobRoller * @copyright 2010 all rights reserved * */ function jr_edit_job_form($relisting = false) { global $post, $posted, $job_details; jr_geolocation_scripts(); ?> <form action="<?php echo get_permalink($post->ID); ?> ?edit=<?php echo $job_details->ID; ?> " method="post" enctype="multipart/form-data" id="submit_form" class="submit_form main_form"> <fieldset> <legend><?php _e('Company Details', 'appthemes'); ?> </legend> <p><?php _e('Fill in the company section to provide details of the company listing the job. Leave this section blank to show your display name and profile page link instead.', 'appthemes'); ?> </p> <p class="optional"><label for="your_name"><?php _e('Your Name/Company Name', 'appthemes'); ?> </label> <input type="text" class="text" name="your_name" id="your_name" value="<?php if (isset($posted['your_name'])) { echo $posted['your_name']; } else { echo get_post_meta($job_details->ID, '_Company', true); } ?> " /></p> <p class="optional"><label for="website"><?php _e('Website', 'appthemes'); ?> </label> <input type="text" class="text" name="website" value="<?php if (isset($posted['website'])) { echo $posted['website']; } else { echo get_post_meta($job_details->ID, '_CompanyURL', true); } ?> " placeholder="http://" id="website" /></p> <p class="optional"><label for="company-logo"><?php _e('Logo (.jpg, .gif or .png)', 'appthemes'); ?> </label> <input type="file" class="text" name="company-logo" id="company-logo" /></p> </fieldset> <fieldset> <legend><?php _e('Job Details', 'appthemes'); ?> </legend> <p><?php _e('Enter details about the job below. Be as descriptive as possible so that potential candidates can find your job listing easily.', 'appthemes'); ?> </p> <p><label for="job_title"><?php _e('Job title', 'appthemes'); ?> <span title="required">*</span></label> <input type="text" class="text" name="job_title" id="job_title" value="<?php if (isset($posted['job_title'])) { echo $posted['job_title']; } else { echo $job_details->post_title; } ?> " /></p> <p><label for="job_type"><?php _e('Job type', 'appthemes'); ?> <span title="required">*</span></label> <select name="job_term_type" id="job_type"> <?php $job_types = get_terms('job_type', array('hide_empty' => '0')); if ($job_types && sizeof($job_types) > 0) { foreach ($job_types as $type) { ?> <option value="<?php echo $type->slug; ?> " <?php if (isset($posted['job_term_type'])) { if ($posted['job_term_type'] == $type->slug) { echo 'selected="selected"'; } } else { $job_has_terms = array(); $get_terms = wp_get_post_terms($job_details->ID, 'job_type'); foreach ($get_terms as $term) { $job_has_terms[] = $term->slug; } if (in_array($type->slug, $job_has_terms)) { echo 'selected="selected"'; } } ?> ><?php echo $type->name; ?> </option> <?php } } ?> </select></p> <p class="<?php if (get_option('jr_submit_cat_required') !== 'yes') { echo 'optional'; } ?> "><label for="job_cat"><?php _e('Job Category', 'appthemes'); ?> <?php if (get_option('jr_submit_cat_required') == 'yes') { ?> <span title="required">*</span><?php } ?> </label> <?php $sel = 0; global $featured_job_cat_id; if (isset($posted['job_term_cat']) && $posted['job_term_cat'] > 0) { $sel = $posted['job_term_cat']; } else { $get_terms = wp_get_post_terms($job_details->ID, 'job_cat'); foreach ($get_terms as $term) { if ($term->term_id !== $featured_job_cat_id) { $sel = $term->term_id; } } } $args = array('orderby' => 'name', 'exclude' => $featured_job_cat_id, 'order' => 'ASC', 'name' => 'job_term_cat', 'hierarchical' => 1, 'echo' => 0, 'class' => 'job_cat', 'selected' => $sel, 'taxonomy' => 'job_cat', 'hide_empty' => false); $dropdown = wp_dropdown_categories($args); $dropdown = str_replace('class=\'job_cat\' >', 'class=\'job_cat\' ><option value="">Select a category…</option>', $dropdown); echo $dropdown; ?> </p> <?php if (get_option('jr_enable_salary_field') !== 'no') { ?> <p class="optional"><label for="job_term_salary"><?php _e('Job Salary', 'appthemes'); ?> </label> <?php $sel = 0; if (isset($posted['job_term_salary']) && $posted['job_term_salary'] > 0) { $sel = $posted['job_term_salary']; } else { $get_terms = wp_get_post_terms($job_details->ID, 'job_salary'); foreach ($get_terms as $term) { $sel = $term->term_id; } } $args = array('orderby' => 'ID', 'order' => 'ASC', 'name' => 'job_term_salary', 'hierarchical' => 1, 'echo' => 0, 'class' => 'job_salary', 'selected' => $sel, 'taxonomy' => 'job_salary', 'hide_empty' => false); $dropdown = wp_dropdown_categories($args); $dropdown = str_replace('class=\'job_salary\' >', 'class=\'job_salary\' ><option value="">Select a salary…</option>', $dropdown); echo $dropdown; ?> </p><?php } ?> <p class="optional"><label for="tags"><?php _e('Tags (comma separated)', 'appthemes'); ?> </label> <input type="text" class="text" name="tags" value="<?php if (isset($posted['tags'])) { echo $posted['tags']; } else { $job_tags = array(); $get_terms = wp_get_post_terms($job_details->ID, 'job_tag'); foreach ($get_terms as $term) { $job_tags[] = $term->name; } echo implode(', ', $job_tags); } ?> " id="tags" /></p> </fieldset> <fieldset> <legend><?php _e('Job Location', 'appthemes'); ?> </legend> <p><?php _e('Leave blank if the location of the applicant does not matter e.g. the job involves working from home.', 'appthemes'); ?> </p> <div id="geolocation_box"> <p><label><input id="geolocation-load" type="button" class="button geolocationadd" value="<?php _e('Find Address/Location', 'appthemes'); ?> " /></label> <input type="text" class="text" name="jr_address" id="geolocation-address" value="<?php if (isset($posted['jr_address'])) { echo $posted['jr_address']; } else { echo get_post_meta($job_details->ID, 'geo_address', true); } ?> " /><input type="hidden" class="text" name="jr_geo_latitude" id="geolocation-latitude" value="<?php if (isset($posted['jr_geo_latitude'])) { echo $posted['jr_geo_latitude']; } else { echo get_post_meta($job_details->ID, '_jr_geo_latitude', true); } ?> " /><input type="hidden" class="text" name="jr_geo_longitude" id="geolocation-longitude" value="<?php if (isset($posted['jr_geo_longitude'])) { echo $posted['jr_geo_longitude']; } else { echo get_post_meta($job_details->ID, '_jr_geo_longitude', true); } ?> " /></p> <div id="map_wrap" style="border:solid 2px #ddd;"><div id="geolocation-map" style="width:100%;height:350px;"></div></div> </div> </fieldset> <fieldset> <legend><?php _e('Job Description', 'appthemes'); ?> </legend> <p><?php _e('Give details about the position, such as responsibilities & salary.', 'appthemes'); if (get_option('jr_html_allowed') == 'no') { _e(' HTML is not allowed.', 'appthemes'); } ?> </p> <p><textarea rows="5" cols="30" name="details" id="details" class="mceEditor"><?php if (isset($posted['details'])) { echo $posted['details']; } else { echo $job_details->post_content; } ?> </textarea></p> </fieldset> <?php if (get_option('jr_submit_how_to_apply_display') == 'yes') { ?> <fieldset> <legend><?php _e('How to apply', 'appthemes'); ?> </legend> <p><?php _e('Tell applicants how to apply – they will also be able to email you via the “apply” form on your job listing\'s page.', 'appthemes'); if (get_option('jr_html_allowed') == 'no') { _e(' HTML is not allowed.', 'appthemes'); } ?> </p> <p><textarea rows="5" cols="30" name="apply" id="apply" class="how mceEditor"><?php if (isset($posted['apply'])) { echo $posted['apply']; } else { echo get_post_meta($job_details->ID, '_how_to_apply', true); } ?> </textarea></p> </fieldset><?php } ?> <?php if ($relisting) { $packs = jr_get_job_packs(); $user_packs = jr_get_user_job_packs(); if (sizeof($packs) > 0 || sizeof($user_packs) > 0) { echo '<h2 style="margin-top: 20px;">' . __('Select a Job Pack:', 'appthemes') . '</h2>'; echo '<ul class="packs">'; $checked = 'checked="checked"'; if (sizeof($user_packs) > 0) { foreach ($user_packs as $pack) { $choose_or_use = __('Choose this pack', 'appthemes'); if (!$pack->jobs_limit) { $pack->jobs_count = __('Unlimited', 'appthemes') . ' ' . __('Jobs remaining', 'appthemes'); } else { $pack->jobs_count = $pack->jobs_limit - $pack->jobs_count; if ($pack->jobs_count == 1) { $pack->jobs_count = $pack->jobs_count . ' ' . __('Job remaining', 'appthemes'); } else { $pack->jobs_count = $pack->jobs_count . ' ' . __('Jobs remaining', 'appthemes'); } } if ($pack->pack_expires) { $pack->pack_expires = __('Usable before ', 'appthemes') . mysql2date(get_option('date_format'), $pack->pack_expires); } if ($pack->job_duration) { $pack->job_duration = __(' lasting ', 'appthemes') . $pack->job_duration . __(' days', 'appthemes'); } echo '<li><span class="cost">' . __('Purchased', 'appthemes') . '</span><h3>' . $pack->pack_name . '</h3> <p>' . $pack->jobs_count . '' . $pack->job_duration . '. ' . $pack->pack_expires . '.</p> <div><label>' . $choose_or_use . ': <input type="radio" name="job_pack" value="user_' . $pack->id . '" ' . $checked . ' /></label></div> </li>'; $checked = ''; } } if (sizeof($packs) > 0) { foreach ($packs as $pack) { $choose_or_use = ''; if (!$pack->job_count) { $pack->job_count = __('Unlimited', 'appthemes'); } if ($pack->pack_duration) { $pack->pack_duration = __(' usable within ', 'appthemes') . $pack->pack_duration . __(' days', 'appthemes'); } if ($pack->job_duration) { $pack->job_duration = __(' lasting ', 'appthemes') . $pack->job_duration . __(' days', 'appthemes'); } if ($pack->pack_cost) { $pack->pack_cost = jr_get_currency($pack->pack_cost) . ''; $choose_or_use = __('Buy this pack', 'appthemes'); } else { $pack->pack_cost = __('Free', 'appthemes'); $choose_or_use = __('Choose this pack', 'appthemes'); } echo '<li><span class="cost">' . $pack->pack_cost . '</span><h3>' . $pack->pack_name . ' – <small>' . $pack->pack_description . '</small></h3> <p>' . $pack->job_count . ' ' . __('Jobs', 'appthemes') . '' . $pack->job_duration . $pack->pack_duration . '.</p> <div><label>' . $choose_or_use . ': <input type="radio" name="job_pack" value="' . $pack->id . '" ' . $checked . ' /></label></div> </li>'; $checked = ''; } } echo '</ul>'; } echo '<input type="hidden" name="relist" value="true" />'; ?> <?php $featured_cost = get_option('jr_cost_to_feature'); if ($featured_cost && is_numeric($featured_cost) && $featured_cost > 0) { // Featuring is an option echo '<h2>' . __('Feature your listing for ', 'appthemes') . jr_get_currency($featured_cost) . __('?', 'appthemes') . '</h2>'; echo '<p>' . __('Featured listings are displayed on the homepage and are also highlighted in all other listing pages.', 'appthemes') . '</p>'; echo '<p><input type="checkbox" name="featureit" id="featureit" /> <label for="featureit" style="float:none">' . __('Yes please, feature my listing.', 'appthemes') . '</label></p>'; } } ?> <p><input type="submit" class="submit" name="job_submit" value="<?php if ($relisting) { _e('Relist →', 'appthemes'); } else { _e('Save →', 'appthemes'); } ?> " /></p> <div class="clear"></div> </form> <?php if (get_option('jr_html_allowed') == 'yes') { jr_tinymce(); } ?> <?php }
/** * JobRoller Submit Job form * Function outputs the job submit form * * * @version 1.0 * @author AppThemes * @package JobRoller * @copyright 2010 all rights reserved * */ function jr_submit_job_form() { global $post, $posted; jr_geolocation_scripts(); ?> <form action="<?php echo get_permalink($post->ID); ?> " method="post" enctype="multipart/form-data" id="submit_form" class="submit_form main_form"> <fieldset> <legend><?php _e('Company Details', 'appthemes'); ?> </legend> <p><?php _e('Fill in the company section to provide details of the company listing the job. Leave this section blank to show your display name and profile page link instead.', 'appthemes'); ?> </p> <p class="optional"><label for="your_name"><?php _e('Your Name/Company Name', 'appthemes'); ?> </label> <input type="text" class="text" name="your_name" id="your_name" value="<?php if (isset($posted['your_name'])) { echo esc_html($posted['your_name']); } ?> " /></p> <p class="optional"><label for="website"><?php _e('Website', 'appthemes'); ?> </label> <input type="text" class="text" name="website" value="<?php if (isset($posted['website'])) { echo esc_html($posted['website']); } ?> " placeholder="http://" id="website" /></p> <p class="optional"><label for="company-logo"><?php _e('Logo (.jpg, .gif or .png)', 'appthemes'); ?> </label> <input type="file" class="text" name="company-logo" id="company-logo" /></p> </fieldset> <fieldset> <legend><?php _e('Job Details', 'appthemes'); ?> </legend> <p><?php _e('Enter details about the job below. Be as descriptive as possible so that potential candidates can find your job listing easily.', 'appthemes'); ?> </p> <p><label for="job_title"><?php _e('Job title', 'appthemes'); ?> <span title="required">*</span></label> <input type="text" class="text" name="job_title" id="job_title" value="<?php if (isset($posted['job_title'])) { echo esc_html($posted['job_title']); } ?> " /></p> <p><label for="job_type"><?php _e('Job type', 'appthemes'); ?> <span title="required">*</span></label> <select name="job_term_type" id="job_type"> <?php $job_types = get_terms('job_type', array('hide_empty' => '0')); if ($job_types && sizeof($job_types) > 0) { foreach ($job_types as $type) { ?> <option <?php if (isset($posted['job_term_type']) && $posted['job_term_type'] == $type->slug) { echo 'selected="selected"'; } ?> value="<?php echo $type->slug; ?> "><?php echo $type->name; ?> </option> <?php } } ?> </select></p> <p class="<?php if (get_option('jr_submit_cat_required') !== 'yes') { echo 'optional'; } ?> "><label for="job_cat"><?php _e('Job Category', 'appthemes'); ?> <?php if (get_option('jr_submit_cat_required') == 'yes') { ?> <span title="required">*</span><?php } ?> </label> <?php $sel = 0; if (isset($posted['job_term_cat']) && $posted['job_term_cat'] > 0) { $sel = $posted['job_term_cat']; } global $featured_job_cat_id; $args = array('orderby' => 'name', 'exclude' => $featured_job_cat_id, 'order' => 'ASC', 'name' => 'job_term_cat', 'hierarchical' => 1, 'echo' => 0, 'class' => 'job_cat', 'selected' => $sel, 'taxonomy' => 'job_cat', 'hide_empty' => false); $dropdown = wp_dropdown_categories($args); $dropdown = str_replace('class=\'job_cat\' >', 'class=\'job_cat\' ><option value="">' . __('Select a category…', 'appthemes') . '</option>', $dropdown); echo $dropdown; ?> </p> <?php if (get_option('jr_enable_salary_field') !== 'no') { ?> <p class="optional"><label for="job_term_salary"><?php _e('Job Salary', 'appthemes'); ?> </label> <?php $sel = 0; if (isset($posted['job_term_salary']) && $posted['job_term_salary'] > 0) { $sel = $posted['job_term_salary']; } $args = array('orderby' => 'ID', 'order' => 'ASC', 'name' => 'job_term_salary', 'hierarchical' => 1, 'echo' => 0, 'class' => 'job_salary', 'selected' => $sel, 'taxonomy' => 'job_salary', 'hide_empty' => false); $dropdown = wp_dropdown_categories($args); $dropdown = str_replace('class=\'job_salary\' >', 'class=\'job_salary\' ><option value="">' . __('Select a salary…', 'appthemes') . '</option>', $dropdown); echo $dropdown; ?> </p><?php } ?> <p class="optional"><label for="tags_input"><?php _e('Tags (comma separated)', 'appthemes'); ?> </label> <input type="text" class="text" name="tags" value="<?php if (isset($posted['tags'])) { echo $posted['tags']; } ?> " id="tags_input" /></p> </fieldset> <fieldset> <legend><?php _e('Job Location', 'appthemes'); ?> </legend> <p><?php _e('Leave blank if the location of the applicant does not matter e.g. the job involves working from home.', 'appthemes'); ?> </p> <div id="geolocation_box"> <p><label><input id="geolocation-load" type="button" class="button geolocationadd" value="<?php _e('Find Address/Location', 'appthemes'); ?> " /></label> <input type="text" class="text" name="jr_address" id="geolocation-address" value="<?php if (isset($posted['jr_address'])) { echo $posted['jr_address']; } ?> " autocomplete="off" /> <input type="hidden" class="text" name="jr_geo_latitude" id="geolocation-latitude" value="<?php if (isset($posted['jr_geo_latitude'])) { echo $posted['jr_geo_latitude']; } ?> " /> <input type="hidden" class="text" name="jr_geo_longitude" id="geolocation-longitude" value="<?php if (isset($posted['jr_geo_longitude'])) { echo $posted['jr_geo_longitude']; } ?> " /> <input type="hidden" class="text" name="jr_geo_country" id="geolocation-country" value="<?php if (isset($posted['jr_geo_country'])) { echo $posted['jr_geo_country']; } ?> " /> <input type="hidden" class="text" name="jr_geo_short_address" id="geolocation-short-address" value="<?php if (isset($posted['jr_geo_short_address'])) { echo $posted['jr_geo_short_address']; } ?> " /> <input type="hidden" class="text" name="jr_geo_short_address_country" id="geolocation-short-address-country" value="<?php if (isset($posted['jr_geo_short_address_country'])) { echo $posted['jr_geo_short_address_country']; } ?> " /> </p> <div id="map_wrap" style="border:solid 2px #ddd;"><div id="geolocation-map" style="width:100%;height:350px;"></div></div> </div> </fieldset> <fieldset> <legend><?php _e('Job Description', 'appthemes'); ?> </legend> <p><?php _e('Give details about the position, such as responsibilities & salary.', 'appthemes'); if (get_option('jr_html_allowed') == 'no') { _e(' HTML is not allowed.', 'appthemes'); } ?> </p> <p><textarea rows="5" cols="30" name="details" id="details" class="mceEditor"><?php if (isset($posted['details'])) { echo $posted['details']; } ?> </textarea></p> </fieldset> <?php if (get_option('jr_submit_how_to_apply_display') == 'yes') { ?> <fieldset> <legend><?php _e('How to apply', 'appthemes'); ?> </legend> <p><?php _e('Tell applicants how to apply – they will also be able to email you via the “apply” form on your job listing\'s page.', 'appthemes'); if (get_option('jr_html_allowed') == 'no') { _e(' HTML is not allowed.', 'appthemes'); } ?> </p> <p><textarea rows="5" cols="30" name="apply" id="apply" class="how mceEditor"><?php if (isset($posted['apply'])) { echo $posted['apply']; } ?> </textarea></p> </fieldset><?php } ?> <p><input type="submit" class="submit" name="job_submit" value="<?php _e('Next →', 'appthemes'); ?> " /></p> <div class="clear"></div> </form> <script type="text/javascript"> /* <![CDATA[ */ jQuery.noConflict(); (function($) { <?php get_template_part('includes/countries'); ?> var availableCountries = [ <?php global $countries; $countries_array = array(); if ($countries) { foreach ($countries as $code => $country) { $countries_array[] = '"' . $country . '"'; } } echo implode(',', $countries_array); ?> ]; var availableStates = [ <?php global $states; echo implode(',', $states); ?> ]; $("input#job_country").autocomplete({ source: availableCountries, minLength: 2 }); $("input#job_city").autocomplete({ source: availableStates, minLength: 1, search: function(){ var c_val = $("input#job_country").val(); if (c_val=='United States' || c_val.val()=='USA' || c_val=='US') return true; else return false; } }); $("#submit_form").submit(function() { $('input#job_city, input#job_country').removeAttr('autocomplete'); }); })(jQuery); /* ]]> */ </script> <?php if (get_option('jr_html_allowed') == 'yes') { jr_tinymce(); } ?> <?php }