da698fa1 by Jeremy Groot

Merge branch 'master' of git.gotenzing.com:Jeremy/stellervista-Intranet

2 parents 3317f0bd 3f527696
......@@ -15268,6 +15268,14 @@ td.hidden {
.table-like__item a:hover {
text-decoration: underline;
}
.table-like__item .flag {
margin-top: 5px;
transform-origin: center;
}
.table-like__item .flag:hover {
color: #000;
transform: scale(1.1);
}
.table-like__item .button {
all: unset;
cursor: pointer;
......@@ -15349,6 +15357,53 @@ p.intro {
max-width: 600px;
}
.flag-modal .modal-dialog {
max-width: 600px !important;
margin: auto;
}
@media only screen and (max-width: 600px) {
.flag-modal .modal-dialog {
margin: 20px 10px;
}
}
.flag-modal .modal-title {
color: #1A3668;
}
.flag-modal .modal-header {
border-bottom: 0px solid #1A3668;
}
.flag-modal .btn-close {
transform-origin: center;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22.828' height='22.828' viewBox='0 0 22.828 22.828'%3E%3Cg id='btn_close_modal' data-name='btn_close modal' transform='translate(1.414 1.414)'%3E%3Cline id='Line_14' data-name='Line 14' x2='28.284' transform='translate(0) rotate(45)' fill='none' stroke='%231A3668' stroke-linecap='round' stroke-width='2'/%3E%3Cline id='Line_15' data-name='Line 15' x2='28.284' transform='translate(20 0) rotate(135)' fill='none' stroke='%231A3668' stroke-linecap='round' stroke-width='2'/%3E%3C/g%3E%3C/svg%3E") !important;
}
.flag-modal .btn-close:hover {
transform: scale(1.1);
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22.828' height='22.828' viewBox='0 0 22.828 22.828'%3E%3Cg id='btn_close_modal' data-name='btn_close modal' transform='translate(1.414 1.414)'%3E%3Cline id='Line_14' data-name='Line 14' x2='28.284' transform='translate(0) rotate(45)' fill='none' stroke='%23000000' stroke-linecap='round' stroke-width='2'/%3E%3Cline id='Line_15' data-name='Line 15' x2='28.284' transform='translate(20 0) rotate(135)' fill='none' stroke='%23000000' stroke-linecap='round' stroke-width='2'/%3E%3C/g%3E%3C/svg%3E") !important;
}
.flag-modal .modal-content {
padding: 10px 20px;
margin: auto;
background-color: #fff;
}
.flag-modal .modal-content label {
font-weight: bold;
color: #1A3668;
}
.flag-modal .modal-content .ninja-forms-field[value=Submit] {
all: unset;
cursor: pointer;
text-transform: uppercase;
background-color: #183668;
color: #fff;
padding: 10px 20px !important;
font-size: 15px;
}
.flag-modal .modal-content .ninja-forms-field[value=Submit]:hover {
font-weight: bold;
text-decoration: none;
background-color: #132C55 !important;
}
.green-block {
margin: 60px 0px;
padding: 40px 125px;
......@@ -15601,21 +15656,21 @@ p.intro {
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9.095' height='15' viewBox='0 0 9.095 15'%3E%3Cpath id='Path_1369' data-name='Path 1369' d='M7.515 3.553c.52.526 1.03 1.048 1.546 1.564q1.857 1.856 3.718 3.708a.834.834 0 0 0 1.232 0c.236-.242.477-.479.716-.718a.817.817 0 0 0 0-1.222L11.379 3.538Q9.758 1.915 8.138.29A.9.9 0 0 0 7.532 0a.864.864 0 0 0-.667.288Q5.614 1.544 4.363 2.8L.956 6.207c-.232.232-.465.463-.7.7A.812.812 0 0 0 .269 8.1l.71.71a.833.833 0 0 0 1.25 0l3.016-3L7.429 3.634Z' transform='translate(9.095) rotate(90)' fill='%231A3668'/%3E%3C/svg%3E") !important;
}
.um-directory .um-members-pagination-box .um-members-pagi .pagi.current {
.um-directory .um-members-pagination-box .um-members-pagi .pagei.current {
border-color: #fff !important;
background-color: #fff !important;
color: #3eaf49 !important;
font-weight: 800 !important;
}
.um-directory .um-members-pagination-box .um-members-pagi .pagi.current span {
.um-directory .um-members-pagination-box .um-members-pagi .pagei.current span {
border-color: #fff !important;
background-color: #fff !important;
color: #3eaf49 !important;
font-weight: 800 !important;
}
.pagi span {
.pagei span {
color: #2c2c2c !important;
}
......@@ -15732,4 +15787,59 @@ p.intro {
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
}
.um-directory .um-members-pagination-box .um-members-pagi .pagei {
cursor: pointer;
display: inline-block;
width: auto;
height: 34px;
line-height: 34px;
transition: all 0.2s linear;
padding: 0 14px;
color: #666 !important;
font-weight: normal;
}
.um-directory .um-members-pagination-box .um-members-pagi .pagei {
cursor: pointer;
display: inline-block;
width: auto;
height: 34px;
line-height: 34px;
transition: all 0.2s linear;
padding: 0 14px;
color: #666 !important;
font-weight: normal;
}
.um-directory .um-members-pagination-box .um-members-pagi .pagei.pagi-arrow {
line-height: 38px;
}
.um-directory .um-members-pagination-box .um-members-pagi .pagei.pagi-arrow i:before {
font-size: 20px;
vertical-align: middle !important;
height: 34px;
line-height: 34px;
top: -2px;
position: relative;
}
.um-directory .um-members-pagination-box .um-members-pagi .pagei.current {
cursor: default;
color: #fff !important;
}
.um-directory .um-members-pagination-box .um-members-pagi .pagei.current:hover {
color: #fff !important;
}
.um-directory .um-members-pagination-box .um-members-pagi .pagei.disabled {
cursor: default;
opacity: 0.4;
}
.um-directory .um-members-pagination-box .um-members-pagi .pagei.none {
color: #aaa !important;
}
/*# sourceMappingURL=child-theme.css.map */
\ No newline at end of file
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
......@@ -167,3 +167,54 @@ function is_valid_email_domain($login, $email, $errors ){
}
}
add_action('register_post', 'is_valid_email_domain',10,3 );
add_filter( 'um_profile_field_filter_hook__phone_number_12', 'my_profile_phone_number', 10, 2 );
add_filter( 'um_profile_field_filter_hook__phone_number', 'my_profile_phone_number', 10, 2 );
function my_profile_phone_number( $value, $data ) {
$value = format_phone_string( $value );
return $value;
}
add_filter( 'um_view_label_phone_number', 'my_phone_number_label', 10, 1 );
function my_phone_number_label( $label ) {
$label = "Direct Line / Branch";
return $label;
}
function format_phone_string( $phoneNumber ) {
// Return the phone number in parentheses format, e.g. (123) 456-7890.
// Handles 10 digit numbers with or without country codes and extensions
// Source 2nd part from: https://stackoverflow.com/questions/4708248/formatting-phone-numbers-in-php
$phoneNumber = preg_replace('/[^0-9]/','',$phoneNumber);
if(strlen($phoneNumber) > 10) {
$countryCode = substr($phoneNumber, 0, strlen($phoneNumber)-10);
$areaCode = substr($phoneNumber, -10, 3);
$nextThree = substr($phoneNumber, -7, 3);
$lastFour = substr($phoneNumber, -4, 4);
$phoneNumber = '+'.$countryCode.' ('.$areaCode.') '.$nextThree.'-'.$lastFour;
}
else if(strlen($phoneNumber) == 10) {
$areaCode = substr($phoneNumber, 0, 3);
$nextThree = substr($phoneNumber, 3, 3);
$lastFour = substr($phoneNumber, 6, 4);
$phoneNumber = '('.$areaCode.') '.$nextThree.'-'.$lastFour;
}
else if(strlen($phoneNumber) == 7) {
$nextThree = substr($phoneNumber, 0, 3);
$lastFour = substr($phoneNumber, 3, 4);
$phoneNumber = $nextThree.'-'.$lastFour;
}
return $phoneNumber;
}
......
......@@ -57,7 +57,20 @@ function resources_list($atts){
endwhile; ?>
</tbody>
</table>
</div>
</div>
<div class="modal fade flag-modal" id="flagModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title" id="exampleModalLabel">Flag Document</h3>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<?php echo do_shortcode('[ninja_form id=3]'); ?>
</div>
</div>
</div>
</div>
<?php endif;
wp_reset_query();
$output = ob_get_clean();
......@@ -119,12 +132,15 @@ function resources($id, $tax){
<tr class="table-like__item">
<td class="item">
<a target="_blank" role="button" href="<?php echo wp_get_attachment_url($id); ?>"><?php echo $post->post_title; ?></a>
<a target="_blank" role="button" class="item-link" href="<?php echo wp_get_attachment_url($id); ?>"><?php echo $post->post_title; ?></a>
</td>
<td class="hidden"> <?php echo $cat; ?></td>
<td class="hidden"><?php echo get_post_time('U',false, $id ); ?></td>
<td>
<td class="wide-td">
<a target="_blank" role="button" href="<?php echo wp_get_attachment_url($id); ?>" class="button">View</a>
<a type="button" data-title="<?php echo $post->post_title; ?>" class="flag" data-bs-toggle="modal" data-bs-target="#flagModal"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-flag-fill" viewBox="0 0 16 16">
<path d="M14.778.085A.5.5 0 0 1 15 .5V8a.5.5 0 0 1-.314.464L14.5 8l.186.464-.003.001-.006.003-.023.009a12.435 12.435 0 0 1-.397.15c-.264.095-.631.223-1.047.35-.816.252-1.879.523-2.71.523-.847 0-1.548-.28-2.158-.525l-.028-.01C7.68 8.71 7.14 8.5 6.5 8.5c-.7 0-1.638.23-2.437.477A19.626 19.626 0 0 0 3 9.342V15.5a.5.5 0 0 1-1 0V.5a.5.5 0 0 1 1 0v.282c.226-.079.496-.17.79-.26C4.606.272 5.67 0 6.5 0c.84 0 1.524.277 2.121.519l.043.018C9.286.788 9.828 1 10.5 1c.7 0 1.638-.23 2.437-.477a19.587 19.587 0 0 0 1.349-.476l.019-.007.004-.002h.001"/>
</svg></a>
</td>
</tr>
<?php
......
......@@ -20110,6 +20110,9 @@
var span = $(this).find('.glyphicon');
span.toggleClass('glyphicon-chevron-up glyphicon-chevron-down');
});
$(document).on("click", ".flag", function (e) {
$("#nf-field-16").val($(this).data('title'));
});
});
/**
......@@ -25052,6 +25055,47 @@
directory.find('.um-member-directory-view-type').removeClass('um-disabled');
});
});
jQuery(document.body).on('click', '.um-directory .pagei:not(.current)', function () {
if (jQuery(this).hasClass('disabled')) {
return;
}
var directory = jQuery(this).parents('.um-directory');
if (um_is_directory_busy(directory)) {
return;
}
um_members_show_preloader(directory);
var page;
if ('first' === jQuery(this).data('page')) {
page = 1;
} else if ('prev' === jQuery(this).data('page')) {
page = directory.data('page') * 1 - 1;
} else if ('next' === jQuery(this).data('page')) {
page = directory.data('page') * 1 + 1;
} else if ('last' === jQuery(this).data('page')) {
page = parseInt(directory.data('total_pages'));
} else {
page = parseInt(jQuery(this).data('page'));
}
if (page === 1) {
directory.find('.pagi[data-page="first"], .pagi[data-page="prev"]').addClass('disabled');
directory.find('.pagi[data-page="prev"], .pagi[data-page="last"]').removeClass('disabled');
} else if (page === parseInt(directory.data('total_pages'))) {
directory.find('.pagi[data-page="prev"], .pagi[data-page="last"]').addClass('disabled');
directory.find('.pagi[data-page="first"], .pagi[data-page="prev"]').removeClass('disabled');
} else {
directory.find('.pagi[data-page="prev"], .pagi[data-page="last"]').removeClass('disabled');
directory.find('.pagi[data-page="first"], .pagi[data-page="prev"]').removeClass('disabled');
}
directory.find('.pagi').removeClass('current');
directory.find('.pagi[data-page="' + page + '"]').addClass('current');
directory.data('page', page);
if (page === 1) {
um_set_url_from_data(directory, 'page', '');
} else {
um_set_url_from_data(directory, 'page', page);
}
um_ajax_get_members_new(directory);
});
function um_ajax_get_members_new(directory, args) {
/**
* Operates with the next data:
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
......@@ -52,6 +52,57 @@ jQuery(document).ready(function($) {
});
jQuery( document.body ).on( 'click', '.um-directory .pagei:not(.current)', function() {
if ( jQuery(this).hasClass('disabled') ) {
return;
}
var directory = jQuery(this).parents('.um-directory');
if ( um_is_directory_busy( directory ) ) {
return;
}
um_members_show_preloader( directory );
var page;
if ( 'first' === jQuery(this).data('page') ) {
page = 1;
} else if ( 'prev' === jQuery(this).data('page') ) {
page = directory.data( 'page' )*1 - 1;
} else if ( 'next' === jQuery(this).data('page') ) {
page = directory.data( 'page' )*1 + 1;
} else if ( 'last' === jQuery(this).data('page') ) {
page = parseInt( directory.data( 'total_pages' ) );
} else {
page = parseInt( jQuery(this).data('page') );
}
if ( page === 1 ) {
directory.find('.pagi[data-page="first"], .pagi[data-page="prev"]').addClass('disabled');
directory.find('.pagi[data-page="prev"], .pagi[data-page="last"]').removeClass('disabled');
} else if ( page === parseInt( directory.data( 'total_pages' ) ) ) {
directory.find('.pagi[data-page="prev"], .pagi[data-page="last"]').addClass('disabled');
directory.find('.pagi[data-page="first"], .pagi[data-page="prev"]').removeClass('disabled');
} else {
directory.find('.pagi[data-page="prev"], .pagi[data-page="last"]').removeClass('disabled');
directory.find('.pagi[data-page="first"], .pagi[data-page="prev"]').removeClass('disabled');
}
directory.find('.pagi').removeClass('current');
directory.find('.pagi[data-page="' + page + '"]').addClass('current');
directory.data( 'page', page );
if ( page === 1 ) {
um_set_url_from_data( directory, 'page', '' );
} else {
um_set_url_from_data( directory, 'page', page );
}
um_ajax_get_members_new( directory );
});
function um_ajax_get_members_new( directory, args ) {
/**
......
......@@ -93,6 +93,9 @@ jQuery(document).ready(function($) {
});
$(document).on("click", ".flag", function(e) {
$("#nf-field-16").val($(this).data('title'));
});
......
......@@ -79,19 +79,19 @@ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9.095' height='15' viewBox='0 0 9.095 15'%3E%3Cpath id='Path_1369' data-name='Path 1369' d='M7.515 3.553c.52.526 1.03 1.048 1.546 1.564q1.857 1.856 3.718 3.708a.834.834 0 0 0 1.232 0c.236-.242.477-.479.716-.718a.817.817 0 0 0 0-1.222L11.379 3.538Q9.758 1.915 8.138.29A.9.9 0 0 0 7.532 0a.864.864 0 0 0-.667.288Q5.614 1.544 4.363 2.8L.956 6.207c-.232.232-.465.463-.7.7A.812.812 0 0 0 .269 8.1l.71.71a.833.833 0 0 0 1.25 0l3.016-3L7.429 3.634Z' transform='translate(9.095) rotate(90)' fill='%231A3668'/%3E%3C/svg%3E") !important;
}
.um-directory .um-members-pagination-box .um-members-pagi .pagi.current{
.um-directory .um-members-pagination-box .um-members-pagi .pagei.current{
border-color: #fff !important;
background-color: #fff !important;
color: #3eaf49 !important;
font-weight: 800 !important;
}
.um-directory .um-members-pagination-box .um-members-pagi .pagi.current span{
.um-directory .um-members-pagination-box .um-members-pagi .pagei.current span{
border-color: #fff !important;
background-color: #fff !important;
color: #3eaf49 !important;
font-weight: 800 !important;
}
.pagi span{
.pagei span{
color: #2c2c2c !important;
}
......@@ -188,4 +188,47 @@ flex-wrap: wrap !important;
.um-directory .um-members-wrapper .um-members .um-member{
border-width: 0px !important;
box-shadow: 0 3px 6px rgb(0 0 0 / 16%);
}
\ No newline at end of file
}
.um-directory .um-members-pagination-box .um-members-pagi .pagei {
cursor: pointer;
display: inline-block;
width: auto;
height: 34px;
line-height: 34px;
transition: all .2s linear;
padding: 0 14px;
color: #666 !important;
font-weight: normal; }
.um-directory .um-members-pagination-box .um-members-pagi .pagei {
cursor: pointer;
display: inline-block;
width: auto;
height: 34px;
line-height: 34px;
transition: all .2s linear;
padding: 0 14px;
color: #666 !important;
font-weight: normal; }
.um-directory .um-members-pagination-box .um-members-pagi .pagei.pagi-arrow {
line-height: 38px; }
.um-directory .um-members-pagination-box .um-members-pagi .pagei.pagi-arrow i:before {
font-size: 20px;
vertical-align: middle !important;
height: 34px;
line-height: 34px;
top: -2px;
position: relative; }
.um-directory .um-members-pagination-box .um-members-pagi .pagei.current {
cursor: default;
color: #fff !important; }
.um-directory .um-members-pagination-box .um-members-pagi .pagei.current:hover {
color: #fff !important; }
.um-directory .um-members-pagination-box .um-members-pagi .pagei.disabled {
cursor: default;
opacity: .4; }
.um-directory .um-members-pagination-box .um-members-pagi .pagei.none {
color: #aaa !important; }
\ No newline at end of file
......
......@@ -228,6 +228,7 @@ td.hidden {
padding: 20px ;
}
.item {
width: 100%;
}
......@@ -253,6 +254,15 @@ td.hidden {
a:hover{
text-decoration: underline;
}
.flag{
margin-top: 5px;
transform-origin: center;
}
.flag:hover{
color: #000;
transform: scale(1.1);
}
.button{
all: unset;
......@@ -328,4 +338,56 @@ td.hidden {
p.intro{
max-width: 600px;
}
\ No newline at end of file
}
.flag-modal{
.modal-dialog{
max-width: 600px !important;
margin: auto;
@media only screen and (max-width: 600px) {
margin: 20px 10px;
}
}
.modal-title{
color: #1A3668;
}
.modal-header{
border-bottom: 0px solid #1A3668;
}
.btn-close{
transform-origin: center;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22.828' height='22.828' viewBox='0 0 22.828 22.828'%3E%3Cg id='btn_close_modal' data-name='btn_close modal' transform='translate(1.414 1.414)'%3E%3Cline id='Line_14' data-name='Line 14' x2='28.284' transform='translate(0) rotate(45)' fill='none' stroke='%231A3668' stroke-linecap='round' stroke-width='2'/%3E%3Cline id='Line_15' data-name='Line 15' x2='28.284' transform='translate(20 0) rotate(135)' fill='none' stroke='%231A3668' stroke-linecap='round' stroke-width='2'/%3E%3C/g%3E%3C/svg%3E") !important;
}
.btn-close:hover{
transform: scale(1.1);
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22.828' height='22.828' viewBox='0 0 22.828 22.828'%3E%3Cg id='btn_close_modal' data-name='btn_close modal' transform='translate(1.414 1.414)'%3E%3Cline id='Line_14' data-name='Line 14' x2='28.284' transform='translate(0) rotate(45)' fill='none' stroke='%23000000' stroke-linecap='round' stroke-width='2'/%3E%3Cline id='Line_15' data-name='Line 15' x2='28.284' transform='translate(20 0) rotate(135)' fill='none' stroke='%23000000' stroke-linecap='round' stroke-width='2'/%3E%3C/g%3E%3C/svg%3E") !important;
}
.modal-content{
padding: 10px 20px;
margin: auto;
background-color: #fff;
label{
font-weight: bold;
color: #1A3668;
}
.ninja-forms-field[value="Submit"]{
all: unset;
cursor: pointer;
text-transform: uppercase;
background-color: #183668;
color:#fff;
padding: 10px 20px !important;
font-size: 15px;
}
.ninja-forms-field[value="Submit"]:hover{
font-weight: bold;
text-decoration: none;
background-color: #132C55 !important;
}
}
}
......
......@@ -5,7 +5,7 @@
Author: the Understrap Contributors
Author URI: https://github.com/understrap/understrap-child/graphs/contributors
Template: understrap
Version: 1.2.0050
Version: 1.2.0056
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: understrap-child
......
......@@ -86,7 +86,13 @@ $unique_hash = substr( md5( $args['form_id'] ), 10, 5 ); ?>
<# if ( typeof user['<?php echo $key; ?>'] !== 'undefined' ) { #>
<div class="um-member-metaline um-member-metaline-<?php echo $key; ?>">
<strong>{{{user['label_<?php echo $key;?>']}}}:</strong>&nbsp;{{{user['<?php echo $key;?>']}}}
<?php if ( $key !== 'phone_number') { ?>
<strong>{{{user['label_<?php echo $key;?>']}}}:</strong>
<?php } ?>
<?php if ( $key === 'phone_number') { ?>
<strong>Direct Line / Branch:</strong>
<?php } ?>
&nbsp;{{{user['<?php echo $key;?>']}}}
</div>
<# } #>
......
......@@ -16,14 +16,14 @@
<div class="um-members-pagi uimob340-hide uimob500-hide">
<span class="pagi pagi-arrow <# if ( data.pagination.current_page == 1 ) { #>disabled<# } #>" data-page="prev" aria-label="<?php esc_attr_e( 'Previous page', 'ultimate-member' ); ?>">
<span class="pagei pagi-arrow <# if ( data.pagination.current_page == 1 ) { #>disabled<# } #>" data-page="prev" aria-label="<?php esc_attr_e( 'Previous page', 'ultimate-member' ); ?>">
<i class="um-faicon-angle-left"></i></span>
<# _.each( data.pagination.pages_to_show, function( page, key, list ) { #>
<span class="pagi <# if ( page == data.pagination.current_page ) { #>current<# } #>" data-page="{{{page}}}"><span>{{{page}}}</span></span>
<span class="pagei <# if ( page == data.pagination.current_page ) { #>current<# } #>" data-page="{{{page}}}"><span>{{{page}}}</span></span>
<# }); #>
<span class="pagi pagi-arrow <# if ( data.pagination.current_page == data.pagination.total_pages ) { #>disabled<# } #>" data-page="next" aria-label="<?php esc_attr_e( 'Next page', 'ultimate-member' ); ?>">
<span class="pagei pagi-arrow <# if ( data.pagination.current_page == data.pagination.total_pages ) { #>disabled<# } #>" data-page="next" aria-label="<?php esc_attr_e( 'Next page', 'ultimate-member' ); ?>">
<i class="um-faicon-angle-right"></i></span>
</div>
......