/** * */ public function update_response_job($job) { $fields = JEP_Field::get_all_fields(); $return = array(); foreach ($fields as $field) { switch ($field->type) { case 'text': case 'select': default: $return[] = array('ID' => $field->ID, 'type' => $field->type, 'value' => get_post_meta($job['ID'], 'cfield-' . $field->ID, true)); break; case 'date': $time = get_post_meta($job['ID'], 'cfield-' . $field->ID, true); if ($time === '' || strtotime($time) === 0) { $time = ''; } else { $time = date(get_option('date_format'), strtotime($time)); } $return[] = array('ID' => $field->ID, 'type' => $field->type, 'value' => $time); break; } } $job['fields'] = $return; return $job; }
/** * LIST VIEW */ public function menu_view($args) { if (isset($_GET['action']) && ($_GET['action'] == 'add' || $_GET['action'] == 'edit')) { $this->add_view($args); return; } ?> <div class="et-main-header"> <div class="title font-quicksand"><?php echo $args->menu_title; ?> </div> <div class="desc"><?php // echo $args->page_subtitle ?> </div> </div> <div class="et-main-content" id="fields-list" > <div class="et-main-left"> <ul class="et-menu-content inner-menu"> <li> <a href="#job-fields-list" menu-data="general" class="<?php if ($this->current_section == 'job') { echo 'active'; } ?> " > <span class="icon" data-icon="l"></span><?php _e("Job", ET_DOMAIN); ?> </a> </li> <li> <a href="#resume-fields-list" menu-data="general" class="<?php if ($this->current_section == 'resume') { echo 'active'; } ?> " > <span class="icon" data-icon="N"></span><?php _e("Resume", ET_DOMAIN); ?> </a> </li> </ul> </div> <div class="et-main-main clearfix inner-content" id="job-fields-list" <?php if ($this->current_section != 'job') { echo 'style="display:none;"'; } ?> > <?php if (!empty($this->msg) && false) { echo '<div class="updated"><p>' . $this->msg . '</p></div>'; } ?> <div class="title font-quicksand"> <a href="<?php $link = add_query_arg('action', 'add'); echo remove_query_arg('type', $link); ?> " class="new-link"><?php _e('New', ET_DOMAIN); ?> </a> <?php _e('Job fields list', ET_DOMAIN); ?> </div> <div class="desc"> <ul class="ordered-list sortable" id="lst_fields"> <?php $fields = JEP_Field::get_all_fields('job'); foreach ($fields as $field) { ?> <li class="item item-<?php echo $field->ID; ?> " id="item_<?php echo $field->ID; ?> "> <div class="sort-handle"></div> <span><strong><?php echo $field->name; ?> </strong> <?php if ($field->required) { echo '(' . __('required', ET_DOMAIN) . ')'; } ?> </span> <div class="actions"> <a href="<?php echo add_query_arg(array('action' => 'edit', 'id' => $field->ID)); ?> " title="<?php _e('Edit', ET_DOMAIN); ?> " class="icon act-edit" data-icon="p"></a> <a href="#" title="<?php _e('Delete', ET_DOMAIN); ?> " data="<?php echo $field->ID; ?> " class="icon act-del" data-icon="D"></a> </div> </li> <?php } ?> </ul> </div> </div> <div class="et-main-main clearfix inner-content" id="resume-fields-list" <?php if ($this->current_section != 'resume') { echo 'style="display:none;"'; } ?> > <div class="title font-quicksand"> <a href="<?php echo add_query_arg(array('action' => 'add', 'type' => 'resume')); ?> " class="new-link"><?php _e('New', ET_DOMAIN); ?> </a> <?php _e('Resume fields list', ET_DOMAIN); ?> </div> <div class="desc"> <ul class="ordered-list sortable" id="resume_lst_fields"> <?php $fields = JEP_Field::get_all_fields('resume'); foreach ($fields as $field) { ?> <li class="item item-<?php echo $field->ID; ?> " id="item_<?php echo $field->ID; ?> "> <div class="sort-handle"></div> <span><strong><?php echo $field->label; ?> </strong> <?php if ($field->required) { echo '(' . __('required', ET_DOMAIN) . ')'; } ?> </span> <div class="actions"> <a href="<?php echo add_query_arg(array('action' => 'edit', 'id' => $field->ID, 'type' => 'resume')); ?> " title="<?php _e('Edit', ET_DOMAIN); ?> " class="icon act-edit" data-icon="p"></a> <a href="#" title="<?php _e('Delete', ET_DOMAIN); ?> " data="<?php echo $field->ID; ?> " class="icon act-del" data-icon="D"></a> </div> </li> <?php } ?> <!-- <li class="item" data=""> <div class="sort-handle"></div> <span><strong>Soft Skill</strong> (required)</span> <div class="actions"> <a href="#" title="<?php _e('Edit', ET_DOMAIN); ?> " class="icon act-edit" rel="<?php echo $plan['ID']; ?> " data-icon="p"></a> <a href="#" title="<?php _e('Delete', ET_DOMAIN); ?> " class="icon act-del" rel="<?php echo $plan['ID']; ?> " data-icon="D"></a> </div> </li> --> </ul> </div> </div> </div> <?php }
function je_resume_edit_form($resume) { $fields = JEP_Field::get_all_fields('resume'); if ($fields) { foreach ($fields as $key => $field) { $this->show_resume_field_on_mobile($resume, $field); } echo '<input type="hidden" id="field_current_date" value="' . date(get_option("date_format"), time()) . '" />'; } }