Example #1
0
 protected static function _modify(Wpjb_Model_Resume $resume)
 {
     $cb = self::_canBrowse();
     $arr = $resume->allToArray();
     $public = array("id", "user_id", "category_id", "title", "firstname", "lastname", "headline", "experience", "education", "country", "address", "email", "phone", "website", "is_active", "degree", "years_experience", "created_at");
     $publish = new stdClass();
     foreach ($public as $k) {
         $publish->{$k} = $resume->{$k};
     }
     foreach ($arr as $k => $a) {
         if (substr($k, 0, 6) == "field_") {
             $publish->{$k} = $a;
         }
     }
     if (!$cb) {
         $private = array("address", "email", "phone", "website");
         foreach ($private as $p) {
             $publish->{$p} = null;
         }
     }
     $t = strtotime($resume->updated_at);
     if ($t <= strtotime("1970-01-01 00:00:00")) {
         $t = __("never", WPJB_DOMAIN);
     } else {
         $t = date("M, d", $t);
     }
     $publish->url = wpjr_link_to("resume", $resume);
     $publish->image = $resume->getImageUrl();
     $publish->can_browse = $cb;
     $publish->formatted_last_update = $t;
     return $publish;
 }
Example #2
0
 public function init()
 {
     $e = new Daq_Form_Element("user_login", Daq_Form_Element::TYPE_TEXT);
     $e->setLabel(__("Username", WPJB_DOMAIN));
     $e->setRequired(true);
     $this->addElement($e, "default");
     $e = new Daq_Form_Element("user_password", Daq_Form_Element::TYPE_PASSWORD);
     $e->setLabel(__("Password", WPJB_DOMAIN));
     $e->setRequired(true);
     $this->addElement($e, "default");
     $e = new Daq_Form_Element("remember", Daq_Form_Element::TYPE_CHECKBOX);
     $e->setLabel(__("Remember me", WPJB_DOMAIN));
     $e->addOption(1, 1, "");
     $this->addElement($e, "default");
     $e = new Daq_Form_Element("redirect_to", Daq_Form_Element::TYPE_HIDDEN);
     $e->setValue(wpjr_link_to("myresume"));
     $this->addElement($e, "hidden");
     apply_filters("wpjr_form_init_login", $this);
 }
Example #3
0
            <span class="wpjb-glyphs wpjb-icon-attention"><?php 
        esc_html_e($form_error);
        ?>
</span>
        </div>
        
        <div>
            <a class="wpjb-button" href="<?php 
        esc_attr_e(wpjr_link_to("login"));
        ?>
"><?php 
        _e("Login", "wpjobboard");
        ?>
</a>
            <a class="wpjb-button" href="<?php 
        esc_attr_e(wpjr_link_to("register"));
        ?>
"><?php 
        _e("Register", "wpjobboard");
        ?>
</a>
            
            <?php 
        do_action("wpjb_tpl_single_actions", $job);
        ?>
        </div>
    </div>
    <?php 
    } elseif ($can_apply) {
        ?>
    
Example #4
0
            <?php 
    }
    ?>
        <?php 
}
?>

            
            <div>
                <label class="wpjb_label">&nbsp;</label>
                <input type="submit" name="wpjb_login" id="wpjb_submit" value="<?php 
_e("Login", WPJB_DOMAIN);
?>
" />
                <a href="<?php 
echo wpjr_link_to("register");
?>
"><?php 
_e("Not a member? Register", WPJB_DOMAIN);
?>
</a>
            </div>
        </fieldset>
        


    </form>


</div>
Example #5
0
?>
</th>
            </tr>
        </thead>
        <tbody>
        <?php 
