Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions admin/assets/css/partials/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,13 @@ h3.users_wp_section_heading {
font-weight: bold;
padding-top: 5px;
display: block;
}
.item-list-tabs {
.filter-links {
a, a:hover, a:active, a:focus {
outline: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
}
}
626 changes: 625 additions & 1 deletion admin/assets/css/users-wp-admin.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion admin/assets/css/users-wp-admin.css.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions admin/assets/js/users-wp-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ function save_field(id) {
}
else {
jQuery('#licontainer_' + id).replaceWith(jQuery.trim(result));
uwp_chosen();

var order = jQuery(".field_row_main ul.core").sortable("serialize") + '&update=update&manage_field_type=custom_fields';

Expand Down
66 changes: 41 additions & 25 deletions admin/settings/class-users-wp-admin-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public function uwp_settings_page() {

<?php if (count($settings_array[$page]) > 1) { ?>

<ul class="item-list-tabs-ul">
<div class="wp-filter" style="margin-bottom: 5px">
<ul class="filter-links">
<?php
foreach( $settings_array[$page] as $tab_id => $tab_name ) {

Expand All @@ -62,22 +63,27 @@ public function uwp_settings_page() {

$active = $active_tab == $tab_id ? ' current selected' : '';
?>
<li id="uwp-<?php echo $tab_id; ?>-li" class="<?php echo $active; ?>">
<a id="uwp-<?php echo $tab_id; ?>" href="<?php echo esc_url( $tab_url ); ?>"><?php echo esc_html( $tab_name ); ?></a>
<li id="uwp-<?php echo $tab_id; ?>-li">
<a class="<?php echo $active; ?>" id="uwp-<?php echo $tab_id; ?>" href="<?php echo esc_url( $tab_url ); ?>"><?php echo esc_html( $tab_name ); ?></a>
</li>
<?php
}
?>
</ul>
</div>

<?php } ?>

<?php do_action($page.'_settings_'.$active_tab.'_tab_content_before'); ?>

<div class="tab-content">
<?php
// {current page}_settings_{active tab}_tab_content
// ex: uwp_settings_main_tab_content
do_action($page.'_settings_'.$active_tab.'_tab_content', uwp_display_form());
?>
<div class="postbox">
<div class="tab-content inside">
<?php
// {current page}_settings_{active tab}_tab_content
// ex: uwp_settings_main_tab_content
do_action($page.'_settings_'.$active_tab.'_tab_content', uwp_display_form());
?>
</div>
</div>
</div>

Expand Down Expand Up @@ -254,37 +260,47 @@ public function get_general_info_content() {
<?php
}

public function get_form_builder_content() {
$form_builder = new Users_WP_Form_Builder();

$subtab = 'account';
public function get_form_builder_tabs() {
$tab = 'account';

if (isset($_GET['subtab'])) {
$subtab = $_GET['subtab'];
if (isset($_GET['tab'])) {
$tab = $_GET['tab'];
}

?>
<div class="item-list-sub-tabs">
<ul class="item-list-tabs-ul">
<li id="uwp-form-builder-account-li" class="<?php if ($subtab == 'account') { echo "current selected"; } ?>">
<a id="uwp-form-builder-account" href="<?php echo add_query_arg(array('tab' => 'form_builder', 'subtab' => 'account')); ?>"><?php echo __( 'Account', 'uwp' ); ?></a>

<div class="wp-filter" style="margin-bottom: 5px">
<ul class="filter-links">
<li id="uwp-form-builder-account-li">
<a id="uwp-form-builder-account" class="<?php if ($tab == 'account') { echo "current selected"; } ?>" href="<?php echo add_query_arg(array('tab' => 'account')); ?>"><?php echo __( 'Account', 'uwp' ); ?></a>
</li>
<li id="uwp-form-builder-register-li" class="<?php if ($subtab == 'register') { echo "current selected"; } ?>">
<a id="uwp-form-builder-register" href="<?php echo add_query_arg(array('tab' => 'form_builder', 'subtab' => 'register')); ?>"><?php echo __( 'Register', 'uwp' ); ?></a>
<li id="uwp-form-builder-register-li">
<a id="uwp-form-builder-register" class="<?php if ($tab == 'register') { echo "current selected"; } ?>" href="<?php echo add_query_arg(array('tab' => 'register')); ?>"><?php echo __( 'Register', 'uwp' ); ?></a>
</li>
</ul>
</div>
<?php
if ($subtab == 'account') {
}

public function get_form_builder_content() {
$form_builder = new Users_WP_Form_Builder();

$tab = 'account';

if (isset($_GET['tab'])) {
$tab = $_GET['tab'];
}

if ($tab == 'account') {
?>
<h3 class=""><?php echo __( 'Manage Account Form Fields', 'uwp' ); ?></h3>
<?php
$form_builder->uwp_form_builder($subtab);
} elseif ($subtab == 'register') {
$form_builder->uwp_form_builder($tab);
} elseif ($tab == 'register') {
?>
<h3 class=""><?php echo __( 'Manage Register Form Fields', 'uwp' ); ?></h3>
<?php
$form_builder->uwp_form_builder($subtab);
$form_builder->uwp_form_builder($tab);
}
}

Expand Down
4 changes: 2 additions & 2 deletions admin/settings/class-users-wp-form-builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __construct() {

public function uwp_form_builder($default_tab = 'account')
{
$form_type = (isset($_REQUEST['subtab']) && $_REQUEST['subtab'] != '') ? sanitize_text_field($_REQUEST['subtab']) : $default_tab;
$form_type = (isset($_REQUEST['tab']) && $_REQUEST['tab'] != '') ? sanitize_text_field($_REQUEST['tab']) : $default_tab;
?>
<div class="uwp-panel-heading">
<h3><?php echo apply_filters('uwp_form_builder_panel_head', '');?></h3>
Expand Down Expand Up @@ -657,7 +657,7 @@ public function uwp_admin_form_field_html($field_info, $field_type, $field_type_

if (!$form_type) {
if (!isset($field_info->form_type)) {
$form_type = sanitize_text_field($_REQUEST['subtab']);
$form_type = sanitize_text_field($_REQUEST['tab']);
} else {
$form_type = $field_info->form_type;
}
Expand Down
8 changes: 4 additions & 4 deletions includes/class-users-wp-profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -805,11 +805,11 @@ public function uwp_image_crop_modal_html($type, $image_url, $full_width, $full_
<input type="hidden" name="h" value="" id="<?php echo $type; ?>-h" />
<input type="hidden" id="uwp-<?php echo $type; ?>-crop-image" name="uwp_crop" value="<?php echo $image_url; ?>" />
<input type="hidden" name="uwp_crop_nonce" value="<?php echo wp_create_nonce( 'uwp-crop-nonce' ); ?>" />
<input type="submit" name="uwp_<?php echo $type; ?>_crop" value="<?php echo __('Apply', 'uwp'); ?>" id="save_uwp_<?php echo $type; ?>" />
<input type="submit" name="uwp_<?php echo $type; ?>_crop" value="<?php echo __('Apply', 'uwp'); ?>" class="button button-primary" id="save_uwp_<?php echo $type; ?>" />
</form>
</div>
</div>
<button type="button" data-type="<?php echo $type; ?>" class="uwp_modal_btn uwp-modal-close" data-dismiss="modal">Cancel</button>
<button type="button" data-type="<?php echo $type; ?>" class="button uwp_modal_btn uwp-modal-close" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
Expand Down Expand Up @@ -871,11 +871,11 @@ public function uwp_crop_submit_form($type = 'avatar') {
<div class="uwp-<?php echo $type; ?>-crop-p-wrap">
<div id="<?php echo $type; ?>-crop-actions">
<form class="uwp-crop-form" method="post">
<input type="submit" name="uwp_<?php echo $type; ?>_crop" disabled="disabled" value="<?php echo __('Apply', 'uwp'); ?>" id="save_uwp_<?php echo $type; ?>" />
<input type="submit" name="uwp_<?php echo $type; ?>_crop" disabled="disabled" value="<?php echo __('Apply', 'uwp'); ?>" class="button button-primary" id="save_uwp_<?php echo $type; ?>" />
</form>
</div>
</div>
<button type="button" data-type="<?php echo $type; ?>" class="uwp_modal_btn uwp-modal-close" data-dismiss="modal">Cancel</button>
<button type="button" data-type="<?php echo $type; ?>" class="button uwp_modal_btn uwp-modal-close" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions includes/class-users-wp.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ private function define_admin_hooks() {
$this->loader->add_action( 'uwp_settings_change_tab_content', $plugin_admin_settings, 'generic_display_form' );
$this->loader->add_action( 'uwp_settings_uninstall_tab_content', $plugin_admin_settings, 'generic_display_form' );

$this->loader->add_action( 'uwp_form_builder_settings_main_tab_content_before', $plugin_admin_settings, 'get_form_builder_tabs' );
$this->loader->add_action( 'uwp_form_builder_settings_main_tab_content', $plugin_admin_settings, 'get_form_builder_content' );
$this->loader->add_filter( 'uwp_display_form_title', $plugin_admin_settings, 'display_form_title', 10, 3 );
$this->loader->add_action( 'uwp_notifications_settings_main_tab_content', $plugin_admin_settings, 'get_notifications_content' );
Expand Down
29 changes: 23 additions & 6 deletions includes/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -1435,7 +1435,7 @@ function uwp_file_upload_preview($field, $value, $removable = true) {
$output .= '<div class="uwp_file_preview_wrap">';
$output .= '<a href="'.$value.'" class="uwp_upload_file_preview"><img style="max-width:100px;" src="'.$value.'" /></a>';
if ($removable) {
$output .= '<a id="uwp_upload_file_remove" onclick="return confirm(\'are you sure?\')" style="display: block;margin: 5px 0;" href="#" data-htmlvar="'.$htmlvar.'" data-uid="'.$user_id.'" class="uwp_upload_file_remove">'. __( 'Remove Image' , 'uwp' ).'</a>';
$output .= '<a onclick="return confirm(\'are you sure?\')" style="display: block;margin: 5px 0;" href="#" id="'.$htmlvar.'" data-htmlvar="'.$htmlvar.'" data-uid="'.$user_id.'" class="uwp_upload_file_remove">'. __( 'Remove Image' , 'uwp' ).'</a>';
}
$output .= '</div>';
?>
Expand All @@ -1444,7 +1444,7 @@ function uwp_file_upload_preview($field, $value, $removable = true) {
$output .= '<div class="uwp_file_preview_wrap">';
$output .= '<a href="'.$value.'" class="uwp_upload_file_preview">'.$file.'</a>';
if ($removable) {
$output .= '<a id="uwp_upload_file_remove" onclick="return confirm(\'are you sure?\')" style="display: block;margin: 5px 0;" href="#" data-htmlvar="'.$htmlvar.'" data-uid="'.$user_id.'" class="uwp_upload_file_remove">'. __( 'Remove File' , 'uwp' ).'</a>';
$output .= '<a onclick="return confirm(\'are you sure?\')" style="display: block;margin: 5px 0;" href="#" id="'.$htmlvar.'" data-htmlvar="'.$htmlvar.'" data-uid="'.$user_id.'" class="uwp_upload_file_remove">'. __( 'Remove File' , 'uwp' ).'</a>';
}
$output .= '</div>';
?>
Expand Down Expand Up @@ -2135,10 +2135,15 @@ function uwp_account_get_available_tabs() {
'icon' => 'fa fa-user',
);

$tabs['privacy'] = array(
'title' => __( 'Privacy', 'uwp' ),
'icon' => 'fa fa-lock',
);
$extra_where = "AND is_public='2'";
$fields = get_account_form_fields($extra_where);

if (is_array($fields) && count($fields) > 0) {
$tabs['privacy'] = array(
'title' => __( 'Privacy', 'uwp' ),
'icon' => 'fa fa-lock',
);
}

return apply_filters( 'uwp_account_available_tabs', $tabs );
}
Expand All @@ -2164,4 +2169,16 @@ function uwp_privacy_submit_handler() {
}

}
}

add_action('admin_head', 'uwp_admin_only_css');
function uwp_admin_only_css() {
?>
<style type="text/css">
.uwp_page .uwp-bs-modal input[type="submit"].button,
.uwp_page .uwp-bs-modal button.button {
padding: 0 10px 1px;
}
</style>
<?php
}
11 changes: 11 additions & 0 deletions public/assets/css/partials/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,15 @@
.uwp-profile-extra-value {
border: none;
}
}
.uwp_widgets {
.uwp-login,
.uwp-registration,
.uwp-forgot,
.uwp-account {
background: transparent;
max-width: none;
padding: 0;
width: auto;
}
}
3 changes: 3 additions & 0 deletions public/assets/css/partials/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,7 @@
h2 {
display: none;
}
.uwp-lf-icon {
display: none;
}
}
5 changes: 4 additions & 1 deletion public/assets/css/partials/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@
.uwp-modal-content .jcrop-holder img {
max-width: none;
}
.jcrop-keymgr {
opacity: 0;
}
}

.uwp_page {
Expand Down Expand Up @@ -207,7 +210,7 @@
}

.uwp-bs-modal-title {
margin-bottom: 0;
margin: 0;
padding: 0;
line-height: 1.42857143;
}
Expand Down
4 changes: 4 additions & 0 deletions public/assets/css/partials/_profile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@
}
.uwp-item-actions {
margin-top: 2px;
overflow: hidden;
.geodir-addtofav {
float: left;
}
Expand All @@ -325,6 +326,9 @@
.gd-star-rating {
float: left;
}
.geodir-addtofav {
margin-left: 10px;
}
}
.uwp_more_content span {
display: none;
Expand Down
1,349 changes: 1,348 additions & 1 deletion public/assets/css/users-wp.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/assets/css/users-wp.css.map

Large diffs are not rendered by default.

Loading