Origin commit
This commit is contained in:
79
templates/user/agency/agency-team.php
Executable file
79
templates/user/agency/agency-team.php
Executable file
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
$agency = OpalEstate_Agency::get_instance( $post_id );
|
||||
|
||||
$users = $agency->get_members();
|
||||
|
||||
$sender_id = '';
|
||||
$prefix = '';
|
||||
|
||||
$fields = array(
|
||||
|
||||
array(
|
||||
'id' => "sender_id",
|
||||
'name' => esc_html__( 'Sender ID', 'opalestate-pro' ),
|
||||
'type' => 'hidden',
|
||||
'default' => "",
|
||||
'description' => "",
|
||||
),
|
||||
array(
|
||||
'id' => "{$prefix}user_id",
|
||||
'name' => esc_html__( 'Name', 'opalestate-pro' ),
|
||||
'type' => 'select',
|
||||
'class' => 'form-control opalesate-find-user',
|
||||
'default' => "",
|
||||
'required' => 'required',
|
||||
'description' => "",
|
||||
),
|
||||
|
||||
|
||||
);
|
||||
$form = OpalEstate()->html->render_form( $fields );
|
||||
$id = 'agency-add-member';
|
||||
?>
|
||||
<div class="opalestate-agency-team">
|
||||
|
||||
<h3><?php esc_html_e( 'Agency Team' , 'opalestate-pro' ); ?></h3>
|
||||
<div class="opal-row">
|
||||
<div class="col-lg-4 col-md-3">
|
||||
<div class="agency-add-team">
|
||||
<p><?php esc_html_e( "As an author, you can add other users to your agency.", "opalestate" ); ?></p>
|
||||
<p><?php esc_html_e( "Add someone to your agency, please enter extractly username in below input:", "opalestate" ); ?></p>
|
||||
<form method="post" id="opalestate-add-team-form">
|
||||
<?php echo $form;?>
|
||||
<?php wp_nonce_field( $id, 'add_team_action' ); ?>
|
||||
<button class="button btn btn-primary btn-3d" data-loading-text="<i class='fa fa-circle-o-notch fa-spin'></i> <?php esc_html_e( 'Processing', 'opalestate-pro' ); ?>" type="submit" name="contact-form"><?php echo esc_html__( 'Send message', 'opalestate-pro' ); ?></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-8 col-md-9">
|
||||
<div class="agency-listing-team">
|
||||
<table>
|
||||
<tr>
|
||||
<th><?php esc_html_e('Users in your team'); ?></th>
|
||||
<th width="100"><?php esc_html_e('Action'); ?></th>
|
||||
</tr>
|
||||
|
||||
<?php foreach( $users as $user ): // echo '<pre>' . print_r( $user, 1);die; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="media">
|
||||
<img src="<?php echo $user['avatar_url'];?>" width="80">
|
||||
<div class="fullname"><?php echo $user['name']; ?> (<?php echo $user['username']; ?> )</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo opalestate_get_user_management_page_uri( array('tab' => 'agency_team', 'remove_id' => $user['id'] ) ); ?>" title="<?php esc_html_e( "Remove" , "opalestate" ); ?>">
|
||||
<i class="fa fa-trash"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
40
templates/user/agency/profile-agency.php
Executable file
40
templates/user/agency/profile-agency.php
Executable file
@@ -0,0 +1,40 @@
|
||||
|
||||
<div class="property-submission-form">
|
||||
|
||||
<?php if ( ! empty( $_SESSION['messages'] ) ) : ?>
|
||||
|
||||
<div class="opalesate_messages">
|
||||
<?php foreach ( $_SESSION['messages'] as $message ) : ?>
|
||||
|
||||
<?php $status = isset( $message[0] ) ? $message[0] : 'success'; ?>
|
||||
<?php $msg = isset( $message[1] ) ? $message[1] : ''; ?>
|
||||
<div class="opalesate_message_line <?php echo esc_attr( $status ) ?>">
|
||||
<?php printf( '%s', $msg ) ?>
|
||||
</div>
|
||||
|
||||
<?php endforeach; unset( $_SESSION['messages'] ); ?>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="opalestate-admin-box">
|
||||
|
||||
<div class="box-content">
|
||||
<h3><?php esc_html_e( 'Edit Agency Profile', 'opalestate-pro' ); ?></h3>
|
||||
|
||||
<?php
|
||||
do_action( 'opalestate_profile_agency_form_before' );
|
||||
// echo '<Pre>'.print_r( $metaboxes ,1 );die;
|
||||
|
||||
if ( function_exists( 'cmb2_get_metabox_form' ) ) {
|
||||
echo cmb2_get_metabox_form( $metaboxes[OPALESTATE_AGENCY_PREFIX.'front'], $post_id, array(
|
||||
'form_format' => '<form action="//' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . '" class="cmb-form" method="post" id="%1$s" enctype="multipart/form-data" encoding="multipart/form-data"><input type="hidden" name="object_id" value="%2$s">%3$s<button type="submit" name="submit-cmb" class="button-primary btn btn-primary">%4$s</button></form>',
|
||||
'save_button' => esc_html__( 'Save Change', 'opalestate-pro' ),
|
||||
) );
|
||||
}
|
||||
|
||||
do_action( 'opalestate_profile_agency_form_after' );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
27
templates/user/agent/profile-agent.php
Executable file
27
templates/user/agent/profile-agent.php
Executable file
@@ -0,0 +1,27 @@
|
||||
|
||||
<div class="property-submission-form">
|
||||
|
||||
<div class="opalestate-admin-box">
|
||||
|
||||
<div class="box-content">
|
||||
<h3><?php esc_html_e( 'Edit Agent Profile', 'opalestate-pro' ); ?></h3>
|
||||
|
||||
<?php if( isset($metaboxes[OPALESTATE_AGENT_PREFIX.'front']) ): ?>
|
||||
<?php
|
||||
do_action( 'opalestate_profile_agency_form_before' );
|
||||
|
||||
if ( function_exists( 'cmb2_get_metabox_form' ) ) {
|
||||
echo cmb2_get_metabox_form( $metaboxes[ OPALESTATE_AGENT_PREFIX . 'front' ], $post_id, [
|
||||
'form_format' => '<form action="//' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . '" class="cmb-form" method="post" id="%1$s" enctype="multipart/form-data" encoding="multipart/form-data"><input type="hidden" name="object_id" value="%2$s">%3$s<button type="submit" name="submit-cmb" class="button-primary btn btn-primary">%4$s</button></form>',
|
||||
'save_button' => esc_html__( 'Save Change', 'opalestate-pro' ),
|
||||
] );
|
||||
}
|
||||
|
||||
do_action( 'opalestate_profile_agency_form_after' );
|
||||
?>
|
||||
<?php else : ?>
|
||||
<div class="alert alert-danger"><?php esc_html_e( 'Agent edit profile form is not avariable', 'opalestate-pro' ); ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
100
templates/user/content-property.php
Executable file
100
templates/user/content-property.php
Executable file
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$property = opalesetate_property( get_the_ID() );
|
||||
|
||||
global $property, $post;
|
||||
|
||||
$meta = $property->get_meta_shortinfo();
|
||||
?>
|
||||
<article itemscope itemtype="http://schema.org/Property" <?php post_class( 'my-property-list' ); ?>>
|
||||
<div class="property-list container-cols-2">
|
||||
<header>
|
||||
<div class="property-group-label">
|
||||
<?php do_action( 'opalestate_before_property_loop_item' ); ?>
|
||||
<?php if ( $property->featured != 1 ): ?>
|
||||
<div class="property-toggle-featured hide" data-id="property-toggle-featured-<?php echo get_the_ID(); ?>">
|
||||
<span class="label-featured label"><?php esc_html_e( 'Featured', 'opalestate-pro' ); ?></span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php opalestate_get_loop_thumbnail( opalestate_get_option( 'loop_image_size', 'large' ) ); ?>
|
||||
<div class="property-meta-bottom">
|
||||
<?php echo do_shortcode( '[opalestate_favorite_button property_id=' . get_the_ID() . ']' ); ?>
|
||||
</div>
|
||||
</header>
|
||||
<div class="abs-col-item">
|
||||
<div class="entry-content">
|
||||
<?php opalestate_property_status(); ?>
|
||||
|
||||
<?php the_title( '<h4 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h4>' ); ?>
|
||||
|
||||
<div class="property-address">
|
||||
<?php echo $property->get_address(); ?>
|
||||
</div>
|
||||
|
||||
<div class="property-price">
|
||||
<span><?php echo opalestate_price_format( $property->get_price() ); ?></span>
|
||||
|
||||
<?php if ( $property->get_sale_price() ): ?>
|
||||
<span class="property-saleprice"><?php echo opalestate_price_format( $property->get_sale_price() ); ?></span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $property->get_price_label() ): ?>
|
||||
<span class="property-price-label"><?php echo esc_html( $property->get_price_label() ); ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="my-properties-bottom">
|
||||
<span class="label-post-status label <?php if ( $post->post_status == 'pending' ): ?> label-danger <?php else : ?> label-info <?php endif; ?>"> <?php echo get_post_status( get_the_ID() ) ?> </span>
|
||||
</div>
|
||||
<div class="property-meta">
|
||||
<ul class="property-meta-list list-inline">
|
||||
<?php if ( $meta ) : ?>
|
||||
<?php foreach ( $meta as $key => $info ) : ?>
|
||||
<li class="property-label-<?php echo esc_attr( $key ); ?>" data-toggle="tooltip" data-placement="top" title="<?php echo esc_attr( $info['label'] ); ?>">
|
||||
<i class="icon-property-<?php echo esc_attr( $key ); ?>"></i>
|
||||
<span class="label-property"><?php echo esc_html( $info['label'] ); ?></span>
|
||||
<span class="label-content"><?php echo apply_filters( 'opalestate-pro' . $key . '_unit_format', trim( $info['value'] ) ); ?></span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- .entry-content -->
|
||||
<div class="button-actions">
|
||||
<?php if ( $property->featured != 1 ): ?>
|
||||
<a href="#" class="btn btn-warning btn-toggle-featured" data-property-id="<?php echo get_the_ID() ?>" data-toggle="tooltip" data-placement="top"
|
||||
title="<?php esc_html_e( 'Set Featured', 'opalestate-pro' ) ?>">
|
||||
<i class="fa fa-star"></i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<a href="<?php echo opalestate_submssion_page( get_the_ID() ) ?>" class="btn btn-info" data-toggle="tooltip" data-placement="top"
|
||||
title="<?php esc_html_e( 'Edit', 'opalestate-pro' ); ?>">
|
||||
<i class="fa fa-edit"></i>
|
||||
</a>
|
||||
|
||||
<?php
|
||||
/* Delete Post Link Bypassing Trash */
|
||||
if ( current_user_can( 'delete_posts' ) ) {
|
||||
$delete_post_link = get_delete_post_link( $post->ID, '', true );
|
||||
if ( ! empty( $delete_post_link ) ) {
|
||||
?>
|
||||
<a onclick="return confirm('<?php esc_html_e( 'Are you sure you wish to delete?', 'opalestate-pro' ); ?>')" href="<?php echo esc_url( $delete_post_link ); ?>"
|
||||
class="btn btn-danger" data-toggle="tooltip" data-placement="top" title="<?php esc_html_e( 'Delete Property', 'opalestate-pro' ); ?>">
|
||||
<i class="fa fa-close"></i>
|
||||
</a>
|
||||
<?php
|
||||
}
|
||||
} ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<meta itemprop="url" content="<?php the_permalink(); ?>"/>
|
||||
</div>
|
||||
</article><!-- #post-## -->
|
||||
146
templates/user/dashboard.php
Executable file
146
templates/user/dashboard.php
Executable file
@@ -0,0 +1,146 @@
|
||||
<div class="opalestate-user-dashboard">
|
||||
<div class="dashboard-grid opal-row">
|
||||
<?php do_action( 'opalestate_user_dashboard_before' ); ?>
|
||||
|
||||
<?php
|
||||
$statistics = new OpalEstate_User_Statistics();
|
||||
|
||||
$properties_count = [];
|
||||
$properties_count[] = [
|
||||
'icon' => 'fa fa-list',
|
||||
'count' => $statistics->get_count_properties(),
|
||||
'label' => esc_html__( 'My Properties', 'opalestate-pro' ),
|
||||
'class' => 'bg-primary text-white',
|
||||
];
|
||||
|
||||
$properties_count[] = [
|
||||
'icon' => 'fa fa-star',
|
||||
'count' => $statistics->get_count_featured(),
|
||||
'label' => esc_html__( 'Featured Properties', 'opalestate-pro' ),
|
||||
'class' => 'bg-info text-white',
|
||||
];
|
||||
|
||||
$properties_count[] = [
|
||||
'icon' => 'fa fa-file',
|
||||
'count' => $statistics->get_count_pending_properties(),
|
||||
'label' => esc_html__( 'Pending Properties', 'opalestate-pro' ),
|
||||
'class' => 'bg-warning text-white',
|
||||
];
|
||||
?>
|
||||
|
||||
<?php foreach ( $properties_count as $item ): ?>
|
||||
<div class="col-lg-4 col-md-4">
|
||||
<div class="card-item inner <?php echo esc_attr( $item['class'] ); ?>">
|
||||
<p><i class="<?php echo esc_attr( $item['icon'] ); ?>"></i> <span><?php echo esc_html( $item['label'] ); ?></span></p>
|
||||
<h5><?php echo esc_html( $item['count'] ); ?></h5>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php if ( $current_user_id = get_current_user_id() ) : ?>
|
||||
<?php
|
||||
$args = [
|
||||
'post_author__in' => [ $current_user_id ],
|
||||
'status' => 'approve',
|
||||
'type' => 'property_review',
|
||||
'number' => 2,
|
||||
];
|
||||
|
||||
$comments = get_comments( $args );
|
||||
?>
|
||||
|
||||
<div class="col-lg-8 col-md-8">
|
||||
<div class="card-item inner bg-primary text-white">
|
||||
<p><i class="fa fa-comment"></i> <span><?php esc_html_e( 'Latest review' ) ?></p>
|
||||
|
||||
<?php if ( ! isset( $comments ) || ! $comments ) : ?>
|
||||
<p class="opalestate-my-reviews-no-reviews"><?php esc_html_e( 'You have not written any reviews yet.', 'opalestate-pro' ); ?> </p>
|
||||
<?php else : ?>
|
||||
<div class="opalestate-my-reviews opalestate-admin-box">
|
||||
<ol class="commentlist opalestate-my-reviews-list">
|
||||
<?php foreach ( $comments as $comment ) : ?>
|
||||
<li class="property_review opalestate-my-reviews-item" id="li-comment-41">
|
||||
<div class="opal-row">
|
||||
<div id="comment-41" class="col-lg-9 col-sm-9 comment_container opalestate-my-reviews-item__comment">
|
||||
<?php echo get_avatar( $comment, apply_filters( 'opalestate_review_gravatar_size', '60' ), '' ); ?>
|
||||
|
||||
<div class="comment-text">
|
||||
|
||||
<div class="wrapperss">
|
||||
<p class="meta">
|
||||
<span class="opalestate-review__author"><?php echo esc_html( $comment->comment_author ); ?> </span>
|
||||
<span class="opalestate-review__dash">–</span>
|
||||
<time class="opalestate-review__published-date" datetime="<?php echo esc_attr( get_comment_date( 'c', $comment->comment_ID ) ); ?>">
|
||||
<?php echo esc_html( get_comment_date( opalestate_date_format(), $comment->comment_ID ) ); ?>
|
||||
</time>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
$cpt_feature = 'opalestate_rating_ft';
|
||||
$average = Opalestate_Rating_Helper::get_average_rating( $comment, $cpt_feature );
|
||||
$features = opalestate_get_property_rating_features();
|
||||
?>
|
||||
<?php if ( $features ) : ?>
|
||||
<div class="opalestate-review__ratings">
|
||||
<div class="opalestate-tooltip" data-tooltip-content="#tooltip_content_<?php echo absint( $comment->comment_ID ); ?>">
|
||||
<?php
|
||||
if ( $average ) {
|
||||
echo opalestate_get_rating_html( $average ); // WPCS: XSS ok.
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="opalestate-rating-detail-container">
|
||||
<ul class="opalestate-rating-detail" id="tooltip_content_<?php echo absint( $comment->comment_ID ); ?>">
|
||||
<?php foreach ( $features as $feature_slug => $feature_title ) : $feature_key = $cpt_feature . '_' . $feature_slug; ?>
|
||||
<li class="opalestate-rating-detail__item">
|
||||
<label><?php echo esc_html( $feature_title ); ?></label>
|
||||
<span><?php echo absint( get_comment_meta( $comment->comment_ID, $feature_key, true ) ); ?></span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<?php
|
||||
if ( $average ) {
|
||||
echo opalestate_get_rating_html( $average ); // WPCS: XSS ok.
|
||||
} ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p><?php echo esc_html( $comment->comment_content ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-sm-3 opalestate-my-reviews-item__property">
|
||||
<?php $post_title = get_the_title( $comment->comment_post_ID ); ?>
|
||||
<?php if ( $post_title ) : ?>
|
||||
<h6 class="opalestate-my-reviews-item_property-name">
|
||||
<a href="<?php echo esc_url( get_permalink( $comment->comment_post_ID ) ); ?>" title="<?php echo esc_attr( $post_title ); ?>" target="_blank">
|
||||
<?php echo esc_html( $post_title ); ?>
|
||||
</a>
|
||||
</h6>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="opalestate-my-reviews-item_property-view">
|
||||
<a href="<?php echo esc_url( get_permalink( $comment->comment_post_ID ) ); ?>" title="<?php echo esc_attr( $post_title ); ?>" target="_blank">
|
||||
<?php esc_html_e( 'View Property', 'opalestate-pro' ); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li><!-- #comment-## -->
|
||||
<?php endforeach; ?>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
14
templates/user/favorite-button.php
Executable file
14
templates/user/favorite-button.php
Executable file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
if( $existed != false || $existed != '' ) {
|
||||
$fav_class = 'fa fa-heart';
|
||||
} else {
|
||||
$fav_class = 'fa fa-heart-o';
|
||||
}
|
||||
$need_login = '';
|
||||
if( !is_user_logged_in() ){
|
||||
$need_login .= ' opalestate-need-login';
|
||||
}
|
||||
?>
|
||||
<span class="property-toggle-favorite <?php echo esc_attr( $need_login ); ?> hint--top" aria-label="<?php esc_html_e('Add To Favorite', 'opalestate-pro'); ?>" data-property-id="<?php echo intval( $property_id ); ?>" title="<?php esc_html_e('Add To Favorite', 'opalestate-pro'); ?>">
|
||||
<span class="<?php echo esc_attr( $fav_class ); ?>"></span>
|
||||
</span>
|
||||
29
templates/user/favorite-properties.php
Executable file
29
templates/user/favorite-properties.php
Executable file
@@ -0,0 +1,29 @@
|
||||
<?php if( $loop->have_posts() ): ?>
|
||||
<div class="property-listing my-favorite">
|
||||
<div class="box-content">
|
||||
|
||||
<div class="opalestate-rows">
|
||||
<div class="<?php echo apply_filters('opalestate_row_container_class', 'opal-row');?>">
|
||||
<?php $cnt=0; while ( $loop->have_posts() ) : $loop->the_post(); global $post; ?>
|
||||
|
||||
<div class="col-lg-4 col-md-4">
|
||||
<?php echo opalestate_load_template_path( 'content-property-grid' ); ?>
|
||||
</div>
|
||||
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php opalestate_pagination( $loop->max_num_pages ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="opalestate-box">
|
||||
<div class="box-content">
|
||||
<div class="opalestate-message">
|
||||
<h3>No Item In Favorite</h3>
|
||||
<p><?php esc_html_e( 'You have not added any property as favorite.', 'opalestate-pro' ) ;?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
63
templates/user/login-form.php
Executable file
63
templates/user/login-form.php
Executable file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit();
|
||||
}
|
||||
|
||||
if ( is_user_logged_in() ) {
|
||||
esc_html_e( 'You are currently logged in.', 'opalestate-pro' );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="opalesate-form">
|
||||
<?php if ( $hide_title === false ) : ?>
|
||||
<h3><?php esc_html_e( 'Login', 'opalestate-pro' ); ?></h3>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $message ) : ?>
|
||||
<p><?php printf( '%s', $message ) ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<form method="POST" class="opalestate-login-form opalestate-member-form">
|
||||
<?php do_action( 'opalestate_member_before_login_form' ); ?>
|
||||
|
||||
<p class="opalestate-form-field username validate-required">
|
||||
<label for="username"><?php esc_html_e( 'Username or email address', 'opalestate-pro' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="opalestate-input text input-text" name="username" id="username" required="required" value="<?php if ( ! empty( $_POST['username'] ) ) {
|
||||
echo esc_attr( $_POST['username'] );
|
||||
} ?>"/>
|
||||
</p>
|
||||
|
||||
<p class="opalestate-form-field password validate-required">
|
||||
<label for="password"><?php esc_html_e( 'Password', 'opalestate-pro' ); ?> <span class="required">*</span></label>
|
||||
<input class="opalestate-input text input-text" type="password" name="password" required="required" id="password"/>
|
||||
</p>
|
||||
|
||||
<?php do_action( 'opalestate_member_login_form' ); ?>
|
||||
|
||||
<p class="opalestate-form-field remberme">
|
||||
<label>
|
||||
<input class="opalestate-input checkbox" name="rememberme" type="checkbox" value="forever"/> <?php esc_html_e( 'Remember me', 'opalestate-pro' ); ?>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p class="opalestate-form-field submit">
|
||||
<?php wp_nonce_field( 'opalestate-login', 'opalestate-login-nonce' ); ?>
|
||||
<?php if ( $redirect ) : ?>
|
||||
<input type="hidden" name="redirect" value="<?php echo esc_url( $redirect ); ?>">
|
||||
<?php endif; ?>
|
||||
<input type="submit" class="opalestate-button button btn btn-primary" name="login" value="<?php esc_attr_e( 'Login', 'opalestate-pro' ); ?>"/>
|
||||
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php esc_html_e( 'Lost your password?', 'opalestate-pro' ); ?></a>
|
||||
</p>
|
||||
|
||||
<!-- <p class="opalestate-form-field register">
|
||||
<a href="<?php echo esc_url( opalestate_get_register_page_uri() ); ?>"><?php esc_html_e( 'Register now!', 'opalestate-pro' ); ?></a>
|
||||
</p> -->
|
||||
|
||||
<?php do_action( 'login_form' ); ?>
|
||||
|
||||
<?php do_action( 'opalestate_member_after_login_form' ); ?>
|
||||
</form>
|
||||
</div>
|
||||
46
templates/user/messages.php
Executable file
46
templates/user/messages.php
Executable file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
$args = array(
|
||||
'cpage' => isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1,
|
||||
'items_per_page' => 10
|
||||
);
|
||||
$messages = opalestate_get_message_by_user( $args );
|
||||
?>
|
||||
<div class="opalestate-admin-box">
|
||||
<h3 class="page-title"><?php echo sprintf( esc_html__( 'Messages for you', 'opalestate-pro'), '' ); ?></h3>
|
||||
<div class="opalestate-messages-list">
|
||||
<div class="message-item">
|
||||
<table>
|
||||
<?php foreach( $messages['items'] as $message ): ?>
|
||||
<tr>
|
||||
<td width="220">
|
||||
<img src="<?php echo OpalEstate_User::get_author_picture( $message->sender_id ); ?>" width="60" alt="<?php esc_attr_e( 'User Avatar', 'opalestate-pro' ); ?>"/>
|
||||
<span><?php echo opalestate_user_fullname( $message->sender_id ); ?></span>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo opalestate_get_read_message_uri( $message->id ); ?>">
|
||||
<h6><?php echo esc_html( $message->subject ); ?></h6>
|
||||
<p><?php echo esc_html( $message->message ); ?></p>
|
||||
</a>
|
||||
</td>
|
||||
<td width="200"><?php echo esc_html( $message->created ); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="opalestate-pagination pagination-main">
|
||||
<?php
|
||||
|
||||
echo paginate_links( array(
|
||||
'base' => add_query_arg( 'cpage', '%#%' ),
|
||||
'format' => '',
|
||||
'prev_text' => esc_html__('«'),
|
||||
'next_text' => esc_html__('»'),
|
||||
'total' => ceil( $messages['total'] / $args['items_per_page'] ),
|
||||
'current' => $args['cpage']
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
30
templates/user/my-account-popup.php
Executable file
30
templates/user/my-account-popup.php
Executable file
@@ -0,0 +1,30 @@
|
||||
<div id="opalestate-user-form-popup" class="white-popup mfp-hide opalestate-mfp-popup tabl-simple-style">
|
||||
<div class="opalestate-tab hr-mode">
|
||||
<div class="nav opalestate-tab-head">
|
||||
<a href="#o-login-form" class="tab-item"><?php esc_html_e( 'Login', 'opalestate-pro' ); ?></a>
|
||||
<a href="#o-register-form" class="tab-item"><?php esc_html_e( 'Register', 'opalestate-pro' ); ?></a>
|
||||
</div>
|
||||
<div class="opalestate-tab-wrap">
|
||||
<div class="opalestate-tab-content" id="o-login-form">
|
||||
<?php
|
||||
$atts = array(
|
||||
'message' => '',
|
||||
'redirect' => '',
|
||||
'hide_title' => false
|
||||
);
|
||||
echo opalestate_load_template_path( 'user/login-form', $atts );
|
||||
?>
|
||||
</div>
|
||||
<div class="opalestate-tab-content" id="o-register-form">
|
||||
<?php
|
||||
$atts = array(
|
||||
'message' => '',
|
||||
'redirect' => '',
|
||||
'hide_title' => false
|
||||
);
|
||||
echo opalestate_load_template_path( 'user/register-form', $atts );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
30
templates/user/my-account.php
Executable file
30
templates/user/my-account.php
Executable file
@@ -0,0 +1,30 @@
|
||||
<div class="opalestate-my-account-form tabl-simple-style">
|
||||
<div class="opalestate-tab hr-mode">
|
||||
<div class="nav opalestate-tab-head">
|
||||
<a href="#o-login-form" class="tab-item"><?php esc_html_e( 'Login', 'opalestate-pro' ); ?></a>
|
||||
<a href="#o-register-form" class="tab-item"><?php esc_html_e( 'Register', 'opalestate-pro' ); ?></a>
|
||||
</div>
|
||||
<div class="opalestate-tab-wrap">
|
||||
<div class="opalestate-tab-content" id="o-login-form">
|
||||
<?php
|
||||
$atts = array(
|
||||
'message' => '',
|
||||
'redirect' => '',
|
||||
'hide_title' => false
|
||||
);
|
||||
echo opalestate_load_template_path( 'user/login-form', $atts );
|
||||
?>
|
||||
</div>
|
||||
<div class="opalestate-tab-content" id="o-register-form">
|
||||
<?php
|
||||
$atts = array(
|
||||
'message' => '',
|
||||
'redirect' => '',
|
||||
'hide_title' => false
|
||||
);
|
||||
echo opalestate_load_template_path( 'user/register-form', $atts );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
54
templates/user/my-properties.php
Executable file
54
templates/user/my-properties.php
Executable file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
$statuses = array(
|
||||
'all' => esc_html__( 'All' ,'opalestate-pro' ),
|
||||
'published' => esc_html__( 'Published' ,'opalestate-pro' ),
|
||||
'pending' => esc_html__( 'Pending' ,'opalestate-pro' ),
|
||||
'expired' => esc_html__( 'Expired' ,'opalestate-pro' ),
|
||||
);
|
||||
|
||||
$gstatus = isset( $_GET['status'] )? $_GET['status']:'all';
|
||||
?>
|
||||
<?php do_action( "opalestate_submission_listing_before" ); ?>
|
||||
<div class="property-listing my-properties">
|
||||
|
||||
<div class="list-tabs">
|
||||
<div class="tabs">
|
||||
<ul class="clearfix">
|
||||
<?php foreach( $statuses as $status => $label ): ?>
|
||||
<li <?php if( $status==$gstatus ):?> class="active" <?php endif; ?>>
|
||||
<a href="<?php echo esc_url( opalestate_get_current_url( array( 'status' => $status) ) ); ?>" ><?php echo esc_attr($label); ?></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="opalestate-admin-box">
|
||||
|
||||
<div class="box-content">
|
||||
|
||||
<?php if( $loop->have_posts() ): ?>
|
||||
<div class="opalestate-rows">
|
||||
<div class="<?php echo apply_filters('opalestate_row_container_class', 'opal-row');?>">
|
||||
<?php $cnt=0; while ( $loop->have_posts() ) : $loop->the_post(); global $post; ?>
|
||||
|
||||
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<?php echo opalestate_load_template_path( 'user/content-property' ); ?>
|
||||
</div>
|
||||
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php opalestate_pagination( $loop->max_num_pages ); ?>
|
||||
|
||||
<?php else : ?>
|
||||
<div class="opalestate-message">
|
||||
<?php esc_html_e( 'You have not submited any property.', 'opalestate-pro' ) ;?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
<?php do_action( "opalestate_submission_listing_after" ); ?>
|
||||
60
templates/user/profile.php
Executable file
60
templates/user/profile.php
Executable file
@@ -0,0 +1,60 @@
|
||||
<div class="property-submission-form">
|
||||
|
||||
<?php if ( ! empty( $_SESSION['messages'] ) ) : ?>
|
||||
|
||||
<div class="opalesate_messages">
|
||||
<?php foreach ( $_SESSION['messages'] as $message ) : ?>
|
||||
|
||||
<?php $status = isset( $message[0] ) ? $message[0] : 'success'; ?>
|
||||
<?php $msg = isset( $message[1] ) ? $message[1] : ''; ?>
|
||||
<div class="opalesate_message_line <?php echo esc_attr( $status ) ?>">
|
||||
<?php printf( '%s', $msg ) ?>
|
||||
</div>
|
||||
|
||||
<?php endforeach; unset( $_SESSION['messages'] ); ?>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="opalestate-admin-box">
|
||||
|
||||
<div class="box-content">
|
||||
<h3><?php esc_html_e( 'Edit User Profile', 'opalestate-pro' ); ?></h3>
|
||||
|
||||
<?php
|
||||
do_action( 'opalestate_profile_form_before' );
|
||||
|
||||
if ( function_exists( 'cmb2_get_metabox_form' ) ) {
|
||||
echo cmb2_get_metabox_form( $metaboxes[ OPALESTATE_USER_PROFILE_PREFIX . 'front' ], $user_id, array(
|
||||
'form_format' => '<form action="//' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . '" class="cmb-form" method="post" id="%1$s" enctype="multipart/form-data" encoding="multipart/form-data"><input type="hidden" name="object_id" value="%2$s">%3$s<input type="submit" name="submit-cmb" value="%4$s" class="button-primary btn btn-primary"></form>',
|
||||
'save_button' => esc_html__( 'Save Change', 'opalestate-pro' ),
|
||||
) );
|
||||
}
|
||||
|
||||
do_action( 'opalestate_profile_form_after' );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="opalestate-admin-box">
|
||||
<div class="box-content">
|
||||
<h3><?php esc_html_e( 'Change Password', 'opalestate-pro' ); ?></h3>
|
||||
|
||||
|
||||
<?php
|
||||
do_action( 'opalestate_profile_form_before' );
|
||||
|
||||
if ( function_exists( 'cmb2_get_metabox_form' ) ) {
|
||||
echo cmb2_get_metabox_form( $metaboxes[ OPALESTATE_USER_PROFILE_PREFIX . 'frontchangepass' ], $user_id, [
|
||||
'form_format' => '<form action="//' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . '" class="cmb-form" method="post" id="%1$s" enctype="multipart/form-data" encoding="multipart/form-data"><input type="hidden" name="object_id" value="%2$s">%3$s<input type="submit" name="submit-cmb" value="%4$s" class="button-primary btn btn-primary"></form>',
|
||||
'save_button' => esc_html__( 'Save Change', 'opalestate-pro' ),
|
||||
] );
|
||||
}
|
||||
|
||||
do_action( 'opalestate_profile_form_after' );
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
99
templates/user/property-ratings.php
Executable file
99
templates/user/property-ratings.php
Executable file
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
/**
|
||||
* Display single property reviews (comments)
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( ! isset( $comments ) || ! $comments ) {
|
||||
echo '<p class="opalestate-my-reviews-no-reviews">' . esc_html__( 'You have not written any reviews yet.', 'opalestate-pro' ) . '</p>';
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
wp_enqueue_style( "tooltipster" );
|
||||
wp_enqueue_script( "tooltipster" );
|
||||
?>
|
||||
|
||||
<div class="opalestate-my-reviews opalestate-box">
|
||||
<ol class="commentlist opalestate-my-reviews-list">
|
||||
<?php foreach ( $comments as $comment ) : ?>
|
||||
<li class="property_review opalestate-my-reviews-item" id="li-comment-41">
|
||||
<div class="opal-row">
|
||||
<div id="comment-41" class="col-lg-9 col-sm-9 comment_container opalestate-my-reviews-item__comment">
|
||||
<?php echo get_avatar( $comment, apply_filters( 'opalestate_review_gravatar_size', '60' ), '' ); ?>
|
||||
|
||||
<div class="comment-text">
|
||||
|
||||
<div class="wrapperss">
|
||||
<p class="meta">
|
||||
<span class="opalestate-review__author"><?php echo esc_html( $comment->comment_author ); ?> </span>
|
||||
<span class="opalestate-review__dash">–</span>
|
||||
<time class="opalestate-review__published-date" datetime="<?php echo esc_attr( get_comment_date( 'c', $comment->comment_ID ) ); ?>">
|
||||
<?php echo esc_html( get_comment_date( opalestate_date_format(), $comment->comment_ID ) ); ?>
|
||||
</time>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
$cpt_feature = 'opalestate_rating_ft';
|
||||
$average = Opalestate_Rating_Helper::get_average_rating( $comment, $cpt_feature );
|
||||
$features = opalestate_get_property_rating_features();
|
||||
?>
|
||||
<?php if ( $features ) : ?>
|
||||
<div class="opalestate-review__ratings">
|
||||
<div class="opalestate-tooltip" data-tooltip-content="#tooltip_content_<?php echo absint( $comment->comment_ID ); ?>">
|
||||
<?php
|
||||
if ( $average ) {
|
||||
echo opalestate_get_rating_html( $average ); // WPCS: XSS ok.
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="opalestate-rating-detail-container">
|
||||
<ul class="opalestate-rating-detail" id="tooltip_content_<?php echo absint( $comment->comment_ID ); ?>">
|
||||
<?php foreach ( $features as $feature_slug => $feature_title ) : $feature_key = $cpt_feature . '_' . $feature_slug; ?>
|
||||
<li class="opalestate-rating-detail__item">
|
||||
<label><?php echo esc_html( $feature_title ); ?></label>
|
||||
<span><?php echo absint( get_comment_meta( $comment->comment_ID, $feature_key, true ) ); ?></span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<?php
|
||||
if ( $average ) {
|
||||
echo opalestate_get_rating_html( $average ); // WPCS: XSS ok.
|
||||
} ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p><?php echo esc_html( $comment->comment_content ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-sm-3 opalestate-my-reviews-item__property">
|
||||
<?php $post_title = get_the_title( $comment->comment_post_ID ); ?>
|
||||
<?php if ( $post_title ) : ?>
|
||||
<h6 class="opalestate-my-reviews-item_property-name">
|
||||
<a href="<?php echo esc_url( get_permalink( $comment->comment_post_ID ) ); ?>" title="<?php echo esc_attr( $post_title ); ?>" target="_blank">
|
||||
<?php echo esc_html( $post_title ); ?>
|
||||
</a>
|
||||
</h6>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="opalestate-my-reviews-item_property-view">
|
||||
<a href="<?php echo esc_url( get_permalink( $comment->comment_post_ID ) ); ?>" title="<?php echo esc_attr( $post_title ); ?>" target="_blank">
|
||||
<?php esc_html_e( 'View Property', 'opalestate-pro' ); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li><!-- #comment-## -->
|
||||
<?php endforeach; ?>
|
||||
</ol>
|
||||
</div>
|
||||
50
templates/user/read-messages.php
Executable file
50
templates/user/read-messages.php
Executable file
@@ -0,0 +1,50 @@
|
||||
<?php if( $message ):
|
||||
$form = OpalEstate()->html->render_form( $fields );
|
||||
$id = 'message-reply';
|
||||
?>
|
||||
<div class="opalestate-nav-bc opal-row">
|
||||
|
||||
<div class="col-lg-8"><a href="<?php echo opalestate_get_user_tab_uri( 'messages' ); ?>"><?php esc_html_e( 'Inbox', 'opalestate-pro' );?></a> /
|
||||
<?php echo esc_html( $message->subject ); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="opalestate-read-message">
|
||||
|
||||
<div class="message-body">
|
||||
<div class="message-avatar">
|
||||
<img src="<?php echo OpalEstate_User::get_author_picture( $message->sender_id ); ?>" width="60" alt="<?php esc_attr_e( 'User Avatar', 'opalestate-pro' ); ?>"/>
|
||||
</div>
|
||||
<div class="message-content">
|
||||
<div><?php echo esc_html( $message->created ); ?></div>
|
||||
<?php echo esc_html( $message->message ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if( $replies ): ?>
|
||||
<?php foreach( $replies as $reply ): ?>
|
||||
|
||||
<div class="message-body">
|
||||
<div class="message-avatar">
|
||||
<img src="<?php echo OpalEstate_User::get_author_picture( $reply->sender_id ); ?>" width="60" alt="<?php esc_attr_e( 'User Avatar', 'opalestate-pro' ); ?>"/>
|
||||
</div>
|
||||
<div class="message-content">
|
||||
<div><?php echo $reply->created; ?></div>
|
||||
<?php echo $reply->message; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="opalestate-message-reply">
|
||||
<form class="opalestate-form-reply" method="post" >
|
||||
<?php echo $form; ?>
|
||||
<?php wp_nonce_field( $id, 'message_action' ); ?>
|
||||
<div class="form-group">
|
||||
<input type="hidden" name="message_id" value="<?php echo $message->id; ?>">
|
||||
<button type="submit"><?php esc_html_e( 'Reply','opalestate-pro'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
98
templates/user/register-form.php
Executable file
98
templates/user/register-form.php
Executable file
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
/**
|
||||
* $Desc$
|
||||
*
|
||||
* @version $Id$
|
||||
* @package $package$
|
||||
* @author Opal Team <info@wpopal.com >
|
||||
* @copyright Copyright (C) 2019 wpopal.com. All Rights Reserved.
|
||||
* @license GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* @website http://www.wpopal.com
|
||||
* @support http://www.wpopal.com/support/forum.html
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
opalestate_print_notices();
|
||||
|
||||
if ( is_user_logged_in() ) {
|
||||
_e( 'You are currently logged in.', 'opalestate-pro' );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$types = OpalEstate_User::get_user_types();
|
||||
?>
|
||||
<div class="opalesate-form">
|
||||
<?php if ( $hide_title === false ) : ?>
|
||||
<h3><?php esc_html_e( 'Register', 'opalestate-pro' ); ?></h3>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $message ) : ?>
|
||||
<p><?php printf( '%s', $message ) ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<form method="POST" class="opalestate-register-form opalestate-member-form">
|
||||
|
||||
<?php do_action( 'opalestate_member_before_register_form' ); ?>
|
||||
|
||||
<p class="opalestate-form-field username validate-required">
|
||||
<label for="reg_username"><?php esc_html_e( 'Username', 'opalestate-pro' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="opalestate-input input-text" name="username" id="reg_username" required="required" value="<?php if ( ! empty( $_POST['username'] ) ) {
|
||||
echo esc_attr( $_POST['username'] );
|
||||
} ?>"/>
|
||||
</p>
|
||||
|
||||
<p class="opalestate-form-field email validate-required">
|
||||
<label for="reg_email"><?php esc_html_e( 'Email address', 'opalestate-pro' ); ?> <span class="required">*</span></label>
|
||||
<input type="email" class="opalestate-input input-text" name="email" id="reg_email" required="required" value="<?php if ( ! empty( $_POST['email'] ) ) {
|
||||
echo esc_attr( $_POST['email'] );
|
||||
} ?>"/>
|
||||
</p>
|
||||
|
||||
<p class="opalestate-form-field password validate-required">
|
||||
<label for="reg_password"><?php esc_html_e( 'Password', 'opalestate-pro' ); ?> <span class="required">*</span></label>
|
||||
<input type="password" class="opalestate-input input-text" name="password" required="required" id="reg_password"/>
|
||||
</p>
|
||||
|
||||
<p class="opalestate-form-field password confirm-password validate-required">
|
||||
<label for="reg_password1"><?php esc_html_e( 'Repeat-Password', 'opalestate-pro' ); ?> <span class="required">*</span></label>
|
||||
<input type="password" class="opalestate-input input-text" name="password1" required="required" id="reg_password1"/>
|
||||
</p>
|
||||
|
||||
<?php if ( $types ): ?>
|
||||
|
||||
<p class="opalestate-form-field usertype validate-required">
|
||||
<label for="userrole"><?php esc_html_e( 'Type', 'opalestate-pro' ); ?> <span class="required">*</span></label>
|
||||
<select name="role" id="userrole" class="form-control">
|
||||
<?php foreach ( $types as $type => $label ): ?>
|
||||
<option value="<?php echo $type; ?>"><?php echo $label; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<p class="opalestate-form-field i-agree validate-required">
|
||||
<label><?php esc_html_e( 'I agree with', 'opalestate-pro' ); ?> <span class="required">*</span></label>
|
||||
<a href="#"><?php esc_html_e( 'terms & conditions', 'opalestate-pro' ); ?></a>
|
||||
<input type="checkbox" name="confirmed_register" id="confirmed_register" required="required" class="comfirmed-box"/>
|
||||
</p>
|
||||
|
||||
<?php do_action( 'opalestate_register_form' ); ?>
|
||||
<?php do_action( 'register_form' ); ?>
|
||||
|
||||
<p class="opalestate-form-field submit">
|
||||
<?php wp_nonce_field( 'opalestate-register', 'opalestate-register-nonce' ); ?>
|
||||
<?php if ( $redirect ) : ?>
|
||||
<input type="hidden" name="redirect" value="<?php echo esc_url( $redirect ); ?>">
|
||||
<?php endif; ?>
|
||||
<input type="submit" class="opalestate-button button btn btn-primary" name="register" value="<?php esc_attr_e( 'Register', 'opalestate-pro' ); ?>"/>
|
||||
</p>
|
||||
|
||||
<?php do_action( 'opalestate_member_after_register_form' ); ?>
|
||||
</form>
|
||||
</div>
|
||||
58
templates/user/share-search-form.php
Executable file
58
templates/user/share-search-form.php
Executable file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$args = array();
|
||||
|
||||
$message = sprintf( esc_html__( 'Hey there! I saved this search on %s, please check out these homes that are listed. Remember to save this search to be first to catch any new listings.', 'opalestate-pro' ) , get_bloginfo( 'name' ) );
|
||||
|
||||
if( opalestate_options('enable_share_earch','on') == 'on' ):
|
||||
?>
|
||||
|
||||
<div class="opalestate-popup">
|
||||
<div class="popup-head <?php if( !is_user_logged_in() ): ?> opalestate-need-login <?php endif; ?>"><span class="text-primary"><i class="fa fa-envelope" aria-hidden="true"></i> <?php esc_html_e('Share this Search', 'opalestate-pro') ?></span> </div>
|
||||
<?php if( is_user_logged_in() ):
|
||||
global $current_user;
|
||||
?>
|
||||
<div class="popup-body">
|
||||
<div class="popup-close"><i class="fa fa-times" aria-hidden="true"></i></div>
|
||||
|
||||
<div class="share-content-form-container">
|
||||
|
||||
<h6><?php echo esc_html__( 'Are you searching with anyone? Share this search.', 'opalestate-pro' ); ?></h6>
|
||||
|
||||
<div class="box-content share-content-form">
|
||||
|
||||
<form method="post" class="opalestate-share-content-form">
|
||||
<?php do_action('opalestate_contact_share_form_before'); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<input class="form-control inputs-emails" name="friend_email[]" type="email" placeholder="<?php echo esc_html__( 'Friend Email', 'opalestate-pro' ); ?>" value="" required="required">
|
||||
</div><!-- /.form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<input class="form-control" name="name" type="text" placeholder="<?php echo esc_html__( 'Name', 'opalestate-pro' ); ?>" value="<?php echo esc_attr( $current_user->data->display_name ); ?>"
|
||||
required="required">
|
||||
</div><!-- /.form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<input class="form-control" name="email" type="email" placeholder="<?php echo esc_html__( 'E-mail', 'opalestate-pro' ); ?>" required="required" value="<?php echo
|
||||
esc_attr( $current_user->data->user_email ); ?>">
|
||||
</div><!-- /.form-group -->
|
||||
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" name="message" placeholder="<?php echo esc_html__( 'Message', 'opalestate-pro' ); ?>" style="overflow: hidden; word-wrap: break-word;
|
||||
min-height: 108px;"><?php echo esc_html( $message ); ?></textarea>
|
||||
</div><!-- /.form-group -->
|
||||
|
||||
<?php do_action('opalestate_contact_share_form_after'); ?>
|
||||
<button class="button btn btn-primary btn-3d btn-block" data-loading-text="<i class='fa fa-circle-o-notch fa-spin'></i> <?php echo esc_html__( ' Processing', 'opalestate-pro' ); ?>" type="submit" name="contact-form"><?php echo esc_html__( 'Send message', 'opalestate-pro' ); ?></button>
|
||||
</form>
|
||||
</div><!-- /.agent-contact-form -->
|
||||
</div><!-- /.agent-contact-->
|
||||
|
||||
</div>
|
||||
<?php endif ; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
21
templates/user/social-login/facebook-button.php
Executable file
21
templates/user/social-login/facebook-button.php
Executable file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit();
|
||||
}
|
||||
|
||||
if ( 'off' === opalestate_get_option( 'enable_facebook_login' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$facebook_app_id = opalestate_get_option( 'facebook_app_id', '' );
|
||||
$facebook_secret = opalestate_get_option( 'facebook_secret', '' );
|
||||
|
||||
if ( ! $facebook_app_id || ! $facebook_secret ) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<a href="javascript:void(0);" rel="nofollow" title="<?php esc_attr_e( 'Facebook', 'opalestate-pro' ); ?>" class="js-opal-facebook-login opalestate-social-login-facebook-btn">
|
||||
<i class="fa fa-facebook"></i><?php esc_html_e( 'Connect with Facebook', 'opalestate-pro' ); ?>
|
||||
</a>
|
||||
21
templates/user/social-login/google-button.php
Executable file
21
templates/user/social-login/google-button.php
Executable file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit();
|
||||
}
|
||||
|
||||
if ( 'off' === opalestate_get_option( 'enable_google_login' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$google_client_id = opalestate_get_option( 'google_client_id', '' );
|
||||
$google_client_secret = opalestate_get_option( 'google_client_secret', '' );
|
||||
$google_api_key = opalestate_get_option( 'google_api_key', '' );
|
||||
|
||||
if ( ! $google_client_id || ! $google_client_secret || ! $google_api_key ) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<a href="javascript:void(0);" rel="nofollow" title="<?php esc_attr_e( 'Google', 'opalestate-pro' ); ?>" class="js-opal-google-login opalestate-social-login-google-btn">
|
||||
<i class="fa fa-google-plus"></i><?php esc_html_e( 'Connect with Google', 'opalestate-pro' ); ?>
|
||||
</a>
|
||||
22
templates/user/social-login/social-login.php
Executable file
22
templates/user/social-login/social-login.php
Executable file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="opalestate-social-login">
|
||||
<ul class="opalestate-social-login__buttons">
|
||||
<?php
|
||||
if ( 'on' === opalestate_get_option( 'enable_facebook_login' ) ) {
|
||||
echo '<li>' . opalestate_load_template_path( 'user/social-login/facebook-button' ) . '</li>';
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ( 'on' === opalestate_get_option( 'enable_google_login' ) ) {
|
||||
echo '<li>' . opalestate_load_template_path( 'user/social-login/google-button' ) . '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
Reference in New Issue
Block a user