if (!empty($resumeList)) {
    foreach ($resumeList as $resume) {
        ?>
            <tr class="<?php 
        wpjb_resume_mods();
        ?>
">
                <td>
                    <a href="<?php 
        echo wpjr_link_to("resume", $resume);
        ?>
"><?php 
        esc_html_e($resume->firstname . " " . $resume->lastname);
        ?>
</a>
                </td>
                <td>
                    <?php 
        esc_html_e($resume->title);
        ?>
                </td>
                <td class="wpjb-last wpjb-column-date">
                    <?php 
        wpjb_resume_last_update_at("M, d", $resume);
        ?>
Example #6
0
/**
 * Job details
 * 
 * This template is responsible for displaying job details on job details page
 * (template single.php) and job preview page (template preview.php)
 * 
 * @author Greg Winiarski
 * @package Templates
 * @subpackage Resumes
 */
/* @var $form Wpjb_Form_ResumesSearch */
?>
<div id="wpjb-main" class="wpjr-page-resumes-search">

    <form action="<?php 
echo wpjr_link_to("search");
?>
" method="get" class="wpjb-form">

        <?php 
wpjb_form_render_hidden($form);
?>
        <?php 
foreach ($form->getNonEmptyGroups() as $group) {
    ?>
        <?php 
    /* @var $group stdClass */
    ?>
 
        <fieldset class="wpjb-fieldset-<?php 
    echo $group->name;
Example #7
0
 public function registerAction()
 {
     if (!get_option('users_can_register')) {
         $this->view->_flash->addError(__("User registration is disabled.", WPJB_DOMAIN));
         return false;
     }
     $object = Wpjb_Model_Resume::current();
     if ($object->id > 0) {
         wp_redirect(wpjr_link_to("myresume"));
     }
     $this->_setTitle(__("Register", WPJB_DOMAIN));
     $form = new Wpjb_Form_Resumes_Register();
     $this->view->errors = array();
     if ($this->isPost()) {
         $isValid = $form->isValid($this->getRequest()->getAll());
         if ($isValid) {
             $username = $form->getElement("user_login")->getValue();
             $password = $form->getElement("user_password")->getValue();
             $email = $form->getElement("user_email")->getValue();
             $id = wp_create_user($username, $password, $email);
             $instance = Wpjb_Project::getInstance();
             $router = $instance->getApplication("resumes")->getRouter();
             /* @var $router Daq_Router */
             $url = $instance->getApplication("resumes")->getUrl();
             $url .= "/" . $router->linkTo("myresume");
             $mail = new Wpjb_Utility_Message(10);
             $mail->setTo($email);
             $mail->setParam("username", $username);
             $mail->setParam("password", $password);
             $mail->setParam("login_url", $url);
             $mail->send();
             $this->view->_flash->addInfo(__("You have been registered.", WPJB_DOMAIN));
             $form = new Wpjb_Form_Resumes_Login();
             $form->isValid(array("user_login" => $username, "user_password" => $password, "remember" => 0));
             $redirect = wpjr_link_to("myresume");
             wp_redirect($redirect);
             die;
         } else {
             $this->view->_flash->addError(__("There are errors in your form.", WPJB_DOMAIN));
         }
     }
     $this->view->form = $form;
     return "register";
 }
Example #8
0
" />
                </form>
            </div>
        </div>      
        <?php 
if (is_array(wpjb_conf("cv_show_applicant_resume")) && $application->getResume()) {
    ?>
        <div class="wpjb-grid-row">
            <div class="wpjb-col-30">
                <?php 
    _e("Applicant Resume", "wpjobboard");
    ?>
            </div>
            <div class="wpjb-col-65 wpjb-glyphs wpjb-icon-link-ext-alt">
                <a href="<?php 
    esc_attr_e(wpjr_link_to("resume", $application->getResume(), array("application_id" => $application->id)));
    ?>
"><?php 
    _e("View Resume", "wpjobboard");
    ?>
</a>
            </div>
        </div>    
        <?php 
}
?>
        <div class="wpjb-grid-row">
            <div class="wpjb-col-30">
                <?php 
_e("Applicant Name", "wpjobboard");
?>
Example #9
0
    <form action="" method="post" class="wpjb-form">
        <input type="hidden" name="verify_me" value="1" />
   
            <input type="submit" class="wpjb-submit" id="wpjb_submit" value="<?php 
    _e("Request verification", "wpjobboard");
    ?>
" />
            <?php 
    _e("or", "wpjobboard");
    ?>
            <a href="javascript:history.back()"><?php 
    _e("Cancel and go back", "wpjobboard");
    ?>
</a>
    </form>
    <?php 
} else {
    ?>
    <a class="wpjb-button wpjb-cancel" href="<?php 
    esc_html_e(wpjr_link_to("home"));
    ?>
"><?php 
    _e("Go back.", "wpjobboard");
    ?>
</a>
    <?php 
}
?>

</div>
Example #10
0
    ?>
            <div>
                <label class="wpjb-label"><?php 
    _e("File", WPJB_DOMAIN);
    ?>
</label>
                <span>
                    <a href="<?php 
    echo $resume->getFileUrl();
    ?>
" class="wpjb-button"><?php 
    _e("Download", WPJB_DOMAIN);
    ?>
</a>
                    <a href="<?php 
    echo wpjr_link_to("myresumedel_file");
    ?>
" class="wpjb-button"><?php 
    _e("Delete file", WPJB_DOMAIN);
    ?>
</a>
                </span>
            </div>
            <?php 
}
?>
        </fieldset>

        <?php 
wpjb_form_render_hidden($form);
?>
/**
 * Saves candidate in DB
 * 
 * This function is executed in "init" action.
 * 
 * Validates and saves resume in database. This action is executed only if
 * there is $_POST["_wpjb_action"] == reg_candidate_alt.
 * 
 * @since 1.0
 * @return void
 */
function full_candidate_register_action()
{
    $form = new Wpjb_Form_Resume_Alt();
    $request = Daq_Request::getInstance();
    $flash = new Wpjb_Utility_Session();
    if ($request->post("_wpjb_action") != "reg_candidate_alt") {
        return;
    }
    $isValid = $form->isValid($request->getAll());
    if (!$isValid) {
        return;
    }
    $form->save();
    $url = wpjr_link_to("login");
    $password = $form->value("user_password");
    $email = $form->value("user_email");
    $username = $form->value("user_login");
    if (empty($username)) {
        $username = $email;
    }
    $mail = Wpjb_Utility_Message::load("notify_canditate_register");
    $mail->setTo($email);
    $mail->assign("username", $username);
    $mail->assign("password", $password);
    $mail->assign("login_url", $url);
    $mail->send();
    do_action("wpjb_user_registered", "candidate");
    $form = new Wpjb_Form_Resumes_Login();
    if ($form->hasElement("recaptcha_response_field")) {
        $form->removeElement("recaptcha_response_field");
    }
    $form->isValid(array("user_login" => $username, "user_password" => $password, "remember" => 0));
    $flash->addInfo(__("You have been registered.", "wpjobboard"));
    $flash->save();
    wp_redirect(wpjr_link_to("myresume_home"));
    exit;
}