File: /mnt/data/kofejob-wp/wp-content/themes/kofejob/page-register.php
<?php
/* Template Name: Register */
/**
* The template for displaying Pages.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package Kofejob
*/
?>
<?php get_header(); ?>
<?php
if ( !is_user_logged_in() ) {
$img_id ='';
$only_url='';
if(!empty($kofejob_theme_options[ 'register_bg_image' ][ 'url' ])) {
$only_url = $kofejob_theme_options[ 'register_bg_image' ][ 'url' ];
}
$bg_img = "style=\"background: url('$only_url'); background-repeat: no-repeat; background-position: center center; background-size: cover;\"";
?>
<div class="main_content">
<div class="account-page">
<div class="content">
<div class="container">
<div class="row">
<div class="col-lg-4 col-md-6 col-sm-12 mx-auto">
<div class="account-content">
<div class="align-items-center justify-content-center">
<?php if(kofejob_fl_framework_get_options('fl_allow_user_email_verification') == false)
{?>
<div class="kofejob-alert alert alert-danger alert-dismissible fade show fr_resend_email" role="alert">
<div class="kofejob-alart-box">
<div class="text-info">
<p>
<?php echo esc_html__('A verification link has been sent to your email. ','kofejob'); ?>
<button class="fr_send_email" type="button" ><?php echo esc_html__('Resend Email','kofejob'); ?></button>
</p>
</div>
</div>
</div>
<?php } ?>
<?php
if ( isset( $kofejob_theme_options[ 'register_logo_show' ] ) && $kofejob_theme_options[ 'register_logo_show' ] == 1 ) {
?>
<div class="login-right">
<div class="login-header text-center">
<?php
}
?>
<h2><?php echo esc_html($kofejob_theme_options['register_heading_text']); ?></h2>
<p><?php echo esc_html($kofejob_theme_options['register_textarea']); ?></p>
</div>
</div>
<form id="signup-form">
<div class="fr-sign-form">
<?php
$user_count = '';
if(isset($kofejob_theme_options['user_registration_type']) && $kofejob_theme_options['user_registration_type'] == 'both_selected')
{
if(!empty($kofejob_theme_options['user_registration_type_selection']))
{
$user_count = count($kofejob_theme_options['user_registration_type_selection']);
}
}
if(isset($kofejob_theme_options['user_registration_type']) && $kofejob_theme_options['user_registration_type'] == 'both_selected' && $user_count == 2 )
{
?>
<div class="form-group register-type">
<div class="register-type-btn">
<label class="radio">
<input class="" type="radio" value="employer" name="kofejob_user_type" checked="checked"><span><?php echo esc_html__('Employer','kofejob'); ?></span>
</label>
</div>
<div class="register-type-btn">
<label class="radio">
<input class="" type="radio" value="freelancer" name="kofejob_user_type"><span><?php echo esc_html__('Freelancer','kofejob'); ?></span>
</label>
</div>
</div>
<?php
}
?>
<div class="fr-sign-form">
<div class="form-group">
<label class="focus-label"><?php echo esc_html__('Name', 'kofejob');?></label>
<input type="text" name="fl_full_name" class="form-control floating" required data-smk-msg="<?php echo esc_attr__('Name required','kofejob'); ?>">
</div>
</div>
<div class="fr-sign-form">
<div class="form-group">
<label class="focus-label"><?php echo esc_html__('Username', 'kofejob');?></label>
<input type="text" name="fl_username" class="form-control floating" required data-smk-msg="<?php echo esc_attr__('Username is required','kofejob'); ?>">
</div>
</div>
<div class="fr-sign-form">
<div class="form-group">
<label class="focus-label"><?php echo esc_html__('Email', 'kofejob');?></label>
<input type="email" name="fl_email" class="form-control floating" required data-smk-msg="<?php echo esc_attr__('Email is required','kofejob'); ?>">
</div>
</div>
<div class="fr-sign-form">
<div class="form-group">
<label class="focus-label"><?php echo esc_html__('Password', 'kofejob');?></label>
<div class="password_field">
<input type="password" name="fl_password" class="form-control floating" id="password-field" required data-smk-msg="<?php echo esc_attr__('Password is required','kofejob'); ?>">
<div data-toggle="#password-field" class="fa fa-fw fa-eye field-icon toggle-password"></div>
</div>
</div>
</div>
<div class="fr-sigin-requirements">
<div class="form-group">
<div class="pretty p-icon p-thick p-curve">
<input type="checkbox" required name="term_condition" data-smk-msg="<?php echo esc_attr__('You must need to accept terms and conditions','kofejob'); ?>">
<div class="state p-warning"> <i class="icon fa fa-check"></i>
<label> </label>
</div>
</div>
<span class="sr-style"><?php echo esc_html__('You agree to the','kofejob'); ?> <a href="<?php echo get_the_permalink($kofejob_theme_options['terms_condition_page']); ?>"><?php echo esc_html__('Terms and Conditions','kofejob'); ?></a> </span>
</div>
</div>
<?php
$redirect_page = isset($_GET['redirect']) ? $_GET['redirect'] : '';
if(isset($redirect_page) && $redirect_page !='')
{
$login_page = get_the_permalink($kofejob_theme_options['login_page']).'?redirect='.$redirect_page;
}
else
{
$login_page = get_the_permalink($kofejob_theme_options['login_page']);
}
$redirect_page= $kofejob_theme_options['user_dashboard_page'];
?>
<div class="fr-sign-submit">
<div class="form-group m-0">
<button type="button" class="btn btn-primary btn-block btn-lg login-btn btn-loading" id="signup-btn" data-redirect-id="<?php echo esc_attr($redirect_page); ?>"> <?php echo esc_html__('Create Account','kofejob'); ?>
<span class="bubbles"> <i class="fa fa-circle"></i> <i class="fa fa-circle"></i> <i class="fa fa-circle"></i> </span>
</button>
<input type="hidden" name="fl_user_id" id="fl_user_id" value="">
<input type="hidden" id="register_nonce" value="<?php echo wp_create_nonce('fl_register_secure'); ?>" />
</div>
</div>
<?php
if( class_exists( 'mo_openid_login_wid' ) )
{
?>
<div class="fr-sign-top-content">
<p> <?php echo esc_html__('OR','kofejob'); ?></p>
</div>
<?php
echo do_shortcode( '[miniorange_social_login]' );
}
?>
</div>
</form>
<div class="row">
<div class="col-12 text-center have_account">
<?php echo esc_html__('Already have an account?','kofejob'); ?> <a href="<?php echo esc_url($login_page); ?>"><?php echo esc_html__('Login','kofejob'); ?></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="fr-sign-background" <?php echo wp_return_echo($bg_img); ?>></div>
</div>
</div>
</div>
<?php
} else {
echo kofejob_redirect( get_the_permalink( $kofejob_theme_options[ 'user_dashboard_page' ] ) );
}
?>
<?php get_footer(); ?>