Version Description
Download this release
Release Info
Developer | ultimatemember |
Plugin | Ultimate Member – User Profile & Membership Plugin |
Version | 1.3.37 |
Comparing to | |
See all releases |
Code changes from version 1.3.36 to 1.3.37
- admin/assets/css/um-admin-misc.css +0 -12
- admin/core/um-admin-actions.php +22 -5
- admin/templates/access/settings.php +27 -26
- admin/templates/extensions.php +7 -0
- admin/templates/role/register.php +51 -42
- assets/css/pickadate/default.date.css +1 -0
- assets/css/um-account.css +15 -2
- assets/css/um-fonticons-fa.css +10 -6
- assets/css/um-profile.css +13 -1
- assets/css/um-styles.css +28 -1
- assets/css/um.min.css +1 -1
- assets/dynamic_css/dynamic_global.php +6 -1
- assets/js/pickadate/legacy.js +125 -2
- assets/js/pickadate/picker.date.js +1351 -2
- assets/js/pickadate/picker.js +1158 -2
- assets/js/pickadate/picker.time.js +1010 -2
- assets/js/um-functions.js +250 -153
- assets/js/um-profile.js +18 -0
- assets/js/um-tipsy.js +7 -5
- assets/js/um.min.js +0 -2
- core/um-account.php +100 -84
- core/um-actions-access.php +23 -9
- core/um-actions-account.php +130 -122
- core/um-actions-ajax.php +48 -29
- core/um-actions-form.php +96 -92
- core/um-actions-global.php +16 -15
- core/um-actions-members.php +12 -129
- core/um-actions-password.php +36 -7
- core/um-actions-profile.php +4 -2
- core/um-actions-register.php +35 -14
- core/um-builtin.php +20 -0
- core/um-enqueue.php +107 -116
- core/um-fields.php +45 -6
- core/um-files.php +171 -131
- core/um-filters-fields.php +2 -2
- core/um-filters-members.php +51 -51
- core/um-filters-profile.php +51 -13
- core/um-form.php +48 -33
- core/um-mail.php +29 -26
- core/um-members.php +4 -1
- core/um-permalinks.php +79 -7
- core/um-rewrite.php +39 -10
- core/um-short-functions.php +244 -217
- core/um-shortcodes.php +244 -216
- core/um-user.php +14 -21
- index.php +2 -2
- readme.txt +55 -3
- templates/members-grid.php +112 -0
- um-config.php +20 -6
- um-init.php +42 -40
admin/assets/css/um-admin-misc.css
CHANGED
@@ -136,13 +136,7 @@ body.um-admin-modal-open {
|
|
136 |
width: 100%;
|
137 |
max-width: 100%;
|
138 |
display: block;
|
139 |
-
color: #666 !important;
|
140 |
-
background: #fff;
|
141 |
-
border: 1px solid #ddd;
|
142 |
-
border-radius: 2px;
|
143 |
-
outline: none !important;
|
144 |
box-sizing: border-box !important;
|
145 |
-
box-shadow: none !important;
|
146 |
font-size: 13px !important;
|
147 |
line-height: 1.4em !important;
|
148 |
padding: 4px 10px !important;
|
@@ -158,12 +152,6 @@ body.um-admin-modal-open {
|
|
158 |
.um-admin-metabox textarea.um-admin-error
|
159 |
{border-color: #C74A4A!important}
|
160 |
|
161 |
-
.um-admin-metabox input[type=text]:focus,
|
162 |
-
.um-admin-metabox textarea:focus{
|
163 |
-
border-color: #ccc;
|
164 |
-
background-color: #fff !important;
|
165 |
-
}
|
166 |
-
|
167 |
.um-admin-metabox input[type=text].small {width: 54px}
|
168 |
|
169 |
.um-admin-metabox textarea {min-height: 100px;height: 100px}
|
136 |
width: 100%;
|
137 |
max-width: 100%;
|
138 |
display: block;
|
|
|
|
|
|
|
|
|
|
|
139 |
box-sizing: border-box !important;
|
|
|
140 |
font-size: 13px !important;
|
141 |
line-height: 1.4em !important;
|
142 |
padding: 4px 10px !important;
|
152 |
.um-admin-metabox textarea.um-admin-error
|
153 |
{border-color: #C74A4A!important}
|
154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
.um-admin-metabox input[type=text].small {width: 54px}
|
156 |
|
157 |
.um-admin-metabox textarea {min-height: 100px;height: 100px}
|
admin/core/um-admin-actions.php
CHANGED
@@ -49,12 +49,29 @@
|
|
49 |
* Add access settings to category
|
50 |
*
|
51 |
**/
|
52 |
-
|
53 |
-
add_action( 'category_add_form_fields', 'um_category_access_fields_create' );
|
54 |
-
add_action( 'category_edit_form_fields', 'um_category_access_fields_edit' );
|
55 |
-
add_action( 'create_category', 'um_category_access_fields_save' );
|
56 |
-
add_action( 'edited_category', 'um_category_access_fields_save' );
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
function um_category_access_fields_create( $term ){
|
59 |
global $ultimatemember;
|
60 |
|
49 |
* Add access settings to category
|
50 |
*
|
51 |
**/
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
+
$exclude_taxonomies = array(
|
54 |
+
'post_tag',
|
55 |
+
'nav_menu',
|
56 |
+
'link_category',
|
57 |
+
'post_format',
|
58 |
+
'um_user_tag',
|
59 |
+
'um_hashtag',
|
60 |
+
);
|
61 |
+
|
62 |
+
$taxonomies = get_taxonomies();
|
63 |
+
|
64 |
+
|
65 |
+
foreach ($taxonomies as $key => $taxonomy) {
|
66 |
+
if( ! in_array( $key , $exclude_taxonomies ) ){
|
67 |
+
add_action( $taxonomy.'_add_form_fields', 'um_category_access_fields_create' );
|
68 |
+
add_action( $taxonomy.'_edit_form_fields', 'um_category_access_fields_edit' );
|
69 |
+
add_action( 'create_'.$taxonomy, 'um_category_access_fields_save' );
|
70 |
+
add_action( 'edited_'.$taxonomy, 'um_category_access_fields_save' );
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
|
75 |
function um_category_access_fields_create( $term ){
|
76 |
global $ultimatemember;
|
77 |
|
admin/templates/access/settings.php
CHANGED
@@ -1,39 +1,39 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
$metabox = new UM_Admin_Metabox();
|
4 |
-
|
5 |
do_action('um_admin_before_access_settings', $metabox);
|
6 |
-
|
7 |
?>
|
8 |
-
|
9 |
<h4><?php _e('Apply custom access settings?','ultimatemember'); ?> <?php $this->tooltip( __('Switch to yes to override global access settings','ultimatemember'), 'e'); ?></h4>
|
10 |
-
|
11 |
<p>
|
12 |
<span><?php $metabox->ui_on_off('_um_custom_access_settings', 0, true, 1, '_um_custom_access_settings', 'xxx'); ?> </span>
|
13 |
</p>
|
14 |
-
|
15 |
<div class="_um_custom_access_settings">
|
16 |
-
|
17 |
<h4><?php _e('Content Availability','ultimatemember'); ?> <?php $this->tooltip( __('Who can access this content?','ultimatemember'), 'e'); ?></h4>
|
18 |
-
|
19 |
<p class="um-conditional-radio-group description" data-cond1="2" data-cond1-show="um-admin-access-roles" data-cond2="1" data-cond2-show="um-admin-access-loggedout">
|
20 |
-
|
21 |
<?php $value = get_post_meta($post->ID, '_um_accessible', true); ?>
|
22 |
-
|
23 |
<label><input type="radio" name="_um_accessible" value="0" <?php if (!isset($value) || $value == 0 ) echo 'checked="checked"'; ?> /> <?php _e('Content accessible to Everyone','ultimatemember'); ?></label><br />
|
24 |
<label><input type="radio" name="_um_accessible" value="1" <?php if (isset($value)) checked(1, $value); ?> /> <?php _e('Content accessible to Logged Out Users','ultimatemember'); ?></label><br />
|
25 |
<label><input type="radio" name="_um_accessible" value="2" <?php if (isset($value)) checked(2, $value); ?> /> <?php _e('Content accessible to Logged In Users','ultimatemember'); ?></label>
|
26 |
-
|
27 |
<?php do_action( 'um_admin_extend_access_settings' ); ?>
|
28 |
-
|
29 |
</p>
|
30 |
-
|
31 |
<div class="um-admin-access-loggedout">
|
32 |
-
|
33 |
<h4><label for="_um_access_redirect2"><?php _e('Redirect URL','ultimatemember'); ?></label> <?php $this->tooltip( __('This is the URL that user is redirected to If he is not permitted to view this content','ultimatemember'), 'e'); ?></h4>
|
34 |
-
|
35 |
<p class="description">
|
36 |
-
|
37 |
<?php $value = get_post_meta($post->ID, '_um_access_redirect2', true); ?>
|
38 |
|
39 |
<input type="text" name="_um_access_redirect2" id="_um_access_redirect2" value="<?php if ( isset( $value ) ) echo $value; ?>" class="widefat" />
|
@@ -41,31 +41,32 @@
|
|
41 |
</p>
|
42 |
|
43 |
</div>
|
44 |
-
|
45 |
<div class="um-admin-access-roles">
|
46 |
-
|
47 |
<h4><?php _e('Select the member roles that can see this content?','ultimatemember'); ?> <?php $this->tooltip( __('If you do not select any role, all members will be able to view this content','ultimatemember'), 'e'); ?></h4>
|
48 |
-
|
49 |
<p class="description">
|
50 |
-
|
51 |
<?php $value = get_post_meta($post->ID, '_um_access_roles', true); ?>
|
52 |
-
|
|
|
53 |
<?php foreach($ultimatemember->query->get_roles() as $role_id => $role) { ?>
|
54 |
<label><input type="checkbox" name="_um_access_roles[]" value="<?php echo $role_id; ?>" <?php if ( ( isset( $value ) && is_array( $value ) && in_array($role_id, $value ) ) || ( isset( $value ) && $role_id == $value ) ) echo 'checked="checked"'; ?> /> <?php echo $role; ?></label><br />
|
55 |
<?php } ?>
|
56 |
|
57 |
</p>
|
58 |
-
|
59 |
<h4><label for="_um_access_redirect"><?php _e('Redirect URL','ultimatemember'); ?></label> <?php $this->tooltip( __('This is the URL that user is redirected to If he is not permitted to view this content','ultimatemember'), 'e'); ?></h4>
|
60 |
-
|
61 |
<p class="description">
|
62 |
|
63 |
<?php $value = get_post_meta($post->ID, '_um_access_redirect', true); ?>
|
64 |
-
|
65 |
<input type="text" name="_um_access_redirect" id="_um_access_redirect" value="<?php if ( isset( $value ) ) echo $value; ?>" class="widefat" />
|
66 |
|
67 |
</p>
|
68 |
|
69 |
</div>
|
70 |
-
|
71 |
-
</div>
|
1 |
<?php
|
2 |
+
|
3 |
$metabox = new UM_Admin_Metabox();
|
4 |
+
|
5 |
do_action('um_admin_before_access_settings', $metabox);
|
6 |
+
|
7 |
?>
|
8 |
+
|
9 |
<h4><?php _e('Apply custom access settings?','ultimatemember'); ?> <?php $this->tooltip( __('Switch to yes to override global access settings','ultimatemember'), 'e'); ?></h4>
|
10 |
+
|
11 |
<p>
|
12 |
<span><?php $metabox->ui_on_off('_um_custom_access_settings', 0, true, 1, '_um_custom_access_settings', 'xxx'); ?> </span>
|
13 |
</p>
|
14 |
+
|
15 |
<div class="_um_custom_access_settings">
|
16 |
+
|
17 |
<h4><?php _e('Content Availability','ultimatemember'); ?> <?php $this->tooltip( __('Who can access this content?','ultimatemember'), 'e'); ?></h4>
|
18 |
+
|
19 |
<p class="um-conditional-radio-group description" data-cond1="2" data-cond1-show="um-admin-access-roles" data-cond2="1" data-cond2-show="um-admin-access-loggedout">
|
20 |
+
|
21 |
<?php $value = get_post_meta($post->ID, '_um_accessible', true); ?>
|
22 |
+
|
23 |
<label><input type="radio" name="_um_accessible" value="0" <?php if (!isset($value) || $value == 0 ) echo 'checked="checked"'; ?> /> <?php _e('Content accessible to Everyone','ultimatemember'); ?></label><br />
|
24 |
<label><input type="radio" name="_um_accessible" value="1" <?php if (isset($value)) checked(1, $value); ?> /> <?php _e('Content accessible to Logged Out Users','ultimatemember'); ?></label><br />
|
25 |
<label><input type="radio" name="_um_accessible" value="2" <?php if (isset($value)) checked(2, $value); ?> /> <?php _e('Content accessible to Logged In Users','ultimatemember'); ?></label>
|
26 |
+
|
27 |
<?php do_action( 'um_admin_extend_access_settings' ); ?>
|
28 |
+
|
29 |
</p>
|
30 |
+
|
31 |
<div class="um-admin-access-loggedout">
|
32 |
+
|
33 |
<h4><label for="_um_access_redirect2"><?php _e('Redirect URL','ultimatemember'); ?></label> <?php $this->tooltip( __('This is the URL that user is redirected to If he is not permitted to view this content','ultimatemember'), 'e'); ?></h4>
|
34 |
+
|
35 |
<p class="description">
|
36 |
+
|
37 |
<?php $value = get_post_meta($post->ID, '_um_access_redirect2', true); ?>
|
38 |
|
39 |
<input type="text" name="_um_access_redirect2" id="_um_access_redirect2" value="<?php if ( isset( $value ) ) echo $value; ?>" class="widefat" />
|
41 |
</p>
|
42 |
|
43 |
</div>
|
44 |
+
|
45 |
<div class="um-admin-access-roles">
|
46 |
+
|
47 |
<h4><?php _e('Select the member roles that can see this content?','ultimatemember'); ?> <?php $this->tooltip( __('If you do not select any role, all members will be able to view this content','ultimatemember'), 'e'); ?></h4>
|
48 |
+
|
49 |
<p class="description">
|
50 |
+
|
51 |
<?php $value = get_post_meta($post->ID, '_um_access_roles', true); ?>
|
52 |
+
|
53 |
+
<input type="hidden" name="_um_access_roles[]" value="0">
|
54 |
<?php foreach($ultimatemember->query->get_roles() as $role_id => $role) { ?>
|
55 |
<label><input type="checkbox" name="_um_access_roles[]" value="<?php echo $role_id; ?>" <?php if ( ( isset( $value ) && is_array( $value ) && in_array($role_id, $value ) ) || ( isset( $value ) && $role_id == $value ) ) echo 'checked="checked"'; ?> /> <?php echo $role; ?></label><br />
|
56 |
<?php } ?>
|
57 |
|
58 |
</p>
|
59 |
+
|
60 |
<h4><label for="_um_access_redirect"><?php _e('Redirect URL','ultimatemember'); ?></label> <?php $this->tooltip( __('This is the URL that user is redirected to If he is not permitted to view this content','ultimatemember'), 'e'); ?></h4>
|
61 |
+
|
62 |
<p class="description">
|
63 |
|
64 |
<?php $value = get_post_meta($post->ID, '_um_access_redirect', true); ?>
|
65 |
+
|
66 |
<input type="text" name="_um_access_redirect" id="_um_access_redirect" value="<?php if ( isset( $value ) ) echo $value; ?>" class="widefat" />
|
67 |
|
68 |
</p>
|
69 |
|
70 |
</div>
|
71 |
+
|
72 |
+
</div>
|
admin/templates/extensions.php
CHANGED
@@ -1,5 +1,12 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
$premium['user-tags'] = array(
|
4 |
'url' => 'https://ultimatemember.com/extensions/user-tags/',
|
5 |
'image' => 'https://ultimatemember.com/wp-content/uploads/2015/12/user-tags-copy.jpg',
|
1 |
<?php
|
2 |
|
3 |
+
$premium['instagram'] = array(
|
4 |
+
'url' => 'https://ultimatemember.com/extensions/instagram/',
|
5 |
+
'image' => 'https://ultimatemember.com/wp-content/uploads/2016/02/instagram-copy.png',
|
6 |
+
'name' => 'Instagram',
|
7 |
+
'desc' => 'Let users can connect to their instagram account and display the latest 18 Instagram photos directly on their profile.',
|
8 |
+
);
|
9 |
+
|
10 |
$premium['user-tags'] = array(
|
11 |
'url' => 'https://ultimatemember.com/extensions/user-tags/',
|
12 |
'image' => 'https://ultimatemember.com/wp-content/uploads/2015/12/user-tags-copy.jpg',
|
admin/templates/role/register.php
CHANGED
@@ -1,30 +1,30 @@
|
|
1 |
<div class="um-admin-metabox">
|
2 |
|
3 |
<div class="">
|
4 |
-
|
5 |
<p>
|
6 |
<label class="um-admin-half"><?php _e('Registration Status','ultimatemember'); ?> <?php $this->tooltip( __('Select the status you would like this user role to have after they register on your site','ultimatemember') ); ?></label>
|
7 |
<span class="um-admin-half">
|
8 |
-
|
9 |
-
<select name="_um_status" id="_um_status" class="umaf-selectjs um-adm-conditional" style="width: 300px"
|
10 |
-
data-cond1="approved" data-cond1-show="approved"
|
11 |
data-cond2="checkmail" data-cond2-show="checkmail"
|
12 |
data-cond3="pending" data-cond3-show="pending">
|
13 |
<option value="approved" <?php selected('approved', $ultimatemember->query->get_meta_value('_um_status') ); ?>><?php _e('Auto Approve','ultimatemember'); ?></option>
|
14 |
<option value="checkmail" <?php selected('checkmail', $ultimatemember->query->get_meta_value('_um_status') ); ?>><?php _e('Require Email Activation','ultimatemember'); ?></option>
|
15 |
<option value="pending" <?php selected('pending', $ultimatemember->query->get_meta_value('_um_status') ); ?>><?php _e('Require Admin Review','ultimatemember'); ?></option>
|
16 |
</select>
|
17 |
-
|
18 |
</span>
|
19 |
</p><div class="um-admin-clear"></div>
|
20 |
|
21 |
<!-- Automatic Approval Settings -->
|
22 |
-
|
23 |
<div class="approved">
|
24 |
<p>
|
25 |
<label class="um-admin-half"><?php _e('Action to be taken after registration','ultimatemember'); ?> <?php $this->tooltip( __('Select what action is taken after a person registers on your site. Depending on the status you can redirect them to their profile, a custom url or show a custom message','ultimatemember') ); ?></label>
|
26 |
<span class="um-admin-half">
|
27 |
-
|
28 |
<select name="_um_auto_approve_act" id="_um_auto_approve_act" class="umaf-selectjs um-adm-conditional" style="width: 300px" data-cond1="redirect_url" data-cond1-show="_um_auto_approve_act">
|
29 |
<option value="redirect_profile" <?php selected('redirect_profile', $ultimatemember->query->get_meta_value('_um_auto_approve_act') ); ?>><?php _e('Redirect to profile','ultimatemember'); ?></option>
|
30 |
<option value="redirect_url" <?php selected('redirect_url', $ultimatemember->query->get_meta_value('_um_auto_approve_act') ); ?>><?php _e('Redirect to URL','ultimatemember'); ?></option>
|
@@ -32,28 +32,37 @@
|
|
32 |
|
33 |
</span>
|
34 |
</p><div class="um-admin-clear"></div>
|
35 |
-
|
36 |
<p class="_um_auto_approve_act">
|
37 |
<label class="um-admin-half" for="_um_auto_approve_url"><?php _e('Set Custom Redirect URL','ultimatemember'); ?></label>
|
38 |
<span class="um-admin-half">
|
39 |
-
|
40 |
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_auto_approve_url', null, 'na'); ?>" name="_um_auto_approve_url" id="_um_auto_approve_url" />
|
41 |
-
|
42 |
</span>
|
43 |
</p><div class="um-admin-clear"></div>
|
44 |
</div>
|
45 |
-
|
46 |
<!-- Automatic Approval Settings -->
|
47 |
-
|
48 |
<!-- Email Approval Settings -->
|
49 |
-
|
50 |
<div class="checkmail">
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
<p>
|
53 |
<label class="um-admin-half"><?php _e('Action to be taken after registration','ultimatemember'); ?> <?php $this->tooltip( __('Select what action is taken after a person registers on your site. Depending on the status you can redirect them to their profile, a custom url or show a custom message','ultimatemember') ); ?></label>
|
54 |
<span class="um-admin-half">
|
55 |
-
|
56 |
-
<select name="_um_checkmail_action" id="_um_checkmail_action" class="umaf-selectjs um-adm-conditional" style="width: 300px"
|
57 |
data-cond1="show_message" data-cond1-show="_um_checkmail_action-1"
|
58 |
data-cond2="redirect_url" data-cond2-show="_um_checkmail_action-2">
|
59 |
<option value="show_message" <?php selected('show_message', $ultimatemember->query->get_meta_value('_um_checkmail_action') ); ?>><?php _e('Show custom message','ultimatemember'); ?></option>
|
@@ -62,46 +71,46 @@
|
|
62 |
|
63 |
</span>
|
64 |
</p><div class="um-admin-clear"></div>
|
65 |
-
|
66 |
<p class="_um_checkmail_action-1">
|
67 |
<label class="um-admin-half"><?php _e('Personalize the custom message','ultimatemember'); ?></label>
|
68 |
<span class="um-admin-half">
|
69 |
-
|
70 |
<textarea name="_um_checkmail_message" id="_um_checkmail_message"><?php echo $ultimatemember->query->get_meta_value('_um_checkmail_message', null, __('Thank you for registering. Before you can login we need you to activate your account by clicking the activation link in the email we just sent you.','ultimatemember') ); ?></textarea>
|
71 |
-
|
72 |
</span>
|
73 |
</p><div class="um-admin-clear"></div>
|
74 |
-
|
75 |
<p class="_um_checkmail_action-2">
|
76 |
<label class="um-admin-half" for="_um_checkmail_url"><?php _e('Set Custom Redirect URL','ultimatemember'); ?></label>
|
77 |
<span class="um-admin-half">
|
78 |
-
|
79 |
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_checkmail_url', null, 'na'); ?>" name="_um_checkmail_url" id="_um_checkmail_url" />
|
80 |
-
|
81 |
</span>
|
82 |
</p><div class="um-admin-clear"></div>
|
83 |
-
|
84 |
<p>
|
85 |
<label class="um-admin-half" for="_um_url_email_activate"><?php _e('URL redirect after e-mail activation','ultimatemember'); ?> <?php $this->tooltip( __('If you want users to go to a specific page other than login page after e-mail activation, enter the URL here.','ultimatemember') ); ?></label>
|
86 |
<span class="um-admin-half">
|
87 |
-
|
88 |
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_url_email_activate', null, 'na'); ?>" name="_um_url_email_activate" id="_um_url_email_activate" />
|
89 |
-
|
90 |
</span>
|
91 |
</p><div class="um-admin-clear"></div>
|
92 |
-
|
93 |
</div>
|
94 |
-
|
95 |
<!-- Email Approval Settings -->
|
96 |
-
|
97 |
<!-- Moderator Approval Settings -->
|
98 |
-
|
99 |
<div class="pending">
|
100 |
<p>
|
101 |
<label class="um-admin-half"><?php _e('Action to be taken after registration','ultimatemember'); ?> <?php $this->tooltip( __('Select what action is taken after a person registers on your site. Depending on the status you can redirect them to their profile, a custom url or show a custom message','ultimatemember') ); ?></label>
|
102 |
<span class="um-admin-half">
|
103 |
-
|
104 |
-
<select name="_um_pending_action" id="_um_pending_action" class="umaf-selectjs um-adm-conditional" style="width: 300px"
|
105 |
data-cond1="show_message" data-cond1-show="_um_pending_action-1"
|
106 |
data-cond2="redirect_url" data-cond2-show="_um_pending_action-2">
|
107 |
<option value="show_message" <?php selected('show_message', $ultimatemember->query->get_meta_value('_um_pending_action') ); ?>><?php _e('Show custom message','ultimatemember'); ?></option>
|
@@ -110,30 +119,30 @@
|
|
110 |
|
111 |
</span>
|
112 |
</p><div class="um-admin-clear"></div>
|
113 |
-
|
114 |
<p class="_um_pending_action-1">
|
115 |
<label class="um-admin-half"><?php _e('Personalize the custom message','ultimatemember'); ?></label>
|
116 |
<span class="um-admin-half">
|
117 |
-
|
118 |
<textarea name="_um_pending_message" id="_um_pending_message"><?php echo $ultimatemember->query->get_meta_value('_um_pending_message', null, __('Thank you for applying for membership to our site. We will review your details and send you an email letting you know whether your application has been successful or not.','ultimatemember') ); ?></textarea>
|
119 |
-
|
120 |
</span>
|
121 |
</p><div class="um-admin-clear"></div>
|
122 |
-
|
123 |
<p class="_um_pending_action-2">
|
124 |
<label class="um-admin-half" for="_um_pending_url"><?php _e('Set Custom Redirect URL','ultimatemember'); ?></label>
|
125 |
<span class="um-admin-half">
|
126 |
-
|
127 |
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_pending_url', null, 'na'); ?>" name="_um_pending_url" id="_um_pending_url" />
|
128 |
-
|
129 |
</span>
|
130 |
</p><div class="um-admin-clear"></div>
|
131 |
</div>
|
132 |
-
|
133 |
<!-- Moderator Approval Settings -->
|
134 |
-
|
135 |
</div>
|
136 |
-
|
137 |
<div class="um-admin-clear"></div>
|
138 |
-
|
139 |
-
</div>
|
1 |
<div class="um-admin-metabox">
|
2 |
|
3 |
<div class="">
|
4 |
+
|
5 |
<p>
|
6 |
<label class="um-admin-half"><?php _e('Registration Status','ultimatemember'); ?> <?php $this->tooltip( __('Select the status you would like this user role to have after they register on your site','ultimatemember') ); ?></label>
|
7 |
<span class="um-admin-half">
|
8 |
+
|
9 |
+
<select name="_um_status" id="_um_status" class="umaf-selectjs um-adm-conditional" style="width: 300px"
|
10 |
+
data-cond1="approved" data-cond1-show="approved"
|
11 |
data-cond2="checkmail" data-cond2-show="checkmail"
|
12 |
data-cond3="pending" data-cond3-show="pending">
|
13 |
<option value="approved" <?php selected('approved', $ultimatemember->query->get_meta_value('_um_status') ); ?>><?php _e('Auto Approve','ultimatemember'); ?></option>
|
14 |
<option value="checkmail" <?php selected('checkmail', $ultimatemember->query->get_meta_value('_um_status') ); ?>><?php _e('Require Email Activation','ultimatemember'); ?></option>
|
15 |
<option value="pending" <?php selected('pending', $ultimatemember->query->get_meta_value('_um_status') ); ?>><?php _e('Require Admin Review','ultimatemember'); ?></option>
|
16 |
</select>
|
17 |
+
|
18 |
</span>
|
19 |
</p><div class="um-admin-clear"></div>
|
20 |
|
21 |
<!-- Automatic Approval Settings -->
|
22 |
+
|
23 |
<div class="approved">
|
24 |
<p>
|
25 |
<label class="um-admin-half"><?php _e('Action to be taken after registration','ultimatemember'); ?> <?php $this->tooltip( __('Select what action is taken after a person registers on your site. Depending on the status you can redirect them to their profile, a custom url or show a custom message','ultimatemember') ); ?></label>
|
26 |
<span class="um-admin-half">
|
27 |
+
|
28 |
<select name="_um_auto_approve_act" id="_um_auto_approve_act" class="umaf-selectjs um-adm-conditional" style="width: 300px" data-cond1="redirect_url" data-cond1-show="_um_auto_approve_act">
|
29 |
<option value="redirect_profile" <?php selected('redirect_profile', $ultimatemember->query->get_meta_value('_um_auto_approve_act') ); ?>><?php _e('Redirect to profile','ultimatemember'); ?></option>
|
30 |
<option value="redirect_url" <?php selected('redirect_url', $ultimatemember->query->get_meta_value('_um_auto_approve_act') ); ?>><?php _e('Redirect to URL','ultimatemember'); ?></option>
|
32 |
|
33 |
</span>
|
34 |
</p><div class="um-admin-clear"></div>
|
35 |
+
|
36 |
<p class="_um_auto_approve_act">
|
37 |
<label class="um-admin-half" for="_um_auto_approve_url"><?php _e('Set Custom Redirect URL','ultimatemember'); ?></label>
|
38 |
<span class="um-admin-half">
|
39 |
+
|
40 |
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_auto_approve_url', null, 'na'); ?>" name="_um_auto_approve_url" id="_um_auto_approve_url" />
|
41 |
+
|
42 |
</span>
|
43 |
</p><div class="um-admin-clear"></div>
|
44 |
</div>
|
45 |
+
|
46 |
<!-- Automatic Approval Settings -->
|
47 |
+
|
48 |
<!-- Email Approval Settings -->
|
49 |
+
|
50 |
<div class="checkmail">
|
51 |
+
|
52 |
+
<p>
|
53 |
+
<label class="um-admin-half"><?php _e('Login user after validating the activation link?','ultimatemember'); ?> <?php $this->tooltip( __('Login the user after validating the activation link','ultimatemember') ); ?></label>
|
54 |
+
<span class="um-admin-half">
|
55 |
+
|
56 |
+
<?php $this->ui_on_off('_um_login_email_activate', 0); ?>
|
57 |
+
|
58 |
+
</span>
|
59 |
+
</p><div class="um-admin-clear"></div>
|
60 |
+
|
61 |
<p>
|
62 |
<label class="um-admin-half"><?php _e('Action to be taken after registration','ultimatemember'); ?> <?php $this->tooltip( __('Select what action is taken after a person registers on your site. Depending on the status you can redirect them to their profile, a custom url or show a custom message','ultimatemember') ); ?></label>
|
63 |
<span class="um-admin-half">
|
64 |
+
|
65 |
+
<select name="_um_checkmail_action" id="_um_checkmail_action" class="umaf-selectjs um-adm-conditional" style="width: 300px"
|
66 |
data-cond1="show_message" data-cond1-show="_um_checkmail_action-1"
|
67 |
data-cond2="redirect_url" data-cond2-show="_um_checkmail_action-2">
|
68 |
<option value="show_message" <?php selected('show_message', $ultimatemember->query->get_meta_value('_um_checkmail_action') ); ?>><?php _e('Show custom message','ultimatemember'); ?></option>
|
71 |
|
72 |
</span>
|
73 |
</p><div class="um-admin-clear"></div>
|
74 |
+
|
75 |
<p class="_um_checkmail_action-1">
|
76 |
<label class="um-admin-half"><?php _e('Personalize the custom message','ultimatemember'); ?></label>
|
77 |
<span class="um-admin-half">
|
78 |
+
|
79 |
<textarea name="_um_checkmail_message" id="_um_checkmail_message"><?php echo $ultimatemember->query->get_meta_value('_um_checkmail_message', null, __('Thank you for registering. Before you can login we need you to activate your account by clicking the activation link in the email we just sent you.','ultimatemember') ); ?></textarea>
|
80 |
+
|
81 |
</span>
|
82 |
</p><div class="um-admin-clear"></div>
|
83 |
+
|
84 |
<p class="_um_checkmail_action-2">
|
85 |
<label class="um-admin-half" for="_um_checkmail_url"><?php _e('Set Custom Redirect URL','ultimatemember'); ?></label>
|
86 |
<span class="um-admin-half">
|
87 |
+
|
88 |
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_checkmail_url', null, 'na'); ?>" name="_um_checkmail_url" id="_um_checkmail_url" />
|
89 |
+
|
90 |
</span>
|
91 |
</p><div class="um-admin-clear"></div>
|
92 |
+
|
93 |
<p>
|
94 |
<label class="um-admin-half" for="_um_url_email_activate"><?php _e('URL redirect after e-mail activation','ultimatemember'); ?> <?php $this->tooltip( __('If you want users to go to a specific page other than login page after e-mail activation, enter the URL here.','ultimatemember') ); ?></label>
|
95 |
<span class="um-admin-half">
|
96 |
+
|
97 |
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_url_email_activate', null, 'na'); ?>" name="_um_url_email_activate" id="_um_url_email_activate" />
|
98 |
+
|
99 |
</span>
|
100 |
</p><div class="um-admin-clear"></div>
|
101 |
+
|
102 |
</div>
|
103 |
+
|
104 |
<!-- Email Approval Settings -->
|
105 |
+
|
106 |
<!-- Moderator Approval Settings -->
|
107 |
+
|
108 |
<div class="pending">
|
109 |
<p>
|
110 |
<label class="um-admin-half"><?php _e('Action to be taken after registration','ultimatemember'); ?> <?php $this->tooltip( __('Select what action is taken after a person registers on your site. Depending on the status you can redirect them to their profile, a custom url or show a custom message','ultimatemember') ); ?></label>
|
111 |
<span class="um-admin-half">
|
112 |
+
|
113 |
+
<select name="_um_pending_action" id="_um_pending_action" class="umaf-selectjs um-adm-conditional" style="width: 300px"
|
114 |
data-cond1="show_message" data-cond1-show="_um_pending_action-1"
|
115 |
data-cond2="redirect_url" data-cond2-show="_um_pending_action-2">
|
116 |
<option value="show_message" <?php selected('show_message', $ultimatemember->query->get_meta_value('_um_pending_action') ); ?>><?php _e('Show custom message','ultimatemember'); ?></option>
|
119 |
|
120 |
</span>
|
121 |
</p><div class="um-admin-clear"></div>
|
122 |
+
|
123 |
<p class="_um_pending_action-1">
|
124 |
<label class="um-admin-half"><?php _e('Personalize the custom message','ultimatemember'); ?></label>
|
125 |
<span class="um-admin-half">
|
126 |
+
|
127 |
<textarea name="_um_pending_message" id="_um_pending_message"><?php echo $ultimatemember->query->get_meta_value('_um_pending_message', null, __('Thank you for applying for membership to our site. We will review your details and send you an email letting you know whether your application has been successful or not.','ultimatemember') ); ?></textarea>
|
128 |
+
|
129 |
</span>
|
130 |
</p><div class="um-admin-clear"></div>
|
131 |
+
|
132 |
<p class="_um_pending_action-2">
|
133 |
<label class="um-admin-half" for="_um_pending_url"><?php _e('Set Custom Redirect URL','ultimatemember'); ?></label>
|
134 |
<span class="um-admin-half">
|
135 |
+
|
136 |
<input type="text" value="<?php echo $ultimatemember->query->get_meta_value('_um_pending_url', null, 'na'); ?>" name="_um_pending_url" id="_um_pending_url" />
|
137 |
+
|
138 |
</span>
|
139 |
</p><div class="um-admin-clear"></div>
|
140 |
</div>
|
141 |
+
|
142 |
<!-- Moderator Approval Settings -->
|
143 |
+
|
144 |
</div>
|
145 |
+
|
146 |
<div class="um-admin-clear"></div>
|
147 |
+
|
148 |
+
</div>
|
assets/css/pickadate/default.date.css
CHANGED
@@ -228,6 +228,7 @@
|
|
228 |
}
|
229 |
.picker__button--today,
|
230 |
.picker__button--clear {
|
|
|
231 |
width: 50%;
|
232 |
display: inline-block;
|
233 |
background: none !important;
|
228 |
}
|
229 |
.picker__button--today,
|
230 |
.picker__button--clear {
|
231 |
+
margin: 0 !important;
|
232 |
width: 50%;
|
233 |
display: inline-block;
|
234 |
background: none !important;
|
assets/css/um-account.css
CHANGED
@@ -2,6 +2,10 @@
|
|
2 |
- Layout
|
3 |
*/
|
4 |
|
|
|
|
|
|
|
|
|
5 |
.um-account p.um-notice {
|
6 |
margin: 0 0 20px 0 !important;
|
7 |
padding: 12px 15px !important;
|
@@ -81,12 +85,21 @@
|
|
81 |
.um-account-meta.radius-2 img { -moz-border-radius: 4px;-webkit-border-radius: 4px;border-radius: 4px }
|
82 |
.um-account-meta.radius-3 img { -moz-border-radius: 0;-webkit-border-radius: 0;border-radius: 0 }
|
83 |
|
|
|
|
|
|
|
|
|
84 |
.um-account-name a {
|
85 |
font-weight: bold;
|
86 |
-
color: #555
|
87 |
text-decoration: none !important;
|
88 |
font-size: 18px;
|
89 |
-
line-height:
|
|
|
|
|
|
|
|
|
|
|
90 |
}
|
91 |
|
92 |
/*
|
2 |
- Layout
|
3 |
*/
|
4 |
|
5 |
+
.um-account i {
|
6 |
+
vertical-align: baseline !important;
|
7 |
+
}
|
8 |
+
|
9 |
.um-account p.um-notice {
|
10 |
margin: 0 0 20px 0 !important;
|
11 |
padding: 12px 15px !important;
|
85 |
.um-account-meta.radius-2 img { -moz-border-radius: 4px;-webkit-border-radius: 4px;border-radius: 4px }
|
86 |
.um-account-meta.radius-3 img { -moz-border-radius: 0;-webkit-border-radius: 0;border-radius: 0 }
|
87 |
|
88 |
+
.um-account-name {
|
89 |
+
padding-top: 12px;
|
90 |
+
}
|
91 |
+
|
92 |
.um-account-name a {
|
93 |
font-weight: bold;
|
94 |
+
color: #555;
|
95 |
text-decoration: none !important;
|
96 |
font-size: 18px;
|
97 |
+
line-height: 1.4em;
|
98 |
+
}
|
99 |
+
|
100 |
+
.um-account-profile-link a {
|
101 |
+
font-size: 13px;
|
102 |
+
font-weight: normal;
|
103 |
}
|
104 |
|
105 |
/*
|
assets/css/um-fonticons-fa.css
CHANGED
@@ -784,6 +784,10 @@
|
|
784 |
.um-faicon-spinner:before {
|
785 |
content: "\f110";
|
786 |
}
|
|
|
|
|
|
|
|
|
787 |
.um-faicon-circle:before {
|
788 |
content: "\f111";
|
789 |
}
|
@@ -1532,7 +1536,7 @@
|
|
1532 |
content: "\f20c";
|
1533 |
}
|
1534 |
|
1535 |
-
@-moz-keyframes spin {
|
1536 |
0% {
|
1537 |
-moz-transform: rotate(0deg);
|
1538 |
}
|
@@ -1540,7 +1544,7 @@
|
|
1540 |
-moz-transform: rotate(359deg);
|
1541 |
}
|
1542 |
}
|
1543 |
-
@-webkit-keyframes spin {
|
1544 |
0% {
|
1545 |
-webkit-transform: rotate(0deg);
|
1546 |
}
|
@@ -1548,7 +1552,7 @@
|
|
1548 |
-webkit-transform: rotate(359deg);
|
1549 |
}
|
1550 |
}
|
1551 |
-
@-o-keyframes spin {
|
1552 |
0% {
|
1553 |
-o-transform: rotate(0deg);
|
1554 |
}
|
@@ -1556,7 +1560,7 @@
|
|
1556 |
-o-transform: rotate(359deg);
|
1557 |
}
|
1558 |
}
|
1559 |
-
@-ms-keyframes spin {
|
1560 |
0% {
|
1561 |
-ms-transform: rotate(0deg);
|
1562 |
}
|
@@ -1564,11 +1568,11 @@
|
|
1564 |
-ms-transform: rotate(359deg);
|
1565 |
}
|
1566 |
}
|
1567 |
-
@keyframes spin {
|
1568 |
0% {
|
1569 |
transform: rotate(0deg);
|
1570 |
}
|
1571 |
100% {
|
1572 |
transform: rotate(359deg);
|
1573 |
}
|
1574 |
-
}
|
784 |
.um-faicon-spinner:before {
|
785 |
content: "\f110";
|
786 |
}
|
787 |
+
.um-faicon-spin {
|
788 |
+
-webkit-animation: um-faicon-spin 2s infinite linear;
|
789 |
+
animation: um-faicon-spin 2s infinite linear;
|
790 |
+
}
|
791 |
.um-faicon-circle:before {
|
792 |
content: "\f111";
|
793 |
}
|
1536 |
content: "\f20c";
|
1537 |
}
|
1538 |
|
1539 |
+
@-moz-keyframes um-faicon-spin {
|
1540 |
0% {
|
1541 |
-moz-transform: rotate(0deg);
|
1542 |
}
|
1544 |
-moz-transform: rotate(359deg);
|
1545 |
}
|
1546 |
}
|
1547 |
+
@-webkit-keyframes um-faicon-spin {
|
1548 |
0% {
|
1549 |
-webkit-transform: rotate(0deg);
|
1550 |
}
|
1552 |
-webkit-transform: rotate(359deg);
|
1553 |
}
|
1554 |
}
|
1555 |
+
@-o-keyframes um-faicon-spin {
|
1556 |
0% {
|
1557 |
-o-transform: rotate(0deg);
|
1558 |
}
|
1560 |
-o-transform: rotate(359deg);
|
1561 |
}
|
1562 |
}
|
1563 |
+
@-ms-keyframes um-faicon-spin {
|
1564 |
0% {
|
1565 |
-ms-transform: rotate(0deg);
|
1566 |
}
|
1568 |
-ms-transform: rotate(359deg);
|
1569 |
}
|
1570 |
}
|
1571 |
+
@keyframes um-faicon-spin {
|
1572 |
0% {
|
1573 |
transform: rotate(0deg);
|
1574 |
}
|
1575 |
100% {
|
1576 |
transform: rotate(359deg);
|
1577 |
}
|
1578 |
+
}
|
assets/css/um-profile.css
CHANGED
@@ -62,6 +62,10 @@
|
|
62 |
display: table;
|
63 |
}
|
64 |
|
|
|
|
|
|
|
|
|
65 |
.um-cover-add span {
|
66 |
display: table-cell;
|
67 |
vertical-align: middle;
|
@@ -141,6 +145,10 @@
|
|
141 |
padding-right: 10px;
|
142 |
}
|
143 |
|
|
|
|
|
|
|
|
|
144 |
/*
|
145 |
- Header without cover enabled
|
146 |
*/
|
@@ -264,6 +272,10 @@
|
|
264 |
line-height: 1.7em;
|
265 |
}
|
266 |
|
|
|
|
|
|
|
|
|
267 |
.um-meta {
|
268 |
font-size: 15px;
|
269 |
}
|
@@ -314,7 +326,7 @@ font-weight: normal;
|
|
314 |
|
315 |
.um-profile-note {
|
316 |
display: none;
|
317 |
-
text-align: center;
|
318 |
padding-top: 20px;
|
319 |
color: #666;
|
320 |
}
|
62 |
display: table;
|
63 |
}
|
64 |
|
65 |
+
.um-cover-add i {
|
66 |
+
font-size: 36px;
|
67 |
+
}
|
68 |
+
|
69 |
.um-cover-add span {
|
70 |
display: table-cell;
|
71 |
vertical-align: middle;
|
145 |
padding-right: 10px;
|
146 |
}
|
147 |
|
148 |
+
.um-profile-edit i {
|
149 |
+
font-size: 30px;
|
150 |
+
}
|
151 |
+
|
152 |
/*
|
153 |
- Header without cover enabled
|
154 |
*/
|
272 |
line-height: 1.7em;
|
273 |
}
|
274 |
|
275 |
+
.um-name a {
|
276 |
+
font-size: 24px;
|
277 |
+
}
|
278 |
+
|
279 |
.um-meta {
|
280 |
font-size: 15px;
|
281 |
}
|
326 |
|
327 |
.um-profile-note {
|
328 |
display: none;
|
329 |
+
text-align: center !important;
|
330 |
padding-top: 20px;
|
331 |
color: #666;
|
332 |
}
|
assets/css/um-styles.css
CHANGED
@@ -381,6 +381,7 @@ p.um-notice.warning {
|
|
381 |
}
|
382 |
|
383 |
.um-form input[type=text],
|
|
|
384 |
.um-form input[type=number],
|
385 |
.um-form input[type=password] {
|
386 |
padding: 0 12px !important;
|
@@ -407,6 +408,7 @@ p.um-notice.warning {
|
|
407 |
}
|
408 |
|
409 |
.um-form input[type=text]:focus,
|
|
|
410 |
.um-form input[type=number]:focus,
|
411 |
.um-form input[type=password]:focus,
|
412 |
.um-form textarea:focus {
|
@@ -415,9 +417,11 @@ p.um-notice.warning {
|
|
415 |
}
|
416 |
|
417 |
.um-form input[type=text].um-iconed,
|
|
|
418 |
.um-form input[type=password].um-iconed { padding-left: 44px !important }
|
419 |
|
420 |
.um-form input[type=text].um-error,
|
|
|
421 |
.um-form input[type=password].um-error { border-color: #C74A4A !important }
|
422 |
|
423 |
.um-form textarea {
|
@@ -737,4 +741,27 @@ span.um-req {
|
|
737 |
margin: 0 0 0 8px;
|
738 |
font-size: 14px;
|
739 |
display: inline-block;
|
740 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
381 |
}
|
382 |
|
383 |
.um-form input[type=text],
|
384 |
+
.um-form input[type=tel],
|
385 |
.um-form input[type=number],
|
386 |
.um-form input[type=password] {
|
387 |
padding: 0 12px !important;
|
408 |
}
|
409 |
|
410 |
.um-form input[type=text]:focus,
|
411 |
+
.um-form input[type=tel]:focus,
|
412 |
.um-form input[type=number]:focus,
|
413 |
.um-form input[type=password]:focus,
|
414 |
.um-form textarea:focus {
|
417 |
}
|
418 |
|
419 |
.um-form input[type=text].um-iconed,
|
420 |
+
.um-form input[type=tel].um-iconed,
|
421 |
.um-form input[type=password].um-iconed { padding-left: 44px !important }
|
422 |
|
423 |
.um-form input[type=text].um-error,
|
424 |
+
.um-form input[type=tel].um-error,
|
425 |
.um-form input[type=password].um-error { border-color: #C74A4A !important }
|
426 |
|
427 |
.um-form textarea {
|
741 |
margin: 0 0 0 8px;
|
742 |
font-size: 14px;
|
743 |
display: inline-block;
|
744 |
+
}
|
745 |
+
|
746 |
+
small.um-max-filesize {
|
747 |
+
display: block;
|
748 |
+
color: #999999;
|
749 |
+
padding-top: 5px;
|
750 |
+
}
|
751 |
+
small.um-max-filesize span{
|
752 |
+
font-size: 12px;
|
753 |
+
}
|
754 |
+
|
755 |
+
.um-form .um-field .um-field-area input.um-form-field.um-validate-not-matched,
|
756 |
+
.um-form .um-field .um-field-area input.um-form-field.um-validate-not-matched:focus,
|
757 |
+
.um-form .um-field .um-field-area input.um-form-field.um-validate-username-exists,
|
758 |
+
.um-form .um-field .um-field-area input.um-form-field.um-validate-username-exists:focus {
|
759 |
+
border-color: #DB2929 !important;
|
760 |
+
}
|
761 |
+
|
762 |
+
.um-form .um-field .um-field-area input.um-searching-username {
|
763 |
+
background-image: url('../img/loading.gif');
|
764 |
+
background-position: right center;
|
765 |
+
background-repeat: no-repeat;
|
766 |
+
background-size: 24px 24px;
|
767 |
+
}
|
assets/css/um.min.css
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
@-webkit-keyframes um-effect-pop{50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes um-effect-pop{50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}.um-effect-pop{-webkit-animation-name:um-effect-pop;animation-name:um-effect-pop;-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:1;animation-iteration-count:1}.um-locked-content{width:100%;box-sizing:border-box;border:2px dotted #cc3000;color:#333;background:#fff;font-size:14px;padding:20px;border-radius:4px;margin-bottom:20px}.um-locked-content a{border:none!important}.um-youtube,.um-vimeo,.um-googlemap{position:relative;height:0;overflow:hidden}.um-youtube{padding-bottom:56.25%}.um-vimeo{padding-bottom:56.25%}.um-googlemap{padding-bottom:75%}.um-youtube iframe,.um-vimeo iframe,.um-googlemap iframe{position:absolute;top:0;left:0;width:100%!important;height:100%!important}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.mCustomScrollbar{-ms-touch-action:none;touch-action:none}.mCustomScrollbar.mCS_no_scrollbar{-ms-touch-action:auto;touch-action:auto}.mCustomScrollBox{position:relative;overflow:hidden;height:100%;max-width:100%;outline:none;direction:ltr}.mCSB_container{overflow:hidden;width:auto;height:auto}.mCSB_inside>.mCSB_container{margin-right:0}.mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{margin-right:0}.mCS-dir-rtl>.mCSB_inside>.mCSB_container{margin-right:0;margin-left:0}.mCS-dir-rtl>.mCSB_inside>.mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{margin-left:0}.mCSB_scrollTools{position:absolute;width:16px;height:auto;left:auto;top:0;right:0;bottom:0}.mCSB_outside+.mCSB_scrollTools{right:-26px}.mCS-dir-rtl>.mCSB_inside>.mCSB_scrollTools,.mCS-dir-rtl>.mCSB_outside+.mCSB_scrollTools{right:auto;left:0}.mCS-dir-rtl>.mCSB_outside+.mCSB_scrollTools{left:-26px}.mCSB_scrollTools .mCSB_draggerContainer{position:absolute;top:0;left:0;bottom:0;right:0;height:auto}.mCSB_scrollTools a+.mCSB_draggerContainer{margin:20px 0}.mCSB_scrollTools .mCSB_draggerRail{width:2px;height:100%;margin:0 auto;-webkit-border-radius:16px;-moz-border-radius:16px;border-radius:16px}.mCSB_scrollTools .mCSB_dragger{cursor:pointer;width:100%;height:30px;z-index:1}.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{position:relative;width:4px;height:100%;margin:0 auto;-webkit-border-radius:16px;-moz-border-radius:16px;border-radius:16px;text-align:center}.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{width:12px}.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{width:8px}.mCSB_scrollTools .mCSB_buttonUp,.mCSB_scrollTools .mCSB_buttonDown{display:block;position:absolute;height:20px;width:100%;overflow:hidden;margin:0 auto;cursor:pointer}.mCSB_scrollTools .mCSB_buttonDown{bottom:0}.mCSB_horizontal.mCSB_inside>.mCSB_container{margin-right:0;margin-bottom:30px}.mCSB_horizontal.mCSB_outside>.mCSB_container{min-height:100%}.mCSB_horizontal>.mCSB_container.mCS_no_scrollbar_x.mCS_x_hidden{margin-bottom:0}.mCSB_scrollTools.mCSB_scrollTools_horizontal{width:auto;height:16px;top:auto;right:0;bottom:0;left:0}.mCustomScrollBox+.mCSB_scrollTools.mCSB_scrollTools_horizontal,.mCustomScrollBox+.mCSB_scrollTools+.mCSB_scrollTools.mCSB_scrollTools_horizontal{bottom:-26px}.mCSB_scrollTools.mCSB_scrollTools_horizontal a+.mCSB_draggerContainer{margin:0 20px}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%;height:2px;margin:7px 0}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_dragger{width:30px;height:100%;left:0}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{width:100%;height:4px;margin:6px auto}.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{height:12px;margin:2px auto}.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{height:8px;margin:4px 0}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonLeft,.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonRight{display:block;position:absolute;width:20px;height:100%;overflow:hidden;margin:0 auto;cursor:pointer}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonLeft{left:0}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonRight{right:0}.mCSB_container_wrapper{position:absolute;height:auto;width:auto;overflow:hidden;top:0;left:0;right:0;bottom:0;margin-right:30px;margin-bottom:30px}.mCSB_container_wrapper>.mCSB_container{padding-right:30px;padding-bottom:30px}.mCSB_vertical_horizontal>.mCSB_scrollTools.mCSB_scrollTools_vertical{bottom:20px}.mCSB_vertical_horizontal>.mCSB_scrollTools.mCSB_scrollTools_horizontal{right:20px}.mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden+.mCSB_scrollTools.mCSB_scrollTools_vertical{bottom:0}.mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden+.mCSB_scrollTools ~ .mCSB_scrollTools.mCSB_scrollTools_horizontal,.mCS-dir-rtl>.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside>.mCSB_scrollTools.mCSB_scrollTools_horizontal{right:0}.mCS-dir-rtl>.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside>.mCSB_scrollTools.mCSB_scrollTools_horizontal{left:20px}.mCS-dir-rtl>.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside>.mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden+.mCSB_scrollTools ~ .mCSB_scrollTools.mCSB_scrollTools_horizontal{left:0}.mCS-dir-rtl>.mCSB_inside>.mCSB_container_wrapper{margin-right:0;margin-left:30px}.mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden>.mCSB_container{padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden>.mCSB_container{padding-bottom:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside>.mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden{margin-right:0;margin-left:0}.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside>.mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden{margin-bottom:0}.mCSB_scrollTools,.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCSB_scrollTools .mCSB_buttonUp,.mCSB_scrollTools .mCSB_buttonDown,.mCSB_scrollTools .mCSB_buttonLeft,.mCSB_scrollTools .mCSB_buttonRight{-webkit-transition:opacity .2s ease-in-out,background-color .2s ease-in-out;-moz-transition:opacity .2s ease-in-out,background-color .2s ease-in-out;-o-transition:opacity .2s ease-in-out,background-color .2s ease-in-out;transition:opacity .2s ease-in-out,background-color .2s ease-in-out}.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger_bar,.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerRail,.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger_bar,.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerRail{-webkit-transition:width .2s ease-out .2s,height .2s ease-out .2s,margin-left .2s ease-out .2s,margin-right .2s ease-out .2s,margin-top .2s ease-out .2s,margin-bottom .2s ease-out .2s,opacity .2s ease-in-out,background-color .2s ease-in-out;-moz-transition:width .2s ease-out .2s,height .2s ease-out .2s,margin-left .2s ease-out .2s,margin-right .2s ease-out .2s,margin-top .2s ease-out .2s,margin-bottom .2s ease-out .2s,opacity .2s ease-in-out,background-color .2s ease-in-out;-o-transition:width .2s ease-out .2s,height .2s ease-out .2s,margin-left .2s ease-out .2s,margin-right .2s ease-out .2s,margin-top .2s ease-out .2s,margin-bottom .2s ease-out .2s,opacity .2s ease-in-out,background-color .2s ease-in-out;transition:width .2s ease-out .2s,height .2s ease-out .2s,margin-left .2s ease-out .2s,margin-right .2s ease-out .2s,margin-top .2s ease-out .2s,margin-bottom .2s ease-out .2s,opacity .2s ease-in-out,background-color .2s ease-in-out}.mCSB_scrollTools{opacity:.75;filter:"alpha(opacity=75)";-ms-filter:"alpha(opacity=75)"}.mCS-autoHide>.mCustomScrollBox>.mCSB_scrollTools,.mCS-autoHide>.mCustomScrollBox ~ .mCSB_scrollTools{opacity:0;filter:"alpha(opacity=0)";-ms-filter:"alpha(opacity=0)"}.mCustomScrollbar>.mCustomScrollBox>.mCSB_scrollTools.mCSB_scrollTools_onDrag,.mCustomScrollbar>.mCustomScrollBox ~ .mCSB_scrollTools.mCSB_scrollTools_onDrag,.mCustomScrollBox:hover>.mCSB_scrollTools,.mCustomScrollBox:hover ~ .mCSB_scrollTools,.mCS-autoHide:hover>.mCustomScrollBox>.mCSB_scrollTools,.mCS-autoHide:hover>.mCustomScrollBox ~ .mCSB_scrollTools{opacity:1;filter:"alpha(opacity=100)";-ms-filter:"alpha(opacity=100)"}.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,0.4);filter:"alpha(opacity=40)";-ms-filter:"alpha(opacity=40)"}.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.75);filter:"alpha(opacity=75)";-ms-filter:"alpha(opacity=75)"}.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.85);filter:"alpha(opacity=85)";-ms-filter:"alpha(opacity=85)"}.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.9);filter:"alpha(opacity=90)";-ms-filter:"alpha(opacity=90)"}.mCSB_scrollTools .mCSB_buttonUp,.mCSB_scrollTools .mCSB_buttonDown,.mCSB_scrollTools .mCSB_buttonLeft,.mCSB_scrollTools .mCSB_buttonRight{background-image:url(mCSB_buttons.png);background-repeat:no-repeat;opacity:.4;filter:"alpha(opacity=40)";-ms-filter:"alpha(opacity=40)"}.mCSB_scrollTools .mCSB_buttonUp:hover,.mCSB_scrollTools .mCSB_buttonDown:hover,.mCSB_scrollTools .mCSB_buttonLeft:hover,.mCSB_scrollTools .mCSB_buttonRight:hover{opacity:.75;filter:"alpha(opacity=75)";-ms-filter:"alpha(opacity=75)"}.mCSB_scrollTools .mCSB_buttonUp:active,.mCSB_scrollTools .mCSB_buttonDown:active,.mCSB_scrollTools .mCSB_buttonLeft:active,.mCSB_scrollTools .mCSB_buttonRight:active{opacity:.9;filter:"alpha(opacity=90)";-ms-filter:"alpha(opacity=90)"}.mCS-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,0.15)}.mCS-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.75)}.mCS-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:rgba(0,0,0,0.85)}.mCS-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:rgba(0,0,0,0.9)}.mCS-light-2.mCSB_scrollTools .mCSB_draggerRail,.mCS-dark-2.mCSB_scrollTools .mCSB_draggerRail{width:4px;background-color:#fff;background-color:rgba(255,255,255,0.1);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-light-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-dark-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:4px;background-color:#fff;background-color:rgba(255,255,255,0.75);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-light-2.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-dark-2.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-light-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-dark-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{width:100%;height:4px;margin:6px auto}.mCS-light-2.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.85)}.mCS-light-2.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-light-2.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.9)}.mCS-dark-2.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,0.1);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-dark-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.75);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-dark-2.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.85)}.mCS-dark-2.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-dark-2.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.9)}.mCS-light-thick.mCSB_scrollTools .mCSB_draggerRail,.mCS-dark-thick.mCSB_scrollTools .mCSB_draggerRail{width:4px;background-color:#fff;background-color:rgba(255,255,255,0.1);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-light-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:6px;background-color:#fff;background-color:rgba(255,255,255,0.75);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-light-thick.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-dark-thick.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%;height:4px;margin:6px 0}.mCS-light-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-dark-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{width:100%;height:6px;margin:5px auto}.mCS-light-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.85)}.mCS-light-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-light-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.9)}.mCS-dark-thick.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,0.1);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.75);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.85)}.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.9)}.mCS-light-thin.mCSB_scrollTools .mCSB_draggerRail{background-color:#fff;background-color:rgba(255,255,255,0.1)}.mCS-light-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:2px}.mCS-light-thin.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-dark-thin.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%}.mCS-light-thin.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-dark-thin.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{width:100%;height:2px;margin:7px auto}.mCS-dark-thin.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,0.15)}.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.75)}.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.85)}.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.9)}.mCS-rounded.mCSB_scrollTools .mCSB_draggerRail{background-color:#fff;background-color:rgba(255,255,255,0.15)}.mCS-rounded.mCSB_scrollTools .mCSB_dragger,.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger,.mCS-rounded-dots.mCSB_scrollTools .mCSB_dragger,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger{height:14px}.mCS-rounded.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dots.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:14px;margin:0 1px}.mCS-rounded.mCSB_scrollTools_horizontal .mCSB_dragger,.mCS-rounded-dark.mCSB_scrollTools_horizontal .mCSB_dragger,.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_dragger,.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_dragger{width:14px}.mCS-rounded.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{height:14px;margin:1px 0}.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{width:16px;height:16px;margin:-1px 0}.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{width:4px}.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{height:16px;width:16px;margin:0 -1px}.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{height:4px;margin:6px 0}.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.75)}.mCS-rounded-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,0.15)}.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.85)}.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.9)}.mCS-rounded-dots.mCSB_scrollTools_vertical .mCSB_draggerRail,.mCS-rounded-dots-dark.mCSB_scrollTools_vertical .mCSB_draggerRail{width:4px}.mCS-rounded-dots.mCSB_scrollTools .mCSB_draggerRail,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{background-color:transparent;background-position:center}.mCS-rounded-dots.mCSB_scrollTools .mCSB_draggerRail,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAANElEQVQYV2NkIAAYiVbw//9/Y6DiM1ANJoyMjGdBbLgJQAX/kU0DKgDLkaQAvxW4HEvQFwCRcxIJK1XznAAAAABJRU5ErkJggg==");background-repeat:repeat-y;opacity:.3;filter:"alpha(opacity=30)";-ms-filter:"alpha(opacity=30)"}.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{height:4px;margin:6px 0;background-repeat:repeat-x}.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAALElEQVQYV2NkIAAYSVFgDFR8BqrBBEifBbGRTfiPZhpYjiQFBK3A6l6CvgAAE9kGCd1mvgEAAAAASUVORK5CYII=")}.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-repeat:repeat-y;background-image:-moz-linear-gradient(left,rgba(255,255,255,0.5) 0,rgba(255,255,255,0) 100%);background-image:-webkit-gradient(linear,left top,right top,color-stop(0%,rgba(255,255,255,0.5)),color-stop(100%,rgba(255,255,255,0)));background-image:-webkit-linear-gradient(left,rgba(255,255,255,0.5) 0,rgba(255,255,255,0) 100%);background-image:-o-linear-gradient(left,rgba(255,255,255,0.5) 0,rgba(255,255,255,0) 100%);background-image:-ms-linear-gradient(left,rgba(255,255,255,0.5) 0,rgba(255,255,255,0) 100%);background-image:linear-gradient(to right,rgba(255,255,255,0.5) 0,rgba(255,255,255,0) 100%)}.mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{background-repeat:repeat-x;background-image:-moz-linear-gradient(top,rgba(255,255,255,0.5) 0,rgba(255,255,255,0) 100%);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,rgba(255,255,255,0.5)),color-stop(100%,rgba(255,255,255,0)));background-image:-webkit-linear-gradient(top,rgba(255,255,255,0.5) 0,rgba(255,255,255,0) 100%);background-image:-o-linear-gradient(top,rgba(255,255,255,0.5) 0,rgba(255,255,255,0) 100%);background-image:-ms-linear-gradient(top,rgba(255,255,255,0.5) 0,rgba(255,255,255,0) 100%);background-image:linear-gradient(to bottom,rgba(255,255,255,0.5) 0,rgba(255,255,255,0) 100%)}.mCS-3d.mCSB_scrollTools_vertical .mCSB_dragger,.mCS-3d-dark.mCSB_scrollTools_vertical .mCSB_dragger{height:70px}.mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger,.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger{width:70px}.mCS-3d.mCSB_scrollTools,.mCS-3d-dark.mCSB_scrollTools{opacity:1;filter:"alpha(opacity=30)";-ms-filter:"alpha(opacity=30)"}.mCS-3d.mCSB_scrollTools .mCSB_draggerRail,.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{-webkit-border-radius:16px;-moz-border-radius:16px;border-radius:16px}.mCS-3d.mCSB_scrollTools .mCSB_draggerRail,.mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail{width:8px;background-color:#000;background-color:rgba(0,0,0,0.2);box-shadow:inset 1px 0 1px rgba(0,0,0,0.5),inset -1px 0 1px rgba(255,255,255,0.2)}.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#555}.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:8px}.mCS-3d.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%;height:8px;margin:4px 0;box-shadow:inset 0 1px 1px rgba(0,0,0,0.5),inset 0 -1px 1px rgba(255,255,255,0.2)}.mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{width:100%;height:8px;margin:4px auto}.mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,0.1);box-shadow:inset 1px 0 1px rgba(0,0,0,0.1)}.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{box-shadow:inset 0 1px 1px rgba(0,0,0,0.1)}.mCS-3d-thick.mCSB_scrollTools,.mCS-3d-thick-dark.mCSB_scrollTools{opacity:1;filter:"alpha(opacity=30)";-ms-filter:"alpha(opacity=30)"}.mCS-3d-thick.mCSB_scrollTools,.mCS-3d-thick-dark.mCSB_scrollTools,.mCS-3d-thick.mCSB_scrollTools .mCSB_draggerContainer,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerContainer{-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.mCSB_inside+.mCS-3d-thick.mCSB_scrollTools_vertical,.mCSB_inside+.mCS-3d-thick-dark.mCSB_scrollTools_vertical{right:1px}.mCS-3d-thick.mCSB_scrollTools_vertical,.mCS-3d-thick-dark.mCSB_scrollTools_vertical{box-shadow:inset 1px 0 1px rgba(0,0,0,0.1),inset 0 0 14px rgba(0,0,0,0.5)}.mCS-3d-thick.mCSB_scrollTools_horizontal,.mCS-3d-thick-dark.mCSB_scrollTools_horizontal{bottom:1px;box-shadow:inset 0 1px 1px rgba(0,0,0,0.1),inset 0 0 14px rgba(0,0,0,0.5)}.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{box-shadow:inset 1px 0 0 rgba(255,255,255,0.4);width:12px;margin:2px;position:absolute;height:auto;top:0;bottom:0;left:0;right:0}.mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{box-shadow:inset 0 1px 0 rgba(255,255,255,0.4)}.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#555}.mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{height:12px;width:auto}.mCS-3d-thick.mCSB_scrollTools .mCSB_draggerContainer{background-color:#000;background-color:rgba(0,0,0,0.05);box-shadow:inset 1px 1px 16px rgba(0,0,0,0.1)}.mCS-3d-thick.mCSB_scrollTools .mCSB_draggerRail{background-color:transparent}.mCS-3d-thick-dark.mCSB_scrollTools{box-shadow:inset 0 0 14px rgba(0,0,0,0.2)}.mCS-3d-thick-dark.mCSB_scrollTools_horizontal{box-shadow:inset 0 1px 1px rgba(0,0,0,0.1),inset 0 0 14px rgba(0,0,0,0.2)}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{box-shadow:inset 1px 0 0 rgba(255,255,255,0.4),inset -1px 0 0 rgba(0,0,0,0.2)}.mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{box-shadow:inset 0 1px 0 rgba(255,255,255,0.4),inset 0 -1px 0 rgba(0,0,0,0.2)}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#777}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerContainer{background-color:#fff;background-color:rgba(0,0,0,0.05);box-shadow:inset 1px 1px 16px rgba(0,0,0,0.1)}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:transparent}.mCSB_outside+.mCS-minimal.mCSB_scrollTools_vertical,.mCSB_outside+.mCS-minimal-dark.mCSB_scrollTools_vertical{right:0;margin:12px 0}.mCustomScrollBox.mCS-minimal+.mCSB_scrollTools.mCSB_scrollTools_horizontal,.mCustomScrollBox.mCS-minimal+.mCSB_scrollTools+.mCSB_scrollTools.mCSB_scrollTools_horizontal,.mCustomScrollBox.mCS-minimal-dark+.mCSB_scrollTools.mCSB_scrollTools_horizontal,.mCustomScrollBox.mCS-minimal-dark+.mCSB_scrollTools+.mCSB_scrollTools.mCSB_scrollTools_horizontal{bottom:0;margin:0 12px}.mCS-dir-rtl>.mCSB_outside+.mCS-minimal.mCSB_scrollTools_vertical,.mCS-dir-rtl>.mCSB_outside+.mCS-minimal-dark.mCSB_scrollTools_vertical{left:0;right:auto}.mCS-minimal.mCSB_scrollTools .mCSB_draggerRail,.mCS-minimal-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:transparent}.mCS-minimal.mCSB_scrollTools_vertical .mCSB_dragger,.mCS-minimal-dark.mCSB_scrollTools_vertical .mCSB_dragger{height:50px}.mCS-minimal.mCSB_scrollTools_horizontal .mCSB_dragger,.mCS-minimal-dark.mCSB_scrollTools_horizontal .mCSB_dragger{width:50px}.mCS-minimal.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.2);filter:"alpha(opacity=20)";-ms-filter:"alpha(opacity=20)"}.mCS-minimal.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-minimal.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.5);filter:"alpha(opacity=50)";-ms-filter:"alpha(opacity=50)"}.mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.2);filter:"alpha(opacity=20)";-ms-filter:"alpha(opacity=20)"}.mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.5);filter:"alpha(opacity=50)";-ms-filter:"alpha(opacity=50)"}.mCS-light-3.mCSB_scrollTools .mCSB_draggerRail,.mCS-dark-3.mCSB_scrollTools .mCSB_draggerRail{width:6px;background-color:#000;background-color:rgba(0,0,0,0.2)}.mCS-light-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-dark-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:6px}.mCS-light-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-dark-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-light-3.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-dark-3.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%;height:6px;margin:5px 0}.mCS-light-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-light-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,.mCS-dark-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-dark-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{width:12px}.mCS-light-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-light-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,.mCS-dark-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-dark-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{height:12px;margin:2px 0}.mCS-dark-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:rgba(0,0,0,0.1)}.mCS-dark-3.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:rgba(0,0,0,0.15)}.mCS-dark-3.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-dark-3.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:rgba(0,0,0,0.15)}.mCS-dark-3.mCSB_scrollTools .mCSB_draggerRail{background-color:rgba(0,0,0,0.1)}.mCS-inset.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-2.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-3.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{width:12px;background-color:#000;background-color:rgba(0,0,0,0.2)}.mCS-inset.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:6px;margin:3px 5px;position:absolute;height:auto;top:0;bottom:0;left:0;right:0}.mCS-inset.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-2-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{height:6px;margin:5px 3px;position:absolute;width:auto;top:0;bottom:0;left:0;right:0}.mCS-inset.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-inset-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-inset-2.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-inset-2-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-inset-3.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-inset-3-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%;height:12px;margin:2px 0}.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.75)}.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.85)}.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.9)}.mCS-inset-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,0.1)}.mCS-inset-2.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:transparent;border-width:1px;border-style:solid;border-color:#fff;border-color:rgba(255,255,255,0.2);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail{border-color:#000;border-color:rgba(0,0,0,0.2)}.mCS-inset-3.mCSB_scrollTools .mCSB_draggerRail{background-color:#fff;background-color:rgba(255,255,255,0.6)}.mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,0.6)}.mCS-inset-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.75)}.mCS-inset-3.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.85)}.mCS-inset-3.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-inset-3.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.9)}.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.75)}.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.85)}.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.9)}
|
2 |
-
.um-login.um-logout{max-width:300px!important}.um-misc-with-img{position:relative;font-size:15px;border-bottom:3px solid #eee;text-align:center;margin-bottom:14px;padding-top:4px;padding-bottom:14px}.um-misc-img{text-align:center}.um-misc-img img{border-radius:999px;height:auto!important;display:inline-block!important}.um-misc-ul,.um-misc-ul li{font-size:14px}.um-profile-connect.um-member-connect{padding:5px 0 10px}.um-profile-connect.um-member-connect a{text-align:center;width:36px;line-height:36px;height:36px;font-size:20px}@charset "UTF-8";@font-face{font-family:FontAwesome;src:url(../font/fontawesome-webfont.eot?v=4.2.0);src:url(../font/fontawesome-webfont.eot?v=4.2.0#iefix) format("embedded-opentype"),url(../font/fontawesome-webfont.woff?v=4.2.0) format("woff"),url(../font/fontawesome-webfont.ttf?v=4.2.0) format("truetype"),url(../font/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular) format("svg");font-weight:400;font-style:normal}[class*=" um-faicon-"]:before,[class^=um-faicon-]:before{font-family:FontAwesome!important;font-style:normal!important;font-weight:400!important;font-variant:normal!important;text-transform:none!important;speak:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.um-faicon-glass:before{content:"\f000"}.um-faicon-music:before{content:"\f001"}.um-faicon-search:before{content:"\f002"}.um-faicon-envelope-o:before{content:"\f003"}.um-faicon-heart:before{content:"\f004"}.um-faicon-star:before{content:"\f005"}.um-faicon-star-o:before{content:"\f006"}.um-faicon-user:before{content:"\f007"}.um-faicon-film:before{content:"\f008"}.um-faicon-th-large:before{content:"\f009"}.um-faicon-th:before{content:"\f00a"}.um-faicon-th-list:before{content:"\f00b"}.um-faicon-check:before{content:"\f00c"}.um-faicon-close:before,.um-faicon-remove:before,.um-faicon-times:before{content:"\f00d"}.um-faicon-search-plus:before{content:"\f00e"}.um-faicon-search-minus:before{content:"\f010"}.um-faicon-power-off:before{content:"\f011"}.um-faicon-signal:before{content:"\f012"}.um-faicon-cog:before,.um-faicon-gear:before{content:"\f013"}.um-faicon-trash-o:before{content:"\f014"}.um-faicon-home:before{content:"\f015"}.um-faicon-file-o:before{content:"\f016"}.um-faicon-clock-o:before{content:"\f017"}.um-faicon-road:before{content:"\f018"}.um-faicon-download:before{content:"\f019"}.um-faicon-arrow-circle-o-down:before{content:"\f01a"}.um-faicon-arrow-circle-o-up:before{content:"\f01b"}.um-faicon-inbox:before{content:"\f01c"}.um-faicon-play-circle-o:before{content:"\f01d"}.um-faicon-repeat:before,.um-faicon-rotate-right:before{content:"\f01e"}.um-faicon-refresh:before{content:"\f021"}.um-faicon-list-alt:before{content:"\f022"}.um-faicon-lock:before{content:"\f023"}.um-faicon-flag:before{content:"\f024"}.um-faicon-headphones:before{content:"\f025"}.um-faicon-volume-off:before{content:"\f026"}.um-faicon-volume-down:before{content:"\f027"}.um-faicon-volume-up:before{content:"\f028"}.um-faicon-qrcode:before{content:"\f029"}.um-faicon-barcode:before{content:"\f02a"}.um-faicon-tag:before{content:"\f02b"}.um-faicon-tags:before{content:"\f02c"}.um-faicon-book:before{content:"\f02d"}.um-faicon-bookmark:before{content:"\f02e"}.um-faicon-print:before{content:"\f02f"}.um-faicon-camera:before{content:"\f030"}.um-faicon-font:before{content:"\f031"}.um-faicon-bold:before{content:"\f032"}.um-faicon-italic:before{content:"\f033"}.um-faicon-text-height:before{content:"\f034"}.um-faicon-text-width:before{content:"\f035"}.um-faicon-align-left:before{content:"\f036"}.um-faicon-align-center:before{content:"\f037"}.um-faicon-align-right:before{content:"\f038"}.um-faicon-align-justify:before{content:"\f039"}.um-faicon-list:before{content:"\f03a"}.um-faicon-dedent:before,.um-faicon-outdent:before{content:"\f03b"}.um-faicon-indent:before{content:"\f03c"}.um-faicon-video-camera:before{content:"\f03d"}.um-faicon-image:before,.um-faicon-photo:before,.um-faicon-picture-o:before{content:"\f03e"}.um-faicon-pencil:before{content:"\f040"}.um-faicon-map-marker:before{content:"\f041"}.um-faicon-adjust:before{content:"\f042"}.um-faicon-tint:before{content:"\f043"}.um-faicon-edit:before,.um-faicon-pencil-square-o:before{content:"\f044"}.um-faicon-share-square-o:before{content:"\f045"}.um-faicon-check-square-o:before{content:"\f046"}.um-faicon-arrows:before{content:"\f047"}.um-faicon-step-backward:before{content:"\f048"}.um-faicon-fast-backward:before{content:"\f049"}.um-faicon-backward:before{content:"\f04a"}.um-faicon-play:before{content:"\f04b"}.um-faicon-pause:before{content:"\f04c"}.um-faicon-stop:before{content:"\f04d"}.um-faicon-forward:before{content:"\f04e"}.um-faicon-fast-forward:before{content:"\f050"}.um-faicon-step-forward:before{content:"\f051"}.um-faicon-eject:before{content:"\f052"}.um-faicon-chevron-left:before{content:"\f053"}.um-faicon-chevron-right:before{content:"\f054"}.um-faicon-plus-circle:before{content:"\f055"}.um-faicon-minus-circle:before{content:"\f056"}.um-faicon-times-circle:before{content:"\f057"}.um-faicon-check-circle:before{content:"\f058"}.um-faicon-question-circle:before{content:"\f059"}.um-faicon-info-circle:before{content:"\f05a"}.um-faicon-crosshairs:before{content:"\f05b"}.um-faicon-times-circle-o:before{content:"\f05c"}.um-faicon-check-circle-o:before{content:"\f05d"}.um-faicon-ban:before{content:"\f05e"}.um-faicon-arrow-left:before{content:"\f060"}.um-faicon-arrow-right:before{content:"\f061"}.um-faicon-arrow-up:before{content:"\f062"}.um-faicon-arrow-down:before{content:"\f063"}.um-faicon-mail-forward:before,.um-faicon-share:before{content:"\f064"}.um-faicon-expand:before{content:"\f065"}.um-faicon-compress:before{content:"\f066"}.um-faicon-plus:before{content:"\f067"}.um-faicon-minus:before{content:"\f068"}.um-faicon-asterisk:before{content:"\f069"}.um-faicon-exclamation-circle:before{content:"\f06a"}.um-faicon-gift:before{content:"\f06b"}.um-faicon-leaf:before{content:"\f06c"}.um-faicon-fire:before{content:"\f06d"}.um-faicon-eye:before{content:"\f06e"}.um-faicon-eye-slash:before{content:"\f070"}.um-faicon-exclamation-triangle:before,.um-faicon-warning:before{content:"\f071"}.um-faicon-plane:before{content:"\f072"}.um-faicon-calendar:before{content:"\f073"}.um-faicon-random:before{content:"\f074"}.um-faicon-comment:before{content:"\f075"}.um-faicon-magnet:before{content:"\f076"}.um-faicon-chevron-up:before{content:"\f077"}.um-faicon-chevron-down:before{content:"\f078"}.um-faicon-retweet:before{content:"\f079"}.um-faicon-shopping-cart:before{content:"\f07a"}.um-faicon-folder:before{content:"\f07b"}.um-faicon-folder-open:before{content:"\f07c"}.um-faicon-arrows-v:before{content:"\f07d"}.um-faicon-arrows-h:before{content:"\f07e"}.um-faicon-bar-chart-o:before,.um-faicon-bar-chart:before{content:"\f080"}.um-faicon-twitter-square:before{content:"\f081"}.um-faicon-facebook-square:before{content:"\f082"}.um-faicon-camera-retro:before{content:"\f083"}.um-faicon-key:before{content:"\f084"}.um-faicon-cogs:before,.um-faicon-gears:before{content:"\f085"}.um-faicon-comments:before{content:"\f086"}.um-faicon-thumbs-o-up:before{content:"\f087"}.um-faicon-thumbs-o-down:before{content:"\f088"}.um-faicon-star-half:before{content:"\f089"}.um-faicon-heart-o:before{content:"\f08a"}.um-faicon-sign-out:before{content:"\f08b"}.um-faicon-linkedin-square:before{content:"\f08c"}.um-faicon-thumb-tack:before{content:"\f08d"}.um-faicon-external-link:before{content:"\f08e"}.um-faicon-sign-in:before{content:"\f090"}.um-faicon-trophy:before{content:"\f091"}.um-faicon-github-square:before{content:"\f092"}.um-faicon-upload:before{content:"\f093"}.um-faicon-lemon-o:before{content:"\f094"}.um-faicon-phone:before{content:"\f095"}.um-faicon-square-o:before{content:"\f096"}.um-faicon-bookmark-o:before{content:"\f097"}.um-faicon-phone-square:before{content:"\f098"}.um-faicon-twitter:before{content:"\f099"}.um-faicon-facebook:before{content:"\f09a"}.um-faicon-github:before{content:"\f09b"}.um-faicon-unlock:before{content:"\f09c"}.um-faicon-credit-card:before{content:"\f09d"}.um-faicon-rss:before{content:"\f09e"}.um-faicon-hdd-o:before{content:"\f0a0"}.um-faicon-bullhorn:before{content:"\f0a1"}.um-faicon-bell:before{content:"\f0f3"}.um-faicon-certificate:before{content:"\f0a3"}.um-faicon-hand-o-right:before{content:"\f0a4"}.um-faicon-hand-o-left:before{content:"\f0a5"}.um-faicon-hand-o-up:before{content:"\f0a6"}.um-faicon-hand-o-down:before{content:"\f0a7"}.um-faicon-arrow-circle-left:before{content:"\f0a8"}.um-faicon-arrow-circle-right:before{content:"\f0a9"}.um-faicon-arrow-circle-up:before{content:"\f0aa"}.um-faicon-arrow-circle-down:before{content:"\f0ab"}.um-faicon-globe:before{content:"\f0ac"}.um-faicon-wrench:before{content:"\f0ad"}.um-faicon-tasks:before{content:"\f0ae"}.um-faicon-filter:before{content:"\f0b0"}.um-faicon-briefcase:before{content:"\f0b1"}.um-faicon-arrows-alt:before{content:"\f0b2"}.um-faicon-group:before,.um-faicon-users:before{content:"\f0c0"}.um-faicon-chain:before,.um-faicon-link:before{content:"\f0c1"}.um-faicon-cloud:before{content:"\f0c2"}.um-faicon-flask:before{content:"\f0c3"}.um-faicon-cut:before,.um-faicon-scissors:before{content:"\f0c4"}.um-faicon-copy:before,.um-faicon-files-o:before{content:"\f0c5"}.um-faicon-paperclip:before{content:"\f0c6"}.um-faicon-floppy-o:before,.um-faicon-save:before{content:"\f0c7"}.um-faicon-square:before{content:"\f0c8"}.um-faicon-bars:before,.um-faicon-navicon:before,.um-faicon-reorder:before{content:"\f0c9"}.um-faicon-list-ul:before{content:"\f0ca"}.um-faicon-list-ol:before{content:"\f0cb"}.um-faicon-strikethrough:before{content:"\f0cc"}.um-faicon-underline:before{content:"\f0cd"}.um-faicon-table:before{content:"\f0ce"}.um-faicon-magic:before{content:"\f0d0"}.um-faicon-truck:before{content:"\f0d1"}.um-faicon-pinterest:before{content:"\f0d2"}.um-faicon-pinterest-square:before{content:"\f0d3"}.um-faicon-google-plus-square:before{content:"\f0d4"}.um-faicon-google-plus:before{content:"\f0d5"}.um-faicon-money:before{content:"\f0d6"}.um-faicon-caret-down:before{content:"\f0d7"}.um-faicon-caret-up:before{content:"\f0d8"}.um-faicon-caret-left:before{content:"\f0d9"}.um-faicon-caret-right:before{content:"\f0da"}.um-faicon-columns:before{content:"\f0db"}.um-faicon-sort:before,.um-faicon-unsorted:before{content:"\f0dc"}.um-faicon-sort-desc:before,.um-faicon-sort-down:before{content:"\f0dd"}.um-faicon-sort-asc:before,.um-faicon-sort-up:before{content:"\f0de"}.um-faicon-envelope:before{content:"\f0e0"}.um-faicon-linkedin:before{content:"\f0e1"}.um-faicon-rotate-left:before,.um-faicon-undo:before{content:"\f0e2"}.um-faicon-gavel:before,.um-faicon-legal:before{content:"\f0e3"}.um-faicon-dashboard:before,.um-faicon-tachometer:before{content:"\f0e4"}.um-faicon-comment-o:before{content:"\f0e5"}.um-faicon-comments-o:before{content:"\f0e6"}.um-faicon-bolt:before,.um-faicon-flash:before{content:"\f0e7"}.um-faicon-sitemap:before{content:"\f0e8"}.um-faicon-umbrella:before{content:"\f0e9"}.um-faicon-clipboard:before,.um-faicon-paste:before{content:"\f0ea"}.um-faicon-lightbulb-o:before{content:"\f0eb"}.um-faicon-exchange:before{content:"\f0ec"}.um-faicon-cloud-download:before{content:"\f0ed"}.um-faicon-cloud-upload:before{content:"\f0ee"}.um-faicon-user-md:before{content:"\f0f0"}.um-faicon-stethoscope:before{content:"\f0f1"}.um-faicon-suitcase:before{content:"\f0f2"}.um-faicon-bell-o:before{content:"\f0a2"}.um-faicon-coffee:before{content:"\f0f4"}.um-faicon-cutlery:before{content:"\f0f5"}.um-faicon-file-text-o:before{content:"\f0f6"}.um-faicon-building-o:before{content:"\f0f7"}.um-faicon-hospital-o:before{content:"\f0f8"}.um-faicon-ambulance:before{content:"\f0f9"}.um-faicon-medkit:before{content:"\f0fa"}.um-faicon-fighter-jet:before{content:"\f0fb"}.um-faicon-beer:before{content:"\f0fc"}.um-faicon-h-square:before{content:"\f0fd"}.um-faicon-plus-square:before{content:"\f0fe"}.um-faicon-angle-double-left:before{content:"\f100"}.um-faicon-angle-double-right:before{content:"\f101"}.um-faicon-angle-double-up:before{content:"\f102"}.um-faicon-angle-double-down:before{content:"\f103"}.um-faicon-angle-left:before{content:"\f104"}.um-faicon-angle-right:before{content:"\f105"}.um-faicon-angle-up:before{content:"\f106"}.um-faicon-angle-down:before{content:"\f107"}.um-faicon-desktop:before{content:"\f108"}.um-faicon-laptop:before{content:"\f109"}.um-faicon-tablet:before{content:"\f10a"}.um-faicon-mobile-phone:before,.um-faicon-mobile:before{content:"\f10b"}.um-faicon-circle-o:before{content:"\f10c"}.um-faicon-quote-left:before{content:"\f10d"}.um-faicon-quote-right:before{content:"\f10e"}.um-faicon-spinner:before{content:"\f110"}.um-faicon-circle:before{content:"\f111"}.um-faicon-mail-reply:before,.um-faicon-reply:before{content:"\f112"}.um-faicon-github-alt:before{content:"\f113"}.um-faicon-folder-o:before{content:"\f114"}.um-faicon-folder-open-o:before{content:"\f115"}.um-faicon-smile-o:before{content:"\f118"}.um-faicon-frown-o:before{content:"\f119"}.um-faicon-meh-o:before{content:"\f11a"}.um-faicon-gamepad:before{content:"\f11b"}.um-faicon-keyboard-o:before{content:"\f11c"}.um-faicon-flag-o:before{content:"\f11d"}.um-faicon-flag-checkered:before{content:"\f11e"}.um-faicon-terminal:before{content:"\f120"}.um-faicon-code:before{content:"\f121"}.um-faicon-mail-reply-all:before,.um-faicon-reply-all:before{content:"\f122"}.um-faicon-star-half-empty:before,.um-faicon-star-half-full:before,.um-faicon-star-half-o:before{content:"\f123"}.um-faicon-location-arrow:before{content:"\f124"}.um-faicon-crop:before{content:"\f125"}.um-faicon-code-fork:before{content:"\f126"}.um-faicon-chain-broken:before,.um-faicon-unlink:before{content:"\f127"}.um-faicon-question:before{content:"\f128"}.um-faicon-info:before{content:"\f129"}.um-faicon-exclamation:before{content:"\f12a"}.um-faicon-superscript:before{content:"\f12b"}.um-faicon-subscript:before{content:"\f12c"}.um-faicon-eraser:before{content:"\f12d"}.um-faicon-puzzle-piece:before{content:"\f12e"}.um-faicon-microphone:before{content:"\f130"}.um-faicon-microphone-slash:before{content:"\f131"}.um-faicon-shield:before{content:"\f132"}.um-faicon-calendar-o:before{content:"\f133"}.um-faicon-fire-extinguisher:before{content:"\f134"}.um-faicon-rocket:before{content:"\f135"}.um-faicon-maxcdn:before{content:"\f136"}.um-faicon-chevron-circle-left:before{content:"\f137"}.um-faicon-chevron-circle-right:before{content:"\f138"}.um-faicon-chevron-circle-up:before{content:"\f139"}.um-faicon-chevron-circle-down:before{content:"\f13a"}.um-faicon-html5:before{content:"\f13b"}.um-faicon-css3:before{content:"\f13c"}.um-faicon-anchor:before{content:"\f13d"}.um-faicon-unlock-alt:before{content:"\f13e"}.um-faicon-bullseye:before{content:"\f140"}.um-faicon-ellipsis-h:before{content:"\f141"}.um-faicon-ellipsis-v:before{content:"\f142"}.um-faicon-rss-square:before{content:"\f143"}.um-faicon-play-circle:before{content:"\f144"}.um-faicon-ticket:before{content:"\f145"}.um-faicon-minus-square:before{content:"\f146"}.um-faicon-minus-square-o:before{content:"\f147"}.um-faicon-level-up:before{content:"\f148"}.um-faicon-level-down:before{content:"\f149"}.um-faicon-check-square:before{content:"\f14a"}.um-faicon-pencil-square:before{content:"\f14b"}.um-faicon-external-link-square:before{content:"\f14c"}.um-faicon-share-square:before{content:"\f14d"}.um-faicon-compass:before{content:"\f14e"}.um-faicon-caret-square-o-down:before,.um-faicon-toggle-down:before{content:"\f150"}.um-faicon-caret-square-o-up:before,.um-faicon-toggle-up:before{content:"\f151"}.um-faicon-caret-square-o-right:before,.um-faicon-toggle-right:before{content:"\f152"}.um-faicon-eur:before,.um-faicon-euro:before{content:"\f153"}.um-faicon-gbp:before{content:"\f154"}.um-faicon-dollar:before,.um-faicon-usd:before{content:"\f155"}.um-faicon-inr:before,.um-faicon-rupee:before{content:"\f156"}.um-faicon-cny:before,.um-faicon-jpy:before,.um-faicon-rmb:before,.um-faicon-yen:before{content:"\f157"}.um-faicon-rouble:before,.um-faicon-rub:before,.um-faicon-ruble:before{content:"\f158"}.um-faicon-krw:before,.um-faicon-won:before{content:"\f159"}.um-faicon-bitcoin:before,.um-faicon-btc:before{content:"\f15a"}.um-faicon-file:before{content:"\f15b"}.um-faicon-file-text:before{content:"\f15c"}.um-faicon-sort-alpha-asc:before{content:"\f15d"}.um-faicon-sort-alpha-desc:before{content:"\f15e"}.um-faicon-sort-amount-asc:before{content:"\f160"}.um-faicon-sort-amount-desc:before{content:"\f161"}.um-faicon-sort-numeric-asc:before{content:"\f162"}.um-faicon-sort-numeric-desc:before{content:"\f163"}.um-faicon-thumbs-up:before{content:"\f164"}.um-faicon-thumbs-down:before{content:"\f165"}.um-faicon-youtube-square:before{content:"\f166"}.um-faicon-youtube:before{content:"\f167"}.um-faicon-xing:before{content:"\f168"}.um-faicon-xing-square:before{content:"\f169"}.um-faicon-youtube-play:before{content:"\f16a"}.um-faicon-dropbox:before{content:"\f16b"}.um-faicon-stack-overflow:before{content:"\f16c"}.um-faicon-instagram:before{content:"\f16d"}.um-faicon-flickr:before{content:"\f16e"}.um-faicon-adn:before{content:"\f170"}.um-faicon-bitbucket:before{content:"\f171"}.um-faicon-bitbucket-square:before{content:"\f172"}.um-faicon-tumblr:before{content:"\f173"}.um-faicon-tumblr-square:before{content:"\f174"}.um-faicon-long-arrow-down:before{content:"\f175"}.um-faicon-long-arrow-up:before{content:"\f176"}.um-faicon-long-arrow-left:before{content:"\f177"}.um-faicon-long-arrow-right:before{content:"\f178"}.um-faicon-apple:before{content:"\f179"}.um-faicon-windows:before{content:"\f17a"}.um-faicon-android:before{content:"\f17b"}.um-faicon-linux:before{content:"\f17c"}.um-faicon-dribbble:before{content:"\f17d"}.um-faicon-skype:before{content:"\f17e"}.um-faicon-foursquare:before{content:"\f180"}.um-faicon-trello:before{content:"\f181"}.um-faicon-female:before{content:"\f182"}.um-faicon-male:before{content:"\f183"}.um-faicon-gittip:before{content:"\f184"}.um-faicon-sun-o:before{content:"\f185"}.um-faicon-moon-o:before{content:"\f186"}.um-faicon-archive:before{content:"\f187"}.um-faicon-bug:before{content:"\f188"}.um-faicon-vk:before{content:"\f189"}.um-faicon-weibo:before{content:"\f18a"}.um-faicon-renren:before{content:"\f18b"}.um-faicon-pagelines:before{content:"\f18c"}.um-faicon-stack-exchange:before{content:"\f18d"}.um-faicon-arrow-circle-o-right:before{content:"\f18e"}.um-faicon-arrow-circle-o-left:before{content:"\f190"}.um-faicon-caret-square-o-left:before,.um-faicon-toggle-left:before{content:"\f191"}.um-faicon-dot-circle-o:before{content:"\f192"}.um-faicon-wheelchair:before{content:"\f193"}.um-faicon-vimeo-square:before{content:"\f194"}.um-faicon-try:before,.um-faicon-turkish-lira:before{content:"\f195"}.um-faicon-plus-square-o:before{content:"\f196"}.um-faicon-space-shuttle:before{content:"\f197"}.um-faicon-slack:before{content:"\f198"}.um-faicon-envelope-square:before{content:"\f199"}.um-faicon-wordpress:before{content:"\f19a"}.um-faicon-openid:before{content:"\f19b"}.um-faicon-bank:before,.um-faicon-institution:before,.um-faicon-university:before{content:"\f19c"}.um-faicon-graduation-cap:before,.um-faicon-mortar-board:before{content:"\f19d"}.um-faicon-yahoo:before{content:"\f19e"}.um-faicon-google:before{content:"\f1a0"}.um-faicon-reddit:before{content:"\f1a1"}.um-faicon-reddit-square:before{content:"\f1a2"}.um-faicon-stumbleupon-circle:before{content:"\f1a3"}.um-faicon-stumbleupon:before{content:"\f1a4"}.um-faicon-delicious:before{content:"\f1a5"}.um-faicon-digg:before{content:"\f1a6"}.um-faicon-pied-piper:before{content:"\f1a7"}.um-faicon-pied-piper-alt:before{content:"\f1a8"}.um-faicon-drupal:before{content:"\f1a9"}.um-faicon-joomla:before{content:"\f1aa"}.um-faicon-language:before{content:"\f1ab"}.um-faicon-fax:before{content:"\f1ac"}.um-faicon-building:before{content:"\f1ad"}.um-faicon-child:before{content:"\f1ae"}.um-faicon-paw:before{content:"\f1b0"}.um-faicon-spoon:before{content:"\f1b1"}.um-faicon-cube:before{content:"\f1b2"}.um-faicon-cubes:before{content:"\f1b3"}.um-faicon-behance:before{content:"\f1b4"}.um-faicon-behance-square:before{content:"\f1b5"}.um-faicon-steam:before{content:"\f1b6"}.um-faicon-steam-square:before{content:"\f1b7"}.um-faicon-recycle:before{content:"\f1b8"}.um-faicon-automobile:before,.um-faicon-car:before{content:"\f1b9"}.um-faicon-cab:before,.um-faicon-taxi:before{content:"\f1ba"}.um-faicon-tree:before{content:"\f1bb"}.um-faicon-spotify:before{content:"\f1bc"}.um-faicon-deviantart:before{content:"\f1bd"}.um-faicon-soundcloud:before{content:"\f1be"}.um-faicon-database:before{content:"\f1c0"}.um-faicon-file-pdf-o:before{content:"\f1c1"}.um-faicon-file-word-o:before{content:"\f1c2"}.um-faicon-file-excel-o:before{content:"\f1c3"}.um-faicon-file-powerpoint-o:before{content:"\f1c4"}.um-faicon-file-image-o:before,.um-faicon-file-photo-o:before,.um-faicon-file-picture-o:before{content:"\f1c5"}.um-faicon-file-archive-o:before,.um-faicon-file-zip-o:before{content:"\f1c6"}.um-faicon-file-audio-o:before,.um-faicon-file-sound-o:before{content:"\f1c7"}.um-faicon-file-movie-o:before,.um-faicon-file-video-o:before{content:"\f1c8"}.um-faicon-file-code-o:before{content:"\f1c9"}.um-faicon-vine:before{content:"\f1ca"}.um-faicon-codepen:before{content:"\f1cb"}.um-faicon-jsfiddle:before{content:"\f1cc"}.um-faicon-life-bouy:before,.um-faicon-life-buoy:before,.um-faicon-life-ring:before,.um-faicon-life-saver:before,.um-faicon-support:before{content:"\f1cd"}.um-faicon-circle-o-notch:before{content:"\f1ce"}.um-faicon-ra:before,.um-faicon-rebel:before{content:"\f1d0"}.um-faicon-empire:before,.um-faicon-ge:before{content:"\f1d1"}.um-faicon-git-square:before{content:"\f1d2"}.um-faicon-git:before{content:"\f1d3"}.um-faicon-hacker-news:before{content:"\f1d4"}.um-faicon-tencent-weibo:before{content:"\f1d5"}.um-faicon-qq:before{content:"\f1d6"}.um-faicon-wechat:before,.um-faicon-weixin:before{content:"\f1d7"}.um-faicon-paper-plane:before,.um-faicon-send:before{content:"\f1d8"}.um-faicon-paper-plane-o:before,.um-faicon-send-o:before{content:"\f1d9"}.um-faicon-history:before{content:"\f1da"}.um-faicon-circle-thin:before{content:"\f1db"}.um-faicon-header:before{content:"\f1dc"}.um-faicon-paragraph:before{content:"\f1dd"}.um-faicon-sliders:before{content:"\f1de"}.um-faicon-share-alt:before{content:"\f1e0"}.um-faicon-share-alt-square:before{content:"\f1e1"}.um-faicon-bomb:before{content:"\f1e2"}.um-faicon-futbol-o:before,.um-faicon-soccer-ball-o:before{content:"\f1e3"}.um-faicon-tty:before{content:"\f1e4"}.um-faicon-binoculars:before{content:"\f1e5"}.um-faicon-plug:before{content:"\f1e6"}.um-faicon-slideshare:before{content:"\f1e7"}.um-faicon-twitch:before{content:"\f1e8"}.um-faicon-yelp:before{content:"\f1e9"}.um-faicon-newspaper-o:before{content:"\f1ea"}.um-faicon-wifi:before{content:"\f1eb"}.um-faicon-calculator:before{content:"\f1ec"}.um-faicon-paypal:before{content:"\f1ed"}.um-faicon-google-wallet:before{content:"\f1ee"}.um-faicon-cc-visa:before{content:"\f1f0"}.um-faicon-cc-mastercard:before{content:"\f1f1"}.um-faicon-cc-discover:before{content:"\f1f2"}.um-faicon-cc-amex:before{content:"\f1f3"}.um-faicon-cc-paypal:before{content:"\f1f4"}.um-faicon-cc-stripe:before{content:"\f1f5"}.um-faicon-bell-slash:before{content:"\f1f6"}.um-faicon-bell-slash-o:before{content:"\f1f7"}.um-faicon-trash:before{content:"\f1f8"}.um-faicon-copyright:before{content:"\f1f9"}.um-faicon-at:before{content:"\f1fa"}.um-faicon-eyedropper:before{content:"\f1fb"}.um-faicon-paint-brush:before{content:"\f1fc"}.um-faicon-birthday-cake:before{content:"\f1fd"}.um-faicon-area-chart:before{content:"\f1fe"}.um-faicon-pie-chart:before{content:"\f200"}.um-faicon-line-chart:before{content:"\f201"}.um-faicon-lastfm:before{content:"\f202"}.um-faicon-lastfm-square:before{content:"\f203"}.um-faicon-toggle-off:before{content:"\f204"}.um-faicon-toggle-on:before{content:"\f205"}.um-faicon-bicycle:before{content:"\f206"}.um-faicon-bus:before{content:"\f207"}.um-faicon-ioxhost:before{content:"\f208"}.um-faicon-angellist:before{content:"\f209"}.um-faicon-cc:before{content:"\f20a"}.um-faicon-ils:before,.um-faicon-shekel:before,.um-faicon-sheqel:before{content:"\f20b"}.um-faicon-meanpath:before{content:"\f20c"}@font-face{font-family:Ionicons;src:url(../font/ionicons.eot?v=2.0.0);src:url(../font/ionicons.eot?v=2.0.0#iefix) format("embedded-opentype"),url(../font/ionicons.woff?v=2.0.0) format("woff"),url(../font/ionicons.ttf?v=2.0.0) format("truetype"),url(../font/ionicons.svg?v=2.0.0#Ionicons) format("svg");font-weight:400;font-style:normal}[class*=" um-icon-"]:before,[class^=um-icon-]:before{font-family:Ionicons!important;font-style:normal!important;font-weight:400!important;font-variant:normal!important;text-transform:none!important;speak:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.um-icon-alert:before{content:"\f101"}.um-icon-alert-circled:before{content:"\f100"}.um-icon-android-add:before{content:"\f2c7"}.um-icon-android-add-circle:before{content:"\f359"}.um-icon-android-alarm-clock:before{content:"\f35a"}.um-icon-android-alert:before{content:"\f35b"}.um-icon-android-apps:before{content:"\f35c"}.um-icon-android-archive:before{content:"\f2c9"}.um-icon-android-arrow-back:before{content:"\f2ca"}.um-icon-android-arrow-down:before{content:"\f35d"}.um-icon-android-arrow-dropdown:before{content:"\f35f"}.um-icon-android-arrow-dropdown-circle:before{content:"\f35e"}.um-icon-android-arrow-dropleft:before{content:"\f361"}.um-icon-android-arrow-dropleft-circle:before{content:"\f360"}.um-icon-android-arrow-dropright:before{content:"\f363"}.um-icon-android-arrow-dropright-circle:before{content:"\f362"}.um-icon-android-arrow-dropup:before{content:"\f365"}.um-icon-android-arrow-dropup-circle:before{content:"\f364"}.um-icon-android-arrow-forward:before{content:"\f30f"}.um-icon-android-arrow-up:before{content:"\f366"}.um-icon-android-attach:before{content:"\f367"}.um-icon-android-bar:before{content:"\f368"}.um-icon-android-bicycle:before{content:"\f369"}.um-icon-android-boat:before{content:"\f36a"}.um-icon-android-bookmark:before{content:"\f36b"}.um-icon-android-bulb:before{content:"\f36c"}.um-icon-android-bus:before{content:"\f36d"}.um-icon-android-calendar:before{content:"\f2d1"}.um-icon-android-call:before{content:"\f2d2"}.um-icon-android-camera:before{content:"\f2d3"}.um-icon-android-cancel:before{content:"\f36e"}.um-icon-android-car:before{content:"\f36f"}.um-icon-android-cart:before{content:"\f370"}.um-icon-android-chat:before{content:"\f2d4"}.um-icon-android-checkbox:before{content:"\f374"}.um-icon-android-checkbox-blank:before{content:"\f371"}.um-icon-android-checkbox-outline:before{content:"\f373"}.um-icon-android-checkbox-outline-blank:before{content:"\f372"}.um-icon-android-checkmark-circle:before{content:"\f375"}.um-icon-android-clipboard:before{content:"\f376"}.um-icon-android-close:before{content:"\f2d7"}.um-icon-android-cloud:before{content:"\f37a"}.um-icon-android-cloud-circle:before{content:"\f377"}.um-icon-android-cloud-done:before{content:"\f378"}.um-icon-android-cloud-outline:before{content:"\f379"}.um-icon-android-color-palette:before{content:"\f37b"}.um-icon-android-compass:before{content:"\f37c"}.um-icon-android-contact:before{content:"\f2d8"}.um-icon-android-contacts:before{content:"\f2d9"}.um-icon-android-contract:before{content:"\f37d"}.um-icon-android-create:before{content:"\f37e"}.um-icon-android-delete:before{content:"\f37f"}.um-icon-android-desktop:before{content:"\f380"}.um-icon-android-document:before{content:"\f381"}.um-icon-android-done:before{content:"\f383"}.um-icon-android-done-all:before{content:"\f382"}.um-icon-android-download:before{content:"\f2dd"}.um-icon-android-drafts:before{content:"\f384"}.um-icon-android-exit:before{content:"\f385"}.um-icon-android-expand:before{content:"\f386"}.um-icon-android-favorite:before{content:"\f388"}.um-icon-android-favorite-outline:before{content:"\f387"}.um-icon-android-film:before{content:"\f389"}.um-icon-android-folder:before{content:"\f2e0"}.um-icon-android-folder-open:before{content:"\f38a"}.um-icon-android-funnel:before{content:"\f38b"}.um-icon-android-globe:before{content:"\f38c"}.um-icon-android-hand:before{content:"\f2e3"}.um-icon-android-hangout:before{content:"\f38d"}.um-icon-android-happy:before{content:"\f38e"}.um-icon-android-home:before{content:"\f38f"}.um-icon-android-image:before{content:"\f2e4"}.um-icon-android-laptop:before{content:"\f390"}.um-icon-android-list:before{content:"\f391"}.um-icon-android-locate:before{content:"\f2e9"}.um-icon-android-lock:before{content:"\f392"}.um-icon-android-mail:before{content:"\f2eb"}.um-icon-android-map:before{content:"\f393"}.um-icon-android-menu:before{content:"\f394"}.um-icon-android-microphone:before{content:"\f2ec"}.um-icon-android-microphone-off:before{content:"\f395"}.um-icon-android-more-horizontal:before{content:"\f396"}.um-icon-android-more-vertical:before{content:"\f397"}.um-icon-android-navigate:before{content:"\f398"}.um-icon-android-notifications:before{content:"\f39b"}.um-icon-android-notifications-none:before{content:"\f399"}.um-icon-android-notifications-off:before{content:"\f39a"}.um-icon-android-open:before{content:"\f39c"}.um-icon-android-options:before{content:"\f39d"}.um-icon-android-people:before{content:"\f39e"}.um-icon-android-person:before{content:"\f3a0"}.um-icon-android-person-add:before{content:"\f39f"}.um-icon-android-phone-landscape:before{content:"\f3a1"}.um-icon-android-phone-portrait:before{content:"\f3a2"}.um-icon-android-pin:before{content:"\f3a3"}.um-icon-android-plane:before{content:"\f3a4"}.um-icon-android-playstore:before{content:"\f2f0"}.um-icon-android-print:before{content:"\f3a5"}.um-icon-android-radio-button-off:before{content:"\f3a6"}.um-icon-android-radio-button-on:before{content:"\f3a7"}.um-icon-android-refresh:before{content:"\f3a8"}.um-icon-android-remove:before{content:"\f2f4"}.um-icon-android-remove-circle:before{content:"\f3a9"}.um-icon-android-restaurant:before{content:"\f3aa"}.um-icon-android-sad:before{content:"\f3ab"}.um-icon-android-search:before{content:"\f2f5"}.um-icon-android-send:before{content:"\f2f6"}.um-icon-android-settings:before{content:"\f2f7"}.um-icon-android-share:before{content:"\f2f8"}.um-icon-android-share-alt:before{content:"\f3ac"}.um-icon-android-star:before{content:"\f2fc"}.um-icon-android-star-half:before{content:"\f3ad"}.um-icon-android-star-outline:before{content:"\f3ae"}.um-icon-android-stopwatch:before{content:"\f2fd"}.um-icon-android-subway:before{content:"\f3af"}.um-icon-android-sunny:before{content:"\f3b0"}.um-icon-android-sync:before{content:"\f3b1"}.um-icon-android-textsms:before{content:"\f3b2"}.um-icon-android-time:before{content:"\f3b3"}.um-icon-android-train:before{content:"\f3b4"}.um-icon-android-unlock:before{content:"\f3b5"}.um-icon-android-upload:before{content:"\f3b6"}.um-icon-android-volume-down:before{content:"\f3b7"}.um-icon-android-volume-mute:before{content:"\f3b8"}.um-icon-android-volume-off:before{content:"\f3b9"}.um-icon-android-volume-up:before{content:"\f3ba"}.um-icon-android-walk:before{content:"\f3bb"}.um-icon-android-warning:before{content:"\f3bc"}.um-icon-android-watch:before{content:"\f3bd"}.um-icon-android-wifi:before{content:"\f305"}.um-icon-aperture:before{content:"\f313"}.um-icon-archive:before{content:"\f102"}.um-icon-arrow-down-a:before{content:"\f103"}.um-icon-arrow-down-b:before{content:"\f104"}.um-icon-arrow-down-c:before{content:"\f105"}.um-icon-arrow-expand:before{content:"\f25e"}.um-icon-arrow-graph-down-left:before{content:"\f25f"}.um-icon-arrow-graph-down-right:before{content:"\f260"}.um-icon-arrow-graph-up-left:before{content:"\f261"}.um-icon-arrow-graph-up-right:before{content:"\f262"}.um-icon-arrow-left-a:before{content:"\f106"}.um-icon-arrow-left-b:before{content:"\f107"}.um-icon-arrow-left-c:before{content:"\f108"}.um-icon-arrow-move:before{content:"\f263"}.um-icon-arrow-resize:before{content:"\f264"}.um-icon-arrow-return-left:before{content:"\f265"}.um-icon-arrow-return-right:before{content:"\f266"}.um-icon-arrow-right-a:before{content:"\f109"}.um-icon-arrow-right-b:before{content:"\f10a"}.um-icon-arrow-right-c:before{content:"\f10b"}.um-icon-arrow-shrink:before{content:"\f267"}.um-icon-arrow-swap:before{content:"\f268"}.um-icon-arrow-up-a:before{content:"\f10c"}.um-icon-arrow-up-b:before{content:"\f10d"}.um-icon-arrow-up-c:before{content:"\f10e"}.um-icon-asterisk:before{content:"\f314"}.um-icon-at:before{content:"\f10f"}.um-icon-backspace:before{content:"\f3bf"}.um-icon-backspace-outline:before{content:"\f3be"}.um-icon-bag:before{content:"\f110"}.um-icon-battery-charging:before{content:"\f111"}.um-icon-battery-empty:before{content:"\f112"}.um-icon-battery-full:before{content:"\f113"}.um-icon-battery-half:before{content:"\f114"}.um-icon-battery-low:before{content:"\f115"}.um-icon-beaker:before{content:"\f269"}.um-icon-beer:before{content:"\f26a"}.um-icon-bluetooth:before{content:"\f116"}.um-icon-bonfire:before{content:"\f315"}.um-icon-bookmark:before{content:"\f26b"}.um-icon-bowtie:before{content:"\f3c0"}.um-icon-briefcase:before{content:"\f26c"}.um-icon-bug:before{content:"\f2be"}.um-icon-calculator:before{content:"\f26d"}.um-icon-calendar:before{content:"\f117"}.um-icon-camera:before{content:"\f118"}.um-icon-card:before{content:"\f119"}.um-icon-cash:before{content:"\f316"}.um-icon-chatbox:before{content:"\f11b"}.um-icon-chatbox-working:before{content:"\f11a"}.um-icon-chatboxes:before{content:"\f11c"}.um-icon-chatbubble:before{content:"\f11e"}.um-icon-chatbubble-working:before{content:"\f11d"}.um-icon-chatbubbles:before{content:"\f11f"}.um-icon-checkmark:before{content:"\f122"}.um-icon-checkmark-circled:before{content:"\f120"}.um-icon-checkmark-round:before{content:"\f121"}.um-icon-chevron-down:before{content:"\f123"}.um-icon-chevron-left:before{content:"\f124"}.um-icon-chevron-right:before{content:"\f125"}.um-icon-chevron-up:before{content:"\f126"}.um-icon-clipboard:before{content:"\f127"}.um-icon-clock:before{content:"\f26e"}.um-icon-close:before{content:"\f12a"}.um-icon-close-circled:before{content:"\f128"}.um-icon-close-round:before{content:"\f129"}.um-icon-closed-captioning:before{content:"\f317"}.um-icon-cloud:before{content:"\f12b"}.um-icon-code:before{content:"\f271"}.um-icon-code-download:before{content:"\f26f"}.um-icon-code-working:before{content:"\f270"}.um-icon-coffee:before{content:"\f272"}.um-icon-compass:before{content:"\f273"}.um-icon-compose:before{content:"\f12c"}.um-icon-connection-bars:before{content:"\f274"}.um-icon-contrast:before{content:"\f275"}.um-icon-crop:before{content:"\f3c1"}.um-icon-cube:before{content:"\f318"}.um-icon-disc:before{content:"\f12d"}.um-icon-document:before{content:"\f12f"}.um-icon-document-text:before{content:"\f12e"}.um-icon-drag:before{content:"\f130"}.um-icon-earth:before{content:"\f276"}.um-icon-easel:before{content:"\f3c2"}.um-icon-edit:before{content:"\f2bf"}.um-icon-egg:before{content:"\f277"}.um-icon-eject:before{content:"\f131"}.um-icon-email:before{content:"\f132"}.um-icon-email-unread:before{content:"\f3c3"}.um-icon-erlenmeyer-flask:before{content:"\f3c5"}.um-icon-erlenmeyer-flask-bubbles:before{content:"\f3c4"}.um-icon-eye:before{content:"\f133"}.um-icon-eye-disabled:before{content:"\f306"}.um-icon-female:before{content:"\f278"}.um-icon-filing:before{content:"\f134"}.um-icon-film-marker:before{content:"\f135"}.um-icon-fireball:before{content:"\f319"}.um-icon-flag:before{content:"\f279"}.um-icon-flame:before{content:"\f31a"}.um-icon-flash:before{content:"\f137"}.um-icon-flash-off:before{content:"\f136"}.um-icon-folder:before{content:"\f139"}.um-icon-fork:before{content:"\f27a"}.um-icon-fork-repo:before{content:"\f2c0"}.um-icon-forward:before{content:"\f13a"}.um-icon-funnel:before{content:"\f31b"}.um-icon-gear-a:before{content:"\f13d"}.um-icon-gear-b:before{content:"\f13e"}.um-icon-grid:before{content:"\f13f"}.um-icon-hammer:before{content:"\f27b"}.um-icon-happy:before{content:"\f31c"}.um-icon-happy-outline:before{content:"\f3c6"}.um-icon-headphone:before{content:"\f140"}.um-icon-heart:before{content:"\f141"}.um-icon-heart-broken:before{content:"\f31d"}.um-icon-help:before{content:"\f143"}.um-icon-help-buoy:before{content:"\f27c"}.um-icon-help-circled:before{content:"\f142"}.um-icon-home:before{content:"\f144"}.um-icon-icecream:before{content:"\f27d"}.um-icon-image:before{content:"\f147"}.um-icon-images:before{content:"\f148"}.um-icon-information:before{content:"\f14a"}.um-icon-information-circled:before{content:"\f149"}.um-icon-ionic:before{content:"\f14b"}.um-icon-ios-alarm:before{content:"\f3c8"}.um-icon-ios-alarm-outline:before{content:"\f3c7"}.um-icon-ios-albums:before{content:"\f3ca"}.um-icon-ios-albums-outline:before{content:"\f3c9"}.um-icon-ios-americanfootball:before{content:"\f3cc"}.um-icon-ios-americanfootball-outline:before{content:"\f3cb"}.um-icon-ios-analytics:before{content:"\f3ce"}.um-icon-ios-analytics-outline:before{content:"\f3cd"}.um-icon-ios-arrow-back:before{content:"\f3cf"}.um-icon-ios-arrow-down:before{content:"\f3d0"}.um-icon-ios-arrow-forward:before{content:"\f3d1"}.um-icon-ios-arrow-left:before{content:"\f3d2"}.um-icon-ios-arrow-right:before{content:"\f3d3"}.um-icon-ios-arrow-thin-down:before{content:"\f3d4"}.um-icon-ios-arrow-thin-left:before{content:"\f3d5"}.um-icon-ios-arrow-thin-right:before{content:"\f3d6"}.um-icon-ios-arrow-thin-up:before{content:"\f3d7"}.um-icon-ios-arrow-up:before{content:"\f3d8"}.um-icon-ios-at:before{content:"\f3da"}.um-icon-ios-at-outline:before{content:"\f3d9"}.um-icon-ios-barcode:before{content:"\f3dc"}.um-icon-ios-barcode-outline:before{content:"\f3db"}.um-icon-ios-baseball:before{content:"\f3de"}.um-icon-ios-baseball-outline:before{content:"\f3dd"}.um-icon-ios-basketball:before{content:"\f3e0"}.um-icon-ios-basketball-outline:before{content:"\f3df"}.um-icon-ios-bell:before{content:"\f3e2"}.um-icon-ios-bell-outline:before{content:"\f3e1"}.um-icon-ios-body:before{content:"\f3e4"}.um-icon-ios-body-outline:before{content:"\f3e3"}.um-icon-ios-bolt:before{content:"\f3e6"}.um-icon-ios-bolt-outline:before{content:"\f3e5"}.um-icon-ios-book:before{content:"\f3e8"}.um-icon-ios-book-outline:before{content:"\f3e7"}.um-icon-ios-bookmarks:before{content:"\f3ea"}.um-icon-ios-bookmarks-outline:before{content:"\f3e9"}.um-icon-ios-box:before{content:"\f3ec"}.um-icon-ios-box-outline:before{content:"\f3eb"}.um-icon-ios-briefcase:before{content:"\f3ee"}.um-icon-ios-briefcase-outline:before{content:"\f3ed"}.um-icon-ios-browsers:before{content:"\f3f0"}.um-icon-ios-browsers-outline:before{content:"\f3ef"}.um-icon-ios-calculator:before{content:"\f3f2"}.um-icon-ios-calculator-outline:before{content:"\f3f1"}.um-icon-ios-calendar:before{content:"\f3f4"}.um-icon-ios-calendar-outline:before{content:"\f3f3"}.um-icon-ios-camera:before{content:"\f3f6"}.um-icon-ios-camera-outline:before{content:"\f3f5"}.um-icon-ios-cart:before{content:"\f3f8"}.um-icon-ios-cart-outline:before{content:"\f3f7"}.um-icon-ios-chatboxes:before{content:"\f3fa"}.um-icon-ios-chatboxes-outline:before{content:"\f3f9"}.um-icon-ios-chatbubble:before{content:"\f3fc"}.um-icon-ios-chatbubble-outline:before{content:"\f3fb"}.um-icon-ios-checkmark:before{content:"\f3ff"}.um-icon-ios-checkmark-empty:before{content:"\f3fd"}.um-icon-ios-checkmark-outline:before{content:"\f3fe"}.um-icon-ios-circle-filled:before{content:"\f400"}.um-icon-ios-circle-outline:before{content:"\f401"}.um-icon-ios-clock:before{content:"\f403"}.um-icon-ios-clock-outline:before{content:"\f402"}.um-icon-ios-close:before{content:"\f406"}.um-icon-ios-close-empty:before{content:"\f404"}.um-icon-ios-close-outline:before{content:"\f405"}.um-icon-ios-cloud:before{content:"\f40c"}.um-icon-ios-cloud-download:before{content:"\f408"}.um-icon-ios-cloud-download-outline:before{content:"\f407"}.um-icon-ios-cloud-outline:before{content:"\f409"}.um-icon-ios-cloud-upload:before{content:"\f40b"}.um-icon-ios-cloud-upload-outline:before{content:"\f40a"}.um-icon-ios-cloudy:before{content:"\f410"}.um-icon-ios-cloudy-night:before{content:"\f40e"}.um-icon-ios-cloudy-night-outline:before{content:"\f40d"}.um-icon-ios-cloudy-outline:before{content:"\f40f"}.um-icon-ios-cog:before{content:"\f412"}.um-icon-ios-cog-outline:before{content:"\f411"}.um-icon-ios-color-filter:before{content:"\f414"}.um-icon-ios-color-filter-outline:before{content:"\f413"}.um-icon-ios-color-wand:before{content:"\f416"}.um-icon-ios-color-wand-outline:before{content:"\f415"}.um-icon-ios-compose:before{content:"\f418"}.um-icon-ios-compose-outline:before{content:"\f417"}.um-icon-ios-contact:before{content:"\f41a"}.um-icon-ios-contact-outline:before{content:"\f419"}.um-icon-ios-copy:before{content:"\f41c"}.um-icon-ios-copy-outline:before{content:"\f41b"}.um-icon-ios-crop:before{content:"\f41e"}.um-icon-ios-crop-strong:before{content:"\f41d"}.um-icon-ios-download:before{content:"\f420"}.um-icon-ios-download-outline:before{content:"\f41f"}.um-icon-ios-drag:before{content:"\f421"}.um-icon-ios-email:before{content:"\f423"}.um-icon-ios-email-outline:before{content:"\f422"}.um-icon-ios-eye:before{content:"\f425"}.um-icon-ios-eye-outline:before{content:"\f424"}.um-icon-ios-fastforward:before{content:"\f427"}.um-icon-ios-fastforward-outline:before{content:"\f426"}.um-icon-ios-filing:before{content:"\f429"}.um-icon-ios-filing-outline:before{content:"\f428"}.um-icon-ios-film:before{content:"\f42b"}.um-icon-ios-film-outline:before{content:"\f42a"}.um-icon-ios-flag:before{content:"\f42d"}.um-icon-ios-flag-outline:before{content:"\f42c"}.um-icon-ios-flame:before{content:"\f42f"}.um-icon-ios-flame-outline:before{content:"\f42e"}.um-icon-ios-flask:before{content:"\f431"}.um-icon-ios-flask-outline:before{content:"\f430"}.um-icon-ios-flower:before{content:"\f433"}.um-icon-ios-flower-outline:before{content:"\f432"}.um-icon-ios-folder:before{content:"\f435"}.um-icon-ios-folder-outline:before{content:"\f434"}.um-icon-ios-football:before{content:"\f437"}.um-icon-ios-football-outline:before{content:"\f436"}.um-icon-ios-game-controller-a:before{content:"\f439"}.um-icon-ios-game-controller-a-outline:before{content:"\f438"}.um-icon-ios-game-controller-b:before{content:"\f43b"}.um-icon-ios-game-controller-b-outline:before{content:"\f43a"}.um-icon-ios-gear:before{content:"\f43d"}.um-icon-ios-gear-outline:before{content:"\f43c"}.um-icon-ios-glasses:before{content:"\f43f"}.um-icon-ios-glasses-outline:before{content:"\f43e"}.um-icon-ios-grid-view:before{content:"\f441"}.um-icon-ios-grid-view-outline:before{content:"\f440"}.um-icon-ios-heart:before{content:"\f443"}.um-icon-ios-heart-outline:before{content:"\f442"}.um-icon-ios-help:before{content:"\f446"}.um-icon-ios-help-empty:before{content:"\f444"}.um-icon-ios-help-outline:before{content:"\f445"}.um-icon-ios-home:before{content:"\f448"}.um-icon-ios-home-outline:before{content:"\f447"}.um-icon-ios-infinite:before{content:"\f44a"}.um-icon-ios-infinite-outline:before{content:"\f449"}.um-icon-ios-information:before{content:"\f44d"}.um-icon-ios-information-empty:before{content:"\f44b"}.um-icon-ios-information-outline:before{content:"\f44c"}.um-icon-ios-ionic-outline:before{content:"\f44e"}.um-icon-ios-keypad:before{content:"\f450"}.um-icon-ios-keypad-outline:before{content:"\f44f"}.um-icon-ios-lightbulb:before{content:"\f452"}.um-icon-ios-lightbulb-outline:before{content:"\f451"}.um-icon-ios-list:before{content:"\f454"}.um-icon-ios-list-outline:before{content:"\f453"}.um-icon-ios-location:before{content:"\f456"}.um-icon-ios-location-outline:before{content:"\f455"}.um-icon-ios-locked:before{content:"\f458"}.um-icon-ios-locked-outline:before{content:"\f457"}.um-icon-ios-loop:before{content:"\f45a"}.um-icon-ios-loop-strong:before{content:"\f459"}.um-icon-ios-medical:before{content:"\f45c"}.um-icon-ios-medical-outline:before{content:"\f45b"}.um-icon-ios-medkit:before{content:"\f45e"}.um-icon-ios-medkit-outline:before{content:"\f45d"}.um-icon-ios-mic:before{content:"\f461"}.um-icon-ios-mic-off:before{content:"\f45f"}.um-icon-ios-mic-outline:before{content:"\f460"}.um-icon-ios-minus:before{content:"\f464"}.um-icon-ios-minus-empty:before{content:"\f462"}.um-icon-ios-minus-outline:before{content:"\f463"}.um-icon-ios-monitor:before{content:"\f466"}.um-icon-ios-monitor-outline:before{content:"\f465"}.um-icon-ios-moon:before{content:"\f468"}.um-icon-ios-moon-outline:before{content:"\f467"}.um-icon-ios-more:before{content:"\f46a"}.um-icon-ios-more-outline:before{content:"\f469"}.um-icon-ios-musical-note:before{content:"\f46b"}.um-icon-ios-musical-notes:before{content:"\f46c"}.um-icon-ios-navigate:before{content:"\f46e"}.um-icon-ios-navigate-outline:before{content:"\f46d"}.um-icon-ios-nutrition:before{content:"\f470"}.um-icon-ios-nutrition-outline:before{content:"\f46f"}.um-icon-ios-paper:before{content:"\f472"}.um-icon-ios-paper-outline:before{content:"\f471"}.um-icon-ios-paperplane:before{content:"\f474"}.um-icon-ios-paperplane-outline:before{content:"\f473"}.um-icon-ios-partlysunny:before{content:"\f476"}.um-icon-ios-partlysunny-outline:before{content:"\f475"}.um-icon-ios-pause:before{content:"\f478"}.um-icon-ios-pause-outline:before{content:"\f477"}.um-icon-ios-paw:before{content:"\f47a"}.um-icon-ios-paw-outline:before{content:"\f479"}.um-icon-ios-people:before{content:"\f47c"}.um-icon-ios-people-outline:before{content:"\f47b"}.um-icon-ios-person:before{content:"\f47e"}.um-icon-ios-person-outline:before{content:"\f47d"}.um-icon-ios-personadd:before{content:"\f480"}.um-icon-ios-personadd-outline:before{content:"\f47f"}.um-icon-ios-photos:before{content:"\f482"}.um-icon-ios-photos-outline:before{content:"\f481"}.um-icon-ios-pie:before{content:"\f484"}.um-icon-ios-pie-outline:before{content:"\f483"}.um-icon-ios-pint:before{content:"\f486"}.um-icon-ios-pint-outline:before{content:"\f485"}.um-icon-ios-play:before{content:"\f488"}.um-icon-ios-play-outline:before{content:"\f487"}.um-icon-ios-plus:before{content:"\f48b"}.um-icon-ios-plus-empty:before{content:"\f489"}.um-icon-ios-plus-outline:before{content:"\f48a"}.um-icon-ios-pricetag:before{content:"\f48d"}.um-icon-ios-pricetag-outline:before{content:"\f48c"}.um-icon-ios-pricetags:before{content:"\f48f"}.um-icon-ios-pricetags-outline:before{content:"\f48e"}.um-icon-ios-printer:before{content:"\f491"}.um-icon-ios-printer-outline:before{content:"\f490"}.um-icon-ios-pulse:before{content:"\f493"}.um-icon-ios-pulse-strong:before{content:"\f492"}.um-icon-ios-rainy:before{content:"\f495"}.um-icon-ios-rainy-outline:before{content:"\f494"}.um-icon-ios-recording:before{content:"\f497"}.um-icon-ios-recording-outline:before{content:"\f496"}.um-icon-ios-redo:before{content:"\f499"}.um-icon-ios-redo-outline:before{content:"\f498"}.um-icon-ios-refresh:before{content:"\f49c"}.um-icon-ios-refresh-empty:before{content:"\f49a"}.um-icon-ios-refresh-outline:before{content:"\f49b"}.um-icon-ios-reload:before{content:"\f49d"}.um-icon-ios-reverse-camera:before{content:"\f49f"}.um-icon-ios-reverse-camera-outline:before{content:"\f49e"}.um-icon-ios-rewind:before{content:"\f4a1"}.um-icon-ios-rewind-outline:before{content:"\f4a0"}.um-icon-ios-rose:before{content:"\f4a3"}.um-icon-ios-rose-outline:before{content:"\f4a2"}.um-icon-ios-search:before{content:"\f4a5"}.um-icon-ios-search-strong:before{content:"\f4a4"}.um-icon-ios-settings:before{content:"\f4a7"}.um-icon-ios-settings-strong:before{content:"\f4a6"}.um-icon-ios-shuffle:before{content:"\f4a9"}.um-icon-ios-shuffle-strong:before{content:"\f4a8"}.um-icon-ios-skipbackward:before{content:"\f4ab"}.um-icon-ios-skipbackward-outline:before{content:"\f4aa"}.um-icon-ios-skipforward:before{content:"\f4ad"}.um-icon-ios-skipforward-outline:before{content:"\f4ac"}.um-icon-ios-snowy:before{content:"\f4ae"}.um-icon-ios-speedometer:before{content:"\f4b0"}.um-icon-ios-speedometer-outline:before{content:"\f4af"}.um-icon-ios-star:before{content:"\f4b3"}.um-icon-ios-star-half:before{content:"\f4b1"}.um-icon-ios-star-outline:before{content:"\f4b2"}.um-icon-ios-stopwatch:before{content:"\f4b5"}.um-icon-ios-stopwatch-outline:before{content:"\f4b4"}.um-icon-ios-sunny:before{content:"\f4b7"}.um-icon-ios-sunny-outline:before{content:"\f4b6"}.um-icon-ios-telephone:before{content:"\f4b9"}.um-icon-ios-telephone-outline:before{content:"\f4b8"}.um-icon-ios-tennisball:before{content:"\f4bb"}.um-icon-ios-tennisball-outline:before{content:"\f4ba"}.um-icon-ios-thunderstorm:before{content:"\f4bd"}.um-icon-ios-thunderstorm-outline:before{content:"\f4bc"}.um-icon-ios-time:before{content:"\f4bf"}.um-icon-ios-time-outline:before{content:"\f4be"}.um-icon-ios-timer:before{content:"\f4c1"}.um-icon-ios-timer-outline:before{content:"\f4c0"}.um-icon-ios-toggle:before{content:"\f4c3"}.um-icon-ios-toggle-outline:before{content:"\f4c2"}.um-icon-ios-trash:before{content:"\f4c5"}.um-icon-ios-trash-outline:before{content:"\f4c4"}.um-icon-ios-undo:before{content:"\f4c7"}.um-icon-ios-undo-outline:before{content:"\f4c6"}.um-icon-ios-unlocked:before{content:"\f4c9"}.um-icon-ios-unlocked-outline:before{content:"\f4c8"}.um-icon-ios-upload:before{content:"\f4cb"}.um-icon-ios-upload-outline:before{content:"\f4ca"}.um-icon-ios-videocam:before{content:"\f4cd"}.um-icon-ios-videocam-outline:before{content:"\f4cc"}.um-icon-ios-volume-high:before{content:"\f4ce"}.um-icon-ios-volume-low:before{content:"\f4cf"}.um-icon-ios-wineglass:before{content:"\f4d1"}.um-icon-ios-wineglass-outline:before{content:"\f4d0"}.um-icon-ios-world:before{content:"\f4d3"}.um-icon-ios-world-outline:before{content:"\f4d2"}.um-icon-ipad:before{content:"\f1f9"}.um-icon-iphone:before{content:"\f1fa"}.um-icon-ipod:before{content:"\f1fb"}.um-icon-jet:before{content:"\f295"}.um-icon-key:before{content:"\f296"}.um-icon-knife:before{content:"\f297"}.um-icon-laptop:before{content:"\f1fc"}.um-icon-leaf:before{content:"\f1fd"}.um-icon-levels:before{content:"\f298"}.um-icon-lightbulb:before{content:"\f299"}.um-icon-link:before{content:"\f1fe"}.um-icon-load-a:before{content:"\f29a"}.um-icon-load-b:before{content:"\f29b"}.um-icon-load-c:before{content:"\f29c"}.um-icon-load-d:before{content:"\f29d"}.um-icon-location:before{content:"\f1ff"}.um-icon-lock-combination:before{content:"\f4d4"}.um-icon-locked:before{content:"\f200"}.um-icon-log-in:before{content:"\f29e"}.um-icon-log-out:before{content:"\f29f"}.um-icon-loop:before{content:"\f201"}.um-icon-magnet:before{content:"\f2a0"}.um-icon-male:before{content:"\f2a1"}.um-icon-man:before{content:"\f202"}.um-icon-map:before{content:"\f203"}.um-icon-medkit:before{content:"\f2a2"}.um-icon-merge:before{content:"\f33f"}.um-icon-mic-a:before{content:"\f204"}.um-icon-mic-b:before{content:"\f205"}.um-icon-mic-c:before{content:"\f206"}.um-icon-minus:before{content:"\f209"}.um-icon-minus-circled:before{content:"\f207"}.um-icon-minus-round:before{content:"\f208"}.um-icon-model-s:before{content:"\f2c1"}.um-icon-monitor:before{content:"\f20a"}.um-icon-more:before{content:"\f20b"}.um-icon-mouse:before{content:"\f340"}.um-icon-music-note:before{content:"\f20c"}.um-icon-navicon:before{content:"\f20e"}.um-icon-navicon-round:before{content:"\f20d"}.um-icon-navigate:before{content:"\f2a3"}.um-icon-network:before{content:"\f341"}.um-icon-no-smoking:before{content:"\f2c2"}.um-icon-nuclear:before{content:"\f2a4"}.um-icon-outlet:before{content:"\f342"}.um-icon-paintbrush:before{content:"\f4d5"}.um-icon-paintbucket:before{content:"\f4d6"}.um-icon-paper-airplane:before{content:"\f2c3"}.um-icon-paperclip:before{content:"\f20f"}.um-icon-pause:before{content:"\f210"}.um-icon-person:before{content:"\f213"}.um-icon-person-add:before{content:"\f211"}.um-icon-person-stalker:before{content:"\f212"}.um-icon-pie-graph:before{content:"\f2a5"}.um-icon-pin:before{content:"\f2a6"}.um-icon-pinpoint:before{content:"\f2a7"}.um-icon-pizza:before{content:"\f2a8"}.um-icon-plane:before{content:"\f214"}.um-icon-planet:before{content:"\f343"}.um-icon-play:before{content:"\f215"}.um-icon-playstation:before{content:"\f30a"}.um-icon-plus:before{content:"\f218"}.um-icon-plus-circled:before{content:"\f216"}.um-icon-plus-round:before{content:"\f217"}.um-icon-podium:before{content:"\f344"}.um-icon-pound:before{content:"\f219"}.um-icon-power:before{content:"\f2a9"}.um-icon-pricetag:before{content:"\f2aa"}.um-icon-pricetags:before{content:"\f2ab"}.um-icon-printer:before{content:"\f21a"}.um-icon-pull-request:before{content:"\f345"}.um-icon-qr-scanner:before{content:"\f346"}.um-icon-quote:before{content:"\f347"}.um-icon-radio-waves:before{content:"\f2ac"}.um-icon-record:before{content:"\f21b"}.um-icon-refresh:before{content:"\f21c"}.um-icon-reply:before{content:"\f21e"}.um-icon-reply-all:before{content:"\f21d"}.um-icon-ribbon-a:before{content:"\f348"}.um-icon-ribbon-b:before{content:"\f349"}.um-icon-sad:before{content:"\f34a"}.um-icon-sad-outline:before{content:"\f4d7"}.um-icon-scissors:before{content:"\f34b"}.um-icon-search:before{content:"\f21f"}.um-icon-settings:before{content:"\f2ad"}.um-icon-share:before{content:"\f220"}.um-icon-shuffle:before{content:"\f221"}.um-icon-skip-backward:before{content:"\f222"}.um-icon-skip-forward:before{content:"\f223"}.um-icon-social-android:before{content:"\f225"}.um-icon-social-android-outline:before{content:"\f224"}.um-icon-social-angular:before{content:"\f4d9"}.um-icon-social-angular-outline:before{content:"\f4d8"}.um-icon-social-apple:before{content:"\f227"}.um-icon-social-apple-outline:before{content:"\f226"}.um-icon-social-bitcoin:before{content:"\f2af"}.um-icon-social-bitcoin-outline:before{content:"\f2ae"}.um-icon-social-buffer:before{content:"\f229"}.um-icon-social-buffer-outline:before{content:"\f228"}.um-icon-social-chrome:before{content:"\f4db"}.um-icon-social-chrome-outline:before{content:"\f4da"}.um-icon-social-codepen:before{content:"\f4dd"}.um-icon-social-codepen-outline:before{content:"\f4dc"}.um-icon-social-css3:before{content:"\f4df"}.um-icon-social-css3-outline:before{content:"\f4de"}.um-icon-social-designernews:before{content:"\f22b"}.um-icon-social-designernews-outline:before{content:"\f22a"}.um-icon-social-dribbble:before{content:"\f22d"}.um-icon-social-dribbble-outline:before{content:"\f22c"}.um-icon-social-dropbox:before{content:"\f22f"}.um-icon-social-dropbox-outline:before{content:"\f22e"}.um-icon-social-euro:before{content:"\f4e1"}.um-icon-social-euro-outline:before{content:"\f4e0"}.um-icon-social-facebook:before{content:"\f231"}.um-icon-social-facebook-outline:before{content:"\f230"}.um-icon-social-foursquare:before{content:"\f34d"}.um-icon-social-foursquare-outline:before{content:"\f34c"}.um-icon-social-freebsd-devil:before{content:"\f2c4"}.um-icon-social-github:before{content:"\f233"}.um-icon-social-github-outline:before{content:"\f232"}.um-icon-social-google:before{content:"\f34f"}.um-icon-social-google-outline:before{content:"\f34e"}.um-icon-social-googleplus:before{content:"\f235"}.um-icon-social-googleplus-outline:before{content:"\f234"}.um-icon-social-hackernews:before{content:"\f237"}.um-icon-social-hackernews-outline:before{content:"\f236"}.um-icon-social-html5:before{content:"\f4e3"}.um-icon-social-html5-outline:before{content:"\f4e2"}.um-icon-social-instagram:before{content:"\f351"}.um-icon-social-instagram-outline:before{content:"\f350"}.um-icon-social-javascript:before{content:"\f4e5"}.um-icon-social-javascript-outline:before{content:"\f4e4"}.um-icon-social-linkedin:before{content:"\f239"}.um-icon-social-linkedin-outline:before{content:"\f238"}.um-icon-social-markdown:before{content:"\f4e6"}.um-icon-social-nodejs:before{content:"\f4e7"}.um-icon-social-octocat:before{content:"\f4e8"}.um-icon-social-pinterest:before{content:"\f2b1"}.um-icon-social-pinterest-outline:before{content:"\f2b0"}.um-icon-social-python:before{content:"\f4e9"}.um-icon-social-reddit:before{content:"\f23b"}.um-icon-social-reddit-outline:before{content:"\f23a"}.um-icon-social-rss:before{content:"\f23d"}.um-icon-social-rss-outline:before{content:"\f23c"}.um-icon-social-sass:before{content:"\f4ea"}.um-icon-social-skype:before{content:"\f23f"}.um-icon-social-skype-outline:before{content:"\f23e"}.um-icon-social-snapchat:before{content:"\f4ec"}.um-icon-social-snapchat-outline:before{content:"\f4eb"}.um-icon-social-tumblr:before{content:"\f241"}.um-icon-social-tumblr-outline:before{content:"\f240"}.um-icon-social-tux:before{content:"\f2c5"}.um-icon-social-twitch:before{content:"\f4ee"}.um-icon-social-twitch-outline:before{content:"\f4ed"}.um-icon-social-twitter:before{content:"\f243"}.um-icon-social-twitter-outline:before{content:"\f242"}.um-icon-social-usd:before{content:"\f353"}.um-icon-social-usd-outline:before{content:"\f352"}.um-icon-social-vimeo:before{content:"\f245"}.um-icon-social-vimeo-outline:before{content:"\f244"}.um-icon-social-whatsapp:before{content:"\f4f0"}.um-icon-social-whatsapp-outline:before{content:"\f4ef"}.um-icon-social-windows:before{content:"\f247"}.um-icon-social-windows-outline:before{content:"\f246"}.um-icon-social-wordpress:before{content:"\f249"}.um-icon-social-wordpress-outline:before{content:"\f248"}.um-icon-social-yahoo:before{content:"\f24b"}.um-icon-social-yahoo-outline:before{content:"\f24a"}.um-icon-social-yen:before{content:"\f4f2"}.um-icon-social-yen-outline:before{content:"\f4f1"}.um-icon-social-youtube:before{content:"\f24d"}.um-icon-social-youtube-outline:before{content:"\f24c"}.um-icon-soup-can:before{content:"\f4f4"}.um-icon-soup-can-outline:before{content:"\f4f3"}.um-icon-speakerphone:before{content:"\f2b2"}.um-icon-speedometer:before{content:"\f2b3"}.um-icon-spoon:before{content:"\f2b4"}.um-icon-star:before{content:"\f24e"}.um-icon-stats-bars:before{content:"\f2b5"}.um-icon-steam:before{content:"\f30b"}.um-icon-stop:before{content:"\f24f"}.um-icon-thermometer:before{content:"\f2b6"}.um-icon-thumbsdown:before{content:"\f250"}.um-icon-thumbsup:before{content:"\f251"}.um-icon-toggle:before{content:"\f355"}.um-icon-toggle-filled:before{content:"\f354"}.um-icon-transgender:before{content:"\f4f5"}.um-icon-trash-a:before{content:"\f252"}.um-icon-trash-b:before{content:"\f253"}.um-icon-trophy:before{content:"\f356"}.um-icon-tshirt:before{content:"\f4f7"}.um-icon-tshirt-outline:before{content:"\f4f6"}.um-icon-umbrella:before{content:"\f2b7"}.um-icon-university:before{content:"\f357"}.um-icon-unlocked:before{content:"\f254"}.um-icon-upload:before{content:"\f255"}.um-icon-usb:before{content:"\f2b8"}.um-icon-videocamera:before{content:"\f256"}.um-icon-volume-high:before{content:"\f257"}.um-icon-volume-low:before{content:"\f258"}.um-icon-volume-medium:before{content:"\f259"}.um-icon-volume-mute:before{content:"\f25a"}.um-icon-wand:before{content:"\f358"}.um-icon-waterdrop:before{content:"\f25b"}.um-icon-wifi:before{content:"\f25c"}.um-icon-wineglass:before{content:"\f2b9"}.um-icon-woman:before{content:"\f25d"}.um-icon-wrench:before{content:"\f2ba"}.um-icon-xbox:before{content:"\f30c"}.um{width:100%;text-align:left;box-sizing:border-box;color:#666;font-size:15px;margin-bottom:30px!important;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important;opacity:0}.um-s1,.um-s2{display:none}.um *,.um :before,.um :after{box-sizing:content-box}.um-header a,.um-cover a,.um-member-photo a,.um-member-name a,.um-member-more a,.um-member-less a,.um-members a,.um-account-side li a,.um-members-pagi span,.um-members-pagi a,.um-field-value a{border-bottom:0!important}.um a:focus,.um-modal a:focus{outline:0!important}.um a .image-overlay,.um a:hover .image-overlay,.um a:hover .image-overlay *{display:none!important;width:0!important;height:0!important;position:static!important}.um.um-in-admin{padding-top:0}.um.um-in-admin .um-tip{display:none!important}.um input,.um select,.um textarea{font-size:15px}.um *{-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important}.um-left{float:left}.um-right{float:right}.um-clear{clear:both}.um-center{text-align:center}.um-center .um-button{display:inline-block!important;width:auto!important;min-width:250px!important}.um-half{width:48%}.um-field-half{width:48%;float:left}.um-field-half.right{float:right}.um-field-tri{width:30%;float:left;margin-right:3%}.um img{box-shadow:none!important}.um-col{padding-bottom:20px}.um-col-alt{margin:0 0 5px}.um-col-alt-s{padding-top:10px}.um-col-alt-b{padding-top:20px}.um-col-121{float:left;width:48%}.um-col-122{float:right;width:48%}.um-col-131{float:left;width:30%}.um-col-132{float:left;width:30%;margin:0 5%}.um-col-133{float:left;width:30%}.um-raty i{font-size:26px}.um-field-half .um-raty i{font-size:21px}.um-field-tri .um-raty i{font-size:21px}.um-button i{font-size:22px;width:22px;height:12px!important;display:inline-block;line-height:12px!important;vertical-align:middle!important;position:relative;top:-6px;margin-right:8px}.um-row-heading{padding:5px 0;font-size:16px}.um-row-heading i{font-size:24px;height:24px;line-height:24px;margin:0 12px 0 0;display:inline-block;width:30px;text-align:center}.um-row-heading i:before{vertical-align:middle!important}p.um-notice{width:auto;color:#fff;box-sizing:border-box;font-size:15px;padding:12px!important;margin:12px 0 0!important;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;position:relative}p.um-notice i{position:absolute;right:14px;font-size:36px;cursor:pointer;top:7px;display:block;height:30px;line-height:30px}p.um-notice.success{background:#7ACF58}p.um-notice.err{background:#C74A4A}p.um-notice.warning{background:#f9f9d1;color:#666;border:1px solid #efe4a2;padding:8px 15px!important}.um-field-error{width:auto;max-width:100%;background:#C74A4A;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;color:#fff;box-sizing:border-box;position:relative;padding:12px;font-size:14px;line-height:20px!important;margin:12px 0 0}.um-field-error a{color:#fff!important;text-decoration:underline!important}.um-field-arrow{top:-17px;left:10px;position:absolute;z-index:900;color:#C74A4A;font-size:28px;line-height:1em!important}.um-error-block{width:auto;max-width:100%;background:#C74A4A;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;color:#fff;box-sizing:border-box;position:relative;padding:12px;font-size:14px;line-height:1em!important;margin:12px 0 0}.um-tip{margin:0 0 0 8px;cursor:pointer;display:inline-block;position:relative;top:3px}.um-tip i{font-size:22px;height:22px;line-height:22px;display:block;position:relative}.um-tip-text{display:block;font-size:13px;line-height:15px;color:#999}.um-form button::-moz-focus-inner,.um-form input::-moz-focus-inner{border:0!important;padding:0!important}.um-field{position:relative;padding:15px 0 0}.um-field-b,.um-field-c{padding-top:0!important}.um-field.um-is-conditional{display:none}.um-field-label{display:block;margin:0 0 8px}.um-field-label .um-field-label-icon{float:left;margin:0 8px 0 0;height:22px;line-height:18px;display:inline-block;width:24px;text-align:center}.um-field-label .um-field-label-icon i{font-size:22px;position:relative;top:1px}.um-field-label label{font-size:15px!important;line-height:22px!important;font-weight:700;font-weight:600}.um-field-area{position:relative;word-wrap:break-word}.um-field-value p{margin:0 0 6px!important;padding:0}.um-field-block{color:#777;font-size:17px}.um-field-spacing{width:100%}.um-field-divider{width:100%;margin:0 0 12px;height:24px;position:relative}.um-field-divider-text{position:absolute;width:100%;text-align:center;bottom:-24px;left:0;font-size:16px;padding:10px 0}.um-field-divider-text span{background:#fff;color:#555;display:inline-block;padding:0 15px}.um-field-icon{position:absolute;cursor:default;text-align:center!important;top:2px;left:0;width:44px;font-size:22px;line-height:1.7em}.um-form input[type=text],.um-form input[type=number],.um-form input[type=password]{padding:0 12px!important;width:100%;display:block!important;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;outline:none!important;cursor:text!important;font-size:15px!important;height:40px!important;box-sizing:border-box!important;box-shadow:none!important;margin:0!important;position:static;outline:none!important}.um-form input[type=number]{width:auto;padding:0 0 0 5px !important;height:30px!important}.um-form input[type=text]:focus,.um-form input[type=number]:focus,.um-form input[type=password]:focus,.um-form textarea:focus{box-shadow:none!important;outline:none!important}.um-form input[type=text].um-iconed,.um-form input[type=password].um-iconed{padding-left:44px!important}.um-form input[type=text].um-error,.um-form input[type=password].um-error{border-color:#C74A4A!important}.um-form textarea{width:100%;padding:8px 12px!important;display:block;font-size:15px!important;line-height:22px!important;background:#fff;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;box-sizing:border-box;min-height:80px!important;box-shadow:none;outline:none!important}.um-form .wp-editor-container{border:1px solid #ddd}.um-form .wp-editor-container textarea{background:#ddd!important;color:#222!important;border-radius:0}.um-field-c .um-field-checkbox{margin:0!important;position:relative;top:-14px}.um-field-checkbox,.um-field-radio{display:block;margin:8px 0;position:relative;cursor:pointer!important}.um-field-checkbox:hover i,.um-field-radio:hover i{color:#666}.um-field-checkbox input,.um-field-radio input{opacity:0!important;display:inline!important;width:0!important;float:left}.um-field-checkbox-state,.um-field-radio-state{position:absolute;top:0;left:1px;width:24px;height:24px}.um-field-checkbox-state i,.um-field-radio-state i{font-size:24px;line-height:24px;height:24px;color:#aaa;transition:all .2s linear}.um-field-checkbox-option,.um-field-radio-option{margin:0 0 0 36px;line-height:24px;color:#888!important;display:block}.um-field-group{margin-top:20px}.um-field-group-head{cursor:pointer;color:#fff;font-size:16px;line-height:22px;padding:10px 20px;transition:.25s;box-sizing:border-box;-moz-border-radius:4px!important;-webkit-border-radius:4px!important;border-radius:4px!important;border-top:1px solid rgba(0,0,0,0.0)!important;border-bottom:2px solid rgba(0,0,0,0.1)!important}.um-field-group-head i{font-size:20px;margin:0 8px 0 0}.um-field-group-head i:before{vertical-align:middle!important}.um-field-group-body{display:none;margin:15px 0 0;padding:15px 20px 5px;background:#f9f9f9;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;position:relative;box-sizing:border-box;width:100%}.um-field-group-body div.um-field{padding:0 0 15px}.um-field-group-cancel{font-size:18px;position:absolute;z-index:800;right:8px;top:8px;color:#ccc!important;text-decoration:none!important}.um-field-group-cancel:hover{color:#777!important}.um div.disabled,.um-disabled,.um input[type=submit]:disabled,.um input[type=text]:disabled,.um input[type=number]:disabled{opacity:.6!important;cursor:no-drop!important}input[type=submit].um-button,input[type=submit].um-button:focus{vertical-align:middle!important;height:auto!important;font-size:15px;cursor:pointer!important;width:100%;box-shadow:none;text-shadow:none;font-family:inherit;outline:none!important;margin:0;opacity:1;-webkit-appearance:none}input[type=submit].um-button:hover{opacity:1}.um-button{font-size:15px;border:none!important;display:block;width:100%;line-height:1em!important;padding:16px 20px!important;text-decoration:none!important;text-align:center;text-transform:none!important;font-weight:400!important;overflow:hidden;position:relative;transition:.25s;box-sizing:border-box;-moz-border-radius:4px!important;-webkit-border-radius:4px!important;border-radius:4px!important;border-top:1px solid rgba(0,0,0,0.0)!important;border-bottom:2px solid rgba(0,0,0,0.1)!important;opacity:1}.um-button.um-btn-auto-width{width:auto;display:inline-block;padding:14px 20px!important;min-width:200px;max-width:450px}a.um-link-alt{line-height:22px;color:#888!important;display:block!important;text-decoration:none!important;font-weight:400;text-align:center;border-bottom:none!important}a.um-link-alt:hover{text-decoration:underline!important}.um-dropdown{position:absolute;height:auto;background:#fff;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;z-index:10;display:none;border:1px solid #e5e5e5;box-sizing:border-box;-webkit-box-shadow:0 0 2px rgba(0,0,0,0.1);box-shadow:0 0 1px rgba(0,0,0,0.1)}.um-dropdown ul,.um-dropdown li{list-style-type:none!important;padding:0!important;margin:0!important}.um-dropdown li a{display:block;padding:8px 12px;color:#666;font-size:14px;line-height:18px}.um-dropdown li:last-child a{border-top:1px solid #e5e5e5;padding:12px}.um-dropdown-b{position:relative}.um-dropdown-arr{position:absolute;color:#fff;font-size:24px;width:24px;height:24px;overflow:hidden;z-index:15;color:#eee}.um-dropdown-arr *{display:block!important;width:24px!important;height:24px!important;vertical-align:bottom!important;overflow:hidden!important;line-height:24px!important}div.um-photo{margin:20px auto 0;text-align:center;box-sizing:border-box;max-width:100%}div.um-photo,div.um-photo a,div.um-photo img{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.um-photo a{border:1px solid #e5e5e5;padding:5px;box-sizing:border-box;display:inline-block;box-shadow:0 1px 1px #eee;margin:0 auto;max-width:100%}div.um-photo img{max-height:300px;max-width:100%}span.um-req{margin:0 0 0 8px;font-size:14px;display:inline-block}.picker{font-size:16px;text-align:left;line-height:1.2;color:#fff;position:absolute;z-index:10000;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.picker__input{cursor:default}.picker__input.picker__input--active{border-color:#0089ec}.picker__holder{width:100%;overflow-y:auto;-webkit-overflow-scrolling:touch}.picker__frame,.picker__holder{bottom:0;left:0;right:0;top:100%}.picker__holder{position:fixed;-webkit-transition:background .15s ease-out,top 0s .15s;-moz-transition:background .15s ease-out,top 0s .15s;transition:background .15s ease-out,top 0s .15s}.picker__frame{position:absolute;margin:0 auto;min-width:256px;max-width:400px;width:100%;-ms-filter:"alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;opacity:0;-webkit-transition:all .15s ease-out;-moz-transition:all .15s ease-out;transition:all .15s ease-out}@media (min-height:33.875em){.picker__frame{overflow:visible;top:auto;bottom:-100%;max-height:80%}}@media (min-height:40.125em){.picker__frame{margin-bottom:15%!important}}.picker__wrap{display:table;width:100%;height:100%}@media (min-height:33.875em){.picker__wrap{display:block}}.picker__box{display:table-cell;vertical-align:middle}@media (min-height:33.875em){.picker__box{display:block;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}}@media (min-height:40.125em){.picker__box{border-bottom-width:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}}.picker--opened .picker__holder{top:0;zoom:1;background:rgba(0,0,0,.7);-webkit-transition:background .15s ease-out;-moz-transition:background .15s ease-out;transition:background .15s ease-out}.picker--opened .picker__frame{top:0;-ms-filter:"alpha(Opacity=100)";filter:alpha(opacity=100);-moz-opacity:1;opacity:1}@media (min-height:33.875em){.picker--opened .picker__frame{top:auto;bottom:0}}.picker__header{text-align:center;position:relative;margin-top:.75em;border-radius:2px 2px 0 0;padding:15px 0;font-size:18px}.picker__month,.picker__year{display:inline-block;margin-left:10px;margin-right:10px}.picker__select--month,.picker__select--year{margin-left:.25em;margin-right:.25em;font-size:16px;color:#999;background:#fff!important;outline:0!important;border:0!important}@media (min-width:24.5em){.picker__select--month,.picker__select--year{margin-top:-.5em}}.picker__select--month{width:35%}.picker__select--year{width:22.5%}.picker__nav--next,.picker__nav--prev{position:absolute;padding:.5em 1.25em;width:1em;height:1em;box-sizing:content-box!important;top:8px;color:#fff}.picker__nav--prev{left:0;padding-right:1.25em}@media (min-width:24.5em){.picker__nav--prev{padding-right:1.5em}}.picker__nav--next{right:0;padding-left:1.25em}@media (min-width:24.5em){.picker__nav--next{padding-left:1.5em}}.picker__nav--next:before,.picker__nav--prev:before{content:" ";border-top:.5em solid transparent;border-bottom:.5em solid transparent;border-right:.5em solid #fff;width:0;height:0;display:block;margin:0 auto}.picker__nav--next:before{border-right:0;border-left:.5em solid #fff}.picker__nav--next:hover,.picker__nav--prev:hover{cursor:pointer;color:#fff}.picker__nav--disabled,.picker__nav--disabled:before,.picker__nav--disabled:before:hover,.picker__nav--disabled:hover{cursor:default;background:0 0}.picker__table{text-align:center;border-collapse:collapse;border-spacing:0;table-layout:fixed;font-size:inherit;width:100%;margin-top:5px;border:none;margin-bottom:0}.picker__table td{margin:0;padding:0 10px;text-align:center;border:0}.picker__weekday{width:14.285714286%;color:#fff;text-align:center;padding:5px 0!important}.picker__day{padding:10px 0;line-height:1em!important}.picker__day--today{position:relative}.picker__day--outfocus{opacity:.75}.picker__day--infocus:hover,.picker__day--outfocus:hover{border-radius:2px;cursor:pointer}.picker--focused .picker__day--highlighted,.picker__day--highlighted:hover{border-radius:2px}.picker__day--disabled,.picker__day--disabled:hover{cursor:default;background:transparent!important;opacity:.3}.picker__footer{text-align:center;height:50px!important;line-height:50px!important;margin-top:5px;border-radius:0 0 2px 2px}.picker__button--clear,.picker__button--today{width:50%;display:inline-block;background:none!important;box-shadow:none!important;border:0!important;outline:0!important;box-sizing:border-box!important}.picker__button--clear:focus,.picker__button--clear:hover,.picker__button--today:focus,.picker__button--today:hover{cursor:pointer}.picker__list{list-style:none;list-style:none!important;padding:5px!important;margin:0!important}.picker__list-item{position:relative;border-radius:2px;display:inline-block;width:25%;text-align:center;box-sizing:border-box;padding:6px 0!important;margin:5px 0!important}.picker__list-item:hover{cursor:pointer;z-index:10}.picker__list-item--highlighted{z-index:10}.picker--focused .picker__list-item--highlighted,.picker__list-item--highlighted:hover{cursor:pointer;font-weight:700}.picker--focused .picker__list-item--selected,.picker__list-item--selected,.picker__list-item--selected:hover{z-index:10}.picker--focused .picker__list-item--disabled,.picker__list-item--disabled,.picker__list-item--disabled:hover{color:#a9e792;cursor:default;background:0 0;z-index:auto}.picker--time .picker__button--clear{width:100%;display:inline-block;box-shadow:none!important;border:0!important;outline:0!important;background:none!important;border-radius:0 0 2px 2px;color:#fff!important}.picker--time .picker__button--clear:focus,.picker--time .picker__button--clear:hover{cursor:pointer}.picker--time .picker__frame{min-width:256px;max-width:400px}.picker--time .picker__box{font-size:15px;padding:0;border-radius:2px!important}@media (min-height:40.125em){.picker--time .picker__frame{margin-bottom:10%!important}}.um-members img{display:block;overflow:hidden;-moz-border-radius:0!important;-webkit-border-radius:0!important;border-radius:0!important;margin:0!important;padding:0!important}.um-members a,.um-members a:hover{text-decoration:none!important}.um-members-intro{text-align:center;margin:0 0 20px}.um-members-total{font-size:30px;font-weight:300}.um-members-none{text-align:center;font-size:18px}.um-search{text-align:center;padding:20px 50px}.um-search.um-search-2{padding-left:20%;padding-right:20%;width:100%;box-sizing:border-box}.um-search.um-search-1{padding-left:32%;padding-right:32%;width:100%;box-sizing:border-box}.um-search.um-search-1 .um-search-submit .um-button{display:block!important;min-width:100%!important;margin:0 0 10px!important}.um-search.um-search-1 .um-search-filter{width:100%;padding:0 0 10px;float:none}.um-search.um-search-2 .um-search-filter{width:50%}.um-search-filter{padding:0 15px 30px;display:block;float:left;width:33%;box-sizing:border-box}.um-search-submit .um-button{display:inline-block!important;width:auto!important;padding:12px 20px!important;margin:0 10px!important;min-width:150px!important}.um-members{-ms-word-break:break-all;word-break:break-word;word-wrap:break-word}.um-member{float:left;width:30%;background:#fff;text-align:center;border:1px solid #eee;box-sizing:border-box;margin-bottom:40px;position:relative}.um-member.awaiting_admin_review,.um-member.inactive,.um-member.rejected{opacity:.7}.um-member-status{display:none}.um-member-status.awaiting_admin_review,.um-member-status.inactive,.um-member-status.rejected{display:block;position:absolute;top:0;left:0;width:100%;padding:7px 15px;background:#C74A4A;color:#fff;z-index:10;font-size:13px;box-sizing:border-box}.um-member-status.inactive,.um-member-status.rejected{background:#999}.um-gutter-sizer{width:5%}.um-member-cover{background-color:#eee;box-sizing:border-box;position:relative}.um-member-cover-e{text-align:center;box-sizing:border-box}.um-member-cover-e img{width:100%!important}.um-member-photo{padding:40px 0 20px;text-align:center}.um-member-photo a{display:inline!important}.um-member-photo img{display:inline!important;border:5px solid #fff;background:#fff;width:140px;height:140px;float:none!important}.um-member.with-cover .um-member-photo{padding-top:0}.um-member.with-cover .um-member-photo img{width:90px;height:90px;position:relative;top:-35px;margin-bottom:-45px!important;float:none!important;opacity:1}.um-member-photo.radius-1 img{-moz-border-radius:999px!important;-webkit-border-radius:999px!important;border-radius:999px!important}.um-member-photo.radius-2 img{-moz-border-radius:4px!important;-webkit-border-radius:4px!important;border-radius:4px!important}.um-member-photo.radius-3 img{-moz-border-radius:0!important;-webkit-border-radius:0!important;border-radius:0!important}.um-member-card.no-photo{padding-top:30px}.um-member-card{padding-bottom:15px}.um-member-name{margin:0 0 4px}.um-member-name a{font-size:16px;line-height:26px;color:#444;font-weight:700}.um-member-tagline{font-size:13px;line-height:22px;color:#999;padding:0 15px}.um-member-less{display:none}.um-member-less a,.um-member-more a{color:#666;display:inline-block}.um-member-less i,.um-member-more i{display:block;font-size:32px;height:32px;line-height:32px}.um-member-meta{display:none;margin:20px 15px 0;padding:15px 0;border-top:1px solid #e5e5e5}.um-member-meta.no-animate{display:block}.um-member-metaline{font-size:13px;padding:12px 0 0;line-height:16px;vertical-align:middle}.um-member-metaline span{display:block;text-align:center}.um-member-connect{padding-top:20px}.um-member-connect a{display:inline-block;width:40px;line-height:40px;height:40px;-moz-border-radius:999px;-webkit-border-radius:999px;border-radius:999px;color:#fff!important;opacity:.85;margin:0 1px;font-size:22px;transition:.25s}.um-member-connect a:hover{opacity:1;color:#fff}.um-members-pagi,.um-members-pagidrop{text-align:center;padding:5px 0;font-size:15px}.um-members-pagi span.current,.um-members-pagi span.current:hover{color:#fff!important}.um-members-pagi i:before{font-size:20px;vertical-align:middle!important;height:34px;line-height:34px;top:-2px;position:relative}.um-members-pagi span.disabled{opacity:.4;cursor:default}.um-members-pagi span.none{color:#aaa!important}.um-members-pagi span{cursor:default}.um-members-pagi a,.um-members-pagi span{display:inline-block;width:auto;height:34px;line-height:34px;transition:all .2s linear;padding:0 14px;color:#666!important;font-weight:400}.um-members-pagi a:hover{text-decoration:none!important}.um-popup-overlay{background:rgba(0,0,0,0.7);width:100%;height:100%;position:fixed;top:0;left:0;z-index:1999992}.um-popup *{-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important}.um-popup{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;position:fixed;left:50%;top:10%;margin-left:-250px;width:500px;background:#fff;box-shadow:0 1px 3px #111;z-index:1999993;box-sizing:border-box;overflow:auto;color:#888;padding:0!important;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important}.um-popup.loading{background:#fff url(../img/loading.gif) no-repeat center;min-height:100px}.um-popup a{outline:none!important}.um-modal-overlay{background:rgba(0,0,0,0.85);width:100%;height:100%;position:fixed;top:0;left:0;z-index:1999992}.um-modal *{-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important}.um-modal-hidden-content{display:none}.um-modal-close{display:block;position:fixed;right:0;top:0;font-size:24px;text-decoration:none!important;color:#fff!important;padding:0 10px}.um-modal{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;position:fixed;left:50%;display:none;z-index:1999993;box-sizing:border-box;bottom:-50px}.um-modal.normal{width:500px;margin-left:-250px}.um-modal.large{width:730px;margin-left:-365px}.um-modal.small{width:400px;margin-left:-200px}.um-modal-body{min-height:3px;padding:20px;box-sizing:border-box;width:100%;background:#fff;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px}.um-modal-body.photo{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,0.1),0px 0 0 1px rgba(255,255,255,0.12) inset;background:#888;padding:0}.um-modal-body.photo img{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;display:block;overflow:hidden;opacity:0}.um-modal.loading .um-modal-body{background:#fff url(../img/loading.gif) no-repeat center;min-height:150px}.um-modal div.um{margin-bottom:20px!important}.um-modal-header{-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;height:44px;line-height:44px;color:#fff;padding:0 20px;box-sizing:border-box;font-size:17px}.um-modal-footer{margin-top:20px}.um-modal-left{float:left}.um-modal-right{float:right}.um-modal-btn.disabled,.um-modal-btn.disabled:hover{opacity:.5;cursor:default!important}.um-modal-btn{cursor:pointer!important;line-height:34px!important;height:34px;display:inline-block;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:0 20px;text-align:center;color:#fff;vertical-align:middle;font-size:14px;box-sizing:border-box;transition:.2s;text-decoration:none!important}.um-modal-btn:hover{background:#44b0ec;color:#fff}.um-modal-btn.alt{color:#666;background:#eee}.um-modal-btn.alt:hover{background:#e5e5e5}.um-profile{box-sizing:border-box}.um-profile .um-cover-overlay{display:none}.um-profile.um-editing .um-cover.has-cover .um-cover-overlay{display:block}.um-profile.um-viewing .um-profile-photo-overlay{display:none}.um-profile img{display:block;overflow:hidden;border-radius:0;margin:0!important}.um-profile a,.um-profile a:hover{text-decoration:none!important}.um-profile .um-profile-body{padding-top:15px;padding-bottom:15px;max-width:600px;margin:auto}.um-profile.um-editing{padding-bottom:15px}.um-profile.um-viewing{padding-bottom:1px}.um-profile.um-viewing .um-field-label{display:block;margin:0 0 8px;border-bottom:solid 2px #eee;padding-bottom:4px}.um-cover{background-color:#eee;box-sizing:border-box;position:relative}.um-cover-add{color:#aaa;font-size:36px;width:100%;display:table}.um-cover-add span{display:table-cell;vertical-align:middle}.um-cover-e{text-align:center;box-sizing:border-box}.um-cover-e img{width:100%!important}.um-cover-overlay{position:absolute;top:0;left:0;background:rgba(0,0,0,.5);text-align:center;box-sizing:border-box;padding:0 40px;color:#fff;text-shadow:0 1px #666;cursor:pointer!important;line-height:21px;font-size:16px;height:100%;width:100%}.um-cover-overlay:hover{background:rgba(0,0,0,.55)}.um-cover-overlay span.um-cover-overlay-s{display:table;height:100%;width:100%}.um-cover-overlay ins{display:table-cell;vertical-align:middle;height:100%;text-decoration:none!important;background:none!important;color:#fff!important;border-bottom:none!important}.um-cover-overlay i{font-size:46px;display:block;margin-bottom:6px}.um-header{position:relative;padding:0 0 25px;border-bottom:solid 2px #eee;min-height:85px;box-sizing:content-box!important}.um-profile-edit{position:absolute;top:15px;right:0;vertical-align:middle;font-size:30px;height:30px;line-height:30px;z-index:66;padding-right:10px}.um-header.no-cover .um-profile-meta{padding-left:0!important;padding-right:0!important;text-align:center!important}.um-header.no-cover .um-name{float:none!important;margin-right:0!important}.um-header.no-cover .um-profile-photo{float:none!important;margin:0 auto!important;text-align:center!important}.um-header.no-cover a.um-profile-photo-img{position:relative!important;top:auto!important;left:auto!important;float:none!important;display:inline-block!important;text-align:center!important}.um-header.no-cover .um-main-meta{padding:0}.um-profile .gravatar{position:static}.um-profile-photo{float:left;position:relative}.um-profile-photo a.um-profile-photo-img{float:left;position:absolute;background:#fff;padding:5px;left:30px}.um-profile-photo a.um-profile-photo-img img{width:100%;height:100%}.um-profile-photo-overlay{position:absolute;top:0;left:0;background:rgba(0,0,0,.5);text-align:center;box-sizing:border-box;padding:0;color:#fff;text-shadow:0 1px #666;cursor:pointer!important;line-height:21px;font-size:16px;height:100%;width:100%}.um-profile-photo-overlay:hover{background:rgba(0,0,0,.55)}.um-profile-photo-overlay span.um-profile-photo-overlay-s{display:table;height:100%;width:100%}.um-profile-photo-overlay ins{display:table-cell;vertical-align:middle;height:100%;text-decoration:none!important;background:none!important;color:#fff!important;border-bottom:none!important}.um-profile-photo-overlay i{font-size:46px;display:block}.um-profile-meta{padding-right:30px;-ms-word-break:break-all;word-break:break-word;word-wrap:break-word}.um-main-meta{padding:10px 0 0}.um-name{float:left;font-size:24px;font-weight:700;margin-right:30px;line-height:1.7em}.um-meta{font-size:15px}.um-meta span a{font-weight:400}.um-meta span:first-child{margin:0 5px 0 0}.um-meta span{margin:0 5px;font-size:14px;display:inline-block}.um-meta span i{font-size:16px;margin:0 5px 0 0}.um-meta-text{margin:6px 0 0;color:#666;line-height:1.4em;font-size: 13px}.um-meta-text p{margin:0 0 6px 0!important;padding:0!important}.um-profile-status{display:none}.um-profile-status.awaiting_admin_review,.um-profile-status.inactive,.um-profile-status.rejected{display:inline-block;margin:6px 0 0;border-left:3px solid #C74A4A;padding-left:10px;font-size:14px;color:#777}.um-profile-note{display:none;text-align:center;padding-top:20px;color:#666}.um-profile-note i{display:inline-block;font-size:70px;height:70px;line-height:70px}.um-profile-note i.um-faicon-lock{position:relative;top:2px;display:inline-block;font-size:24px;height:auto;line-height:24px;margin-right:10px}.um-profile-note span{margin-top:10px;display:block;font-size:16px;color:#888}.um-profile-note a{border:none!important}.um-profile-note a:hover{text-decoration:underline!important}.um-profile-nav{padding:10px;background:#444;text-align:center}.um-profile-nav-item.active a,.um-profile-nav-item.active a:hover{color:#FFF!important}.um-profile-nav-item.active a span.count{background:0 0;padding:4px 0;color:#fff}.um-profile-nav-item a{color:#fff!important;font-size:14px;font-weight:600;padding:6px 10px 6px 28px;display:block;float:left;border-radius:4px;margin-left:5px;position:relative;border-bottom:0!important}.um-profile-nav-item.without-icon a{padding-left:10px}.um-profile-nav-item.without-icon span.title{padding-left:0}.um-profile-nav-item.without-icon i{display:none}.um-profile-nav-item a:hover{background:#555}.um-profile-nav-item i{font-size:18px;height:18px;line-height:18px;position:absolute;display:block;top:8px;left:10px}.um-profile-nav-item span.title{padding-left:5px}.um-profile-nav-item span.count{font-size:12px;font-weight:300;background:#ddd;color:#666;border-radius:3px;padding:4px 8px;margin-left:3px}.um-profile-subnav{background:#eee;padding:15px;text-align:center}.um-profile-subnav a{display:inline-block;color:#555;font-size:15px;font-weight:600;margin:0 20px;border-bottom:0!important}.um-profile-subnav a:hover{color:#333}.um-profile-subnav span{display:inline-block;margin:0 0 0 8px;background:#ddd;padding:1px 8px;color:#aaa!important;border-radius:2px}.um-item{padding:20px 0;border-bottom:1px solid #eee;position:relative}.um-item-action{position:absolute;right:0;top:16px;width:20px;height:20px;font-size:20px;text-align:center}.um-item-action a{color:#ccc}.um-item-action a:hover{color:#999}.um-item-link{padding-right:40px}.um-item-link a{color:#333;font-size:16px;line-height:20px}.um-item-link a:hover{text-decoration:underline!important}.um-item-link i{font-size:24px;color:#666;margin-right:10px;position:relative;top:3px}.um-item-img{padding:10px 0 0}.um-item-img a{display:inline-block;padding:8px;border-radius:3px;border:1px solid #ddd}.um-item-img a:hover{border-color:#bbb}.um-item-img img{max-width:100%;border-radius:3px}.um-item-meta{color:#888}.um-item-meta span{font-size:13px;font-weight:400;font-style:italic}.um-item-meta span:not(:last-child):after{position:relative;padding:0 4px 0 7px;content:"•"}.um-item-meta a{font-weight:700;border-bottom:1px solid #E0E0E0}.um-item-meta a:hover{border-bottom-color:#bbb}.um-load-items{text-align:center;margin-top:12px;padding-top:30px}.um-load-items.loading{background:url(../img/loading-dots.gif) no-repeat top center}.um-load-items a{max-width:250px;display:inline-block;margin:0 auto}.um-tab-notifier{position:absolute;background:none repeat scroll 0 0 #c65151;right:0;top:0;width:18px;height:18px;border-radius:999px;line-height:18px;top:2px;right:8px;font-size:11px;font-weight:400}@font-face{font-family:raty;font-style:normal;font-weight:400;src:url(../font/raty.eot);src:url(../font/raty.eot?#iefix) format("embedded-opentype");src:url(../font/raty.svg#raty) format("svg");src:url(../font/raty.ttf) format("truetype");src:url(../font/raty.woff) format("woff")}.cancel-off-png,.cancel-on-png,.star-half-png,.star-off-png,.star-on-png{font-family:raty;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;margin-right:.2em;color:#ccc}.star-half-png,.star-on-png{color:#ffbe32}.cancel-on-png:before{content:"\e600"}.cancel-off-png:before{content:"\e601"}.star-on-png:before{content:"\f005"}.star-off-png:before{content:"\f006"}.star-half-png:before{content:"\f123"}.select2-container{margin:0!important;position:relative!important;display:inline-block!important;zoom:1!important;*display:inline!important;vertical-align:middle!important}.select2-container a:hover{color:#666!important}.select2-container,.select2-drop,.select2-search,.select2-search input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.select2-container .select2-choice{display:block!important;height:36px!important;padding:0 0 0 12px!important;overflow:hidden!important;position:relative!important;white-space:nowrap!important;line-height:35px!important;color:#666!important;font-size:15px!important;text-align:left!important;text-decoration:none!important;-moz-border-radius:2px!important;-webkit-border-radius:2px!important;border-radius:2px!important;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background:none!important;background-color:#fff!important}.select2-container.select2-drop-above .select2-choice{-moz-border-radius:0 0 2px 2px!important;-webkit-border-radius:0 0 2px 2px!important;border-radius:0 0 2px 2px!important}.select2-container.select2-allowclear .select2-choice .select2-chosen{margin-right:42px}.select2-container .select2-choice>.select2-chosen{margin-right:26px!important;display:block!important;overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important;float:none!important;width:auto!important;font-weight:400}.select2-container .select2-choice abbr{display:none;width:20px!important;height:100%!important;right:24px!important;font-size:1px!important;text-decoration:none!important;border:0!important;background:none!important;cursor:pointer!important;outline:0!important}.select2-container.select2-allowclear .select2-choice abbr{display:inline-block!important}.select2-container .select2-choice abbr:hover{cursor:pointer!important}.select2-drop-mask{border:0!important;margin:0!important;padding:0!important;position:fixed!important;left:0!important;top:0!important;min-height:100%!important;min-width:100%!important;height:auto!important;width:auto!important;opacity:0!important;z-index:1999997!important;background-color:#fff!important;filter:alpha(opacity=0)!important}.select2-drop{width:100%;margin-top:-1px;position:absolute;z-index:1999998!important;top:100%;background:#fff;color:#666;-moz-border-radius:0 0 2px 2px;-webkit-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px;box-shadow:none}.select2-drop.select2-drop-above{margin-top:1px;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;box-shadow:none}.select2-drop-active{box-shadow:none!important}.select2-drop-auto-width{width:auto!important}.select2-drop-auto-width .select2-search{padding-top:4px}.select2-container .select2-choice .select2-arrow{display:inline-block!important;width:34px!important;height:100%!important;position:absolute!important;right:0!important;top:0!important;-moz-border-radius:0 2px 2px 0!important;-webkit-border-radius:0 2px 2px 0!important;border-radius:0 2px 2px 0!important;text-align:center!important;background:transparent!important;border-left:0!important}.select2-container .select2-choice .select2-arrow *{line-height:100%!important;vertical-align:middle!important}.select2-container .select2-choice .select2-arrow b{display:block!important;width:100%!important;height:100%!important;background:none!important}.select2-container .select2-choice .select2-arrow:before{content:"\f3d0"!important;font-size:27px!important;font-family:Ionicons!important;width:100%!important;display:block;height:100%;line-height:36px}.select2-container .select2-choice .select2-arrow:hover:before{color:#666!important}.select2-search{display:inline-block!important;width:100%!important;min-height:32px!important;height:32px!important;line-height:1em!important;margin:0!important;padding-left:4px!important;padding-right:4px!important;position:relative!important;z-index:1999999!important;white-space:nowrap!important}.select2-search input[type=text]{background:none!important;width:100%!important;height:32px!important;line-height:auto!important;padding:0 38px 0 7px!important;margin:0!important;outline:0!important;border:1px solid #ddd!important;color:#666!important;-moz-border-radius:2px!important;-webkit-border-radius:2px!important;border-radius:2px!important;font-size:15px!important;box-sizing:border-box!important;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important;box-shadow:none!important}.select2-search:before{content:"\f4a4"!important;font-size:20px!important;height:32px!important;line-height:32px!important;font-family:Ionicons!important;top:0!important;right:10px!important;position:absolute!important}.select2-drop .select2-search{margin-top:4px!important}.select2-search input.select2-active{background:#fff!important}.select2-container-active .select2-choice,.select2-container-active .select2-choices{outline:0!important;box-shadow:none!important}.select2-dropdown-open .select2-choice{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.select2-dropdown-open .select2-choice .select2-arrow{background:transparent!important;filter:none!important;border-color:transparent!important}.select2-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.select2-results{max-height:200px;padding:0 0 0 5px;margin:4px 4px 4px 0;position:relative;overflow-x:hidden;overflow-y:auto;-webkit-tap-highlight-color:rgba(0,0,0,0)}.select2-results ul.select2-result-sub{margin:0;padding-left:0}.select2-results li{list-style:none;display:list-item;background-image:none;font-size:15px;margin:0!important;padding:3px 0!important;color:#666!important}.select2-results li.select2-result-with-children>.select2-result-label{font-weight:700!important}.select2-results .select2-result-label{padding:3px 7px 4px!important;margin:0!important;cursor:pointer;min-height:1em!important;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important}.select2-results-dept-1 .select2-result-label{padding-left:20px}.select2-results-dept-2 .select2-result-label{padding-left:40px}.select2-results-dept-3 .select2-result-label{padding-left:60px}.select2-results-dept-4 .select2-result-label{padding-left:80px}.select2-results-dept-5 .select2-result-label{padding-left:100px}.select2-results-dept-6 .select2-result-label{padding-left:110px}.select2-results-dept-7 .select2-result-label{padding-left:120px}.select2-results .select2-highlighted{background:none!important;background:#f4f4f4!important;color:#666!important}.select2-results li em{background:#feffde!important;font-style:normal!important}.select2-results .select2-highlighted em{background:transparent!important}.select2-results .select2-highlighted ul{background:#fff!important;color:#666!important}.select2-results .select2-no-results,.select2-results .select2-searching,.select2-results .select2-selection-limit{background:#f4f4f4!important;display:list-item!important;padding:5px!important;font-size:15px!important;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important}.select2-results .select2-disabled .select2-result-label,.select2-results .select2-disabled.select2-highlighted .select2-result-label{color:#bbb!important;background:#fff!important;display:list-item!important;cursor:default!important}.select2-results .select2-selected{display:none}.select2-more-results.select2-active{background:#f4f4f4!important}.select2-more-results{background:#f4f4f4!important;display:list-item!important}.select2-container.select2-container-disabled .select2-choice{background-color:#f4f4f4!important;background-image:none!important;border:1px solid #ddd!important;cursor:default!important}.select2-container.select2-container-disabled .select2-choice .select2-arrow{background:none!important;background:#f9f9f9!important;border-left:0!important}.select2-container.select2-container-disabled .select2-choice abbr{display:none!important}.select2-container-multi .select2-choices{height:auto!important;height:1%!important;margin:0!important;padding:1px 3px!important;position:relative!important;cursor:text!important;overflow:hidden!important;-moz-border-radius:2px!important;-webkit-border-radius:2px!important;border-radius:2px!important;box-shadow:none!important}.select2-locked{padding:3px 5px!important}.select2-container-multi .select2-choices{min-height:26px;background-image:none!important}.select2-container-multi.select2-container-active .select2-choices{outline:0;box-shadow:none}.select2-container-multi .select2-choices li{float:left;list-style:none}html[dir=rtl] .select2-container-multi .select2-choices li{float:right}.select2-container-multi .select2-choices .select2-search-field{margin:0;padding:0;white-space:nowrap}.select2-container-multi .select2-choices .select2-search-field input{padding:5px!important;margin:3px 0!important;font-size:100%;height:auto!important;outline:0;border:0!important;-webkit-box-shadow:none;box-shadow:none;background:transparent!important}.select2-container-multi .select2-choices .select2-search-field input.select2-active{background:#fff!important}.select2-container-multi .select2-choices .select2-search-choice{padding:4px 20px 4px 5px!important;margin:6px 0 4px 5px!important;position:relative;line-height:14px;font-size:14px;color:#666;cursor:default;border:1px solid #ddd;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;box-shadow:none!important;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background:none!important;background-color:#f9f9f9!important}html[dir=rtl] .select2-container-multi .select2-choices .select2-search-choice{margin-left:0;margin-right:5px}.select2-container-multi .select2-choices .select2-search-choice .select2-chosen{cursor:default}.select2-container-multi .select2-choices .select2-search-choice-focus{background:#f1f1f1}.select2-search-choice-close{position:absolute!important;width:18px!important;height:18px!important;right:0!important;top:0!important;left:auto!important;outline:0!important;background:none!important}.select2-search-choice-close:before{content:"\f2d7"!important;font-size:22px!important;font-family:Ionicons!important;right:4px!important;position:relative!important;display:block;height:100%;width:100%;line-height:36px}.select2-search-choice-close:hover:before{color:#666!important}.select2-container-multi .select2-search-choice-close{text-decoration:none!important;width:21px!important;height:100%!important;text-align:center!important;border-bottom:0!important}.select2-container-multi .select2-search-choice-close:before{font-size:16px!important;right:0!important;line-height:23px!important}.select2-container-multi.select2-container-disabled .select2-choices{background-color:#f4f4f4;background-image:none;border:1px solid #ddd;cursor:default}.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice{padding:3px 5px;border:1px solid #ddd;background-image:none;background-color:#f4f4f4}.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close{display:none;background:0 0}.select2-result-selectable .select2-match,.select2-result-unselectable .select2-match{text-decoration:underline}.select2-offscreen,.select2-offscreen:focus{clip:rect(0 0 0 0)!important;width:1px!important;height:1px!important;border:0!important;margin:0!important;padding:0!important;overflow:hidden!important;position:absolute!important;outline:0!important;left:0!important;top:0!important}.select2-display-none{display:none}.select2-measure-scrollbar{position:absolute;top:-10000px;left:-10000px;width:100px;height:100px;overflow:scroll}.tipsy{padding:5px;position:absolute;z-index:9999999999!important}.tipsy-inner{font-size:13px!important;line-height:17px!important;background-color:#333!important;color:#fff!important;max-width:250px!important;padding:6px 10px!important;text-align:left!important;word-wrap:break-word!important;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px}.tipsy-arrow{position:absolute!important;width:0!important;height:0!important;line-height:0!important;border:5px dashed #333}.tipsy-arrow-n{border-bottom-color:#333!important}.tipsy-arrow-s{border-top-color:#333!important}.tipsy-arrow-e{border-left-color:#333!important}.tipsy-arrow-w{border-right-color:#333!important}.tipsy-n .tipsy-arrow{top:0;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-nw .tipsy-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-ne .tipsy-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-s .tipsy-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-sw .tipsy-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-se .tipsy-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-e .tipsy-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.tipsy-w .tipsy-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.um-account p.um-notice{margin:0 0 20px 0!important;padding:12px 15px!important}.um-account a:focus{outline:0!important}.um-account-side{float:left;width:35%;padding:0 30px;box-sizing:border-box}.um-account-main{float:left;width:50%;padding:0 30px;box-sizing:border-box}.um-account-main a{border-bottom:none!important}.um-account-tab{display:none}.um-account-main div.um-account-heading{margin:0!important;font-size:18px;line-height:18px;font-weight:700;color:#555}.um-account-main div.um-account-heading i{margin-right:10px;font-size:26px;position:relative;top:2px}.um-account-main p{margin:20px 0 0!important;padding:0!important}.um-account-main label{font-size:15px}.um-account-meta{text-align:center;margin-bottom:20px}.um-account-meta img{margin:0!important;position:static!important;float:none!important;display:inline-block}.um-account-meta.radius-1 img{-moz-border-radius:999px;-webkit-border-radius:999px;border-radius:999px}.um-account-meta.radius-2 img{-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}.um-account-meta.radius-3 img{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.um-account-name a{font-weight:700;color:#555!important;text-decoration:none!important;font-size:18px;line-height:2em}.um-account-nav a{display:block;height:44px;line-height:44px;color:#666!important;text-decoration:none!important;position:relative;padding-left:40px;border-bottom:1px solid #eee!important;transition:all .2s linear;font-size:14px}.um-account-nav a.current{font-weight:700}.um-account-nav span.arr{position:absolute;right:0;top:1px;font-size:28px}.um-account-nav span.ico{position:absolute;left:0;top:0;font-size:21px;width:21px;text-align:center}.um-account-side li,.um-account-side ul{margin:0!important;padding:0!important;list-style-type:none!important}.um-account-side li{margin-bottom:1px!important;background:#eee}.um-account-side li a{display:block;padding:4px 0;font-size:14px;height:30px;line-height:20px;color:#999;position:relative}.um-account-side li a span.um-account-arrow{position:absolute;right:10px;top:6px;font-size:26px;opacity:0.6}.um-account-side li a span.um-account-icon,.um-account-side li a.current span.um-account-icon,.um-account-side li a.current:hover span.um-account-icon{text-align:center;font-size:20px;width:20px;height:30px;border-right:1px solid #ccc;color:#444;float:left;padding:0 15px;font-weight:400!important}.um-account-side li a span.um-account-icon i{display:block;height:30px;line-height:30px}.um-account-side li a span.um-account-title{padding-left:20px;float:left;height:30px;line-height:30px;color:#555}.um-account-side li a:hover{color:#444;background:#ddd}.um-account-side li a.current,.um-account-side li a.current:hover{color:#444;font-weight:700;text-decoration:none!important}.cropper-container{position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}.cropper-container img{width:100%;height:100%;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important}.cropper-canvas,.cropper-modal{position:absolute;top:0;right:0;bottom:0;left:0}.cropper-canvas{background-color:#fff;opacity:0;filter:alpha(opacity=0)}.cropper-modal{background-color:#000;opacity:.5;filter:alpha(opacity=50)}.cropper-dragger{position:absolute;top:10%;left:10%;width:80%;height:80%}.cropper-viewer{display:block;width:100%;height:100%;overflow:hidden;outline-width:1px;outline-style:solid;outline-color:#69f;outline-color:rgba(51,102,255,.75)}.cropper-dashed{position:absolute;display:block;border:0 dashed #fff;opacity:.5;filter:alpha(opacity=50)}.cropper-dashed.dashed-h{top:33.3%;left:0;width:100%;height:33.3%;border-top-width:1px;border-bottom-width:1px}.cropper-dashed.dashed-v{top:0;left:33.3%;width:33.3%;height:100%;border-right-width:1px;border-left-width:1px}.cropper-face,.cropper-line,.cropper-point{position:absolute;display:block;width:100%;height:100%;opacity:.1;filter:alpha(opacity=10)}.cropper-face{top:0;left:0;cursor:move;background-color:#fff}.cropper-line{background-color:#69f}.cropper-line.line-e{top:0;right:-3px;width:5px;cursor:e-resize}.cropper-line.line-n{top:-3px;left:0;height:5px;cursor:n-resize}.cropper-line.line-w{top:0;left:-3px;width:5px;cursor:w-resize}.cropper-line.line-s{bottom:-3px;left:0;height:5px;cursor:s-resize}.cropper-point{width:5px;height:5px;background-color:#69f;opacity:.75;filter:alpha(opacity=75)}.cropper-point.point-e{top:50%;right:-3px;margin-top:-3px;cursor:e-resize}.cropper-point.point-n{top:-3px;left:50%;margin-left:-3px;cursor:n-resize}.cropper-point.point-w{top:50%;left:-3px;margin-top:-3px;cursor:w-resize}.cropper-point.point-s{bottom:-3px;left:50%;margin-left:-3px;cursor:s-resize}.cropper-point.point-ne{top:-3px;right:-3px;cursor:ne-resize}.cropper-point.point-nw{top:-3px;left:-3px;cursor:nw-resize}.cropper-point.point-sw{bottom:-3px;left:-3px;cursor:sw-resize}.cropper-point.point-se{right:-3px;bottom:-3px;width:20px;height:20px;cursor:se-resize;opacity:1;filter:alpha(opacity=100)}.cropper-point.point-se:before{position:absolute;right:-50%;bottom:-50%;display:block;width:200%;height:200%;content:" ";background-color:#69f;opacity:0;filter:alpha(opacity=0)}@media (min-width:768px){.cropper-point.point-se{width:15px;height:15px}}@media (min-width:992px){.cropper-point.point-se{width:10px;height:10px}}@media (min-width:1200px){.cropper-point.point-se{width:5px;height:5px;opacity:.75;filter:alpha(opacity=75)}}.cropper-hidden{display:none!important}.cropper-invisible{position:fixed;top:0;left:0;z-index:-1;width:auto!important;max-width:none!important;height:auto!important;max-height:none!important;opacity:0;filter:alpha(opacity=0)}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-canvas,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}.um .um-single-file-preview,.um .um-single-image-preview{margin-bottom:20px}.um .um-single-image-preview>img{max-height:300px;display:inline-block;overflow:hidden;margin:auto;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.um-single-file-preview,.um-single-image-preview{display:none;text-align:center;position:relative}.um-single-file-preview.show,.um-single-image-preview.show{display:block}.um-single-image-preview>img{max-width:100%;max-height:inherit}.um-single-file-preview a.cancel,.um-single-image-preview a.cancel{position:absolute;top:-15px;right:-15px;width:30px;height:30px;-moz-border-radius:999px;-webkit-border-radius:999px;border-radius:999px;background:#ddd;cursor:pointer;text-decoration:none!important;z-index:666;opacity:.75}.um-single-file-preview a.cancel i,.um-single-image-preview a.cancel i{font-size:16px;color:#888;position:relative;display:block;width:100%;height:100%;line-height:30px;overflow:hidden}.um-single-file-preview a.cancel i:before,.um-single-image-preview a.cancel i:before{line-height:inherit}.um-single-fileinfo{padding:26px 0 20px;display:inline-block}.um-single-fileinfo span.icon{font-size:40px;display:inline-block;width:100px;height:70px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#666;color:#fff!important}.um-single-fileinfo span.icon i{display:block;height:70px;line-height:70px;overflow:hidden}.um-single-fileinfo span.icon i:before{line-height:inherit}.um-single-fileinfo span.filename{display:block;font-size:16px;color:#888;padding-top:5px}.um-single-fileinfo a{text-decoration:none!important;opacity:.9}.um-single-fileinfo a:hover{opacity:1}.upload-statusbar{margin:20px 0 0}.upload-filename{display:none!important}.upload-progress{position:relative;width:100%;box-sizing:border-box}.upload-bar{width:0;height:10px;color:#666;background:#7ACF58;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.ajax-upload-dragdrop{width:100%;text-align:center;vertical-align:middle;padding:20px;box-sizing:border-box;border:2px dashed #ddd;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;font-size:18px;line-height:1em}.ajax-upload-dragdrop span.str{display:block;margin:0 0 15px}.ajax-upload-dragdrop span.icon{display:block;font-size:80px;line-height:80px;vertical-align:middle;margin-bottom:10px}.ajax-upload-dragdrop span.help{display:block;font-size:14px;color:#aaa;margin:0 0 12px}.upload{cursor:pointer!important;line-height:34px!important;height:34px;display:inline-block;text-decoration:none;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:0 20px;color:#fff;vertical-align:middle;font-size:14px;box-sizing:border-box;transition:.2s}.upload:hover{background:#44b0ec}.um-modal input[type=file]::-webkit-file-upload-button{cursor:pointer}.uimob340-show,.uimob500-show,.uimob800-show,.uimob960-show{display:none}div.uimob340 .uimob340-show,div.uimob500 .uimob500-show,div.uimob800 .uimob800-show,div.uimob960 .uimob960-show{display:block}div.uimob340 .uimob340-hide,div.uimob500 .uimob500-hide,div.uimob800 .uimob800-hide,div.uimob960 .uimob960-hide{display:none}div.uimob340 .um-item-link a{font-size:14px}div.uimob340 .um-item-meta span{font-size:13px}div.uimob340 .um-load-items a{width:100%!important;max-width:100%!important}div.uimob340 .um-profile-nav{padding:0}div.uimob340 .um-profile-nav-item a{padding:10px 16px;margin-left:0;border-radius:0}div.uimob340 .um-profile-nav-item i{display:block;position:static;top:auto;left:auto}div.uimob340 .um-profile-subnav{padding:8px 15px}div.uimob340 .um-profile-subnav a{display:block;text-align:left;font-size:13px;margin:0;padding:6px 0}div.uimob340 .um-profile-subnav span{font-size:12px;padding:1px 6px}div.uimob340 .um-cover-overlay span.um-cover-overlay-t{display:none!important}div.uimob340 .um-cover-overlay{padding:0}div.uimob340 .um-cover-overlay i,div.uimob340 .um-profile-photo-overlay i{margin-bottom:0;font-size:30px}.um-modal.uimob340{width:100%!important;margin:0!important;left:0!important;height:100%;background:#fff}.um-modal.uimob340,.um-modal.uimob340 .um-modal-body,.um-modal.uimob340 .um-modal-header{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.um-modal.uimob340 .um-modal-header{text-align:center}.um-modal.uimob340 .um-modal-footer{position:absolute;bottom:0;left:0;width:100%;box-sizing:border-box;padding:10px;border-top:1px solid #ddd}.um-modal.uimob340 .um-modal-right{width:100%;float:none}.um-modal.uimob340 .um-modal-footer a.um-modal-btn{width:48%;margin:0 1%;float:left;display:block;line-height:44px!important;height:44px}.um-modal.uimob340 .ajax-upload-dragdrop span.icon{font-size:40px;line-height:40px}div.uimob340 .um-profile-body{padding-left:0;padding-right:0}div.uimob340 .um-profile-photo{width:100%!important;text-align:center!important;position:absolute;top:-40px;left:0}div.uimob340 .um-header.no-cover .um-profile-photo{position:static;top:auto;left:auto}div.uimob340 .um-profile-photo a.um-profile-photo-img{width:100px!important;height:100px!important;margin:0 auto!important;float:none!important;display:inline-block!important;position:relative!important;top:auto!important;left:auto!important}div.uimob340 .um-header.no-cover .um-profile-photo a.um-profile-photo-img{width:120px!important;height:120px!important}div.uimob340 .um-header .um-profile-meta{padding-left:0!important;padding-right:0!important;text-align:center!important;padding-top:60px!important}div.uimob340 .um-header.no-cover .um-profile-meta{padding-top:0!important}div.uimob340 .um-header .um-name{float:none!important;margin-right:0!important;font-size:18px}div.uimob340 .um-header .um-meta,div.uimob340 .um-header .um-meta-text{padding:0 20px}div.uimob340 .um-header .um-meta span:first-child{display:block}div.uimob340 .um-header .um-meta span{display:none}div.uimob340 .um-col-121,div.uimob340 .um-col-122,div.uimob340 .um-col-131,div.uimob340 .um-col-132,div.uimob340 .um-col-133{float:none;width:100%;margin:0}div.uimob340 .um-field-half{float:none;width:100%}div.uimob340 .um-search{padding:20px 0!important;width:100%!important;box-sizing:border-box}div.uimob340 .um-search .um-search-filter{width:100%!important;float:none!important;padding:0 0 15px!important}div.uimob340 .um-search .um-search-submit .um-button{display:block!important;min-width:100%!important;margin:0 0 15px!important}div.uimob340 .um-member{width:100%}div.uimob340 .um-gutter-sizer{width:0}div.uimob340 .um-account-main{float:none;width:100%;padding:0;box-sizing:border-box}div.uimob340 .um-account-tab{padding-bottom:20px;border-bottom:1px solid #eee}div.uimob340 .um-account-meta{margin-bottom:0}.uimob340 .um-half{float:none;width:100%;margin:0 0 10px}.uimob340 .um-button.um-btn-auto-width{min-width:auto;max-width:auto;width:100%}.uimob340 .um-col-alt-s{padding-top:0}div.uimob500 .um-profile-nav{padding:0}div.uimob500 .um-profile-nav-item a{padding:10px 16px;margin-left:0;border-radius:0}div.uimob500 .um-profile-nav-item i{display:block;position:static;top:auto;left:auto;font-size:22px;height:22px;line-height:22px}div.uimob500 .um-profile-subnav{padding:8px 15px}div.uimob500 .um-profile-subnav a{display:block;text-align:left;font-size:13px;margin:0;padding:6px 0}div.uimob500 .um-profile-subnav span{font-size:12px;padding:1px 6px}div.uimob500 .um-cover-overlay span.um-cover-overlay-t{display:none!important}div.uimob500 .um-cover-overlay{padding:0}div.uimob500 .um-cover-overlay i,div.uimob500 .um-profile-photo-overlay i{margin-bottom:0;font-size:30px}.um-modal.uimob500{width:100%!important;margin:0!important;left:0!important;height:100%;background:#fff}.um-modal.uimob500,.um-modal.uimob500 .um-modal-body,.um-modal.uimob500 .um-modal-header{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.um-modal.uimob500 .um-modal-header{text-align:center}.um-modal.uimob500 .um-modal-footer{position:absolute;bottom:0;left:0;width:100%;box-sizing:border-box;padding:10px;border-top:1px solid #ddd}.um-modal.uimob500 .um-modal-right{width:100%;float:none}.um-modal.uimob500 .um-modal-footer a.um-modal-btn{width:48%;margin:0 1%;float:left;display:block;line-height:44px!important;height:44px}.um-modal.uimob500 .ajax-upload-dragdrop span.icon{font-size:40px;line-height:40px}div.uimob500 .um-profile-body{padding-left:0;padding-right:0}div.uimob500 .um-profile-photo{width:100%!important;text-align:center!important;position:absolute;top:-40px;left:0}div.uimob500 .um-header.no-cover .um-profile-photo{position:static;top:auto;left:auto}div.uimob500 .um-profile-photo a.um-profile-photo-img{width:100px!important;height:100px!important;margin:0 auto!important;float:none!important;display:inline-block!important;position:relative!important;top:auto!important;left:auto!important}div.uimob500 .um-header.no-cover .um-profile-photo a.um-profile-photo-img{width:120px!important;height:120px!important}div.uimob500 .um-header .um-profile-meta{padding-left:0!important;padding-right:0!important;text-align:center!important;padding-top:60px!important}div.uimob500 .um-header.no-cover .um-profile-meta{padding-top:0!important}div.uimob500 .um-header .um-name{float:none!important;margin-right:0!important;font-size:21px}div.uimob500 .um-header .um-meta,div.uimob500 .um-header .um-meta-text{padding:0 20px}div.uimob500 .um-header .um-meta span:first-child{display:block}div.uimob500 .um-header .um-meta span{display:none}div.uimob500 .um-col-121,div.uimob500 .um-col-122,div.uimob500 .um-col-131,div.uimob500 .um-col-132,div.uimob500 .um-col-133{float:none;width:100%;margin:0}div.uimob500 .um-field-half{float:none;width:100%}div.uimob500 .um-search{padding:20px 0!important;width:100%!important;box-sizing:border-box}div.uimob500 .um-search .um-search-filter{width:100%!important;float:none!important;padding:0 0 15px!important}div.uimob500 .um-search .um-search-submit .um-button{display:block!important;min-width:100%!important;margin:0 0 15px!important}div.uimob500 .um-member{width:100%}div.uimob500 .um-gutter-sizer{width:0}div.uimob500 .um-account-main{float:none;width:100%;padding:0;box-sizing:border-box}div.uimob500 .um-account-tab{padding-bottom:20px;border-bottom:1px solid #eee}div.uimob500 .um-account-meta{margin-bottom:0}div.uimob800 .um-profile-nav{padding:0}div.uimob800 .um-profile-nav-item a{padding:10px 20px;margin-left:0;border-radius:0}div.uimob800 .um-profile-nav-item i{display:block;position:static;top:auto;left:auto;font-size:26px;height:26px;line-height:26px}div.uimob800 .um-profile-subnav{padding:8px 15px}div.uimob800 .um-profile-subnav a{display:block;text-align:left;font-size:14px;margin:0;padding:6px 0}div.uimob800 .um-profile-subnav span{font-size:12px;padding:2px 8px}div.uimob800 .um-account-main{width:90%;max-width:450px}div.uimob800 .um-account-side{padding:0;width:10%}div.uimob800 .um-account-side ul{border:1px solid #ddd;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.uimob800 .um-account-side li{margin-bottom:0!important;background:0 0}div.uimob800 .um-account-side li a{display:block;padding:0!important;height:44px;line-height:44px;color:#666!important;text-align:center;text-decoration:none!important;background:0 0;transition:all .2s linear}div.uimob800 .um-account-side li:first-child a{-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0}div.uimob800 .um-account-side li:last-child a{-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px}div.uimob800 .um-account-side li a span.um-account-icontip{display:block;float:left;text-align:center;width:100%;height:100%;font-size:22px;line-height:44px}div.uimob800 .um-account-side li a span.um-account-icontip i{position:relative;text-align:center;width:100%}div.uimob800 .um-account-side li a.current,div.uimob800 .um-account-side li a.current:hover{color:#fff!important}div.uimob800 .um-account-meta a{border:1px solid #ddd}div.uimob800 .um-account-meta a,div.uimob800 .um-account-meta img{display:block;overflow:hidden;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;max-width:100%;height:auto}div.uimob800 .um-profile-photo{width:200px!important}div.uimob800 .um-profile-photo a.um-profile-photo-img{width:140px!important;height:140px!important;top:-70px!important}div.uimob800 .um-header.no-cover .um-profile-photo a.um-profile-photo-img{top:auto!important}div.uimob800 .um-header .um-profile-meta{padding-left:200px}div.uimob800 .um-cover-overlay{padding:0}div.uimob800 .um-search{padding:20px 0!important;width:100%!important;box-sizing:border-box}div.uimob800 .um-search .um-search-filter{width:48%!important;float:left!important;padding:0 0 15px!important}div.uimob800 .um-search .um-search-filter-2{margin-left:4%}div.uimob800 .um-search .um-search-submit .um-button{display:block!important;width:48%!important;margin:0 0 15px!important;box-sizing:border-box;float:left}div.uimob800 .um-search .um-search-submit .um-button.um-alt{float:right}div.uimob800 .um-member{width:48%}div.uimob800 .um-gutter-sizer{width:4%}div.uimob960 .um-search{padding:20px 0!important;width:100%!important;box-sizing:border-box}div.uimob960 .um-search .um-search-filter{width:48%!important;float:left!important;padding:0 0 15px!important}div.uimob960 .um-search .um-search-filter-2{margin-left:4%}div.uimob960 .um-search .um-search-submit .um-button{display:block!important;width:48%!important;margin:0 0 15px!important;box-sizing:border-box;float:left}div.uimob960 .um-search .um-search-submit .um-button.um-alt{float:right}div.uimob960 .um-member{width:48%}div.uimob960 .um-gutter-sizer{width:4%}@media screen and (max-height:400px){.ajax-upload-dragdrop span.icon{display:none}.um-modal.no-photo{width:100%!important;margin:0!important;left:0!important;height:100%;background:#fff}.um-modal.no-photo,.um-modal.no-photo .um-modal-body,.um-modal.no-photo .um-modal-header{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.um-modal.no-photo .um-modal-header{text-align:center;font-size:14px}.um-modal.no-photo .um-modal-footer{position:absolute;bottom:0;left:0;width:100%;box-sizing:border-box;padding:10px;border-top:1px solid #ddd}.um-modal.no-photo .um-modal-right{width:100%;float:none}.um-modal.no-photo .um-modal-footer a.um-modal-btn{width:48%;margin:0 1%;float:left;display:block;line-height:44px!important;height:44px}}@media screen and (max-height:300px){.ajax-upload-dragdrop span.icon,.ajax-upload-dragdrop span.str,.um-modal.no-photo .um-modal-header{display:none}}@media screen and (max-width:600px){.um-popup{width:96%;margin-left:2%;left:0;top:15px}}
|
1 |
@-webkit-keyframes um-effect-pop{50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes um-effect-pop{50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}.um-effect-pop{-webkit-animation-name:um-effect-pop;animation-name:um-effect-pop;-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:1;animation-iteration-count:1}.um-locked-content{width:100%;box-sizing:border-box;border:2px dotted #cc3000;color:#333;background:#fff;font-size:14px;padding:20px;border-radius:4px;margin-bottom:20px}.um-locked-content a{border:none!important}.um-youtube,.um-vimeo,.um-googlemap{position:relative;height:0;overflow:hidden}.um-youtube{padding-bottom:56.25%}.um-vimeo{padding-bottom:56.25%}.um-googlemap{padding-bottom:75%}.um-youtube iframe,.um-vimeo iframe,.um-googlemap iframe{position:absolute;top:0;left:0;width:100%!important;height:100%!important}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.mCustomScrollbar{-ms-touch-action:none;touch-action:none}.mCustomScrollbar.mCS_no_scrollbar{-ms-touch-action:auto;touch-action:auto}.mCustomScrollBox{position:relative;overflow:hidden;height:100%;max-width:100%;outline:none;direction:ltr}.mCSB_container{overflow:hidden;width:auto;height:auto}.mCSB_inside>.mCSB_container{margin-right:0}.mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{margin-right:0}.mCS-dir-rtl>.mCSB_inside>.mCSB_container{margin-right:0;margin-left:0}.mCS-dir-rtl>.mCSB_inside>.mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{margin-left:0}.mCSB_scrollTools{position:absolute;width:16px;height:auto;left:auto;top:0;right:0;bottom:0}.mCSB_outside+.mCSB_scrollTools{right:-26px}.mCS-dir-rtl>.mCSB_inside>.mCSB_scrollTools,.mCS-dir-rtl>.mCSB_outside+.mCSB_scrollTools{right:auto;left:0}.mCS-dir-rtl>.mCSB_outside+.mCSB_scrollTools{left:-26px}.mCSB_scrollTools .mCSB_draggerContainer{position:absolute;top:0;left:0;bottom:0;right:0;height:auto}.mCSB_scrollTools a+.mCSB_draggerContainer{margin:20px 0}.mCSB_scrollTools .mCSB_draggerRail{width:2px;height:100%;margin:0 auto;-webkit-border-radius:16px;-moz-border-radius:16px;border-radius:16px}.mCSB_scrollTools .mCSB_dragger{cursor:pointer;width:100%;height:30px;z-index:1}.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{position:relative;width:4px;height:100%;margin:0 auto;-webkit-border-radius:16px;-moz-border-radius:16px;border-radius:16px;text-align:center}.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{width:12px}.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{width:8px}.mCSB_scrollTools .mCSB_buttonUp,.mCSB_scrollTools .mCSB_buttonDown{display:block;position:absolute;height:20px;width:100%;overflow:hidden;margin:0 auto;cursor:pointer}.mCSB_scrollTools .mCSB_buttonDown{bottom:0}.mCSB_horizontal.mCSB_inside>.mCSB_container{margin-right:0;margin-bottom:30px}.mCSB_horizontal.mCSB_outside>.mCSB_container{min-height:100%}.mCSB_horizontal>.mCSB_container.mCS_no_scrollbar_x.mCS_x_hidden{margin-bottom:0}.mCSB_scrollTools.mCSB_scrollTools_horizontal{width:auto;height:16px;top:auto;right:0;bottom:0;left:0}.mCustomScrollBox+.mCSB_scrollTools.mCSB_scrollTools_horizontal,.mCustomScrollBox+.mCSB_scrollTools+.mCSB_scrollTools.mCSB_scrollTools_horizontal{bottom:-26px}.mCSB_scrollTools.mCSB_scrollTools_horizontal a+.mCSB_draggerContainer{margin:0 20px}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%;height:2px;margin:7px 0}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_dragger{width:30px;height:100%;left:0}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{width:100%;height:4px;margin:6px auto}.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{height:12px;margin:2px auto}.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{height:8px;margin:4px 0}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonLeft,.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonRight{display:block;position:absolute;width:20px;height:100%;overflow:hidden;margin:0 auto;cursor:pointer}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonLeft{left:0}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonRight{right:0}.mCSB_container_wrapper{position:absolute;height:auto;width:auto;overflow:hidden;top:0;left:0;right:0;bottom:0;margin-right:30px;margin-bottom:30px}.mCSB_container_wrapper>.mCSB_container{padding-right:30px;padding-bottom:30px}.mCSB_vertical_horizontal>.mCSB_scrollTools.mCSB_scrollTools_vertical{bottom:20px}.mCSB_vertical_horizontal>.mCSB_scrollTools.mCSB_scrollTools_horizontal{right:20px}.mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden+.mCSB_scrollTools.mCSB_scrollTools_vertical{bottom:0}.mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden+.mCSB_scrollTools ~ .mCSB_scrollTools.mCSB_scrollTools_horizontal,.mCS-dir-rtl>.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside>.mCSB_scrollTools.mCSB_scrollTools_horizontal{right:0}.mCS-dir-rtl>.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside>.mCSB_scrollTools.mCSB_scrollTools_horizontal{left:20px}.mCS-dir-rtl>.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside>.mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden+.mCSB_scrollTools ~ .mCSB_scrollTools.mCSB_scrollTools_horizontal{left:0}.mCS-dir-rtl>.mCSB_inside>.mCSB_container_wrapper{margin-right:0;margin-left:30px}.mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden>.mCSB_container{padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden>.mCSB_container{padding-bottom:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside>.mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden{margin-right:0;margin-left:0}.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside>.mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden{margin-bottom:0}.mCSB_scrollTools,.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCSB_scrollTools .mCSB_buttonUp,.mCSB_scrollTools .mCSB_buttonDown,.mCSB_scrollTools .mCSB_buttonLeft,.mCSB_scrollTools .mCSB_buttonRight{-webkit-transition:opacity .2s ease-in-out,background-color .2s ease-in-out;-moz-transition:opacity .2s ease-in-out,background-color .2s ease-in-out;-o-transition:opacity .2s ease-in-out,background-color .2s ease-in-out;transition:opacity .2s ease-in-out,background-color .2s ease-in-out}.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger_bar,.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerRail,.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger_bar,.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerRail{-webkit-transition:width .2s ease-out .2s,height .2s ease-out .2s,margin-left .2s ease-out .2s,margin-right .2s ease-out .2s,margin-top .2s ease-out .2s,margin-bottom .2s ease-out .2s,opacity .2s ease-in-out,background-color .2s ease-in-out;-moz-transition:width .2s ease-out .2s,height .2s ease-out .2s,margin-left .2s ease-out .2s,margin-right .2s ease-out .2s,margin-top .2s ease-out .2s,margin-bottom .2s ease-out .2s,opacity .2s ease-in-out,background-color .2s ease-in-out;-o-transition:width .2s ease-out .2s,height .2s ease-out .2s,margin-left .2s ease-out .2s,margin-right .2s ease-out .2s,margin-top .2s ease-out .2s,margin-bottom .2s ease-out .2s,opacity .2s ease-in-out,background-color .2s ease-in-out;transition:width .2s ease-out .2s,height .2s ease-out .2s,margin-left .2s ease-out .2s,margin-right .2s ease-out .2s,margin-top .2s ease-out .2s,margin-bottom .2s ease-out .2s,opacity .2s ease-in-out,background-color .2s ease-in-out}.mCSB_scrollTools{opacity:.75;filter:"alpha(opacity=75)";-ms-filter:"alpha(opacity=75)"}.mCS-autoHide>.mCustomScrollBox>.mCSB_scrollTools,.mCS-autoHide>.mCustomScrollBox ~ .mCSB_scrollTools{opacity:0;filter:"alpha(opacity=0)";-ms-filter:"alpha(opacity=0)"}.mCustomScrollbar>.mCustomScrollBox>.mCSB_scrollTools.mCSB_scrollTools_onDrag,.mCustomScrollbar>.mCustomScrollBox ~ .mCSB_scrollTools.mCSB_scrollTools_onDrag,.mCustomScrollBox:hover>.mCSB_scrollTools,.mCustomScrollBox:hover ~ .mCSB_scrollTools,.mCS-autoHide:hover>.mCustomScrollBox>.mCSB_scrollTools,.mCS-autoHide:hover>.mCustomScrollBox ~ .mCSB_scrollTools{opacity:1;filter:"alpha(opacity=100)";-ms-filter:"alpha(opacity=100)"}.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,0.4);filter:"alpha(opacity=40)";-ms-filter:"alpha(opacity=40)"}.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.75);filter:"alpha(opacity=75)";-ms-filter:"alpha(opacity=75)"}.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.85);filter:"alpha(opacity=85)";-ms-filter:"alpha(opacity=85)"}.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.9);filter:"alpha(opacity=90)";-ms-filter:"alpha(opacity=90)"}.mCSB_scrollTools .mCSB_buttonUp,.mCSB_scrollTools .mCSB_buttonDown,.mCSB_scrollTools .mCSB_buttonLeft,.mCSB_scrollTools .mCSB_buttonRight{background-image:url(mCSB_buttons.png);background-repeat:no-repeat;opacity:.4;filter:"alpha(opacity=40)";-ms-filter:"alpha(opacity=40)"}.mCSB_scrollTools .mCSB_buttonUp:hover,.mCSB_scrollTools .mCSB_buttonDown:hover,.mCSB_scrollTools .mCSB_buttonLeft:hover,.mCSB_scrollTools .mCSB_buttonRight:hover{opacity:.75;filter:"alpha(opacity=75)";-ms-filter:"alpha(opacity=75)"}.mCSB_scrollTools .mCSB_buttonUp:active,.mCSB_scrollTools .mCSB_buttonDown:active,.mCSB_scrollTools .mCSB_buttonLeft:active,.mCSB_scrollTools .mCSB_buttonRight:active{opacity:.9;filter:"alpha(opacity=90)";-ms-filter:"alpha(opacity=90)"}.mCS-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,0.15)}.mCS-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.75)}.mCS-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:rgba(0,0,0,0.85)}.mCS-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:rgba(0,0,0,0.9)}.mCS-light-2.mCSB_scrollTools .mCSB_draggerRail,.mCS-dark-2.mCSB_scrollTools .mCSB_draggerRail{width:4px;background-color:#fff;background-color:rgba(255,255,255,0.1);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-light-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-dark-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:4px;background-color:#fff;background-color:rgba(255,255,255,0.75);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-light-2.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-dark-2.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-light-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-dark-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{width:100%;height:4px;margin:6px auto}.mCS-light-2.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.85)}.mCS-light-2.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-light-2.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.9)}.mCS-dark-2.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,0.1);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-dark-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.75);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-dark-2.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.85)}.mCS-dark-2.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-dark-2.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.9)}.mCS-light-thick.mCSB_scrollTools .mCSB_draggerRail,.mCS-dark-thick.mCSB_scrollTools .mCSB_draggerRail{width:4px;background-color:#fff;background-color:rgba(255,255,255,0.1);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-light-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:6px;background-color:#fff;background-color:rgba(255,255,255,0.75);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-light-thick.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-dark-thick.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%;height:4px;margin:6px 0}.mCS-light-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-dark-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{width:100%;height:6px;margin:5px auto}.mCS-light-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.85)}.mCS-light-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-light-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.9)}.mCS-dark-thick.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,0.1);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.75);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.85)}.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.9)}.mCS-light-thin.mCSB_scrollTools .mCSB_draggerRail{background-color:#fff;background-color:rgba(255,255,255,0.1)}.mCS-light-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:2px}.mCS-light-thin.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-dark-thin.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%}.mCS-light-thin.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-dark-thin.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{width:100%;height:2px;margin:7px auto}.mCS-dark-thin.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,0.15)}.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.75)}.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.85)}.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.9)}.mCS-rounded.mCSB_scrollTools .mCSB_draggerRail{background-color:#fff;background-color:rgba(255,255,255,0.15)}.mCS-rounded.mCSB_scrollTools .mCSB_dragger,.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger,.mCS-rounded-dots.mCSB_scrollTools .mCSB_dragger,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger{height:14px}.mCS-rounded.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dots.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:14px;margin:0 1px}.mCS-rounded.mCSB_scrollTools_horizontal .mCSB_dragger,.mCS-rounded-dark.mCSB_scrollTools_horizontal .mCSB_dragger,.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_dragger,.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_dragger{width:14px}.mCS-rounded.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{height:14px;margin:1px 0}.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{width:16px;height:16px;margin:-1px 0}.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{width:4px}.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{height:16px;width:16px;margin:0 -1px}.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{height:4px;margin:6px 0}.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.75)}.mCS-rounded-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,0.15)}.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.85)}.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.9)}.mCS-rounded-dots.mCSB_scrollTools_vertical .mCSB_draggerRail,.mCS-rounded-dots-dark.mCSB_scrollTools_vertical .mCSB_draggerRail{width:4px}.mCS-rounded-dots.mCSB_scrollTools .mCSB_draggerRail,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{background-color:transparent;background-position:center}.mCS-rounded-dots.mCSB_scrollTools .mCSB_draggerRail,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAANElEQVQYV2NkIAAYiVbw//9/Y6DiM1ANJoyMjGdBbLgJQAX/kU0DKgDLkaQAvxW4HEvQFwCRcxIJK1XznAAAAABJRU5ErkJggg==");background-repeat:repeat-y;opacity:.3;filter:"alpha(opacity=30)";-ms-filter:"alpha(opacity=30)"}.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{height:4px;margin:6px 0;background-repeat:repeat-x}.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAALElEQVQYV2NkIAAYSVFgDFR8BqrBBEifBbGRTfiPZhpYjiQFBK3A6l6CvgAAE9kGCd1mvgEAAAAASUVORK5CYII=")}.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-repeat:repeat-y;background-image:-moz-linear-gradient(left,rgba(255,255,255,0.5) 0,rgba(255,255,255,0) 100%);background-image:-webkit-gradient(linear,left top,right top,color-stop(0%,rgba(255,255,255,0.5)),color-stop(100%,rgba(255,255,255,0)));background-image:-webkit-linear-gradient(left,rgba(255,255,255,0.5) 0,rgba(255,255,255,0) 100%);background-image:-o-linear-gradient(left,rgba(255,255,255,0.5) 0,rgba(255,255,255,0) 100%);background-image:-ms-linear-gradient(left,rgba(255,255,255,0.5) 0,rgba(255,255,255,0) 100%);background-image:linear-gradient(to right,rgba(255,255,255,0.5) 0,rgba(255,255,255,0) 100%)}.mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{background-repeat:repeat-x;background-image:-moz-linear-gradient(top,rgba(255,255,255,0.5) 0,rgba(255,255,255,0) 100%);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,rgba(255,255,255,0.5)),color-stop(100%,rgba(255,255,255,0)));background-image:-webkit-linear-gradient(top,rgba(255,255,255,0.5) 0,rgba(255,255,255,0) 100%);background-image:-o-linear-gradient(top,rgba(255,255,255,0.5) 0,rgba(255,255,255,0) 100%);background-image:-ms-linear-gradient(top,rgba(255,255,255,0.5) 0,rgba(255,255,255,0) 100%);background-image:linear-gradient(to bottom,rgba(255,255,255,0.5) 0,rgba(255,255,255,0) 100%)}.mCS-3d.mCSB_scrollTools_vertical .mCSB_dragger,.mCS-3d-dark.mCSB_scrollTools_vertical .mCSB_dragger{height:70px}.mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger,.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger{width:70px}.mCS-3d.mCSB_scrollTools,.mCS-3d-dark.mCSB_scrollTools{opacity:1;filter:"alpha(opacity=30)";-ms-filter:"alpha(opacity=30)"}.mCS-3d.mCSB_scrollTools .mCSB_draggerRail,.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{-webkit-border-radius:16px;-moz-border-radius:16px;border-radius:16px}.mCS-3d.mCSB_scrollTools .mCSB_draggerRail,.mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail{width:8px;background-color:#000;background-color:rgba(0,0,0,0.2);box-shadow:inset 1px 0 1px rgba(0,0,0,0.5),inset -1px 0 1px rgba(255,255,255,0.2)}.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#555}.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:8px}.mCS-3d.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%;height:8px;margin:4px 0;box-shadow:inset 0 1px 1px rgba(0,0,0,0.5),inset 0 -1px 1px rgba(255,255,255,0.2)}.mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{width:100%;height:8px;margin:4px auto}.mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,0.1);box-shadow:inset 1px 0 1px rgba(0,0,0,0.1)}.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{box-shadow:inset 0 1px 1px rgba(0,0,0,0.1)}.mCS-3d-thick.mCSB_scrollTools,.mCS-3d-thick-dark.mCSB_scrollTools{opacity:1;filter:"alpha(opacity=30)";-ms-filter:"alpha(opacity=30)"}.mCS-3d-thick.mCSB_scrollTools,.mCS-3d-thick-dark.mCSB_scrollTools,.mCS-3d-thick.mCSB_scrollTools .mCSB_draggerContainer,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerContainer{-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.mCSB_inside+.mCS-3d-thick.mCSB_scrollTools_vertical,.mCSB_inside+.mCS-3d-thick-dark.mCSB_scrollTools_vertical{right:1px}.mCS-3d-thick.mCSB_scrollTools_vertical,.mCS-3d-thick-dark.mCSB_scrollTools_vertical{box-shadow:inset 1px 0 1px rgba(0,0,0,0.1),inset 0 0 14px rgba(0,0,0,0.5)}.mCS-3d-thick.mCSB_scrollTools_horizontal,.mCS-3d-thick-dark.mCSB_scrollTools_horizontal{bottom:1px;box-shadow:inset 0 1px 1px rgba(0,0,0,0.1),inset 0 0 14px rgba(0,0,0,0.5)}.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{box-shadow:inset 1px 0 0 rgba(255,255,255,0.4);width:12px;margin:2px;position:absolute;height:auto;top:0;bottom:0;left:0;right:0}.mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{box-shadow:inset 0 1px 0 rgba(255,255,255,0.4)}.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#555}.mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{height:12px;width:auto}.mCS-3d-thick.mCSB_scrollTools .mCSB_draggerContainer{background-color:#000;background-color:rgba(0,0,0,0.05);box-shadow:inset 1px 1px 16px rgba(0,0,0,0.1)}.mCS-3d-thick.mCSB_scrollTools .mCSB_draggerRail{background-color:transparent}.mCS-3d-thick-dark.mCSB_scrollTools{box-shadow:inset 0 0 14px rgba(0,0,0,0.2)}.mCS-3d-thick-dark.mCSB_scrollTools_horizontal{box-shadow:inset 0 1px 1px rgba(0,0,0,0.1),inset 0 0 14px rgba(0,0,0,0.2)}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{box-shadow:inset 1px 0 0 rgba(255,255,255,0.4),inset -1px 0 0 rgba(0,0,0,0.2)}.mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{box-shadow:inset 0 1px 0 rgba(255,255,255,0.4),inset 0 -1px 0 rgba(0,0,0,0.2)}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#777}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerContainer{background-color:#fff;background-color:rgba(0,0,0,0.05);box-shadow:inset 1px 1px 16px rgba(0,0,0,0.1)}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:transparent}.mCSB_outside+.mCS-minimal.mCSB_scrollTools_vertical,.mCSB_outside+.mCS-minimal-dark.mCSB_scrollTools_vertical{right:0;margin:12px 0}.mCustomScrollBox.mCS-minimal+.mCSB_scrollTools.mCSB_scrollTools_horizontal,.mCustomScrollBox.mCS-minimal+.mCSB_scrollTools+.mCSB_scrollTools.mCSB_scrollTools_horizontal,.mCustomScrollBox.mCS-minimal-dark+.mCSB_scrollTools.mCSB_scrollTools_horizontal,.mCustomScrollBox.mCS-minimal-dark+.mCSB_scrollTools+.mCSB_scrollTools.mCSB_scrollTools_horizontal{bottom:0;margin:0 12px}.mCS-dir-rtl>.mCSB_outside+.mCS-minimal.mCSB_scrollTools_vertical,.mCS-dir-rtl>.mCSB_outside+.mCS-minimal-dark.mCSB_scrollTools_vertical{left:0;right:auto}.mCS-minimal.mCSB_scrollTools .mCSB_draggerRail,.mCS-minimal-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:transparent}.mCS-minimal.mCSB_scrollTools_vertical .mCSB_dragger,.mCS-minimal-dark.mCSB_scrollTools_vertical .mCSB_dragger{height:50px}.mCS-minimal.mCSB_scrollTools_horizontal .mCSB_dragger,.mCS-minimal-dark.mCSB_scrollTools_horizontal .mCSB_dragger{width:50px}.mCS-minimal.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.2);filter:"alpha(opacity=20)";-ms-filter:"alpha(opacity=20)"}.mCS-minimal.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-minimal.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.5);filter:"alpha(opacity=50)";-ms-filter:"alpha(opacity=50)"}.mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.2);filter:"alpha(opacity=20)";-ms-filter:"alpha(opacity=20)"}.mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.5);filter:"alpha(opacity=50)";-ms-filter:"alpha(opacity=50)"}.mCS-light-3.mCSB_scrollTools .mCSB_draggerRail,.mCS-dark-3.mCSB_scrollTools .mCSB_draggerRail{width:6px;background-color:#000;background-color:rgba(0,0,0,0.2)}.mCS-light-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-dark-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:6px}.mCS-light-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-dark-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-light-3.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-dark-3.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%;height:6px;margin:5px 0}.mCS-light-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-light-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,.mCS-dark-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-dark-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{width:12px}.mCS-light-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-light-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,.mCS-dark-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-dark-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{height:12px;margin:2px 0}.mCS-dark-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:rgba(0,0,0,0.1)}.mCS-dark-3.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:rgba(0,0,0,0.15)}.mCS-dark-3.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-dark-3.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:rgba(0,0,0,0.15)}.mCS-dark-3.mCSB_scrollTools .mCSB_draggerRail{background-color:rgba(0,0,0,0.1)}.mCS-inset.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-2.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-3.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{width:12px;background-color:#000;background-color:rgba(0,0,0,0.2)}.mCS-inset.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:6px;margin:3px 5px;position:absolute;height:auto;top:0;bottom:0;left:0;right:0}.mCS-inset.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-2-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{height:6px;margin:5px 3px;position:absolute;width:auto;top:0;bottom:0;left:0;right:0}.mCS-inset.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-inset-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-inset-2.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-inset-2-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-inset-3.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-inset-3-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%;height:12px;margin:2px 0}.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.75)}.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.85)}.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.9)}.mCS-inset-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,0.1)}.mCS-inset-2.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:transparent;border-width:1px;border-style:solid;border-color:#fff;border-color:rgba(255,255,255,0.2);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail{border-color:#000;border-color:rgba(0,0,0,0.2)}.mCS-inset-3.mCSB_scrollTools .mCSB_draggerRail{background-color:#fff;background-color:rgba(255,255,255,0.6)}.mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,0.6)}.mCS-inset-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.75)}.mCS-inset-3.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.85)}.mCS-inset-3.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-inset-3.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,0.9)}.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.75)}.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.85)}.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,0.9)}
|
2 |
+
.um-login.um-logout{max-width:300px!important}.um-misc-with-img{position:relative;font-size:15px;border-bottom:3px solid #eee;text-align:center;margin-bottom:14px;padding-top:4px;padding-bottom:14px}.um-misc-img{text-align:center}.um-misc-img img{border-radius:999px;height:auto!important;display:inline-block!important}.um-misc-ul,.um-misc-ul li{font-size:14px}.um-profile-connect.um-member-connect{padding:5px 0 10px}.um-profile-connect.um-member-connect a{text-align:center;width:36px;line-height:36px;height:36px;font-size:20px}@charset "UTF-8";@font-face{font-family:FontAwesome;src:url(../font/fontawesome-webfont.eot?v=4.2.0);src:url(../font/fontawesome-webfont.eot?v=4.2.0#iefix) format("embedded-opentype"),url(../font/fontawesome-webfont.woff?v=4.2.0) format("woff"),url(../font/fontawesome-webfont.ttf?v=4.2.0) format("truetype"),url(../font/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular) format("svg");font-weight:400;font-style:normal}[class*=" um-faicon-"]:before,[class^=um-faicon-]:before{font-family:FontAwesome!important;font-style:normal!important;font-weight:400!important;font-variant:normal!important;text-transform:none!important;speak:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.um-faicon-glass:before{content:"\f000"}.um-faicon-music:before{content:"\f001"}.um-faicon-search:before{content:"\f002"}.um-faicon-envelope-o:before{content:"\f003"}.um-faicon-heart:before{content:"\f004"}.um-faicon-star:before{content:"\f005"}.um-faicon-star-o:before{content:"\f006"}.um-faicon-user:before{content:"\f007"}.um-faicon-film:before{content:"\f008"}.um-faicon-th-large:before{content:"\f009"}.um-faicon-th:before{content:"\f00a"}.um-faicon-th-list:before{content:"\f00b"}.um-faicon-check:before{content:"\f00c"}.um-faicon-close:before,.um-faicon-remove:before,.um-faicon-times:before{content:"\f00d"}.um-faicon-search-plus:before{content:"\f00e"}.um-faicon-search-minus:before{content:"\f010"}.um-faicon-power-off:before{content:"\f011"}.um-faicon-signal:before{content:"\f012"}.um-faicon-cog:before,.um-faicon-gear:before{content:"\f013"}.um-faicon-trash-o:before{content:"\f014"}.um-faicon-home:before{content:"\f015"}.um-faicon-file-o:before{content:"\f016"}.um-faicon-clock-o:before{content:"\f017"}.um-faicon-road:before{content:"\f018"}.um-faicon-download:before{content:"\f019"}.um-faicon-arrow-circle-o-down:before{content:"\f01a"}.um-faicon-arrow-circle-o-up:before{content:"\f01b"}.um-faicon-inbox:before{content:"\f01c"}.um-faicon-play-circle-o:before{content:"\f01d"}.um-faicon-repeat:before,.um-faicon-rotate-right:before{content:"\f01e"}.um-faicon-refresh:before{content:"\f021"}.um-faicon-list-alt:before{content:"\f022"}.um-faicon-lock:before{content:"\f023"}.um-faicon-flag:before{content:"\f024"}.um-faicon-headphones:before{content:"\f025"}.um-faicon-volume-off:before{content:"\f026"}.um-faicon-volume-down:before{content:"\f027"}.um-faicon-volume-up:before{content:"\f028"}.um-faicon-qrcode:before{content:"\f029"}.um-faicon-barcode:before{content:"\f02a"}.um-faicon-tag:before{content:"\f02b"}.um-faicon-tags:before{content:"\f02c"}.um-faicon-book:before{content:"\f02d"}.um-faicon-bookmark:before{content:"\f02e"}.um-faicon-print:before{content:"\f02f"}.um-faicon-camera:before{content:"\f030"}.um-faicon-font:before{content:"\f031"}.um-faicon-bold:before{content:"\f032"}.um-faicon-italic:before{content:"\f033"}.um-faicon-text-height:before{content:"\f034"}.um-faicon-text-width:before{content:"\f035"}.um-faicon-align-left:before{content:"\f036"}.um-faicon-align-center:before{content:"\f037"}.um-faicon-align-right:before{content:"\f038"}.um-faicon-align-justify:before{content:"\f039"}.um-faicon-list:before{content:"\f03a"}.um-faicon-dedent:before,.um-faicon-outdent:before{content:"\f03b"}.um-faicon-indent:before{content:"\f03c"}.um-faicon-video-camera:before{content:"\f03d"}.um-faicon-image:before,.um-faicon-photo:before,.um-faicon-picture-o:before{content:"\f03e"}.um-faicon-pencil:before{content:"\f040"}.um-faicon-map-marker:before{content:"\f041"}.um-faicon-adjust:before{content:"\f042"}.um-faicon-tint:before{content:"\f043"}.um-faicon-edit:before,.um-faicon-pencil-square-o:before{content:"\f044"}.um-faicon-share-square-o:before{content:"\f045"}.um-faicon-check-square-o:before{content:"\f046"}.um-faicon-arrows:before{content:"\f047"}.um-faicon-step-backward:before{content:"\f048"}.um-faicon-fast-backward:before{content:"\f049"}.um-faicon-backward:before{content:"\f04a"}.um-faicon-play:before{content:"\f04b"}.um-faicon-pause:before{content:"\f04c"}.um-faicon-stop:before{content:"\f04d"}.um-faicon-forward:before{content:"\f04e"}.um-faicon-fast-forward:before{content:"\f050"}.um-faicon-step-forward:before{content:"\f051"}.um-faicon-eject:before{content:"\f052"}.um-faicon-chevron-left:before{content:"\f053"}.um-faicon-chevron-right:before{content:"\f054"}.um-faicon-plus-circle:before{content:"\f055"}.um-faicon-minus-circle:before{content:"\f056"}.um-faicon-times-circle:before{content:"\f057"}.um-faicon-check-circle:before{content:"\f058"}.um-faicon-question-circle:before{content:"\f059"}.um-faicon-info-circle:before{content:"\f05a"}.um-faicon-crosshairs:before{content:"\f05b"}.um-faicon-times-circle-o:before{content:"\f05c"}.um-faicon-check-circle-o:before{content:"\f05d"}.um-faicon-ban:before{content:"\f05e"}.um-faicon-arrow-left:before{content:"\f060"}.um-faicon-arrow-right:before{content:"\f061"}.um-faicon-arrow-up:before{content:"\f062"}.um-faicon-arrow-down:before{content:"\f063"}.um-faicon-mail-forward:before,.um-faicon-share:before{content:"\f064"}.um-faicon-expand:before{content:"\f065"}.um-faicon-compress:before{content:"\f066"}.um-faicon-plus:before{content:"\f067"}.um-faicon-minus:before{content:"\f068"}.um-faicon-asterisk:before{content:"\f069"}.um-faicon-exclamation-circle:before{content:"\f06a"}.um-faicon-gift:before{content:"\f06b"}.um-faicon-leaf:before{content:"\f06c"}.um-faicon-fire:before{content:"\f06d"}.um-faicon-eye:before{content:"\f06e"}.um-faicon-eye-slash:before{content:"\f070"}.um-faicon-exclamation-triangle:before,.um-faicon-warning:before{content:"\f071"}.um-faicon-plane:before{content:"\f072"}.um-faicon-calendar:before{content:"\f073"}.um-faicon-random:before{content:"\f074"}.um-faicon-comment:before{content:"\f075"}.um-faicon-magnet:before{content:"\f076"}.um-faicon-chevron-up:before{content:"\f077"}.um-faicon-chevron-down:before{content:"\f078"}.um-faicon-retweet:before{content:"\f079"}.um-faicon-shopping-cart:before{content:"\f07a"}.um-faicon-folder:before{content:"\f07b"}.um-faicon-folder-open:before{content:"\f07c"}.um-faicon-arrows-v:before{content:"\f07d"}.um-faicon-arrows-h:before{content:"\f07e"}.um-faicon-bar-chart-o:before,.um-faicon-bar-chart:before{content:"\f080"}.um-faicon-twitter-square:before{content:"\f081"}.um-faicon-facebook-square:before{content:"\f082"}.um-faicon-camera-retro:before{content:"\f083"}.um-faicon-key:before{content:"\f084"}.um-faicon-cogs:before,.um-faicon-gears:before{content:"\f085"}.um-faicon-comments:before{content:"\f086"}.um-faicon-thumbs-o-up:before{content:"\f087"}.um-faicon-thumbs-o-down:before{content:"\f088"}.um-faicon-star-half:before{content:"\f089"}.um-faicon-heart-o:before{content:"\f08a"}.um-faicon-sign-out:before{content:"\f08b"}.um-faicon-linkedin-square:before{content:"\f08c"}.um-faicon-thumb-tack:before{content:"\f08d"}.um-faicon-external-link:before{content:"\f08e"}.um-faicon-sign-in:before{content:"\f090"}.um-faicon-trophy:before{content:"\f091"}.um-faicon-github-square:before{content:"\f092"}.um-faicon-upload:before{content:"\f093"}.um-faicon-lemon-o:before{content:"\f094"}.um-faicon-phone:before{content:"\f095"}.um-faicon-square-o:before{content:"\f096"}.um-faicon-bookmark-o:before{content:"\f097"}.um-faicon-phone-square:before{content:"\f098"}.um-faicon-twitter:before{content:"\f099"}.um-faicon-facebook:before{content:"\f09a"}.um-faicon-github:before{content:"\f09b"}.um-faicon-unlock:before{content:"\f09c"}.um-faicon-credit-card:before{content:"\f09d"}.um-faicon-rss:before{content:"\f09e"}.um-faicon-hdd-o:before{content:"\f0a0"}.um-faicon-bullhorn:before{content:"\f0a1"}.um-faicon-bell:before{content:"\f0f3"}.um-faicon-certificate:before{content:"\f0a3"}.um-faicon-hand-o-right:before{content:"\f0a4"}.um-faicon-hand-o-left:before{content:"\f0a5"}.um-faicon-hand-o-up:before{content:"\f0a6"}.um-faicon-hand-o-down:before{content:"\f0a7"}.um-faicon-arrow-circle-left:before{content:"\f0a8"}.um-faicon-arrow-circle-right:before{content:"\f0a9"}.um-faicon-arrow-circle-up:before{content:"\f0aa"}.um-faicon-arrow-circle-down:before{content:"\f0ab"}.um-faicon-globe:before{content:"\f0ac"}.um-faicon-wrench:before{content:"\f0ad"}.um-faicon-tasks:before{content:"\f0ae"}.um-faicon-filter:before{content:"\f0b0"}.um-faicon-briefcase:before{content:"\f0b1"}.um-faicon-arrows-alt:before{content:"\f0b2"}.um-faicon-group:before,.um-faicon-users:before{content:"\f0c0"}.um-faicon-chain:before,.um-faicon-link:before{content:"\f0c1"}.um-faicon-cloud:before{content:"\f0c2"}.um-faicon-flask:before{content:"\f0c3"}.um-faicon-cut:before,.um-faicon-scissors:before{content:"\f0c4"}.um-faicon-copy:before,.um-faicon-files-o:before{content:"\f0c5"}.um-faicon-paperclip:before{content:"\f0c6"}.um-faicon-floppy-o:before,.um-faicon-save:before{content:"\f0c7"}.um-faicon-square:before{content:"\f0c8"}.um-faicon-bars:before,.um-faicon-navicon:before,.um-faicon-reorder:before{content:"\f0c9"}.um-faicon-list-ul:before{content:"\f0ca"}.um-faicon-list-ol:before{content:"\f0cb"}.um-faicon-strikethrough:before{content:"\f0cc"}.um-faicon-underline:before{content:"\f0cd"}.um-faicon-table:before{content:"\f0ce"}.um-faicon-magic:before{content:"\f0d0"}.um-faicon-truck:before{content:"\f0d1"}.um-faicon-pinterest:before{content:"\f0d2"}.um-faicon-pinterest-square:before{content:"\f0d3"}.um-faicon-google-plus-square:before{content:"\f0d4"}.um-faicon-google-plus:before{content:"\f0d5"}.um-faicon-money:before{content:"\f0d6"}.um-faicon-caret-down:before{content:"\f0d7"}.um-faicon-caret-up:before{content:"\f0d8"}.um-faicon-caret-left:before{content:"\f0d9"}.um-faicon-caret-right:before{content:"\f0da"}.um-faicon-columns:before{content:"\f0db"}.um-faicon-sort:before,.um-faicon-unsorted:before{content:"\f0dc"}.um-faicon-sort-desc:before,.um-faicon-sort-down:before{content:"\f0dd"}.um-faicon-sort-asc:before,.um-faicon-sort-up:before{content:"\f0de"}.um-faicon-envelope:before{content:"\f0e0"}.um-faicon-linkedin:before{content:"\f0e1"}.um-faicon-rotate-left:before,.um-faicon-undo:before{content:"\f0e2"}.um-faicon-gavel:before,.um-faicon-legal:before{content:"\f0e3"}.um-faicon-dashboard:before,.um-faicon-tachometer:before{content:"\f0e4"}.um-faicon-comment-o:before{content:"\f0e5"}.um-faicon-comments-o:before{content:"\f0e6"}.um-faicon-bolt:before,.um-faicon-flash:before{content:"\f0e7"}.um-faicon-sitemap:before{content:"\f0e8"}.um-faicon-umbrella:before{content:"\f0e9"}.um-faicon-clipboard:before,.um-faicon-paste:before{content:"\f0ea"}.um-faicon-lightbulb-o:before{content:"\f0eb"}.um-faicon-exchange:before{content:"\f0ec"}.um-faicon-cloud-download:before{content:"\f0ed"}.um-faicon-cloud-upload:before{content:"\f0ee"}.um-faicon-user-md:before{content:"\f0f0"}.um-faicon-stethoscope:before{content:"\f0f1"}.um-faicon-suitcase:before{content:"\f0f2"}.um-faicon-bell-o:before{content:"\f0a2"}.um-faicon-coffee:before{content:"\f0f4"}.um-faicon-cutlery:before{content:"\f0f5"}.um-faicon-file-text-o:before{content:"\f0f6"}.um-faicon-building-o:before{content:"\f0f7"}.um-faicon-hospital-o:before{content:"\f0f8"}.um-faicon-ambulance:before{content:"\f0f9"}.um-faicon-medkit:before{content:"\f0fa"}.um-faicon-fighter-jet:before{content:"\f0fb"}.um-faicon-beer:before{content:"\f0fc"}.um-faicon-h-square:before{content:"\f0fd"}.um-faicon-plus-square:before{content:"\f0fe"}.um-faicon-angle-double-left:before{content:"\f100"}.um-faicon-angle-double-right:before{content:"\f101"}.um-faicon-angle-double-up:before{content:"\f102"}.um-faicon-angle-double-down:before{content:"\f103"}.um-faicon-angle-left:before{content:"\f104"}.um-faicon-angle-right:before{content:"\f105"}.um-faicon-angle-up:before{content:"\f106"}.um-faicon-angle-down:before{content:"\f107"}.um-faicon-desktop:before{content:"\f108"}.um-faicon-laptop:before{content:"\f109"}.um-faicon-tablet:before{content:"\f10a"}.um-faicon-mobile-phone:before,.um-faicon-mobile:before{content:"\f10b"}.um-faicon-circle-o:before{content:"\f10c"}.um-faicon-quote-left:before{content:"\f10d"}.um-faicon-quote-right:before{content:"\f10e"}.um-faicon-spinner:before{content:"\f110"}.um-faicon-circle:before{content:"\f111"}.um-faicon-mail-reply:before,.um-faicon-reply:before{content:"\f112"}.um-faicon-github-alt:before{content:"\f113"}.um-faicon-folder-o:before{content:"\f114"}.um-faicon-folder-open-o:before{content:"\f115"}.um-faicon-smile-o:before{content:"\f118"}.um-faicon-frown-o:before{content:"\f119"}.um-faicon-meh-o:before{content:"\f11a"}.um-faicon-gamepad:before{content:"\f11b"}.um-faicon-keyboard-o:before{content:"\f11c"}.um-faicon-flag-o:before{content:"\f11d"}.um-faicon-flag-checkered:before{content:"\f11e"}.um-faicon-terminal:before{content:"\f120"}.um-faicon-code:before{content:"\f121"}.um-faicon-mail-reply-all:before,.um-faicon-reply-all:before{content:"\f122"}.um-faicon-star-half-empty:before,.um-faicon-star-half-full:before,.um-faicon-star-half-o:before{content:"\f123"}.um-faicon-location-arrow:before{content:"\f124"}.um-faicon-crop:before{content:"\f125"}.um-faicon-code-fork:before{content:"\f126"}.um-faicon-chain-broken:before,.um-faicon-unlink:before{content:"\f127"}.um-faicon-question:before{content:"\f128"}.um-faicon-info:before{content:"\f129"}.um-faicon-exclamation:before{content:"\f12a"}.um-faicon-superscript:before{content:"\f12b"}.um-faicon-subscript:before{content:"\f12c"}.um-faicon-eraser:before{content:"\f12d"}.um-faicon-puzzle-piece:before{content:"\f12e"}.um-faicon-microphone:before{content:"\f130"}.um-faicon-microphone-slash:before{content:"\f131"}.um-faicon-shield:before{content:"\f132"}.um-faicon-calendar-o:before{content:"\f133"}.um-faicon-fire-extinguisher:before{content:"\f134"}.um-faicon-rocket:before{content:"\f135"}.um-faicon-maxcdn:before{content:"\f136"}.um-faicon-chevron-circle-left:before{content:"\f137"}.um-faicon-chevron-circle-right:before{content:"\f138"}.um-faicon-chevron-circle-up:before{content:"\f139"}.um-faicon-chevron-circle-down:before{content:"\f13a"}.um-faicon-html5:before{content:"\f13b"}.um-faicon-css3:before{content:"\f13c"}.um-faicon-anchor:before{content:"\f13d"}.um-faicon-unlock-alt:before{content:"\f13e"}.um-faicon-bullseye:before{content:"\f140"}.um-faicon-ellipsis-h:before{content:"\f141"}.um-faicon-ellipsis-v:before{content:"\f142"}.um-faicon-rss-square:before{content:"\f143"}.um-faicon-play-circle:before{content:"\f144"}.um-faicon-ticket:before{content:"\f145"}.um-faicon-minus-square:before{content:"\f146"}.um-faicon-minus-square-o:before{content:"\f147"}.um-faicon-level-up:before{content:"\f148"}.um-faicon-level-down:before{content:"\f149"}.um-faicon-check-square:before{content:"\f14a"}.um-faicon-pencil-square:before{content:"\f14b"}.um-faicon-external-link-square:before{content:"\f14c"}.um-faicon-share-square:before{content:"\f14d"}.um-faicon-compass:before{content:"\f14e"}.um-faicon-caret-square-o-down:before,.um-faicon-toggle-down:before{content:"\f150"}.um-faicon-caret-square-o-up:before,.um-faicon-toggle-up:before{content:"\f151"}.um-faicon-caret-square-o-right:before,.um-faicon-toggle-right:before{content:"\f152"}.um-faicon-eur:before,.um-faicon-euro:before{content:"\f153"}.um-faicon-gbp:before{content:"\f154"}.um-faicon-dollar:before,.um-faicon-usd:before{content:"\f155"}.um-faicon-inr:before,.um-faicon-rupee:before{content:"\f156"}.um-faicon-cny:before,.um-faicon-jpy:before,.um-faicon-rmb:before,.um-faicon-yen:before{content:"\f157"}.um-faicon-rouble:before,.um-faicon-rub:before,.um-faicon-ruble:before{content:"\f158"}.um-faicon-krw:before,.um-faicon-won:before{content:"\f159"}.um-faicon-bitcoin:before,.um-faicon-btc:before{content:"\f15a"}.um-faicon-file:before{content:"\f15b"}.um-faicon-file-text:before{content:"\f15c"}.um-faicon-sort-alpha-asc:before{content:"\f15d"}.um-faicon-sort-alpha-desc:before{content:"\f15e"}.um-faicon-sort-amount-asc:before{content:"\f160"}.um-faicon-sort-amount-desc:before{content:"\f161"}.um-faicon-sort-numeric-asc:before{content:"\f162"}.um-faicon-sort-numeric-desc:before{content:"\f163"}.um-faicon-thumbs-up:before{content:"\f164"}.um-faicon-thumbs-down:before{content:"\f165"}.um-faicon-youtube-square:before{content:"\f166"}.um-faicon-youtube:before{content:"\f167"}.um-faicon-xing:before{content:"\f168"}.um-faicon-xing-square:before{content:"\f169"}.um-faicon-youtube-play:before{content:"\f16a"}.um-faicon-dropbox:before{content:"\f16b"}.um-faicon-stack-overflow:before{content:"\f16c"}.um-faicon-instagram:before{content:"\f16d"}.um-faicon-flickr:before{content:"\f16e"}.um-faicon-adn:before{content:"\f170"}.um-faicon-bitbucket:before{content:"\f171"}.um-faicon-bitbucket-square:before{content:"\f172"}.um-faicon-tumblr:before{content:"\f173"}.um-faicon-tumblr-square:before{content:"\f174"}.um-faicon-long-arrow-down:before{content:"\f175"}.um-faicon-long-arrow-up:before{content:"\f176"}.um-faicon-long-arrow-left:before{content:"\f177"}.um-faicon-long-arrow-right:before{content:"\f178"}.um-faicon-apple:before{content:"\f179"}.um-faicon-windows:before{content:"\f17a"}.um-faicon-android:before{content:"\f17b"}.um-faicon-linux:before{content:"\f17c"}.um-faicon-dribbble:before{content:"\f17d"}.um-faicon-skype:before{content:"\f17e"}.um-faicon-foursquare:before{content:"\f180"}.um-faicon-trello:before{content:"\f181"}.um-faicon-female:before{content:"\f182"}.um-faicon-male:before{content:"\f183"}.um-faicon-gittip:before{content:"\f184"}.um-faicon-sun-o:before{content:"\f185"}.um-faicon-moon-o:before{content:"\f186"}.um-faicon-archive:before{content:"\f187"}.um-faicon-bug:before{content:"\f188"}.um-faicon-vk:before{content:"\f189"}.um-faicon-weibo:before{content:"\f18a"}.um-faicon-renren:before{content:"\f18b"}.um-faicon-pagelines:before{content:"\f18c"}.um-faicon-stack-exchange:before{content:"\f18d"}.um-faicon-arrow-circle-o-right:before{content:"\f18e"}.um-faicon-arrow-circle-o-left:before{content:"\f190"}.um-faicon-caret-square-o-left:before,.um-faicon-toggle-left:before{content:"\f191"}.um-faicon-dot-circle-o:before{content:"\f192"}.um-faicon-wheelchair:before{content:"\f193"}.um-faicon-vimeo-square:before{content:"\f194"}.um-faicon-try:before,.um-faicon-turkish-lira:before{content:"\f195"}.um-faicon-plus-square-o:before{content:"\f196"}.um-faicon-space-shuttle:before{content:"\f197"}.um-faicon-slack:before{content:"\f198"}.um-faicon-envelope-square:before{content:"\f199"}.um-faicon-wordpress:before{content:"\f19a"}.um-faicon-openid:before{content:"\f19b"}.um-faicon-bank:before,.um-faicon-institution:before,.um-faicon-university:before{content:"\f19c"}.um-faicon-graduation-cap:before,.um-faicon-mortar-board:before{content:"\f19d"}.um-faicon-yahoo:before{content:"\f19e"}.um-faicon-google:before{content:"\f1a0"}.um-faicon-reddit:before{content:"\f1a1"}.um-faicon-reddit-square:before{content:"\f1a2"}.um-faicon-stumbleupon-circle:before{content:"\f1a3"}.um-faicon-stumbleupon:before{content:"\f1a4"}.um-faicon-delicious:before{content:"\f1a5"}.um-faicon-digg:before{content:"\f1a6"}.um-faicon-pied-piper:before{content:"\f1a7"}.um-faicon-pied-piper-alt:before{content:"\f1a8"}.um-faicon-drupal:before{content:"\f1a9"}.um-faicon-joomla:before{content:"\f1aa"}.um-faicon-language:before{content:"\f1ab"}.um-faicon-fax:before{content:"\f1ac"}.um-faicon-building:before{content:"\f1ad"}.um-faicon-child:before{content:"\f1ae"}.um-faicon-paw:before{content:"\f1b0"}.um-faicon-spoon:before{content:"\f1b1"}.um-faicon-cube:before{content:"\f1b2"}.um-faicon-cubes:before{content:"\f1b3"}.um-faicon-behance:before{content:"\f1b4"}.um-faicon-behance-square:before{content:"\f1b5"}.um-faicon-steam:before{content:"\f1b6"}.um-faicon-steam-square:before{content:"\f1b7"}.um-faicon-recycle:before{content:"\f1b8"}.um-faicon-automobile:before,.um-faicon-car:before{content:"\f1b9"}.um-faicon-cab:before,.um-faicon-taxi:before{content:"\f1ba"}.um-faicon-tree:before{content:"\f1bb"}.um-faicon-spotify:before{content:"\f1bc"}.um-faicon-deviantart:before{content:"\f1bd"}.um-faicon-soundcloud:before{content:"\f1be"}.um-faicon-database:before{content:"\f1c0"}.um-faicon-file-pdf-o:before{content:"\f1c1"}.um-faicon-file-word-o:before{content:"\f1c2"}.um-faicon-file-excel-o:before{content:"\f1c3"}.um-faicon-file-powerpoint-o:before{content:"\f1c4"}.um-faicon-file-image-o:before,.um-faicon-file-photo-o:before,.um-faicon-file-picture-o:before{content:"\f1c5"}.um-faicon-file-archive-o:before,.um-faicon-file-zip-o:before{content:"\f1c6"}.um-faicon-file-audio-o:before,.um-faicon-file-sound-o:before{content:"\f1c7"}.um-faicon-file-movie-o:before,.um-faicon-file-video-o:before{content:"\f1c8"}.um-faicon-file-code-o:before{content:"\f1c9"}.um-faicon-vine:before{content:"\f1ca"}.um-faicon-codepen:before{content:"\f1cb"}.um-faicon-jsfiddle:before{content:"\f1cc"}.um-faicon-life-bouy:before,.um-faicon-life-buoy:before,.um-faicon-life-ring:before,.um-faicon-life-saver:before,.um-faicon-support:before{content:"\f1cd"}.um-faicon-circle-o-notch:before{content:"\f1ce"}.um-faicon-ra:before,.um-faicon-rebel:before{content:"\f1d0"}.um-faicon-empire:before,.um-faicon-ge:before{content:"\f1d1"}.um-faicon-git-square:before{content:"\f1d2"}.um-faicon-git:before{content:"\f1d3"}.um-faicon-hacker-news:before{content:"\f1d4"}.um-faicon-tencent-weibo:before{content:"\f1d5"}.um-faicon-qq:before{content:"\f1d6"}.um-faicon-wechat:before,.um-faicon-weixin:before{content:"\f1d7"}.um-faicon-paper-plane:before,.um-faicon-send:before{content:"\f1d8"}.um-faicon-paper-plane-o:before,.um-faicon-send-o:before{content:"\f1d9"}.um-faicon-history:before{content:"\f1da"}.um-faicon-circle-thin:before{content:"\f1db"}.um-faicon-header:before{content:"\f1dc"}.um-faicon-paragraph:before{content:"\f1dd"}.um-faicon-sliders:before{content:"\f1de"}.um-faicon-share-alt:before{content:"\f1e0"}.um-faicon-share-alt-square:before{content:"\f1e1"}.um-faicon-bomb:before{content:"\f1e2"}.um-faicon-futbol-o:before,.um-faicon-soccer-ball-o:before{content:"\f1e3"}.um-faicon-tty:before{content:"\f1e4"}.um-faicon-binoculars:before{content:"\f1e5"}.um-faicon-plug:before{content:"\f1e6"}.um-faicon-slideshare:before{content:"\f1e7"}.um-faicon-twitch:before{content:"\f1e8"}.um-faicon-yelp:before{content:"\f1e9"}.um-faicon-newspaper-o:before{content:"\f1ea"}.um-faicon-wifi:before{content:"\f1eb"}.um-faicon-calculator:before{content:"\f1ec"}.um-faicon-paypal:before{content:"\f1ed"}.um-faicon-google-wallet:before{content:"\f1ee"}.um-faicon-cc-visa:before{content:"\f1f0"}.um-faicon-cc-mastercard:before{content:"\f1f1"}.um-faicon-cc-discover:before{content:"\f1f2"}.um-faicon-cc-amex:before{content:"\f1f3"}.um-faicon-cc-paypal:before{content:"\f1f4"}.um-faicon-cc-stripe:before{content:"\f1f5"}.um-faicon-bell-slash:before{content:"\f1f6"}.um-faicon-bell-slash-o:before{content:"\f1f7"}.um-faicon-trash:before{content:"\f1f8"}.um-faicon-copyright:before{content:"\f1f9"}.um-faicon-at:before{content:"\f1fa"}.um-faicon-eyedropper:before{content:"\f1fb"}.um-faicon-paint-brush:before{content:"\f1fc"}.um-faicon-birthday-cake:before{content:"\f1fd"}.um-faicon-area-chart:before{content:"\f1fe"}.um-faicon-pie-chart:before{content:"\f200"}.um-faicon-line-chart:before{content:"\f201"}.um-faicon-lastfm:before{content:"\f202"}.um-faicon-lastfm-square:before{content:"\f203"}.um-faicon-toggle-off:before{content:"\f204"}.um-faicon-toggle-on:before{content:"\f205"}.um-faicon-bicycle:before{content:"\f206"}.um-faicon-bus:before{content:"\f207"}.um-faicon-ioxhost:before{content:"\f208"}.um-faicon-angellist:before{content:"\f209"}.um-faicon-cc:before{content:"\f20a"}.um-faicon-ils:before,.um-faicon-shekel:before,.um-faicon-sheqel:before{content:"\f20b"}.um-faicon-meanpath:before{content:"\f20c"}@font-face{font-family:Ionicons;src:url(../font/ionicons.eot?v=2.0.0);src:url(../font/ionicons.eot?v=2.0.0#iefix) format("embedded-opentype"),url(../font/ionicons.woff?v=2.0.0) format("woff"),url(../font/ionicons.ttf?v=2.0.0) format("truetype"),url(../font/ionicons.svg?v=2.0.0#Ionicons) format("svg");font-weight:400;font-style:normal}[class*=" um-icon-"]:before,[class^=um-icon-]:before{font-family:Ionicons!important;font-style:normal!important;font-weight:400!important;font-variant:normal!important;text-transform:none!important;speak:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.um-icon-alert:before{content:"\f101"}.um-icon-alert-circled:before{content:"\f100"}.um-icon-android-add:before{content:"\f2c7"}.um-icon-android-add-circle:before{content:"\f359"}.um-icon-android-alarm-clock:before{content:"\f35a"}.um-icon-android-alert:before{content:"\f35b"}.um-icon-android-apps:before{content:"\f35c"}.um-icon-android-archive:before{content:"\f2c9"}.um-icon-android-arrow-back:before{content:"\f2ca"}.um-icon-android-arrow-down:before{content:"\f35d"}.um-icon-android-arrow-dropdown:before{content:"\f35f"}.um-icon-android-arrow-dropdown-circle:before{content:"\f35e"}.um-icon-android-arrow-dropleft:before{content:"\f361"}.um-icon-android-arrow-dropleft-circle:before{content:"\f360"}.um-icon-android-arrow-dropright:before{content:"\f363"}.um-icon-android-arrow-dropright-circle:before{content:"\f362"}.um-icon-android-arrow-dropup:before{content:"\f365"}.um-icon-android-arrow-dropup-circle:before{content:"\f364"}.um-icon-android-arrow-forward:before{content:"\f30f"}.um-icon-android-arrow-up:before{content:"\f366"}.um-icon-android-attach:before{content:"\f367"}.um-icon-android-bar:before{content:"\f368"}.um-icon-android-bicycle:before{content:"\f369"}.um-icon-android-boat:before{content:"\f36a"}.um-icon-android-bookmark:before{content:"\f36b"}.um-icon-android-bulb:before{content:"\f36c"}.um-icon-android-bus:before{content:"\f36d"}.um-icon-android-calendar:before{content:"\f2d1"}.um-icon-android-call:before{content:"\f2d2"}.um-icon-android-camera:before{content:"\f2d3"}.um-icon-android-cancel:before{content:"\f36e"}.um-icon-android-car:before{content:"\f36f"}.um-icon-android-cart:before{content:"\f370"}.um-icon-android-chat:before{content:"\f2d4"}.um-icon-android-checkbox:before{content:"\f374"}.um-icon-android-checkbox-blank:before{content:"\f371"}.um-icon-android-checkbox-outline:before{content:"\f373"}.um-icon-android-checkbox-outline-blank:before{content:"\f372"}.um-icon-android-checkmark-circle:before{content:"\f375"}.um-icon-android-clipboard:before{content:"\f376"}.um-icon-android-close:before{content:"\f2d7"}.um-icon-android-cloud:before{content:"\f37a"}.um-icon-android-cloud-circle:before{content:"\f377"}.um-icon-android-cloud-done:before{content:"\f378"}.um-icon-android-cloud-outline:before{content:"\f379"}.um-icon-android-color-palette:before{content:"\f37b"}.um-icon-android-compass:before{content:"\f37c"}.um-icon-android-contact:before{content:"\f2d8"}.um-icon-android-contacts:before{content:"\f2d9"}.um-icon-android-contract:before{content:"\f37d"}.um-icon-android-create:before{content:"\f37e"}.um-icon-android-delete:before{content:"\f37f"}.um-icon-android-desktop:before{content:"\f380"}.um-icon-android-document:before{content:"\f381"}.um-icon-android-done:before{content:"\f383"}.um-icon-android-done-all:before{content:"\f382"}.um-icon-android-download:before{content:"\f2dd"}.um-icon-android-drafts:before{content:"\f384"}.um-icon-android-exit:before{content:"\f385"}.um-icon-android-expand:before{content:"\f386"}.um-icon-android-favorite:before{content:"\f388"}.um-icon-android-favorite-outline:before{content:"\f387"}.um-icon-android-film:before{content:"\f389"}.um-icon-android-folder:before{content:"\f2e0"}.um-icon-android-folder-open:before{content:"\f38a"}.um-icon-android-funnel:before{content:"\f38b"}.um-icon-android-globe:before{content:"\f38c"}.um-icon-android-hand:before{content:"\f2e3"}.um-icon-android-hangout:before{content:"\f38d"}.um-icon-android-happy:before{content:"\f38e"}.um-icon-android-home:before{content:"\f38f"}.um-icon-android-image:before{content:"\f2e4"}.um-icon-android-laptop:before{content:"\f390"}.um-icon-android-list:before{content:"\f391"}.um-icon-android-locate:before{content:"\f2e9"}.um-icon-android-lock:before{content:"\f392"}.um-icon-android-mail:before{content:"\f2eb"}.um-icon-android-map:before{content:"\f393"}.um-icon-android-menu:before{content:"\f394"}.um-icon-android-microphone:before{content:"\f2ec"}.um-icon-android-microphone-off:before{content:"\f395"}.um-icon-android-more-horizontal:before{content:"\f396"}.um-icon-android-more-vertical:before{content:"\f397"}.um-icon-android-navigate:before{content:"\f398"}.um-icon-android-notifications:before{content:"\f39b"}.um-icon-android-notifications-none:before{content:"\f399"}.um-icon-android-notifications-off:before{content:"\f39a"}.um-icon-android-open:before{content:"\f39c"}.um-icon-android-options:before{content:"\f39d"}.um-icon-android-people:before{content:"\f39e"}.um-icon-android-person:before{content:"\f3a0"}.um-icon-android-person-add:before{content:"\f39f"}.um-icon-android-phone-landscape:before{content:"\f3a1"}.um-icon-android-phone-portrait:before{content:"\f3a2"}.um-icon-android-pin:before{content:"\f3a3"}.um-icon-android-plane:before{content:"\f3a4"}.um-icon-android-playstore:before{content:"\f2f0"}.um-icon-android-print:before{content:"\f3a5"}.um-icon-android-radio-button-off:before{content:"\f3a6"}.um-icon-android-radio-button-on:before{content:"\f3a7"}.um-icon-android-refresh:before{content:"\f3a8"}.um-icon-android-remove:before{content:"\f2f4"}.um-icon-android-remove-circle:before{content:"\f3a9"}.um-icon-android-restaurant:before{content:"\f3aa"}.um-icon-android-sad:before{content:"\f3ab"}.um-icon-android-search:before{content:"\f2f5"}.um-icon-android-send:before{content:"\f2f6"}.um-icon-android-settings:before{content:"\f2f7"}.um-icon-android-share:before{content:"\f2f8"}.um-icon-android-share-alt:before{content:"\f3ac"}.um-icon-android-star:before{content:"\f2fc"}.um-icon-android-star-half:before{content:"\f3ad"}.um-icon-android-star-outline:before{content:"\f3ae"}.um-icon-android-stopwatch:before{content:"\f2fd"}.um-icon-android-subway:before{content:"\f3af"}.um-icon-android-sunny:before{content:"\f3b0"}.um-icon-android-sync:before{content:"\f3b1"}.um-icon-android-textsms:before{content:"\f3b2"}.um-icon-android-time:before{content:"\f3b3"}.um-icon-android-train:before{content:"\f3b4"}.um-icon-android-unlock:before{content:"\f3b5"}.um-icon-android-upload:before{content:"\f3b6"}.um-icon-android-volume-down:before{content:"\f3b7"}.um-icon-android-volume-mute:before{content:"\f3b8"}.um-icon-android-volume-off:before{content:"\f3b9"}.um-icon-android-volume-up:before{content:"\f3ba"}.um-icon-android-walk:before{content:"\f3bb"}.um-icon-android-warning:before{content:"\f3bc"}.um-icon-android-watch:before{content:"\f3bd"}.um-icon-android-wifi:before{content:"\f305"}.um-icon-aperture:before{content:"\f313"}.um-icon-archive:before{content:"\f102"}.um-icon-arrow-down-a:before{content:"\f103"}.um-icon-arrow-down-b:before{content:"\f104"}.um-icon-arrow-down-c:before{content:"\f105"}.um-icon-arrow-expand:before{content:"\f25e"}.um-icon-arrow-graph-down-left:before{content:"\f25f"}.um-icon-arrow-graph-down-right:before{content:"\f260"}.um-icon-arrow-graph-up-left:before{content:"\f261"}.um-icon-arrow-graph-up-right:before{content:"\f262"}.um-icon-arrow-left-a:before{content:"\f106"}.um-icon-arrow-left-b:before{content:"\f107"}.um-icon-arrow-left-c:before{content:"\f108"}.um-icon-arrow-move:before{content:"\f263"}.um-icon-arrow-resize:before{content:"\f264"}.um-icon-arrow-return-left:before{content:"\f265"}.um-icon-arrow-return-right:before{content:"\f266"}.um-icon-arrow-right-a:before{content:"\f109"}.um-icon-arrow-right-b:before{content:"\f10a"}.um-icon-arrow-right-c:before{content:"\f10b"}.um-icon-arrow-shrink:before{content:"\f267"}.um-icon-arrow-swap:before{content:"\f268"}.um-icon-arrow-up-a:before{content:"\f10c"}.um-icon-arrow-up-b:before{content:"\f10d"}.um-icon-arrow-up-c:before{content:"\f10e"}.um-icon-asterisk:before{content:"\f314"}.um-icon-at:before{content:"\f10f"}.um-icon-backspace:before{content:"\f3bf"}.um-icon-backspace-outline:before{content:"\f3be"}.um-icon-bag:before{content:"\f110"}.um-icon-battery-charging:before{content:"\f111"}.um-icon-battery-empty:before{content:"\f112"}.um-icon-battery-full:before{content:"\f113"}.um-icon-battery-half:before{content:"\f114"}.um-icon-battery-low:before{content:"\f115"}.um-icon-beaker:before{content:"\f269"}.um-icon-beer:before{content:"\f26a"}.um-icon-bluetooth:before{content:"\f116"}.um-icon-bonfire:before{content:"\f315"}.um-icon-bookmark:before{content:"\f26b"}.um-icon-bowtie:before{content:"\f3c0"}.um-icon-briefcase:before{content:"\f26c"}.um-icon-bug:before{content:"\f2be"}.um-icon-calculator:before{content:"\f26d"}.um-icon-calendar:before{content:"\f117"}.um-icon-camera:before{content:"\f118"}.um-icon-card:before{content:"\f119"}.um-icon-cash:before{content:"\f316"}.um-icon-chatbox:before{content:"\f11b"}.um-icon-chatbox-working:before{content:"\f11a"}.um-icon-chatboxes:before{content:"\f11c"}.um-icon-chatbubble:before{content:"\f11e"}.um-icon-chatbubble-working:before{content:"\f11d"}.um-icon-chatbubbles:before{content:"\f11f"}.um-icon-checkmark:before{content:"\f122"}.um-icon-checkmark-circled:before{content:"\f120"}.um-icon-checkmark-round:before{content:"\f121"}.um-icon-chevron-down:before{content:"\f123"}.um-icon-chevron-left:before{content:"\f124"}.um-icon-chevron-right:before{content:"\f125"}.um-icon-chevron-up:before{content:"\f126"}.um-icon-clipboard:before{content:"\f127"}.um-icon-clock:before{content:"\f26e"}.um-icon-close:before{content:"\f12a"}.um-icon-close-circled:before{content:"\f128"}.um-icon-close-round:before{content:"\f129"}.um-icon-closed-captioning:before{content:"\f317"}.um-icon-cloud:before{content:"\f12b"}.um-icon-code:before{content:"\f271"}.um-icon-code-download:before{content:"\f26f"}.um-icon-code-working:before{content:"\f270"}.um-icon-coffee:before{content:"\f272"}.um-icon-compass:before{content:"\f273"}.um-icon-compose:before{content:"\f12c"}.um-icon-connection-bars:before{content:"\f274"}.um-icon-contrast:before{content:"\f275"}.um-icon-crop:before{content:"\f3c1"}.um-icon-cube:before{content:"\f318"}.um-icon-disc:before{content:"\f12d"}.um-icon-document:before{content:"\f12f"}.um-icon-document-text:before{content:"\f12e"}.um-icon-drag:before{content:"\f130"}.um-icon-earth:before{content:"\f276"}.um-icon-easel:before{content:"\f3c2"}.um-icon-edit:before{content:"\f2bf"}.um-icon-egg:before{content:"\f277"}.um-icon-eject:before{content:"\f131"}.um-icon-email:before{content:"\f132"}.um-icon-email-unread:before{content:"\f3c3"}.um-icon-erlenmeyer-flask:before{content:"\f3c5"}.um-icon-erlenmeyer-flask-bubbles:before{content:"\f3c4"}.um-icon-eye:before{content:"\f133"}.um-icon-eye-disabled:before{content:"\f306"}.um-icon-female:before{content:"\f278"}.um-icon-filing:before{content:"\f134"}.um-icon-film-marker:before{content:"\f135"}.um-icon-fireball:before{content:"\f319"}.um-icon-flag:before{content:"\f279"}.um-icon-flame:before{content:"\f31a"}.um-icon-flash:before{content:"\f137"}.um-icon-flash-off:before{content:"\f136"}.um-icon-folder:before{content:"\f139"}.um-icon-fork:before{content:"\f27a"}.um-icon-fork-repo:before{content:"\f2c0"}.um-icon-forward:before{content:"\f13a"}.um-icon-funnel:before{content:"\f31b"}.um-icon-gear-a:before{content:"\f13d"}.um-icon-gear-b:before{content:"\f13e"}.um-icon-grid:before{content:"\f13f"}.um-icon-hammer:before{content:"\f27b"}.um-icon-happy:before{content:"\f31c"}.um-icon-happy-outline:before{content:"\f3c6"}.um-icon-headphone:before{content:"\f140"}.um-icon-heart:before{content:"\f141"}.um-icon-heart-broken:before{content:"\f31d"}.um-icon-help:before{content:"\f143"}.um-icon-help-buoy:before{content:"\f27c"}.um-icon-help-circled:before{content:"\f142"}.um-icon-home:before{content:"\f144"}.um-icon-icecream:before{content:"\f27d"}.um-icon-image:before{content:"\f147"}.um-icon-images:before{content:"\f148"}.um-icon-information:before{content:"\f14a"}.um-icon-information-circled:before{content:"\f149"}.um-icon-ionic:before{content:"\f14b"}.um-icon-ios-alarm:before{content:"\f3c8"}.um-icon-ios-alarm-outline:before{content:"\f3c7"}.um-icon-ios-albums:before{content:"\f3ca"}.um-icon-ios-albums-outline:before{content:"\f3c9"}.um-icon-ios-americanfootball:before{content:"\f3cc"}.um-icon-ios-americanfootball-outline:before{content:"\f3cb"}.um-icon-ios-analytics:before{content:"\f3ce"}.um-icon-ios-analytics-outline:before{content:"\f3cd"}.um-icon-ios-arrow-back:before{content:"\f3cf"}.um-icon-ios-arrow-down:before{content:"\f3d0"}.um-icon-ios-arrow-forward:before{content:"\f3d1"}.um-icon-ios-arrow-left:before{content:"\f3d2"}.um-icon-ios-arrow-right:before{content:"\f3d3"}.um-icon-ios-arrow-thin-down:before{content:"\f3d4"}.um-icon-ios-arrow-thin-left:before{content:"\f3d5"}.um-icon-ios-arrow-thin-right:before{content:"\f3d6"}.um-icon-ios-arrow-thin-up:before{content:"\f3d7"}.um-icon-ios-arrow-up:before{content:"\f3d8"}.um-icon-ios-at:before{content:"\f3da"}.um-icon-ios-at-outline:before{content:"\f3d9"}.um-icon-ios-barcode:before{content:"\f3dc"}.um-icon-ios-barcode-outline:before{content:"\f3db"}.um-icon-ios-baseball:before{content:"\f3de"}.um-icon-ios-baseball-outline:before{content:"\f3dd"}.um-icon-ios-basketball:before{content:"\f3e0"}.um-icon-ios-basketball-outline:before{content:"\f3df"}.um-icon-ios-bell:before{content:"\f3e2"}.um-icon-ios-bell-outline:before{content:"\f3e1"}.um-icon-ios-body:before{content:"\f3e4"}.um-icon-ios-body-outline:before{content:"\f3e3"}.um-icon-ios-bolt:before{content:"\f3e6"}.um-icon-ios-bolt-outline:before{content:"\f3e5"}.um-icon-ios-book:before{content:"\f3e8"}.um-icon-ios-book-outline:before{content:"\f3e7"}.um-icon-ios-bookmarks:before{content:"\f3ea"}.um-icon-ios-bookmarks-outline:before{content:"\f3e9"}.um-icon-ios-box:before{content:"\f3ec"}.um-icon-ios-box-outline:before{content:"\f3eb"}.um-icon-ios-briefcase:before{content:"\f3ee"}.um-icon-ios-briefcase-outline:before{content:"\f3ed"}.um-icon-ios-browsers:before{content:"\f3f0"}.um-icon-ios-browsers-outline:before{content:"\f3ef"}.um-icon-ios-calculator:before{content:"\f3f2"}.um-icon-ios-calculator-outline:before{content:"\f3f1"}.um-icon-ios-calendar:before{content:"\f3f4"}.um-icon-ios-calendar-outline:before{content:"\f3f3"}.um-icon-ios-camera:before{content:"\f3f6"}.um-icon-ios-camera-outline:before{content:"\f3f5"}.um-icon-ios-cart:before{content:"\f3f8"}.um-icon-ios-cart-outline:before{content:"\f3f7"}.um-icon-ios-chatboxes:before{content:"\f3fa"}.um-icon-ios-chatboxes-outline:before{content:"\f3f9"}.um-icon-ios-chatbubble:before{content:"\f3fc"}.um-icon-ios-chatbubble-outline:before{content:"\f3fb"}.um-icon-ios-checkmark:before{content:"\f3ff"}.um-icon-ios-checkmark-empty:before{content:"\f3fd"}.um-icon-ios-checkmark-outline:before{content:"\f3fe"}.um-icon-ios-circle-filled:before{content:"\f400"}.um-icon-ios-circle-outline:before{content:"\f401"}.um-icon-ios-clock:before{content:"\f403"}.um-icon-ios-clock-outline:before{content:"\f402"}.um-icon-ios-close:before{content:"\f406"}.um-icon-ios-close-empty:before{content:"\f404"}.um-icon-ios-close-outline:before{content:"\f405"}.um-icon-ios-cloud:before{content:"\f40c"}.um-icon-ios-cloud-download:before{content:"\f408"}.um-icon-ios-cloud-download-outline:before{content:"\f407"}.um-icon-ios-cloud-outline:before{content:"\f409"}.um-icon-ios-cloud-upload:before{content:"\f40b"}.um-icon-ios-cloud-upload-outline:before{content:"\f40a"}.um-icon-ios-cloudy:before{content:"\f410"}.um-icon-ios-cloudy-night:before{content:"\f40e"}.um-icon-ios-cloudy-night-outline:before{content:"\f40d"}.um-icon-ios-cloudy-outline:before{content:"\f40f"}.um-icon-ios-cog:before{content:"\f412"}.um-icon-ios-cog-outline:before{content:"\f411"}.um-icon-ios-color-filter:before{content:"\f414"}.um-icon-ios-color-filter-outline:before{content:"\f413"}.um-icon-ios-color-wand:before{content:"\f416"}.um-icon-ios-color-wand-outline:before{content:"\f415"}.um-icon-ios-compose:before{content:"\f418"}.um-icon-ios-compose-outline:before{content:"\f417"}.um-icon-ios-contact:before{content:"\f41a"}.um-icon-ios-contact-outline:before{content:"\f419"}.um-icon-ios-copy:before{content:"\f41c"}.um-icon-ios-copy-outline:before{content:"\f41b"}.um-icon-ios-crop:before{content:"\f41e"}.um-icon-ios-crop-strong:before{content:"\f41d"}.um-icon-ios-download:before{content:"\f420"}.um-icon-ios-download-outline:before{content:"\f41f"}.um-icon-ios-drag:before{content:"\f421"}.um-icon-ios-email:before{content:"\f423"}.um-icon-ios-email-outline:before{content:"\f422"}.um-icon-ios-eye:before{content:"\f425"}.um-icon-ios-eye-outline:before{content:"\f424"}.um-icon-ios-fastforward:before{content:"\f427"}.um-icon-ios-fastforward-outline:before{content:"\f426"}.um-icon-ios-filing:before{content:"\f429"}.um-icon-ios-filing-outline:before{content:"\f428"}.um-icon-ios-film:before{content:"\f42b"}.um-icon-ios-film-outline:before{content:"\f42a"}.um-icon-ios-flag:before{content:"\f42d"}.um-icon-ios-flag-outline:before{content:"\f42c"}.um-icon-ios-flame:before{content:"\f42f"}.um-icon-ios-flame-outline:before{content:"\f42e"}.um-icon-ios-flask:before{content:"\f431"}.um-icon-ios-flask-outline:before{content:"\f430"}.um-icon-ios-flower:before{content:"\f433"}.um-icon-ios-flower-outline:before{content:"\f432"}.um-icon-ios-folder:before{content:"\f435"}.um-icon-ios-folder-outline:before{content:"\f434"}.um-icon-ios-football:before{content:"\f437"}.um-icon-ios-football-outline:before{content:"\f436"}.um-icon-ios-game-controller-a:before{content:"\f439"}.um-icon-ios-game-controller-a-outline:before{content:"\f438"}.um-icon-ios-game-controller-b:before{content:"\f43b"}.um-icon-ios-game-controller-b-outline:before{content:"\f43a"}.um-icon-ios-gear:before{content:"\f43d"}.um-icon-ios-gear-outline:before{content:"\f43c"}.um-icon-ios-glasses:before{content:"\f43f"}.um-icon-ios-glasses-outline:before{content:"\f43e"}.um-icon-ios-grid-view:before{content:"\f441"}.um-icon-ios-grid-view-outline:before{content:"\f440"}.um-icon-ios-heart:before{content:"\f443"}.um-icon-ios-heart-outline:before{content:"\f442"}.um-icon-ios-help:before{content:"\f446"}.um-icon-ios-help-empty:before{content:"\f444"}.um-icon-ios-help-outline:before{content:"\f445"}.um-icon-ios-home:before{content:"\f448"}.um-icon-ios-home-outline:before{content:"\f447"}.um-icon-ios-infinite:before{content:"\f44a"}.um-icon-ios-infinite-outline:before{content:"\f449"}.um-icon-ios-information:before{content:"\f44d"}.um-icon-ios-information-empty:before{content:"\f44b"}.um-icon-ios-information-outline:before{content:"\f44c"}.um-icon-ios-ionic-outline:before{content:"\f44e"}.um-icon-ios-keypad:before{content:"\f450"}.um-icon-ios-keypad-outline:before{content:"\f44f"}.um-icon-ios-lightbulb:before{content:"\f452"}.um-icon-ios-lightbulb-outline:before{content:"\f451"}.um-icon-ios-list:before{content:"\f454"}.um-icon-ios-list-outline:before{content:"\f453"}.um-icon-ios-location:before{content:"\f456"}.um-icon-ios-location-outline:before{content:"\f455"}.um-icon-ios-locked:before{content:"\f458"}.um-icon-ios-locked-outline:before{content:"\f457"}.um-icon-ios-loop:before{content:"\f45a"}.um-icon-ios-loop-strong:before{content:"\f459"}.um-icon-ios-medical:before{content:"\f45c"}.um-icon-ios-medical-outline:before{content:"\f45b"}.um-icon-ios-medkit:before{content:"\f45e"}.um-icon-ios-medkit-outline:before{content:"\f45d"}.um-icon-ios-mic:before{content:"\f461"}.um-icon-ios-mic-off:before{content:"\f45f"}.um-icon-ios-mic-outline:before{content:"\f460"}.um-icon-ios-minus:before{content:"\f464"}.um-icon-ios-minus-empty:before{content:"\f462"}.um-icon-ios-minus-outline:before{content:"\f463"}.um-icon-ios-monitor:before{content:"\f466"}.um-icon-ios-monitor-outline:before{content:"\f465"}.um-icon-ios-moon:before{content:"\f468"}.um-icon-ios-moon-outline:before{content:"\f467"}.um-icon-ios-more:before{content:"\f46a"}.um-icon-ios-more-outline:before{content:"\f469"}.um-icon-ios-musical-note:before{content:"\f46b"}.um-icon-ios-musical-notes:before{content:"\f46c"}.um-icon-ios-navigate:before{content:"\f46e"}.um-icon-ios-navigate-outline:before{content:"\f46d"}.um-icon-ios-nutrition:before{content:"\f470"}.um-icon-ios-nutrition-outline:before{content:"\f46f"}.um-icon-ios-paper:before{content:"\f472"}.um-icon-ios-paper-outline:before{content:"\f471"}.um-icon-ios-paperplane:before{content:"\f474"}.um-icon-ios-paperplane-outline:before{content:"\f473"}.um-icon-ios-partlysunny:before{content:"\f476"}.um-icon-ios-partlysunny-outline:before{content:"\f475"}.um-icon-ios-pause:before{content:"\f478"}.um-icon-ios-pause-outline:before{content:"\f477"}.um-icon-ios-paw:before{content:"\f47a"}.um-icon-ios-paw-outline:before{content:"\f479"}.um-icon-ios-people:before{content:"\f47c"}.um-icon-ios-people-outline:before{content:"\f47b"}.um-icon-ios-person:before{content:"\f47e"}.um-icon-ios-person-outline:before{content:"\f47d"}.um-icon-ios-personadd:before{content:"\f480"}.um-icon-ios-personadd-outline:before{content:"\f47f"}.um-icon-ios-photos:before{content:"\f482"}.um-icon-ios-photos-outline:before{content:"\f481"}.um-icon-ios-pie:before{content:"\f484"}.um-icon-ios-pie-outline:before{content:"\f483"}.um-icon-ios-pint:before{content:"\f486"}.um-icon-ios-pint-outline:before{content:"\f485"}.um-icon-ios-play:before{content:"\f488"}.um-icon-ios-play-outline:before{content:"\f487"}.um-icon-ios-plus:before{content:"\f48b"}.um-icon-ios-plus-empty:before{content:"\f489"}.um-icon-ios-plus-outline:before{content:"\f48a"}.um-icon-ios-pricetag:before{content:"\f48d"}.um-icon-ios-pricetag-outline:before{content:"\f48c"}.um-icon-ios-pricetags:before{content:"\f48f"}.um-icon-ios-pricetags-outline:before{content:"\f48e"}.um-icon-ios-printer:before{content:"\f491"}.um-icon-ios-printer-outline:before{content:"\f490"}.um-icon-ios-pulse:before{content:"\f493"}.um-icon-ios-pulse-strong:before{content:"\f492"}.um-icon-ios-rainy:before{content:"\f495"}.um-icon-ios-rainy-outline:before{content:"\f494"}.um-icon-ios-recording:before{content:"\f497"}.um-icon-ios-recording-outline:before{content:"\f496"}.um-icon-ios-redo:before{content:"\f499"}.um-icon-ios-redo-outline:before{content:"\f498"}.um-icon-ios-refresh:before{content:"\f49c"}.um-icon-ios-refresh-empty:before{content:"\f49a"}.um-icon-ios-refresh-outline:before{content:"\f49b"}.um-icon-ios-reload:before{content:"\f49d"}.um-icon-ios-reverse-camera:before{content:"\f49f"}.um-icon-ios-reverse-camera-outline:before{content:"\f49e"}.um-icon-ios-rewind:before{content:"\f4a1"}.um-icon-ios-rewind-outline:before{content:"\f4a0"}.um-icon-ios-rose:before{content:"\f4a3"}.um-icon-ios-rose-outline:before{content:"\f4a2"}.um-icon-ios-search:before{content:"\f4a5"}.um-icon-ios-search-strong:before{content:"\f4a4"}.um-icon-ios-settings:before{content:"\f4a7"}.um-icon-ios-settings-strong:before{content:"\f4a6"}.um-icon-ios-shuffle:before{content:"\f4a9"}.um-icon-ios-shuffle-strong:before{content:"\f4a8"}.um-icon-ios-skipbackward:before{content:"\f4ab"}.um-icon-ios-skipbackward-outline:before{content:"\f4aa"}.um-icon-ios-skipforward:before{content:"\f4ad"}.um-icon-ios-skipforward-outline:before{content:"\f4ac"}.um-icon-ios-snowy:before{content:"\f4ae"}.um-icon-ios-speedometer:before{content:"\f4b0"}.um-icon-ios-speedometer-outline:before{content:"\f4af"}.um-icon-ios-star:before{content:"\f4b3"}.um-icon-ios-star-half:before{content:"\f4b1"}.um-icon-ios-star-outline:before{content:"\f4b2"}.um-icon-ios-stopwatch:before{content:"\f4b5"}.um-icon-ios-stopwatch-outline:before{content:"\f4b4"}.um-icon-ios-sunny:before{content:"\f4b7"}.um-icon-ios-sunny-outline:before{content:"\f4b6"}.um-icon-ios-telephone:before{content:"\f4b9"}.um-icon-ios-telephone-outline:before{content:"\f4b8"}.um-icon-ios-tennisball:before{content:"\f4bb"}.um-icon-ios-tennisball-outline:before{content:"\f4ba"}.um-icon-ios-thunderstorm:before{content:"\f4bd"}.um-icon-ios-thunderstorm-outline:before{content:"\f4bc"}.um-icon-ios-time:before{content:"\f4bf"}.um-icon-ios-time-outline:before{content:"\f4be"}.um-icon-ios-timer:before{content:"\f4c1"}.um-icon-ios-timer-outline:before{content:"\f4c0"}.um-icon-ios-toggle:before{content:"\f4c3"}.um-icon-ios-toggle-outline:before{content:"\f4c2"}.um-icon-ios-trash:before{content:"\f4c5"}.um-icon-ios-trash-outline:before{content:"\f4c4"}.um-icon-ios-undo:before{content:"\f4c7"}.um-icon-ios-undo-outline:before{content:"\f4c6"}.um-icon-ios-unlocked:before{content:"\f4c9"}.um-icon-ios-unlocked-outline:before{content:"\f4c8"}.um-icon-ios-upload:before{content:"\f4cb"}.um-icon-ios-upload-outline:before{content:"\f4ca"}.um-icon-ios-videocam:before{content:"\f4cd"}.um-icon-ios-videocam-outline:before{content:"\f4cc"}.um-icon-ios-volume-high:before{content:"\f4ce"}.um-icon-ios-volume-low:before{content:"\f4cf"}.um-icon-ios-wineglass:before{content:"\f4d1"}.um-icon-ios-wineglass-outline:before{content:"\f4d0"}.um-icon-ios-world:before{content:"\f4d3"}.um-icon-ios-world-outline:before{content:"\f4d2"}.um-icon-ipad:before{content:"\f1f9"}.um-icon-iphone:before{content:"\f1fa"}.um-icon-ipod:before{content:"\f1fb"}.um-icon-jet:before{content:"\f295"}.um-icon-key:before{content:"\f296"}.um-icon-knife:before{content:"\f297"}.um-icon-laptop:before{content:"\f1fc"}.um-icon-leaf:before{content:"\f1fd"}.um-icon-levels:before{content:"\f298"}.um-icon-lightbulb:before{content:"\f299"}.um-icon-link:before{content:"\f1fe"}.um-icon-load-a:before{content:"\f29a"}.um-icon-load-b:before{content:"\f29b"}.um-icon-load-c:before{content:"\f29c"}.um-icon-load-d:before{content:"\f29d"}.um-icon-location:before{content:"\f1ff"}.um-icon-lock-combination:before{content:"\f4d4"}.um-icon-locked:before{content:"\f200"}.um-icon-log-in:before{content:"\f29e"}.um-icon-log-out:before{content:"\f29f"}.um-icon-loop:before{content:"\f201"}.um-icon-magnet:before{content:"\f2a0"}.um-icon-male:before{content:"\f2a1"}.um-icon-man:before{content:"\f202"}.um-icon-map:before{content:"\f203"}.um-icon-medkit:before{content:"\f2a2"}.um-icon-merge:before{content:"\f33f"}.um-icon-mic-a:before{content:"\f204"}.um-icon-mic-b:before{content:"\f205"}.um-icon-mic-c:before{content:"\f206"}.um-icon-minus:before{content:"\f209"}.um-icon-minus-circled:before{content:"\f207"}.um-icon-minus-round:before{content:"\f208"}.um-icon-model-s:before{content:"\f2c1"}.um-icon-monitor:before{content:"\f20a"}.um-icon-more:before{content:"\f20b"}.um-icon-mouse:before{content:"\f340"}.um-icon-music-note:before{content:"\f20c"}.um-icon-navicon:before{content:"\f20e"}.um-icon-navicon-round:before{content:"\f20d"}.um-icon-navigate:before{content:"\f2a3"}.um-icon-network:before{content:"\f341"}.um-icon-no-smoking:before{content:"\f2c2"}.um-icon-nuclear:before{content:"\f2a4"}.um-icon-outlet:before{content:"\f342"}.um-icon-paintbrush:before{content:"\f4d5"}.um-icon-paintbucket:before{content:"\f4d6"}.um-icon-paper-airplane:before{content:"\f2c3"}.um-icon-paperclip:before{content:"\f20f"}.um-icon-pause:before{content:"\f210"}.um-icon-person:before{content:"\f213"}.um-icon-person-add:before{content:"\f211"}.um-icon-person-stalker:before{content:"\f212"}.um-icon-pie-graph:before{content:"\f2a5"}.um-icon-pin:before{content:"\f2a6"}.um-icon-pinpoint:before{content:"\f2a7"}.um-icon-pizza:before{content:"\f2a8"}.um-icon-plane:before{content:"\f214"}.um-icon-planet:before{content:"\f343"}.um-icon-play:before{content:"\f215"}.um-icon-playstation:before{content:"\f30a"}.um-icon-plus:before{content:"\f218"}.um-icon-plus-circled:before{content:"\f216"}.um-icon-plus-round:before{content:"\f217"}.um-icon-podium:before{content:"\f344"}.um-icon-pound:before{content:"\f219"}.um-icon-power:before{content:"\f2a9"}.um-icon-pricetag:before{content:"\f2aa"}.um-icon-pricetags:before{content:"\f2ab"}.um-icon-printer:before{content:"\f21a"}.um-icon-pull-request:before{content:"\f345"}.um-icon-qr-scanner:before{content:"\f346"}.um-icon-quote:before{content:"\f347"}.um-icon-radio-waves:before{content:"\f2ac"}.um-icon-record:before{content:"\f21b"}.um-icon-refresh:before{content:"\f21c"}.um-icon-reply:before{content:"\f21e"}.um-icon-reply-all:before{content:"\f21d"}.um-icon-ribbon-a:before{content:"\f348"}.um-icon-ribbon-b:before{content:"\f349"}.um-icon-sad:before{content:"\f34a"}.um-icon-sad-outline:before{content:"\f4d7"}.um-icon-scissors:before{content:"\f34b"}.um-icon-search:before{content:"\f21f"}.um-icon-settings:before{content:"\f2ad"}.um-icon-share:before{content:"\f220"}.um-icon-shuffle:before{content:"\f221"}.um-icon-skip-backward:before{content:"\f222"}.um-icon-skip-forward:before{content:"\f223"}.um-icon-social-android:before{content:"\f225"}.um-icon-social-android-outline:before{content:"\f224"}.um-icon-social-angular:before{content:"\f4d9"}.um-icon-social-angular-outline:before{content:"\f4d8"}.um-icon-social-apple:before{content:"\f227"}.um-icon-social-apple-outline:before{content:"\f226"}.um-icon-social-bitcoin:before{content:"\f2af"}.um-icon-social-bitcoin-outline:before{content:"\f2ae"}.um-icon-social-buffer:before{content:"\f229"}.um-icon-social-buffer-outline:before{content:"\f228"}.um-icon-social-chrome:before{content:"\f4db"}.um-icon-social-chrome-outline:before{content:"\f4da"}.um-icon-social-codepen:before{content:"\f4dd"}.um-icon-social-codepen-outline:before{content:"\f4dc"}.um-icon-social-css3:before{content:"\f4df"}.um-icon-social-css3-outline:before{content:"\f4de"}.um-icon-social-designernews:before{content:"\f22b"}.um-icon-social-designernews-outline:before{content:"\f22a"}.um-icon-social-dribbble:before{content:"\f22d"}.um-icon-social-dribbble-outline:before{content:"\f22c"}.um-icon-social-dropbox:before{content:"\f22f"}.um-icon-social-dropbox-outline:before{content:"\f22e"}.um-icon-social-euro:before{content:"\f4e1"}.um-icon-social-euro-outline:before{content:"\f4e0"}.um-icon-social-facebook:before{content:"\f231"}.um-icon-social-facebook-outline:before{content:"\f230"}.um-icon-social-foursquare:before{content:"\f34d"}.um-icon-social-foursquare-outline:before{content:"\f34c"}.um-icon-social-freebsd-devil:before{content:"\f2c4"}.um-icon-social-github:before{content:"\f233"}.um-icon-social-github-outline:before{content:"\f232"}.um-icon-social-google:before{content:"\f34f"}.um-icon-social-google-outline:before{content:"\f34e"}.um-icon-social-googleplus:before{content:"\f235"}.um-icon-social-googleplus-outline:before{content:"\f234"}.um-icon-social-hackernews:before{content:"\f237"}.um-icon-social-hackernews-outline:before{content:"\f236"}.um-icon-social-html5:before{content:"\f4e3"}.um-icon-social-html5-outline:before{content:"\f4e2"}.um-icon-social-instagram:before{content:"\f351"}.um-icon-social-instagram-outline:before{content:"\f350"}.um-icon-social-javascript:before{content:"\f4e5"}.um-icon-social-javascript-outline:before{content:"\f4e4"}.um-icon-social-linkedin:before{content:"\f239"}.um-icon-social-linkedin-outline:before{content:"\f238"}.um-icon-social-markdown:before{content:"\f4e6"}.um-icon-social-nodejs:before{content:"\f4e7"}.um-icon-social-octocat:before{content:"\f4e8"}.um-icon-social-pinterest:before{content:"\f2b1"}.um-icon-social-pinterest-outline:before{content:"\f2b0"}.um-icon-social-python:before{content:"\f4e9"}.um-icon-social-reddit:before{content:"\f23b"}.um-icon-social-reddit-outline:before{content:"\f23a"}.um-icon-social-rss:before{content:"\f23d"}.um-icon-social-rss-outline:before{content:"\f23c"}.um-icon-social-sass:before{content:"\f4ea"}.um-icon-social-skype:before{content:"\f23f"}.um-icon-social-skype-outline:before{content:"\f23e"}.um-icon-social-snapchat:before{content:"\f4ec"}.um-icon-social-snapchat-outline:before{content:"\f4eb"}.um-icon-social-tumblr:before{content:"\f241"}.um-icon-social-tumblr-outline:before{content:"\f240"}.um-icon-social-tux:before{content:"\f2c5"}.um-icon-social-twitch:before{content:"\f4ee"}.um-icon-social-twitch-outline:before{content:"\f4ed"}.um-icon-social-twitter:before{content:"\f243"}.um-icon-social-twitter-outline:before{content:"\f242"}.um-icon-social-usd:before{content:"\f353"}.um-icon-social-usd-outline:before{content:"\f352"}.um-icon-social-vimeo:before{content:"\f245"}.um-icon-social-vimeo-outline:before{content:"\f244"}.um-icon-social-whatsapp:before{content:"\f4f0"}.um-icon-social-whatsapp-outline:before{content:"\f4ef"}.um-icon-social-windows:before{content:"\f247"}.um-icon-social-windows-outline:before{content:"\f246"}.um-icon-social-wordpress:before{content:"\f249"}.um-icon-social-wordpress-outline:before{content:"\f248"}.um-icon-social-yahoo:before{content:"\f24b"}.um-icon-social-yahoo-outline:before{content:"\f24a"}.um-icon-social-yen:before{content:"\f4f2"}.um-icon-social-yen-outline:before{content:"\f4f1"}.um-icon-social-youtube:before{content:"\f24d"}.um-icon-social-youtube-outline:before{content:"\f24c"}.um-icon-soup-can:before{content:"\f4f4"}.um-icon-soup-can-outline:before{content:"\f4f3"}.um-icon-speakerphone:before{content:"\f2b2"}.um-icon-speedometer:before{content:"\f2b3"}.um-icon-spoon:before{content:"\f2b4"}.um-icon-star:before{content:"\f24e"}.um-icon-stats-bars:before{content:"\f2b5"}.um-icon-steam:before{content:"\f30b"}.um-icon-stop:before{content:"\f24f"}.um-icon-thermometer:before{content:"\f2b6"}.um-icon-thumbsdown:before{content:"\f250"}.um-icon-thumbsup:before{content:"\f251"}.um-icon-toggle:before{content:"\f355"}.um-icon-toggle-filled:before{content:"\f354"}.um-icon-transgender:before{content:"\f4f5"}.um-icon-trash-a:before{content:"\f252"}.um-icon-trash-b:before{content:"\f253"}.um-icon-trophy:before{content:"\f356"}.um-icon-tshirt:before{content:"\f4f7"}.um-icon-tshirt-outline:before{content:"\f4f6"}.um-icon-umbrella:before{content:"\f2b7"}.um-icon-university:before{content:"\f357"}.um-icon-unlocked:before{content:"\f254"}.um-icon-upload:before{content:"\f255"}.um-icon-usb:before{content:"\f2b8"}.um-icon-videocamera:before{content:"\f256"}.um-icon-volume-high:before{content:"\f257"}.um-icon-volume-low:before{content:"\f258"}.um-icon-volume-medium:before{content:"\f259"}.um-icon-volume-mute:before{content:"\f25a"}.um-icon-wand:before{content:"\f358"}.um-icon-waterdrop:before{content:"\f25b"}.um-icon-wifi:before{content:"\f25c"}.um-icon-wineglass:before{content:"\f2b9"}.um-icon-woman:before{content:"\f25d"}.um-icon-wrench:before{content:"\f2ba"}.um-icon-xbox:before{content:"\f30c"}.um{width:100%;text-align:left;box-sizing:border-box;color:#666;font-size:15px;margin-bottom:30px!important;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important;opacity:0}.um-s1,.um-s2{display:none}.um *,.um :before,.um :after{box-sizing:content-box}.um-header a,.um-cover a,.um-member-photo a,.um-member-name a,.um-member-more a,.um-member-less a,.um-members a,.um-account-side li a,.um-members-pagi span,.um-members-pagi a,.um-field-value a{border-bottom:0!important}.um a:focus,.um-modal a:focus{outline:0!important}.um a .image-overlay,.um a:hover .image-overlay,.um a:hover .image-overlay *{display:none!important;width:0!important;height:0!important;position:static!important}.um.um-in-admin{padding-top:0}.um.um-in-admin .um-tip{display:none!important}.um input,.um select,.um textarea{font-size:15px}.um *{-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important}.um-left{float:left}.um-right{float:right}.um-clear{clear:both}.um-center{text-align:center}.um-center .um-button{display:inline-block!important;width:auto!important;min-width:250px!important}.um-half{width:48%}.um-field-half{width:48%;float:left}.um-field-half.right{float:right}.um-field-tri{width:30%;float:left;margin-right:3%}.um img{box-shadow:none!important}.um-col{padding-bottom:20px}.um-col-alt{margin:0 0 5px}.um-col-alt-s{padding-top:10px}.um-col-alt-b{padding-top:20px}.um-col-121{float:left;width:48%}.um-col-122{float:right;width:48%}.um-col-131{float:left;width:30%}.um-col-132{float:left;width:30%;margin:0 5%}.um-col-133{float:left;width:30%}.um-raty i{font-size:26px}.um-field-half .um-raty i{font-size:21px}.um-field-tri .um-raty i{font-size:21px}.um-button i{font-size:22px;width:22px;height:12px!important;display:inline-block;line-height:12px!important;vertical-align:middle!important;position:relative;top:-6px;margin-right:8px}.um-row-heading{padding:5px 0;font-size:16px}.um-row-heading i{font-size:24px;height:24px;line-height:24px;margin:0 12px 0 0;display:inline-block;width:30px;text-align:center}.um-row-heading i:before{vertical-align:middle!important}p.um-notice{width:auto;color:#fff;box-sizing:border-box;font-size:15px;padding:12px!important;margin:12px 0 0!important;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;position:relative}p.um-notice i{position:absolute;right:14px;font-size:36px;cursor:pointer;top:7px;display:block;height:30px;line-height:30px}p.um-notice.success{background:#7ACF58}p.um-notice.err{background:#C74A4A}p.um-notice.warning{background:#f9f9d1;color:#666;border:1px solid #efe4a2;padding:8px 15px!important}.um-field-error{width:auto;max-width:100%;background:#C74A4A;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;color:#fff;box-sizing:border-box;position:relative;padding:12px;font-size:14px;line-height:20px!important;margin:12px 0 0}.um-field-error a{color:#fff!important;text-decoration:underline!important}.um-field-arrow{top:-17px;left:10px;position:absolute;z-index:900;color:#C74A4A;font-size:28px;line-height:1em!important}.um-error-block{width:auto;max-width:100%;background:#C74A4A;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;color:#fff;box-sizing:border-box;position:relative;padding:12px;font-size:14px;line-height:1em!important;margin:12px 0 0}.um-tip{margin:0 0 0 8px;cursor:pointer;display:inline-block;position:relative;top:3px}.um-tip i{font-size:22px;height:22px;line-height:22px;display:block;position:relative}.um-tip-text{display:block;font-size:13px;line-height:15px;color:#999}.um-form button::-moz-focus-inner,.um-form input::-moz-focus-inner{border:0!important;padding:0!important}.um-field{position:relative;padding:15px 0 0}.um-field-b,.um-field-c{padding-top:0!important}.um-field.um-is-conditional{display:none}.um-field-label{display:block;margin:0 0 8px}.um-field-label .um-field-label-icon{float:left;margin:0 8px 0 0;height:22px;line-height:18px;display:inline-block;width:24px;text-align:center}.um-field-label .um-field-label-icon i{font-size:22px;position:relative;top:1px}.um-field-label label{font-size:15px!important;line-height:22px!important;font-weight:700;font-weight:600}.um-field-area{position:relative;word-wrap:break-word}.um-field-value p{margin:0 0 6px!important;padding:0}.um-field-block{color:#777;font-size:17px}.um-field-spacing{width:100%}.um-field-divider{width:100%;margin:0 0 12px;height:24px;position:relative}.um-field-divider-text{position:absolute;width:100%;text-align:center;bottom:-24px;left:0;font-size:16px;padding:10px 0}.um-field-divider-text span{background:#fff;color:#555;display:inline-block;padding:0 15px}.um-field-icon{position:absolute;cursor:default;text-align:center!important;top:2px;left:0;width:44px;font-size:22px;line-height:1.7em}.um-form input[type=text],.um-form input[type=number],.um-form input[type=password]{padding:0 12px!important;width:100%;display:block!important;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;outline:none!important;cursor:text!important;font-size:15px!important;height:40px!important;box-sizing:border-box!important;box-shadow:none!important;margin:0!important;position:static;outline:none!important}.um-form input[type=number]{width:auto;padding:0 0 0 5px !important;height:30px!important}.um-form input[type=text]:focus,.um-form input[type=number]:focus,.um-form input[type=password]:focus,.um-form textarea:focus{box-shadow:none!important;outline:none!important}.um-form input[type=text].um-iconed,.um-form input[type=password].um-iconed{padding-left:44px!important}.um-form input[type=text].um-error,.um-form input[type=password].um-error{border-color:#C74A4A!important}.um-form textarea{width:100%;padding:8px 12px!important;display:block;font-size:15px!important;line-height:22px!important;background:#fff;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;box-sizing:border-box;min-height:80px!important;box-shadow:none;outline:none!important}.um-form .wp-editor-container{border:1px solid #ddd}.um-form .wp-editor-container textarea{background:#ddd!important;color:#222!important;border-radius:0}.um-field-c .um-field-checkbox{margin:0!important;position:relative;top:-14px}.um-field-checkbox,.um-field-radio{display:block;margin:8px 0;position:relative;cursor:pointer!important}.um-field-checkbox:hover i,.um-field-radio:hover i{color:#666}.um-field-checkbox input,.um-field-radio input{opacity:0!important;display:inline!important;width:0!important;float:left}.um-field-checkbox-state,.um-field-radio-state{position:absolute;top:0;left:1px;width:24px;height:24px}.um-field-checkbox-state i,.um-field-radio-state i{font-size:24px;line-height:24px;height:24px;color:#aaa;transition:all .2s linear}.um-field-checkbox-option,.um-field-radio-option{margin:0 0 0 36px;line-height:24px;color:#888!important;display:block}.um-field-group{margin-top:20px}.um-field-group-head{cursor:pointer;color:#fff;font-size:16px;line-height:22px;padding:10px 20px;transition:.25s;box-sizing:border-box;-moz-border-radius:4px!important;-webkit-border-radius:4px!important;border-radius:4px!important;border-top:1px solid rgba(0,0,0,0.0)!important;border-bottom:2px solid rgba(0,0,0,0.1)!important}.um-field-group-head i{font-size:20px;margin:0 8px 0 0}.um-field-group-head i:before{vertical-align:middle!important}.um-field-group-body{display:none;margin:15px 0 0;padding:15px 20px 5px;background:#f9f9f9;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;position:relative;box-sizing:border-box;width:100%}.um-field-group-body div.um-field{padding:0 0 15px}.um-field-group-cancel{font-size:18px;position:absolute;z-index:800;right:8px;top:8px;color:#ccc!important;text-decoration:none!important}.um-field-group-cancel:hover{color:#777!important}.um div.disabled,.um-disabled,.um input[type=submit]:disabled,.um input[type=text]:disabled,.um input[type=number]:disabled{opacity:.6!important;cursor:no-drop!important}input[type=submit].um-button,input[type=submit].um-button:focus{vertical-align:middle!important;height:auto!important;font-size:15px;cursor:pointer!important;width:100%;box-shadow:none;text-shadow:none;font-family:inherit;outline:none!important;margin:0;opacity:1;-webkit-appearance:none}input[type=submit].um-button:hover{opacity:1}.um-button{font-size:15px;border:none!important;display:block;width:100%;line-height:1em!important;padding:16px 20px!important;text-decoration:none!important;text-align:center;text-transform:none!important;font-weight:400!important;overflow:hidden;position:relative;transition:.25s;box-sizing:border-box;-moz-border-radius:4px!important;-webkit-border-radius:4px!important;border-radius:4px!important;border-top:1px solid rgba(0,0,0,0.0)!important;border-bottom:2px solid rgba(0,0,0,0.1)!important;opacity:1}.um-button.um-btn-auto-width{width:auto;display:inline-block;padding:14px 20px!important;min-width:200px;max-width:450px}a.um-link-alt{line-height:22px;color:#888!important;display:block!important;text-decoration:none!important;font-weight:400;text-align:center;border-bottom:none!important}a.um-link-alt:hover{text-decoration:underline!important}.um-dropdown{position:absolute;height:auto;background:#fff;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;z-index:10;display:none;border:1px solid #e5e5e5;box-sizing:border-box;-webkit-box-shadow:0 0 2px rgba(0,0,0,0.1);box-shadow:0 0 1px rgba(0,0,0,0.1)}.um-dropdown ul,.um-dropdown li{list-style-type:none!important;padding:0!important;margin:0!important}.um-dropdown li a{display:block;padding:8px 12px;color:#666;font-size:14px;line-height:18px}.um-dropdown li:last-child a{border-top:1px solid #e5e5e5;padding:12px}.um-dropdown-b{position:relative}.um-dropdown-arr{position:absolute;color:#fff;font-size:24px;width:24px;height:24px;overflow:hidden;z-index:15;color:#eee}.um-dropdown-arr *{display:block!important;width:24px!important;height:24px!important;vertical-align:bottom!important;overflow:hidden!important;line-height:24px!important}div.um-photo{margin:20px auto 0;text-align:center;box-sizing:border-box;max-width:100%}div.um-photo,div.um-photo a,div.um-photo img{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.um-photo a{border:1px solid #e5e5e5;padding:5px;box-sizing:border-box;display:inline-block;box-shadow:0 1px 1px #eee;margin:0 auto;max-width:100%}div.um-photo img{max-height:300px;max-width:100%}span.um-req{margin:0 0 0 8px;font-size:14px;display:inline-block}.picker{font-size:16px;text-align:left;line-height:1.2;color:#fff;position:absolute;z-index:10000;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.picker__input{cursor:default}.picker__input.picker__input--active{border-color:#0089ec}.picker__holder{width:100%;overflow-y:auto;-webkit-overflow-scrolling:touch}.picker__frame,.picker__holder{bottom:0;left:0;right:0;top:100%}.picker__holder{position:fixed;-webkit-transition:background .15s ease-out,top 0s .15s;-moz-transition:background .15s ease-out,top 0s .15s;transition:background .15s ease-out,top 0s .15s}.picker__frame{position:absolute;margin:0 auto;min-width:256px;max-width:400px;width:100%;-ms-filter:"alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;opacity:0;-webkit-transition:all .15s ease-out;-moz-transition:all .15s ease-out;transition:all .15s ease-out}@media (min-height:33.875em){.picker__frame{overflow:visible;top:auto;bottom:-100%;max-height:80%}}@media (min-height:40.125em){.picker__frame{margin-bottom:15%!important}}.picker__wrap{display:table;width:100%;height:100%}@media (min-height:33.875em){.picker__wrap{display:block}}.picker__box{display:table-cell;vertical-align:middle}@media (min-height:33.875em){.picker__box{display:block;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}}@media (min-height:40.125em){.picker__box{border-bottom-width:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}}.picker--opened .picker__holder{top:0;zoom:1;background:rgba(0,0,0,.7);-webkit-transition:background .15s ease-out;-moz-transition:background .15s ease-out;transition:background .15s ease-out}.picker--opened .picker__frame{top:0;-ms-filter:"alpha(Opacity=100)";filter:alpha(opacity=100);-moz-opacity:1;opacity:1}@media (min-height:33.875em){.picker--opened .picker__frame{top:auto;bottom:0}}.picker__header{text-align:center;position:relative;margin-top:.75em;border-radius:2px 2px 0 0;padding:15px 0;font-size:18px}.picker__month,.picker__year{display:inline-block;margin-left:10px;margin-right:10px}.picker__select--month,.picker__select--year{margin-left:.25em;margin-right:.25em;font-size:16px;color:#999;background:#fff!important;outline:0!important;border:0!important}@media (min-width:24.5em){.picker__select--month,.picker__select--year{margin-top:-.5em}}.picker__select--month{width:35%}.picker__select--year{width:22.5%}.picker__nav--next,.picker__nav--prev{position:absolute;padding:.5em 1.25em;width:1em;height:1em;box-sizing:content-box!important;top:8px;color:#fff}.picker__nav--prev{left:0;padding-right:1.25em}@media (min-width:24.5em){.picker__nav--prev{padding-right:1.5em}}.picker__nav--next{right:0;padding-left:1.25em}@media (min-width:24.5em){.picker__nav--next{padding-left:1.5em}}.picker__nav--next:before,.picker__nav--prev:before{content:" ";border-top:.5em solid transparent;border-bottom:.5em solid transparent;border-right:.5em solid #fff;width:0;height:0;display:block;margin:0 auto}.picker__nav--next:before{border-right:0;border-left:.5em solid #fff}.picker__nav--next:hover,.picker__nav--prev:hover{cursor:pointer;color:#fff}.picker__nav--disabled,.picker__nav--disabled:before,.picker__nav--disabled:before:hover,.picker__nav--disabled:hover{cursor:default;background:0 0}.picker__table{text-align:center;border-collapse:collapse;border-spacing:0;table-layout:fixed;font-size:inherit;width:100%;margin-top:5px;border:none;margin-bottom:0}.picker__table td{margin:0;padding:0 10px;text-align:center;border:0}.picker__weekday{width:14.285714286%;color:#fff;text-align:center;padding:5px 0!important}.picker__day{padding:10px 0;line-height:1em!important}.picker__day--today{position:relative}.picker__day--outfocus{opacity:.75}.picker__day--infocus:hover,.picker__day--outfocus:hover{border-radius:2px;cursor:pointer}.picker--focused .picker__day--highlighted,.picker__day--highlighted:hover{border-radius:2px}.picker__day--disabled,.picker__day--disabled:hover{cursor:default;background:transparent!important;opacity:.3}.picker__footer{text-align:center;height:50px!important;line-height:50px!important;margin-top:5px;border-radius:0 0 2px 2px}.picker__button--clear,.picker__button--today{margin:0!important;width:50%;display:inline-block;background:none!important;box-shadow:none!important;border:0!important;outline:0!important;box-sizing:border-box!important}.picker__button--clear:focus,.picker__button--clear:hover,.picker__button--today:focus,.picker__button--today:hover{cursor:pointer}.picker__list{list-style:none;list-style:none!important;padding:5px!important;margin:0!important}.picker__list-item{position:relative;border-radius:2px;display:inline-block;width:25%;text-align:center;box-sizing:border-box;padding:6px 0!important;margin:5px 0!important}.picker__list-item:hover{cursor:pointer;z-index:10}.picker__list-item--highlighted{z-index:10}.picker--focused .picker__list-item--highlighted,.picker__list-item--highlighted:hover{cursor:pointer;font-weight:700}.picker--focused .picker__list-item--selected,.picker__list-item--selected,.picker__list-item--selected:hover{z-index:10}.picker--focused .picker__list-item--disabled,.picker__list-item--disabled,.picker__list-item--disabled:hover{color:#a9e792;cursor:default;background:0 0;z-index:auto}.picker--time .picker__button--clear{width:100%;display:inline-block;box-shadow:none!important;border:0!important;outline:0!important;background:none!important;border-radius:0 0 2px 2px;color:#fff!important}.picker--time .picker__button--clear:focus,.picker--time .picker__button--clear:hover{cursor:pointer}.picker--time .picker__frame{min-width:256px;max-width:400px}.picker--time .picker__box{font-size:15px;padding:0;border-radius:2px!important}@media (min-height:40.125em){.picker--time .picker__frame{margin-bottom:10%!important}}.um-members img{display:block;overflow:hidden;-moz-border-radius:0!important;-webkit-border-radius:0!important;border-radius:0!important;margin:0!important;padding:0!important}.um-members a,.um-members a:hover{text-decoration:none!important}.um-members-intro{text-align:center;margin:0 0 20px}.um-members-total{font-size:30px;font-weight:300}.um-members-none{text-align:center;font-size:18px}.um-search{text-align:center;padding:20px 50px}.um-search.um-search-2{padding-left:20%;padding-right:20%;width:100%;box-sizing:border-box}.um-search.um-search-1{padding-left:32%;padding-right:32%;width:100%;box-sizing:border-box}.um-search.um-search-1 .um-search-submit .um-button{display:block!important;min-width:100%!important;margin:0 0 10px!important}.um-search.um-search-1 .um-search-filter{width:100%;padding:0 0 10px;float:none}.um-search.um-search-2 .um-search-filter{width:50%}.um-search-filter{padding:0 15px 30px;display:block;float:left;width:33%;box-sizing:border-box}.um-search-submit .um-button{display:inline-block!important;width:auto!important;padding:12px 20px!important;margin:0 10px!important;min-width:150px!important}.um-members{-ms-word-break:break-all;word-break:break-word;word-wrap:break-word}.um-member{float:left;width:30%;background:#fff;text-align:center;border:1px solid #eee;box-sizing:border-box;margin-bottom:40px;position:relative}.um-member.awaiting_admin_review,.um-member.inactive,.um-member.rejected{opacity:.7}.um-member-status{display:none}.um-member-status.awaiting_admin_review,.um-member-status.inactive,.um-member-status.rejected{display:block;position:absolute;top:0;left:0;width:100%;padding:7px 15px;background:#C74A4A;color:#fff;z-index:10;font-size:13px;box-sizing:border-box}.um-member-status.inactive,.um-member-status.rejected{background:#999}.um-gutter-sizer{width:5%}.um-member-cover{background-color:#eee;box-sizing:border-box;position:relative}.um-member-cover-e{text-align:center;box-sizing:border-box}.um-member-cover-e img{width:100%!important}.um-member-photo{padding:40px 0 20px;text-align:center}.um-member-photo a{display:inline!important}.um-member-photo img{display:inline!important;border:5px solid #fff;background:#fff;width:140px;height:140px;float:none!important}.um-member.with-cover .um-member-photo{padding-top:0}.um-member.with-cover .um-member-photo img{width:90px;height:90px;position:relative;top:-35px;margin-bottom:-45px!important;float:none!important;opacity:1}.um-member-photo.radius-1 img{-moz-border-radius:999px!important;-webkit-border-radius:999px!important;border-radius:999px!important}.um-member-photo.radius-2 img{-moz-border-radius:4px!important;-webkit-border-radius:4px!important;border-radius:4px!important}.um-member-photo.radius-3 img{-moz-border-radius:0!important;-webkit-border-radius:0!important;border-radius:0!important}.um-member-card.no-photo{padding-top:30px}.um-member-card{padding-bottom:15px}.um-member-name{margin:0 0 4px}.um-member-name a{font-size:16px;line-height:26px;color:#444;font-weight:700}.um-member-tagline{font-size:13px;line-height:22px;color:#999;padding:0 15px}.um-member-less{display:none}.um-member-less a,.um-member-more a{color:#666;display:inline-block}.um-member-less i,.um-member-more i{display:block;font-size:32px;height:32px;line-height:32px}.um-member-meta{display:none;margin:20px 15px 0;padding:15px 0;border-top:1px solid #e5e5e5}.um-member-meta.no-animate{display:block}.um-member-metaline{font-size:13px;padding:12px 0 0;line-height:16px;vertical-align:middle}.um-member-metaline span{display:block;text-align:center}.um-member-connect{padding-top:20px}.um-member-connect a{display:inline-block;width:40px;line-height:40px;height:40px;-moz-border-radius:999px;-webkit-border-radius:999px;border-radius:999px;color:#fff!important;opacity:.85;margin:0 1px;font-size:22px;transition:.25s}.um-member-connect a:hover{opacity:1;color:#fff}.um-members-pagi,.um-members-pagidrop{text-align:center;padding:5px 0;font-size:15px}.um-members-pagi span.current,.um-members-pagi span.current:hover{color:#fff!important}.um-members-pagi i:before{font-size:20px;vertical-align:middle!important;height:34px;line-height:34px;top:-2px;position:relative}.um-members-pagi span.disabled{opacity:.4;cursor:default}.um-members-pagi span.none{color:#aaa!important}.um-members-pagi span{cursor:default}.um-members-pagi a,.um-members-pagi span{display:inline-block;width:auto;height:34px;line-height:34px;transition:all .2s linear;padding:0 14px;color:#666!important;font-weight:400}.um-members-pagi a:hover{text-decoration:none!important}.um-popup-overlay{background:rgba(0,0,0,0.7);width:100%;height:100%;position:fixed;top:0;left:0;z-index:1999992}.um-popup *{-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important}.um-popup{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;position:fixed;left:50%;top:10%;margin-left:-250px;width:500px;background:#fff;box-shadow:0 1px 3px #111;z-index:1999993;box-sizing:border-box;overflow:auto;color:#888;padding:0!important;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important}.um-popup.loading{background:#fff url(../img/loading.gif) no-repeat center;min-height:100px}.um-popup a{outline:none!important}.um-modal-overlay{background:rgba(0,0,0,0.85);width:100%;height:100%;position:fixed;top:0;left:0;z-index:1999992}.um-modal *{-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important}.um-modal-hidden-content{display:none}.um-modal-close{display:block;position:fixed;right:0;top:0;font-size:24px;text-decoration:none!important;color:#fff!important;padding:0 10px}.um-modal{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;position:fixed;left:50%;display:none;z-index:1999993;box-sizing:border-box;bottom:-50px}.um-modal.normal{width:500px;margin-left:-250px}.um-modal.large{width:730px;margin-left:-365px}.um-modal.small{width:400px;margin-left:-200px}.um-modal-body{min-height:3px;padding:20px;box-sizing:border-box;width:100%;background:#fff;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px}.um-modal-body.photo{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,0.1),0px 0 0 1px rgba(255,255,255,0.12) inset;background:#888;padding:0}.um-modal-body.photo img{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;display:block;overflow:hidden;opacity:0}.um-modal.loading .um-modal-body{background:#fff url(../img/loading.gif) no-repeat center;min-height:150px}.um-modal div.um{margin-bottom:20px!important}.um-modal-header{-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;height:44px;line-height:44px;color:#fff;padding:0 20px;box-sizing:border-box;font-size:17px}.um-modal-footer{margin-top:20px}.um-modal-left{float:left}.um-modal-right{float:right}.um-modal-btn.disabled,.um-modal-btn.disabled:hover{opacity:.5;cursor:default!important}.um-modal-btn{cursor:pointer!important;line-height:34px!important;height:34px;display:inline-block;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:0 20px;text-align:center;color:#fff;vertical-align:middle;font-size:14px;box-sizing:border-box;transition:.2s;text-decoration:none!important}.um-modal-btn:hover{background:#44b0ec;color:#fff}.um-modal-btn.alt{color:#666;background:#eee}.um-modal-btn.alt:hover{background:#e5e5e5}.um-profile{box-sizing:border-box}.um-profile .um-cover-overlay{display:none}.um-profile.um-editing .um-cover.has-cover .um-cover-overlay{display:block}.um-profile.um-viewing .um-profile-photo-overlay{display:none}.um-profile img{display:block;overflow:hidden;border-radius:0;margin:0!important}.um-profile a,.um-profile a:hover{text-decoration:none!important}.um-profile .um-profile-body{padding-top:15px;padding-bottom:15px;max-width:600px;margin:auto}.um-profile.um-editing{padding-bottom:15px}.um-profile.um-viewing{padding-bottom:1px}.um-profile.um-viewing .um-field-label{display:block;margin:0 0 8px;border-bottom:solid 2px #eee;padding-bottom:4px}.um-cover{background-color:#eee;box-sizing:border-box;position:relative}.um-cover-add{color:#aaa;font-size:36px;width:100%;display:table}.um-cover-add i{font-size:36px}.um-cover-add span{display:table-cell;vertical-align:middle}.um-cover-e{text-align:center;box-sizing:border-box}.um-cover-e img{width:100%!important}.um-cover-overlay{position:absolute;top:0;left:0;background:rgba(0,0,0,.5);text-align:center;box-sizing:border-box;padding:0 40px;color:#fff;text-shadow:0 1px #666;cursor:pointer!important;line-height:21px;font-size:16px;height:100%;width:100%}.um-cover-overlay:hover{background:rgba(0,0,0,.55)}.um-cover-overlay span.um-cover-overlay-s{display:table;height:100%;width:100%}.um-cover-overlay ins{display:table-cell;vertical-align:middle;height:100%;text-decoration:none!important;background:none!important;color:#fff!important;border-bottom:none!important}.um-cover-overlay i{font-size:46px;display:block;margin-bottom:6px}.um-header{position:relative;padding:0 0 25px;border-bottom:solid 2px #eee;min-height:85px;box-sizing:content-box!important}.um-profile-edit{position:absolute;top:15px;right:0;vertical-align:middle;font-size:30px;height:30px;line-height:30px;z-index:66;padding-right:10px}.um-profile-edit i{font-size:30px}.um-header.no-cover .um-profile-meta{padding-left:0!important;padding-right:0!important;text-align:center!important}.um-header.no-cover .um-name{float:none!important;margin-right:0!important}.um-name a{font-size:24px}.um-header.no-cover .um-profile-photo{float:none!important;margin:0 auto!important;text-align:center!important}.um-header.no-cover a.um-profile-photo-img{position:relative!important;top:auto!important;left:auto!important;float:none!important;display:inline-block!important;text-align:center!important}.um-header.no-cover .um-main-meta{padding:0}.um-profile .gravatar{position:static}.um-profile-photo{float:left;position:relative}.um-profile-photo a.um-profile-photo-img{float:left;position:absolute;background:#fff;padding:5px;left:30px}.um-profile-photo a.um-profile-photo-img img{width:100%;height:100%}.um-profile-photo-overlay{position:absolute;top:0;left:0;background:rgba(0,0,0,.5);text-align:center;box-sizing:border-box;padding:0;color:#fff;text-shadow:0 1px #666;cursor:pointer!important;line-height:21px;font-size:16px;height:100%;width:100%}.um-profile-photo-overlay:hover{background:rgba(0,0,0,.55)}.um-profile-photo-overlay span.um-profile-photo-overlay-s{display:table;height:100%;width:100%}.um-profile-photo-overlay ins{display:table-cell;vertical-align:middle;height:100%;text-decoration:none!important;background:none!important;color:#fff!important;border-bottom:none!important}.um-profile-photo-overlay i{font-size:46px;display:block}.um-profile-meta{padding-right:30px;-ms-word-break:break-all;word-break:break-word;word-wrap:break-word}.um-main-meta{padding:10px 0 0}.um-name{float:left;font-size:24px;font-weight:700;margin-right:30px;line-height:1.7em}.um-meta{font-size:15px}.um-meta span a{font-weight:400}.um-meta span:first-child{margin:0 5px 0 0}.um-meta span{margin:0 5px;font-size:14px;display:inline-block}.um-meta span i{font-size:16px;margin:0 5px 0 0}.um-meta-text{margin:6px 0 0;color:#666;line-height:1.4em;font-size: 13px}.um-meta-text p{margin:0 0 6px 0!important;padding:0!important}.um-profile-status{display:none}.um-profile-status.awaiting_admin_review,.um-profile-status.inactive,.um-profile-status.rejected{display:inline-block;margin:6px 0 0;border-left:3px solid #C74A4A;padding-left:10px;font-size:14px;color:#777}.um-profile-note{display:none;text-align:center!important;padding-top:20px;color:#666}.um-profile-note i{display:inline-block;font-size:70px;height:70px;line-height:70px}.um-profile-note i.um-faicon-lock{position:relative;top:2px;display:inline-block;font-size:24px;height:auto;line-height:24px;margin-right:10px}.um-profile-note span{margin-top:10px;display:block;font-size:16px;color:#888}.um-profile-note a{border:none!important}.um-profile-note a:hover{text-decoration:underline!important}.um-profile-nav{padding:10px;background:#444;text-align:center}.um-profile-nav-item.active a,.um-profile-nav-item.active a:hover{color:#FFF!important}.um-profile-nav-item.active a span.count{background:0 0;padding:4px 0;color:#fff}.um-profile-nav-item a{color:#fff!important;font-size:14px;font-weight:600;padding:6px 10px 6px 28px;display:block;float:left;border-radius:4px;margin-left:5px;position:relative;border-bottom:0!important}.um-profile-nav-item.without-icon a{padding-left:10px}.um-profile-nav-item.without-icon span.title{padding-left:0}.um-profile-nav-item.without-icon i{display:none}.um-profile-nav-item a:hover{background:#555}.um-profile-nav-item i{font-size:18px;height:18px;line-height:18px;position:absolute;display:block;top:8px;left:10px}.um-profile-nav-item span.title{padding-left:5px}.um-profile-nav-item span.count{font-size:12px;font-weight:300;background:#ddd;color:#666;border-radius:3px;padding:4px 8px;margin-left:3px}.um-profile-subnav{background:#eee;padding:15px;text-align:center}.um-profile-subnav a{display:inline-block;color:#555;font-size:15px;font-weight:600;margin:0 20px;border-bottom:0!important}.um-profile-subnav a:hover{color:#333}.um-profile-subnav span{display:inline-block;margin:0 0 0 8px;background:#ddd;padding:1px 8px;color:#aaa!important;border-radius:2px}.um-item{padding:20px 0;border-bottom:1px solid #eee;position:relative}.um-item-action{position:absolute;right:0;top:16px;width:20px;height:20px;font-size:20px;text-align:center}.um-item-action a{color:#ccc}.um-item-action a:hover{color:#999}.um-item-link{padding-right:40px}.um-item-link a{color:#333;font-size:16px;line-height:20px}.um-item-link a:hover{text-decoration:underline!important}.um-item-link i{font-size:24px;color:#666;margin-right:10px;position:relative;top:3px}.um-item-img{padding:10px 0 0}.um-item-img a{display:inline-block;padding:8px;border-radius:3px;border:1px solid #ddd}.um-item-img a:hover{border-color:#bbb}.um-item-img img{max-width:100%;border-radius:3px}.um-item-meta{color:#888}.um-item-meta span{font-size:13px;font-weight:400;font-style:italic}.um-item-meta span:not(:last-child):after{position:relative;padding:0 4px 0 7px;content:"•"}.um-item-meta a{font-weight:700;border-bottom:1px solid #E0E0E0}.um-item-meta a:hover{border-bottom-color:#bbb}.um-load-items{text-align:center;margin-top:12px;padding-top:30px}.um-load-items.loading{background:url(../img/loading-dots.gif) no-repeat top center}.um-load-items a{max-width:250px;display:inline-block;margin:0 auto}.um-tab-notifier{position:absolute;background:none repeat scroll 0 0 #c65151;right:0;top:0;width:18px;height:18px;border-radius:999px;line-height:18px;top:2px;right:8px;font-size:11px;font-weight:400}@font-face{font-family:raty;font-style:normal;font-weight:400;src:url(../font/raty.eot);src:url(../font/raty.eot?#iefix) format("embedded-opentype");src:url(../font/raty.svg#raty) format("svg");src:url(../font/raty.ttf) format("truetype");src:url(../font/raty.woff) format("woff")}.cancel-off-png,.cancel-on-png,.star-half-png,.star-off-png,.star-on-png{font-family:raty;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;margin-right:.2em;color:#ccc}.star-half-png,.star-on-png{color:#ffbe32}.cancel-on-png:before{content:"\e600"}.cancel-off-png:before{content:"\e601"}.star-on-png:before{content:"\f005"}.star-off-png:before{content:"\f006"}.star-half-png:before{content:"\f123"}.select2-container{margin:0!important;position:relative!important;display:inline-block!important;zoom:1!important;*display:inline!important;vertical-align:middle!important}.select2-container a:hover{color:#666!important}.select2-container,.select2-drop,.select2-search,.select2-search input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.select2-container .select2-choice{display:block!important;height:36px!important;padding:0 0 0 12px!important;overflow:hidden!important;position:relative!important;white-space:nowrap!important;line-height:35px!important;color:#666!important;font-size:15px!important;text-align:left!important;text-decoration:none!important;-moz-border-radius:2px!important;-webkit-border-radius:2px!important;border-radius:2px!important;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background:none!important;background-color:#fff!important}.select2-container.select2-drop-above .select2-choice{-moz-border-radius:0 0 2px 2px!important;-webkit-border-radius:0 0 2px 2px!important;border-radius:0 0 2px 2px!important}.select2-container.select2-allowclear .select2-choice .select2-chosen{margin-right:42px}.select2-container .select2-choice>.select2-chosen{margin-right:26px!important;display:block!important;overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important;float:none!important;width:auto!important;font-weight:400}.select2-container .select2-choice abbr{display:none;width:20px!important;height:100%!important;right:24px!important;font-size:1px!important;text-decoration:none!important;border:0!important;background:none!important;cursor:pointer!important;outline:0!important}.select2-container.select2-allowclear .select2-choice abbr{display:inline-block!important}.select2-container .select2-choice abbr:hover{cursor:pointer!important}.select2-drop-mask{border:0!important;margin:0!important;padding:0!important;position:fixed!important;left:0!important;top:0!important;min-height:100%!important;min-width:100%!important;height:auto!important;width:auto!important;opacity:0!important;z-index:1999997!important;background-color:#fff!important;filter:alpha(opacity=0)!important}.select2-drop{width:100%;margin-top:-1px;position:absolute;z-index:1999998!important;top:100%;background:#fff;color:#666;-moz-border-radius:0 0 2px 2px;-webkit-border-radius:0 0 2px 2px;border-radius:0 0 2px 2px;box-shadow:none}.select2-drop.select2-drop-above{margin-top:1px;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0;box-shadow:none}.select2-drop-active{box-shadow:none!important}.select2-drop-auto-width{width:auto!important}.select2-drop-auto-width .select2-search{padding-top:4px}.select2-container .select2-choice .select2-arrow{display:inline-block!important;width:34px!important;height:100%!important;position:absolute!important;right:0!important;top:0!important;-moz-border-radius:0 2px 2px 0!important;-webkit-border-radius:0 2px 2px 0!important;border-radius:0 2px 2px 0!important;text-align:center!important;background:transparent!important;border-left:0!important}.select2-container .select2-choice .select2-arrow *{line-height:100%!important;vertical-align:middle!important}.select2-container .select2-choice .select2-arrow b{display:block!important;width:100%!important;height:100%!important;background:none!important}.select2-container .select2-choice .select2-arrow:before{content:"\f3d0"!important;font-size:27px!important;font-family:Ionicons!important;width:100%!important;display:block;height:100%;line-height:36px}.select2-container .select2-choice .select2-arrow:hover:before{color:#666!important}.select2-search{display:inline-block!important;width:100%!important;min-height:32px!important;height:32px!important;line-height:1em!important;margin:0!important;padding-left:4px!important;padding-right:4px!important;position:relative!important;z-index:1999999!important;white-space:nowrap!important}.select2-search input[type=text]{background:none!important;width:100%!important;height:32px!important;line-height:auto!important;padding:0 38px 0 7px!important;margin:0!important;outline:0!important;border:1px solid #ddd!important;color:#666!important;-moz-border-radius:2px!important;-webkit-border-radius:2px!important;border-radius:2px!important;font-size:15px!important;box-sizing:border-box!important;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important;box-shadow:none!important}.select2-search:before{content:"\f4a4"!important;font-size:20px!important;height:32px!important;line-height:32px!important;font-family:Ionicons!important;top:0!important;right:10px!important;position:absolute!important}.select2-drop .select2-search{margin-top:4px!important}.select2-search input.select2-active{background:#fff!important}.select2-container-active .select2-choice,.select2-container-active .select2-choices{outline:0!important;box-shadow:none!important}.select2-dropdown-open .select2-choice{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.select2-dropdown-open .select2-choice .select2-arrow{background:transparent!important;filter:none!important;border-color:transparent!important}.select2-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.select2-results{max-height:200px;padding:0 0 0 5px;margin:4px 4px 4px 0;position:relative;overflow-x:hidden;overflow-y:auto;-webkit-tap-highlight-color:rgba(0,0,0,0)}.select2-results ul.select2-result-sub{margin:0;padding-left:0}.select2-results li{list-style:none;display:list-item;background-image:none;font-size:15px;margin:0!important;padding:3px 0!important;color:#666!important}.select2-results li.select2-result-with-children>.select2-result-label{font-weight:700!important}.select2-results .select2-result-label{padding:3px 7px 4px!important;margin:0!important;cursor:pointer;min-height:1em!important;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important}.select2-results-dept-1 .select2-result-label{padding-left:20px}.select2-results-dept-2 .select2-result-label{padding-left:40px}.select2-results-dept-3 .select2-result-label{padding-left:60px}.select2-results-dept-4 .select2-result-label{padding-left:80px}.select2-results-dept-5 .select2-result-label{padding-left:100px}.select2-results-dept-6 .select2-result-label{padding-left:110px}.select2-results-dept-7 .select2-result-label{padding-left:120px}.select2-results .select2-highlighted{background:none!important;background:#f4f4f4!important;color:#666!important}.select2-results li em{background:#feffde!important;font-style:normal!important}.select2-results .select2-highlighted em{background:transparent!important}.select2-results .select2-highlighted ul{background:#fff!important;color:#666!important}.select2-results .select2-no-results,.select2-results .select2-searching,.select2-results .select2-selection-limit{background:#f4f4f4!important;display:list-item!important;padding:5px!important;font-size:15px!important;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important}.select2-results .select2-disabled .select2-result-label,.select2-results .select2-disabled.select2-highlighted .select2-result-label{color:#bbb!important;background:#fff!important;display:list-item!important;cursor:default!important}.select2-results .select2-selected{display:none}.select2-more-results.select2-active{background:#f4f4f4!important}.select2-more-results{background:#f4f4f4!important;display:list-item!important}.select2-container.select2-container-disabled .select2-choice{background-color:#f4f4f4!important;background-image:none!important;border:1px solid #ddd!important;cursor:default!important}.select2-container.select2-container-disabled .select2-choice .select2-arrow{background:none!important;background:#f9f9f9!important;border-left:0!important}.select2-container.select2-container-disabled .select2-choice abbr{display:none!important}.select2-container-multi .select2-choices{height:auto!important;height:1%!important;margin:0!important;padding:1px 3px!important;position:relative!important;cursor:text!important;overflow:hidden!important;-moz-border-radius:2px!important;-webkit-border-radius:2px!important;border-radius:2px!important;box-shadow:none!important}.select2-locked{padding:3px 5px!important}.select2-container-multi .select2-choices{min-height:26px;background-image:none!important}.select2-container-multi.select2-container-active .select2-choices{outline:0;box-shadow:none}.select2-container-multi .select2-choices li{float:left;list-style:none}html[dir=rtl] .select2-container-multi .select2-choices li{float:right}.select2-container-multi .select2-choices .select2-search-field{margin:0;padding:0;white-space:nowrap}.select2-container-multi .select2-choices .select2-search-field input{padding:5px!important;margin:3px 0!important;font-size:100%;height:auto!important;outline:0;border:0!important;-webkit-box-shadow:none;box-shadow:none;background:transparent!important}.select2-container-multi .select2-choices .select2-search-field input.select2-active{background:#fff!important}.select2-container-multi .select2-choices .select2-search-choice{padding:4px 20px 4px 5px!important;margin:6px 0 4px 5px!important;position:relative;line-height:14px;font-size:14px;color:#666;cursor:default;border:1px solid #ddd;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;box-shadow:none!important;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background:none!important;background-color:#f9f9f9!important}html[dir=rtl] .select2-container-multi .select2-choices .select2-search-choice{margin-left:0;margin-right:5px}.select2-container-multi .select2-choices .select2-search-choice .select2-chosen{cursor:default}.select2-container-multi .select2-choices .select2-search-choice-focus{background:#f1f1f1}.select2-search-choice-close{position:absolute!important;width:18px!important;height:18px!important;right:0!important;top:0!important;left:auto!important;outline:0!important;background:none!important}.select2-search-choice-close:before{content:"\f2d7"!important;font-size:22px!important;font-family:Ionicons!important;right:4px!important;position:relative!important;display:block;height:100%;width:100%;line-height:36px}.select2-search-choice-close:hover:before{color:#666!important}.select2-container-multi .select2-search-choice-close{text-decoration:none!important;width:21px!important;height:100%!important;text-align:center!important;border-bottom:0!important}.select2-container-multi .select2-search-choice-close:before{font-size:16px!important;right:0!important;line-height:23px!important}.select2-container-multi.select2-container-disabled .select2-choices{background-color:#f4f4f4;background-image:none;border:1px solid #ddd;cursor:default}.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice{padding:3px 5px;border:1px solid #ddd;background-image:none;background-color:#f4f4f4}.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close{display:none;background:0 0}.select2-result-selectable .select2-match,.select2-result-unselectable .select2-match{text-decoration:underline}.select2-offscreen,.select2-offscreen:focus{clip:rect(0 0 0 0)!important;width:1px!important;height:1px!important;border:0!important;margin:0!important;padding:0!important;overflow:hidden!important;position:absolute!important;outline:0!important;left:0!important;top:0!important}.select2-display-none{display:none}.select2-measure-scrollbar{position:absolute;top:-10000px;left:-10000px;width:100px;height:100px;overflow:scroll}.tipsy{padding:5px;position:absolute;z-index:9999999999!important}.tipsy-inner{font-size:13px!important;line-height:17px!important;background-color:#333!important;color:#fff!important;max-width:250px!important;padding:6px 10px!important;text-align:left!important;word-wrap:break-word!important;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px}.tipsy-arrow{position:absolute!important;width:0!important;height:0!important;line-height:0!important;border:5px dashed #333}.tipsy-arrow-n{border-bottom-color:#333!important}.tipsy-arrow-s{border-top-color:#333!important}.tipsy-arrow-e{border-left-color:#333!important}.tipsy-arrow-w{border-right-color:#333!important}.tipsy-n .tipsy-arrow{top:0;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-nw .tipsy-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-ne .tipsy-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.tipsy-s .tipsy-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-sw .tipsy-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-se .tipsy-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.tipsy-e .tipsy-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.tipsy-w .tipsy-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.um-account i{vertical-align:baseline!important}.um-account p.um-notice{margin:0 0 20px!important;padding:12px 15px!important}.um-account a:focus{outline:0!important}.um-account-side{float:left;width:35%;padding:0 30px;box-sizing:border-box}.um-account-main{float:left;width:50%;padding:0 30px;box-sizing:border-box}.um-account-main a{border-bottom:none!important}.um-account-tab{display:none}.um-account-main div.um-account-heading{margin:0!important;font-size:18px;line-height:18px;font-weight:700;color:#555}.um-account-main div.um-account-heading i{margin-right:10px;font-size:26px;position:relative;top:2px}.um-account-main p{margin:20px 0 0!important;padding:0!important}.um-account-main label{font-size:15px}.um-account-meta{text-align:center;margin-bottom:20px}.um-account-meta img{margin:0!important;position:static!important;float:none!important;display:inline-block}.um-account-meta.radius-1 img{-moz-border-radius:999px;-webkit-border-radius:999px;border-radius:999px}.um-account-meta.radius-2 img{-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}.um-account-meta.radius-3 img{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.um-account-name{padding-top:12px}.um-account-name a{font-weight:700;color:#555;text-decoration:none!important;font-size:18px;line-height:1.4em}.um-account-profile-link a{font-size:13px;font-weight:400}.um-account-nav a{display:block;height:44px;line-height:44px;color:#666!important;text-decoration:none!important;position:relative;padding-left:40px;border-bottom:1px solid #eee!important;transition:all .2s linear;font-size:14px}.um-account-nav a.current{font-weight:700}.um-account-nav span.arr{position:absolute;right:0;top:1px;font-size:28px}.um-account-nav span.ico{position:absolute;left:0;top:0;font-size:21px;width:21px;text-align:center}.um-account-side ul,.um-account-side li{margin:0!important;padding:0!important;list-style-type:none!important}.um-account-side li{margin-bottom:1px!important;background:#eee}.um-account-side li a{display:block;padding:4px 0;font-size:14px;height:30px;line-height:20px;color:#999;position:relative}.um-account-side li a span.um-account-arrow{position:absolute;right:10px;top:6px;font-size:26px;opacity:.6}.um-account-side li a span.um-account-icon,.um-account-side li a.current span.um-account-icon,.um-account-side li a.current:hover span.um-account-icon{text-align:center;font-size:20px;width:20px;height:30px;border-right:1px solid #ccc;color:#444;float:left;padding:0 15px;font-weight:400!important}.um-account-side li a span.um-account-icon i{display:block;height:30px;line-height:30px}.um-account-side li a span.um-account-title{padding-left:20px;float:left;height:30px;line-height:30px;color:#555}.um-account-side li a:hover{color:#444;background:#ddd}.um-account-side li a.current,.um-account-side li a.current:hover{color:#444;font-weight:700;text-decoration:none!important}.cropper-container{position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}.cropper-container img{width:100%;height:100%;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important}.cropper-canvas,.cropper-modal{position:absolute;top:0;right:0;bottom:0;left:0}.cropper-canvas{background-color:#fff;opacity:0;filter:alpha(opacity=0)}.cropper-modal{background-color:#000;opacity:.5;filter:alpha(opacity=50)}.cropper-dragger{position:absolute;top:10%;left:10%;width:80%;height:80%}.cropper-viewer{display:block;width:100%;height:100%;overflow:hidden;outline-width:1px;outline-style:solid;outline-color:#69f;outline-color:rgba(51,102,255,.75)}.cropper-dashed{position:absolute;display:block;border:0 dashed #fff;opacity:.5;filter:alpha(opacity=50)}.cropper-dashed.dashed-h{top:33.3%;left:0;width:100%;height:33.3%;border-top-width:1px;border-bottom-width:1px}.cropper-dashed.dashed-v{top:0;left:33.3%;width:33.3%;height:100%;border-right-width:1px;border-left-width:1px}.cropper-face,.cropper-line,.cropper-point{position:absolute;display:block;width:100%;height:100%;opacity:.1;filter:alpha(opacity=10)}.cropper-face{top:0;left:0;cursor:move;background-color:#fff}.cropper-line{background-color:#69f}.cropper-line.line-e{top:0;right:-3px;width:5px;cursor:e-resize}.cropper-line.line-n{top:-3px;left:0;height:5px;cursor:n-resize}.cropper-line.line-w{top:0;left:-3px;width:5px;cursor:w-resize}.cropper-line.line-s{bottom:-3px;left:0;height:5px;cursor:s-resize}.cropper-point{width:5px;height:5px;background-color:#69f;opacity:.75;filter:alpha(opacity=75)}.cropper-point.point-e{top:50%;right:-3px;margin-top:-3px;cursor:e-resize}.cropper-point.point-n{top:-3px;left:50%;margin-left:-3px;cursor:n-resize}.cropper-point.point-w{top:50%;left:-3px;margin-top:-3px;cursor:w-resize}.cropper-point.point-s{bottom:-3px;left:50%;margin-left:-3px;cursor:s-resize}.cropper-point.point-ne{top:-3px;right:-3px;cursor:ne-resize}.cropper-point.point-nw{top:-3px;left:-3px;cursor:nw-resize}.cropper-point.point-sw{bottom:-3px;left:-3px;cursor:sw-resize}.cropper-point.point-se{right:-3px;bottom:-3px;width:20px;height:20px;cursor:se-resize;opacity:1;filter:alpha(opacity=100)}.cropper-point.point-se:before{position:absolute;right:-50%;bottom:-50%;display:block;width:200%;height:200%;content:" ";background-color:#69f;opacity:0;filter:alpha(opacity=0)}@media (min-width:768px){.cropper-point.point-se{width:15px;height:15px}}@media (min-width:992px){.cropper-point.point-se{width:10px;height:10px}}@media (min-width:1200px){.cropper-point.point-se{width:5px;height:5px;opacity:.75;filter:alpha(opacity=75)}}.cropper-hidden{display:none!important}.cropper-invisible{position:fixed;top:0;left:0;z-index:-1;width:auto!important;max-width:none!important;height:auto!important;max-height:none!important;opacity:0;filter:alpha(opacity=0)}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-canvas,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}.um .um-single-file-preview,.um .um-single-image-preview{margin-bottom:20px}.um .um-single-image-preview>img{max-height:300px;display:inline-block;overflow:hidden;margin:auto;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.um-single-file-preview,.um-single-image-preview{display:none;text-align:center;position:relative}.um-single-file-preview.show,.um-single-image-preview.show{display:block}.um-single-image-preview>img{max-width:100%;max-height:inherit}.um-single-file-preview a.cancel,.um-single-image-preview a.cancel{position:absolute;top:-15px;right:-15px;width:30px;height:30px;-moz-border-radius:999px;-webkit-border-radius:999px;border-radius:999px;background:#ddd;cursor:pointer;text-decoration:none!important;z-index:666;opacity:.75}.um-single-file-preview a.cancel i,.um-single-image-preview a.cancel i{font-size:16px;color:#888;position:relative;display:block;width:100%;height:100%;line-height:30px;overflow:hidden}.um-single-file-preview a.cancel i:before,.um-single-image-preview a.cancel i:before{line-height:inherit}.um-single-fileinfo{padding:26px 0 20px;display:inline-block}.um-single-fileinfo span.icon{font-size:40px;display:inline-block;width:100px;height:70px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#666;color:#fff!important}.um-single-fileinfo span.icon i{display:block;height:70px;line-height:70px;overflow:hidden}.um-single-fileinfo span.icon i:before{line-height:inherit}.um-single-fileinfo span.filename{display:block;font-size:16px;color:#888;padding-top:5px}.um-single-fileinfo a{text-decoration:none!important;opacity:.9}.um-single-fileinfo a:hover{opacity:1}.upload-statusbar{margin:20px 0 0}.upload-filename{display:none!important}.upload-progress{position:relative;width:100%;box-sizing:border-box}.upload-bar{width:0;height:10px;color:#666;background:#7ACF58;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.ajax-upload-dragdrop{width:100%;text-align:center;vertical-align:middle;padding:20px;box-sizing:border-box;border:2px dashed #ddd;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;font-size:18px;line-height:1em}.ajax-upload-dragdrop span.str{display:block;margin:0 0 15px}.ajax-upload-dragdrop span.icon{display:block;font-size:80px;line-height:80px;vertical-align:middle;margin-bottom:10px}.ajax-upload-dragdrop span.help{display:block;font-size:14px;color:#aaa;margin:0 0 12px}.upload{cursor:pointer!important;line-height:34px!important;height:34px;display:inline-block;text-decoration:none;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:0 20px;color:#fff;vertical-align:middle;font-size:14px;box-sizing:border-box;transition:.2s}.upload:hover{background:#44b0ec}.um-modal input[type=file]::-webkit-file-upload-button{cursor:pointer}.uimob340-show,.uimob500-show,.uimob800-show,.uimob960-show{display:none}div.uimob340 .uimob340-show,div.uimob500 .uimob500-show,div.uimob800 .uimob800-show,div.uimob960 .uimob960-show{display:block}div.uimob340 .uimob340-hide,div.uimob500 .uimob500-hide,div.uimob800 .uimob800-hide,div.uimob960 .uimob960-hide{display:none}div.uimob340 .um-item-link a{font-size:14px}div.uimob340 .um-item-meta span{font-size:13px}div.uimob340 .um-load-items a{width:100%!important;max-width:100%!important}div.uimob340 .um-profile-nav{padding:0}div.uimob340 .um-profile-nav-item a{padding:10px 16px;margin-left:0;border-radius:0}div.uimob340 .um-profile-nav-item i{display:block;position:static;top:auto;left:auto}div.uimob340 .um-profile-subnav{padding:8px 15px}div.uimob340 .um-profile-subnav a{display:block;text-align:left;font-size:13px;margin:0;padding:6px 0}div.uimob340 .um-profile-subnav span{font-size:12px;padding:1px 6px}div.uimob340 .um-cover-overlay span.um-cover-overlay-t{display:none!important}div.uimob340 .um-cover-overlay{padding:0}div.uimob340 .um-cover-overlay i,div.uimob340 .um-profile-photo-overlay i{margin-bottom:0;font-size:30px}.um-modal.uimob340{width:100%!important;margin:0!important;left:0!important;height:100%;background:#fff}.um-modal.uimob340,.um-modal.uimob340 .um-modal-body,.um-modal.uimob340 .um-modal-header{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.um-modal.uimob340 .um-modal-header{text-align:center}.um-modal.uimob340 .um-modal-footer{position:absolute;bottom:0;left:0;width:100%;box-sizing:border-box;padding:10px;border-top:1px solid #ddd}.um-modal.uimob340 .um-modal-right{width:100%;float:none}.um-modal.uimob340 .um-modal-footer a.um-modal-btn{width:48%;margin:0 1%;float:left;display:block;line-height:44px!important;height:44px}.um-modal.uimob340 .ajax-upload-dragdrop span.icon{font-size:40px;line-height:40px}div.uimob340 .um-profile-body{padding-left:0;padding-right:0}div.uimob340 .um-profile-photo{width:100%!important;text-align:center!important;position:absolute;top:-40px;left:0}div.uimob340 .um-header.no-cover .um-profile-photo{position:static;top:auto;left:auto}div.uimob340 .um-profile-photo a.um-profile-photo-img{width:100px!important;height:100px!important;margin:0 auto!important;float:none!important;display:inline-block!important;position:relative!important;top:auto!important;left:auto!important}div.uimob340 .um-header.no-cover .um-profile-photo a.um-profile-photo-img{width:120px!important;height:120px!important}div.uimob340 .um-header .um-profile-meta{padding-left:0!important;padding-right:0!important;text-align:center!important;padding-top:60px!important}div.uimob340 .um-header.no-cover .um-profile-meta{padding-top:0!important}div.uimob340 .um-header .um-name{float:none!important;margin-right:0!important;font-size:18px}div.uimob340 .um-header .um-meta,div.uimob340 .um-header .um-meta-text{padding:0 20px}div.uimob340 .um-header .um-meta span:first-child{display:block}div.uimob340 .um-header .um-meta span{display:none}div.uimob340 .um-col-121,div.uimob340 .um-col-122,div.uimob340 .um-col-131,div.uimob340 .um-col-132,div.uimob340 .um-col-133{float:none;width:100%;margin:0}div.uimob340 .um-field-half{float:none;width:100%}div.uimob340 .um-search{padding:20px 0!important;width:100%!important;box-sizing:border-box}div.uimob340 .um-search .um-search-filter{width:100%!important;float:none!important;padding:0 0 15px!important}div.uimob340 .um-search .um-search-submit .um-button{display:block!important;min-width:100%!important;margin:0 0 15px!important}div.uimob340 .um-member{width:100%}div.uimob340 .um-gutter-sizer{width:0}div.uimob340 .um-account-main{float:none;width:100%;padding:0;box-sizing:border-box}div.uimob340 .um-account-tab{padding-bottom:20px;border-bottom:1px solid #eee}div.uimob340 .um-account-meta{margin-bottom:0}.uimob340 .um-half{float:none;width:100%;margin:0 0 10px}.uimob340 .um-button.um-btn-auto-width{min-width:auto;max-width:auto;width:100%}.uimob340 .um-col-alt-s{padding-top:0}div.uimob500 .um-profile-nav{padding:0}div.uimob500 .um-profile-nav-item a{padding:10px 16px;margin-left:0;border-radius:0}div.uimob500 .um-profile-nav-item i{display:block;position:static;top:auto;left:auto;font-size:22px;height:22px;line-height:22px}div.uimob500 .um-profile-subnav{padding:8px 15px}div.uimob500 .um-profile-subnav a{display:block;text-align:left;font-size:13px;margin:0;padding:6px 0}div.uimob500 .um-profile-subnav span{font-size:12px;padding:1px 6px}div.uimob500 .um-cover-overlay span.um-cover-overlay-t{display:none!important}div.uimob500 .um-cover-overlay{padding:0}div.uimob500 .um-cover-overlay i,div.uimob500 .um-profile-photo-overlay i{margin-bottom:0;font-size:30px}.um-modal.uimob500{width:100%!important;margin:0!important;left:0!important;height:100%;background:#fff}.um-modal.uimob500,.um-modal.uimob500 .um-modal-body,.um-modal.uimob500 .um-modal-header{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.um-modal.uimob500 .um-modal-header{text-align:center}.um-modal.uimob500 .um-modal-footer{position:absolute;bottom:0;left:0;width:100%;box-sizing:border-box;padding:10px;border-top:1px solid #ddd}.um-modal.uimob500 .um-modal-right{width:100%;float:none}.um-modal.uimob500 .um-modal-footer a.um-modal-btn{width:48%;margin:0 1%;float:left;display:block;line-height:44px!important;height:44px}.um-modal.uimob500 .ajax-upload-dragdrop span.icon{font-size:40px;line-height:40px}div.uimob500 .um-profile-body{padding-left:0;padding-right:0}div.uimob500 .um-profile-photo{width:100%!important;text-align:center!important;position:absolute;top:-40px;left:0}div.uimob500 .um-header.no-cover .um-profile-photo{position:static;top:auto;left:auto}div.uimob500 .um-profile-photo a.um-profile-photo-img{width:100px!important;height:100px!important;margin:0 auto!important;float:none!important;display:inline-block!important;position:relative!important;top:auto!important;left:auto!important}div.uimob500 .um-header.no-cover .um-profile-photo a.um-profile-photo-img{width:120px!important;height:120px!important}div.uimob500 .um-header .um-profile-meta{padding-left:0!important;padding-right:0!important;text-align:center!important;padding-top:60px!important}div.uimob500 .um-header.no-cover .um-profile-meta{padding-top:0!important}div.uimob500 .um-header .um-name{float:none!important;margin-right:0!important;font-size:21px}div.uimob500 .um-header .um-meta,div.uimob500 .um-header .um-meta-text{padding:0 20px}div.uimob500 .um-header .um-meta span:first-child{display:block}div.uimob500 .um-header .um-meta span{display:none}div.uimob500 .um-col-121,div.uimob500 .um-col-122,div.uimob500 .um-col-131,div.uimob500 .um-col-132,div.uimob500 .um-col-133{float:none;width:100%;margin:0}div.uimob500 .um-field-half{float:none;width:100%}div.uimob500 .um-search{padding:20px 0!important;width:100%!important;box-sizing:border-box}div.uimob500 .um-search .um-search-filter{width:100%!important;float:none!important;padding:0 0 15px!important}div.uimob500 .um-search .um-search-submit .um-button{display:block!important;min-width:100%!important;margin:0 0 15px!important}div.uimob500 .um-member{width:100%}div.uimob500 .um-gutter-sizer{width:0}div.uimob500 .um-account-main{float:none;width:100%;padding:0;box-sizing:border-box}div.uimob500 .um-account-tab{padding-bottom:20px;border-bottom:1px solid #eee}div.uimob500 .um-account-meta{margin-bottom:0}div.uimob800 .um-profile-nav{padding:0}div.uimob800 .um-profile-nav-item a{padding:10px 20px;margin-left:0;border-radius:0}div.uimob800 .um-profile-nav-item i{display:block;position:static;top:auto;left:auto;font-size:26px;height:26px;line-height:26px}div.uimob800 .um-profile-subnav{padding:8px 15px}div.uimob800 .um-profile-subnav a{display:block;text-align:left;font-size:14px;margin:0;padding:6px 0}div.uimob800 .um-profile-subnav span{font-size:12px;padding:2px 8px}div.uimob800 .um-account-main{width:90%;max-width:450px}div.uimob800 .um-account-side{padding:0;width:10%}div.uimob800 .um-account-side ul{border:1px solid #ddd;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.uimob800 .um-account-side li{margin-bottom:0!important;background:0 0}div.uimob800 .um-account-side li a{display:block;padding:0!important;height:44px;line-height:44px;color:#666!important;text-align:center;text-decoration:none!important;background:0 0;transition:all .2s linear}div.uimob800 .um-account-side li:first-child a{-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0}div.uimob800 .um-account-side li:last-child a{-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px}div.uimob800 .um-account-side li a span.um-account-icontip{display:block;float:left;text-align:center;width:100%;height:100%;font-size:22px;line-height:44px}div.uimob800 .um-account-side li a span.um-account-icontip i{position:relative;text-align:center;width:100%}div.uimob800 .um-account-side li a.current,div.uimob800 .um-account-side li a.current:hover{color:#fff!important}div.uimob800 .um-account-meta a{border:1px solid #ddd}div.uimob800 .um-account-meta a,div.uimob800 .um-account-meta img{display:block;overflow:hidden;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;max-width:100%;height:auto}div.uimob800 .um-profile-photo{width:200px!important}div.uimob800 .um-profile-photo a.um-profile-photo-img{width:140px!important;height:140px!important;top:-70px!important}div.uimob800 .um-header.no-cover .um-profile-photo a.um-profile-photo-img{top:auto!important}div.uimob800 .um-header .um-profile-meta{padding-left:200px}div.uimob800 .um-cover-overlay{padding:0}div.uimob800 .um-search{padding:20px 0!important;width:100%!important;box-sizing:border-box}div.uimob800 .um-search .um-search-filter{width:48%!important;float:left!important;padding:0 0 15px!important}div.uimob800 .um-search .um-search-filter-2{margin-left:4%}div.uimob800 .um-search .um-search-submit .um-button{display:block!important;width:48%!important;margin:0 0 15px!important;box-sizing:border-box;float:left}div.uimob800 .um-search .um-search-submit .um-button.um-alt{float:right}div.uimob800 .um-member{width:48%}div.uimob800 .um-gutter-sizer{width:4%}div.uimob960 .um-search{padding:20px 0!important;width:100%!important;box-sizing:border-box}div.uimob960 .um-search .um-search-filter{width:48%!important;float:left!important;padding:0 0 15px!important}div.uimob960 .um-search .um-search-filter-2{margin-left:4%}div.uimob960 .um-search .um-search-submit .um-button{display:block!important;width:48%!important;margin:0 0 15px!important;box-sizing:border-box;float:left}div.uimob960 .um-search .um-search-submit .um-button.um-alt{float:right}div.uimob960 .um-member{width:48%}div.uimob960 .um-gutter-sizer{width:4%}@media screen and (max-height:400px){.ajax-upload-dragdrop span.icon{display:none}.um-modal.no-photo{width:100%!important;margin:0!important;left:0!important;height:100%;background:#fff}.um-modal.no-photo,.um-modal.no-photo .um-modal-body,.um-modal.no-photo .um-modal-header{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.um-modal.no-photo .um-modal-header{text-align:center;font-size:14px}.um-modal.no-photo .um-modal-footer{position:absolute;bottom:0;left:0;width:100%;box-sizing:border-box;padding:10px;border-top:1px solid #ddd}.um-modal.no-photo .um-modal-right{width:100%;float:none}.um-modal.no-photo .um-modal-footer a.um-modal-btn{width:48%;margin:0 1%;float:left;display:block;line-height:44px!important;height:44px}}@media screen and (max-height:300px){.ajax-upload-dragdrop span.icon,.ajax-upload-dragdrop span.str,.um-modal.no-photo .um-modal-header{display:none}}@media screen and (max-width:600px){.um-popup{width:96%;margin-left:2%;left:0;top:15px}}
|
assets/dynamic_css/dynamic_global.php
CHANGED
@@ -146,6 +146,7 @@ print ".um-$form_id.um .um-button.um-alt,
|
|
146 |
if ( $form_border ) {
|
147 |
print "
|
148 |
.um-$form_id.um .um-form input[type=text],
|
|
|
149 |
.um-$form_id.um .um-form input[type=number],
|
150 |
.um-$form_id.um .um-form input[type=password],
|
151 |
.um-$form_id.um .um-form textarea,
|
@@ -167,6 +168,7 @@ print "
|
|
167 |
if ( $form_border_hover ) {
|
168 |
print "
|
169 |
.um-$form_id.um .um-form input[type=text]:focus,
|
|
|
170 |
.um-$form_id.um .um-form input[type=number]:focus,
|
171 |
.um-$form_id.um .um-form input[type=password]:focus,
|
172 |
.um-$form_id.um .um-form textarea:focus {
|
@@ -178,6 +180,7 @@ print "
|
|
178 |
if ( $form_bg_color ) {
|
179 |
print "
|
180 |
.um-$form_id.um .um-form input[type=text],
|
|
|
181 |
.um-$form_id.um .um-form input[type=number],
|
182 |
.um-$form_id.um .um-form input[type=password],
|
183 |
.um-$form_id.um .um-form textarea,
|
@@ -192,6 +195,7 @@ print "
|
|
192 |
if ( $form_bg_color_focus ) {
|
193 |
print "
|
194 |
.um-$form_id.um .um-form input[type=text]:focus,
|
|
|
195 |
.um-$form_id.um .um-form input[type=number]:focus,
|
196 |
.um-$form_id.um .um-form input[type=password]:focus,
|
197 |
.um-$form_id.um .um-form textarea:focus {
|
@@ -270,6 +274,7 @@ if ( $form_text_color ) {
|
|
270 |
print "
|
271 |
|
272 |
.um-$form_id.um .um-form input[type=text],
|
|
|
273 |
.um-$form_id.um .um-form input[type=password],
|
274 |
.um-$form_id.um .um-form textarea
|
275 |
{
|
@@ -298,4 +303,4 @@ print "
|
|
298 |
}
|
299 |
|
300 |
?>
|
301 |
-
</style>
|
146 |
if ( $form_border ) {
|
147 |
print "
|
148 |
.um-$form_id.um .um-form input[type=text],
|
149 |
+
.um-$form_id.um .um-form input[type=tel],
|
150 |
.um-$form_id.um .um-form input[type=number],
|
151 |
.um-$form_id.um .um-form input[type=password],
|
152 |
.um-$form_id.um .um-form textarea,
|
168 |
if ( $form_border_hover ) {
|
169 |
print "
|
170 |
.um-$form_id.um .um-form input[type=text]:focus,
|
171 |
+
.um-$form_id.um .um-form input[type=tel]:focus,
|
172 |
.um-$form_id.um .um-form input[type=number]:focus,
|
173 |
.um-$form_id.um .um-form input[type=password]:focus,
|
174 |
.um-$form_id.um .um-form textarea:focus {
|
180 |
if ( $form_bg_color ) {
|
181 |
print "
|
182 |
.um-$form_id.um .um-form input[type=text],
|
183 |
+
.um-$form_id.um .um-form input[type=tel],
|
184 |
.um-$form_id.um .um-form input[type=number],
|
185 |
.um-$form_id.um .um-form input[type=password],
|
186 |
.um-$form_id.um .um-form textarea,
|
195 |
if ( $form_bg_color_focus ) {
|
196 |
print "
|
197 |
.um-$form_id.um .um-form input[type=text]:focus,
|
198 |
+
.um-$form_id.um .um-form input[type=tel]:focus,
|
199 |
.um-$form_id.um .um-form input[type=number]:focus,
|
200 |
.um-$form_id.um .um-form input[type=password]:focus,
|
201 |
.um-$form_id.um .um-form textarea:focus {
|
274 |
print "
|
275 |
|
276 |
.um-$form_id.um .um-form input[type=text],
|
277 |
+
.um-$form_id.um .um-form input[type=tel],
|
278 |
.um-$form_id.um .um-form input[type=password],
|
279 |
.um-$form_id.um .um-form textarea
|
280 |
{
|
303 |
}
|
304 |
|
305 |
?>
|
306 |
+
</style>
|
assets/js/pickadate/legacy.js
CHANGED
@@ -1,10 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/*!
|
2 |
* Legacy browser support
|
3 |
*/
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
* Cross-Browser Split 1.1.1
|
6 |
* Copyright 2007-2012 Steven Levithan <stevenlevithan.com>
|
7 |
* Available under the MIT License
|
8 |
* http://blog.stevenlevithan.com/archives/cross-browser-split
|
9 |
*/
|
10 |
-
var nativeSplit=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
/*jshint
|
3 |
+
asi: true,
|
4 |
+
unused: true,
|
5 |
+
boss: true,
|
6 |
+
loopfunc: true,
|
7 |
+
eqnull: true
|
8 |
+
*/
|
9 |
+
|
10 |
+
|
11 |
/*!
|
12 |
* Legacy browser support
|
13 |
*/
|
14 |
+
|
15 |
+
|
16 |
+
// Map array support
|
17 |
+
if ( ![].map ) {
|
18 |
+
Array.prototype.map = function ( callback, self ) {
|
19 |
+
var array = this, len = array.length, newArray = new Array( len )
|
20 |
+
for ( var i = 0; i < len; i++ ) {
|
21 |
+
if ( i in array ) {
|
22 |
+
newArray[ i ] = callback.call( self, array[ i ], i, array )
|
23 |
+
}
|
24 |
+
}
|
25 |
+
return newArray
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
|
30 |
+
// Filter array support
|
31 |
+
if ( ![].filter ) {
|
32 |
+
Array.prototype.filter = function( callback ) {
|
33 |
+
if ( this == null ) throw new TypeError()
|
34 |
+
var t = Object( this ), len = t.length >>> 0
|
35 |
+
if ( typeof callback != 'function' ) throw new TypeError()
|
36 |
+
var newArray = [], thisp = arguments[ 1 ]
|
37 |
+
for ( var i = 0; i < len; i++ ) {
|
38 |
+
if ( i in t ) {
|
39 |
+
var val = t[ i ]
|
40 |
+
if ( callback.call( thisp, val, i, t ) ) newArray.push( val )
|
41 |
+
}
|
42 |
+
}
|
43 |
+
return newArray
|
44 |
+
}
|
45 |
+
}
|
46 |
+
|
47 |
+
|
48 |
+
// Index of array support
|
49 |
+
if ( ![].indexOf ) {
|
50 |
+
Array.prototype.indexOf = function( searchElement ) {
|
51 |
+
if ( this == null ) throw new TypeError()
|
52 |
+
var t = Object( this ), len = t.length >>> 0
|
53 |
+
if ( len === 0 ) return -1
|
54 |
+
var n = 0
|
55 |
+
if ( arguments.length > 1 ) {
|
56 |
+
n = Number( arguments[ 1 ] )
|
57 |
+
if ( n != n ) {
|
58 |
+
n = 0
|
59 |
+
}
|
60 |
+
else if ( n !== 0 && n != Infinity && n != -Infinity ) {
|
61 |
+
n = ( n > 0 || -1 ) * Math.floor( Math.abs( n ) )
|
62 |
+
}
|
63 |
+
}
|
64 |
+
if ( n >= len ) return -1
|
65 |
+
var k = n >= 0 ? n : Math.max( len - Math.abs( n ), 0 )
|
66 |
+
for ( ; k < len; k++ ) {
|
67 |
+
if ( k in t && t[ k ] === searchElement ) return k
|
68 |
+
}
|
69 |
+
return -1
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
|
74 |
+
/*!
|
75 |
* Cross-Browser Split 1.1.1
|
76 |
* Copyright 2007-2012 Steven Levithan <stevenlevithan.com>
|
77 |
* Available under the MIT License
|
78 |
* http://blog.stevenlevithan.com/archives/cross-browser-split
|
79 |
*/
|
80 |
+
var nativeSplit = String.prototype.split, compliantExecNpcg = /()??/.exec('')[1] === undefined
|
81 |
+
String.prototype.split = function(separator, limit) {
|
82 |
+
var str = this
|
83 |
+
if (Object.prototype.toString.call(separator) !== '[object RegExp]') {
|
84 |
+
return nativeSplit.call(str, separator, limit)
|
85 |
+
}
|
86 |
+
var output = [],
|
87 |
+
flags = (separator.ignoreCase ? 'i' : '') +
|
88 |
+
(separator.multiline ? 'm' : '') +
|
89 |
+
(separator.extended ? 'x' : '') +
|
90 |
+
(separator.sticky ? 'y' : ''),
|
91 |
+
lastLastIndex = 0,
|
92 |
+
separator2, match, lastIndex, lastLength
|
93 |
+
separator = new RegExp(separator.source, flags + 'g')
|
94 |
+
str += ''
|
95 |
+
if (!compliantExecNpcg) {
|
96 |
+
separator2 = new RegExp('^' + separator.source + '$(?!\\s)', flags)
|
97 |
+
}
|
98 |
+
limit = limit === undefined ? -1 >>> 0 : limit >>> 0
|
99 |
+
while (match = separator.exec(str)) {
|
100 |
+
lastIndex = match.index + match[0].length
|
101 |
+
if (lastIndex > lastLastIndex) {
|
102 |
+
output.push(str.slice(lastLastIndex, match.index))
|
103 |
+
if (!compliantExecNpcg && match.length > 1) {
|
104 |
+
match[0].replace(separator2, function () {
|
105 |
+
for (var i = 1; i < arguments.length - 2; i++) {
|
106 |
+
if (arguments[i] === undefined) {
|
107 |
+
match[i] = undefined
|
108 |
+
}
|
109 |
+
}
|
110 |
+
})
|
111 |
+
}
|
112 |
+
if (match.length > 1 && match.index < str.length) {
|
113 |
+
Array.prototype.push.apply(output, match.slice(1))
|
114 |
+
}
|
115 |
+
lastLength = match[0].length
|
116 |
+
lastLastIndex = lastIndex
|
117 |
+
if (output.length >= limit) {
|
118 |
+
break
|
119 |
+
}
|
120 |
+
}
|
121 |
+
if (separator.lastIndex === match.index) {
|
122 |
+
separator.lastIndex++
|
123 |
+
}
|
124 |
+
}
|
125 |
+
if (lastLastIndex === str.length) {
|
126 |
+
if (lastLength || !separator.test('')) {
|
127 |
+
output.push('')
|
128 |
+
}
|
129 |
+
} else {
|
130 |
+
output.push(str.slice(lastLastIndex))
|
131 |
+
}
|
132 |
+
return output.length > limit ? output.slice(0, limit) : output
|
133 |
+
};
|
assets/js/pickadate/picker.date.js
CHANGED
@@ -1,5 +1,1354 @@
|
|
1 |
/*!
|
2 |
-
* Date picker for pickadate.js v3.5.
|
3 |
* http://amsul.github.io/pickadate.js/date.htm
|
4 |
*/
|
5 |
-
!function(a){"function"==typeof define&&define.amd?define(["picker","jquery"],a):a(Picker,jQuery)}(function(a,b){function c(a,b){var c=this,d=a.$node[0].value,e=a.$node.data("value"),f=e||d,g=e?b.formatSubmit:b.format,h=function(){return"rtl"===getComputedStyle(a.$root[0]).direction};c.settings=b,c.$node=a.$node,c.queue={min:"measure create",max:"measure create",now:"now create",select:"parse create validate",highlight:"parse navigate create validate",view:"parse create validate viewset",disable:"deactivate",enable:"activate"},c.item={},c.item.clear=null,c.item.disable=(b.disable||[]).slice(0),c.item.enable=-function(a){return a[0]===!0?a.shift():-1}(c.item.disable),c.set("min",b.min).set("max",b.max).set("now"),f?c.set("select",f,{format:g}):c.set("select",null).set("highlight",c.item.now),c.key={40:7,38:-7,39:function(){return h()?-1:1},37:function(){return h()?1:-1},go:function(a){var b=c.item.highlight,d=new Date(b.year,b.month,b.date+a);c.set("highlight",[d.getFullYear(),d.getMonth(),d.getDate()],{interval:a}),this.render()}},a.on("render",function(){a.$root.find("."+b.klass.selectMonth).on("change",function(){var c=this.value;c&&(a.set("highlight",[a.get("view").year,c,a.get("highlight").date]),a.$root.find("."+b.klass.selectMonth).trigger("focus"))}),a.$root.find("."+b.klass.selectYear).on("change",function(){var c=this.value;c&&(a.set("highlight",[c,a.get("view").month,a.get("highlight").date]),a.$root.find("."+b.klass.selectYear).trigger("focus"))})}).on("open",function(){a.$root.find("button, select").attr("disabled",!1)}).on("close",function(){a.$root.find("button, select").attr("disabled",!0)})}var d=7,e=6,f=a._;c.prototype.set=function(a,b,c){var d=this,e=d.item;return null===b?("clear"==a&&(a="select"),e[a]=b,d):(e["enable"==a?"disable":"flip"==a?"enable":a]=d.queue[a].split(" ").map(function(e){return b=d[e](a,b,c)}).pop(),"select"==a?d.set("highlight",e.select,c):"highlight"==a?d.set("view",e.highlight,c):a.match(/^(flip|min|max|disable|enable)$/)&&(e.select&&d.disabled(e.select)&&d.set("select",e.select,c),e.highlight&&d.disabled(e.highlight)&&d.set("highlight",e.highlight,c)),d)},c.prototype.get=function(a){return this.item[a]},c.prototype.create=function(a,c,d){var e,g=this;return c=void 0===c?a:c,c==-1/0||1/0==c?e=c:b.isPlainObject(c)&&f.isInteger(c.pick)?c=c.obj:b.isArray(c)?(c=new Date(c[0],c[1],c[2]),c=f.isDate(c)?c:g.create().obj):c=f.isInteger(c)||f.isDate(c)?g.normalize(new Date(c),d):g.now(a,c,d),{year:e||c.getFullYear(),month:e||c.getMonth(),date:e||c.getDate(),day:e||c.getDay(),obj:e||c,pick:e||c.getTime()}},c.prototype.createRange=function(a,c){var d=this,e=function(a){return a===!0||b.isArray(a)||f.isDate(a)?d.create(a):a};return f.isInteger(a)||(a=e(a)),f.isInteger(c)||(c=e(c)),f.isInteger(a)&&b.isPlainObject(c)?a=[c.year,c.month,c.date+a]:f.isInteger(c)&&b.isPlainObject(a)&&(c=[a.year,a.month,a.date+c]),{from:e(a),to:e(c)}},c.prototype.withinRange=function(a,b){return a=this.createRange(a.from,a.to),b.pick>=a.from.pick&&b.pick<=a.to.pick},c.prototype.overlapRanges=function(a,b){var c=this;return a=c.createRange(a.from,a.to),b=c.createRange(b.from,b.to),c.withinRange(a,b.from)||c.withinRange(a,b.to)||c.withinRange(b,a.from)||c.withinRange(b,a.to)},c.prototype.now=function(a,b,c){return b=new Date,c&&c.rel&&b.setDate(b.getDate()+c.rel),this.normalize(b,c)},c.prototype.navigate=function(a,c,d){var e,f,g,h,i=b.isArray(c),j=b.isPlainObject(c),k=this.item.view;if(i||j){for(j?(f=c.year,g=c.month,h=c.date):(f=+c[0],g=+c[1],h=+c[2]),d&&d.nav&&k&&k.month!==g&&(f=k.year,g=k.month),e=new Date(f,g+(d&&d.nav?d.nav:0),1),f=e.getFullYear(),g=e.getMonth();new Date(f,g,h).getMonth()!==g;)h-=1;c=[f,g,h]}return c},c.prototype.normalize=function(a){return a.setHours(0,0,0,0),a},c.prototype.measure=function(a,b){var c=this;return b?f.isInteger(b)&&(b=c.now(a,b,{rel:b})):b="min"==a?-1/0:1/0,b},c.prototype.viewset=function(a,b){return this.create([b.year,b.month,1])},c.prototype.validate=function(a,c,d){var e,g,h,i,j=this,k=c,l=d&&d.interval?d.interval:1,m=-1===j.item.enable,n=j.item.min,o=j.item.max,p=m&&j.item.disable.filter(function(a){if(b.isArray(a)){var d=j.create(a).pick;d<c.pick?e=!0:d>c.pick&&(g=!0)}return f.isInteger(a)}).length;if((!d||!d.nav)&&(!m&&j.disabled(c)||m&&j.disabled(c)&&(p||e||g)||!m&&(c.pick<=n.pick||c.pick>=o.pick)))for(m&&!p&&(!g&&l>0||!e&&0>l)&&(l*=-1);j.disabled(c)&&(Math.abs(l)>1&&(c.month<k.month||c.month>k.month)&&(c=k,l=l>0?1:-1),c.pick<=n.pick?(h=!0,l=1,c=j.create([n.year,n.month,n.date+(c.pick===n.pick?0:-1)])):c.pick>=o.pick&&(i=!0,l=-1,c=j.create([o.year,o.month,o.date+(c.pick===o.pick?0:1)])),!h||!i);)c=j.create([c.year,c.month,c.date+l]);return c},c.prototype.disabled=function(a){var c=this,d=c.item.disable.filter(function(d){return f.isInteger(d)?a.day===(c.settings.firstDay?d:d-1)%7:b.isArray(d)||f.isDate(d)?a.pick===c.create(d).pick:b.isPlainObject(d)?c.withinRange(d,a):void 0});return d=d.length&&!d.filter(function(a){return b.isArray(a)&&"inverted"==a[3]||b.isPlainObject(a)&&a.inverted}).length,-1===c.item.enable?!d:d||a.pick<c.item.min.pick||a.pick>c.item.max.pick},c.prototype.parse=function(a,b,c){var d=this,e={};return b&&"string"==typeof b?(c&&c.format||(c=c||{},c.format=d.settings.format),d.formats.toArray(c.format).map(function(a){var c=d.formats[a],g=c?f.trigger(c,d,[b,e]):a.replace(/^!/,"").length;c&&(e[a]=b.substr(0,g)),b=b.substr(g)}),[e.yyyy||e.yy,+(e.mm||e.m)-1,e.dd||e.d]):b},c.prototype.formats=function(){function a(a,b,c){var d=a.match(/\w+/)[0];return c.mm||c.m||(c.m=b.indexOf(d)+1),d.length}function b(a){return a.match(/\w+/)[0].length}return{d:function(a,b){return a?f.digits(a):b.date},dd:function(a,b){return a?2:f.lead(b.date)},ddd:function(a,c){return a?b(a):this.settings.weekdaysShort[c.day]},dddd:function(a,c){return a?b(a):this.settings.weekdaysFull[c.day]},m:function(a,b){return a?f.digits(a):b.month+1},mm:function(a,b){return a?2:f.lead(b.month+1)},mmm:function(b,c){var d=this.settings.monthsShort;return b?a(b,d,c):d[c.month]},mmmm:function(b,c){var d=this.settings.monthsFull;return b?a(b,d,c):d[c.month]},yy:function(a,b){return a?2:(""+b.year).slice(2)},yyyy:function(a,b){return a?4:b.year},toArray:function(a){return a.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g)},toString:function(a,b){var c=this;return c.formats.toArray(a).map(function(a){return f.trigger(c.formats[a],c,[0,b])||a.replace(/^!/,"")}).join("")}}}(),c.prototype.isDateExact=function(a,c){var d=this;return f.isInteger(a)&&f.isInteger(c)||"boolean"==typeof a&&"boolean"==typeof c?a===c:(f.isDate(a)||b.isArray(a))&&(f.isDate(c)||b.isArray(c))?d.create(a).pick===d.create(c).pick:b.isPlainObject(a)&&b.isPlainObject(c)?d.isDateExact(a.from,c.from)&&d.isDateExact(a.to,c.to):!1},c.prototype.isDateOverlap=function(a,c){var d=this,e=d.settings.firstDay?1:0;return f.isInteger(a)&&(f.isDate(c)||b.isArray(c))?(a=a%7+e,a===d.create(c).day+1):f.isInteger(c)&&(f.isDate(a)||b.isArray(a))?(c=c%7+e,c===d.create(a).day+1):b.isPlainObject(a)&&b.isPlainObject(c)?d.overlapRanges(a,c):!1},c.prototype.flipEnable=function(a){var b=this.item;b.enable=a||(-1==b.enable?1:-1)},c.prototype.deactivate=function(a,c){var d=this,e=d.item.disable.slice(0);return"flip"==c?d.flipEnable():c===!1?(d.flipEnable(1),e=[]):c===!0?(d.flipEnable(-1),e=[]):c.map(function(a){for(var c,g=0;g<e.length;g+=1)if(d.isDateExact(a,e[g])){c=!0;break}c||(f.isInteger(a)||f.isDate(a)||b.isArray(a)||b.isPlainObject(a)&&a.from&&a.to)&&e.push(a)}),e},c.prototype.activate=function(a,c){var d=this,e=d.item.disable,g=e.length;return"flip"==c?d.flipEnable():c===!0?(d.flipEnable(1),e=[]):c===!1?(d.flipEnable(-1),e=[]):c.map(function(a){var c,h,i,j;for(i=0;g>i;i+=1){if(h=e[i],d.isDateExact(h,a)){c=e[i]=null,j=!0;break}if(d.isDateOverlap(h,a)){b.isPlainObject(a)?(a.inverted=!0,c=a):b.isArray(a)?(c=a,c[3]||c.push("inverted")):f.isDate(a)&&(c=[a.getFullYear(),a.getMonth(),a.getDate(),"inverted"]);break}}if(c)for(i=0;g>i;i+=1)if(d.isDateExact(e[i],a)){e[i]=null;break}if(j)for(i=0;g>i;i+=1)if(d.isDateOverlap(e[i],a)){e[i]=null;break}c&&e.push(c)}),e.filter(function(a){return null!=a})},c.prototype.nodes=function(a){var b=this,c=b.settings,g=b.item,h=g.now,i=g.select,j=g.highlight,k=g.view,l=g.disable,m=g.min,n=g.max,o=function(a,b){return c.firstDay&&(a.push(a.shift()),b.push(b.shift())),f.node("thead",f.node("tr",f.group({min:0,max:d-1,i:1,node:"th",item:function(d){return[a[d],c.klass.weekdays,'scope=col title="'+b[d]+'"']}})))}((c.showWeekdaysFull?c.weekdaysFull:c.weekdaysShort).slice(0),c.weekdaysFull.slice(0)),p=function(a){return f.node("div"," ",c.klass["nav"+(a?"Next":"Prev")]+(a&&k.year>=n.year&&k.month>=n.month||!a&&k.year<=m.year&&k.month<=m.month?" "+c.klass.navDisabled:""),"data-nav="+(a||-1)+" "+f.ariaAttr({role:"button",controls:b.$node[0].id+"_table"})+' title="'+(a?c.labelMonthNext:c.labelMonthPrev)+'"')},q=function(){var d=c.showMonthsShort?c.monthsShort:c.monthsFull;return c.selectMonths?f.node("select",f.group({min:0,max:11,i:1,node:"option",item:function(a){return[d[a],0,"value="+a+(k.month==a?" selected":"")+(k.year==m.year&&a<m.month||k.year==n.year&&a>n.month?" disabled":"")]}}),c.klass.selectMonth,(a?"":"disabled")+" "+f.ariaAttr({controls:b.$node[0].id+"_table"})+' title="'+c.labelMonthSelect+'"'):f.node("div",d[k.month],c.klass.month)},r=function(){var d=k.year,e=c.selectYears===!0?5:~~(c.selectYears/2);if(e){var g=m.year,h=n.year,i=d-e,j=d+e;if(g>i&&(j+=g-i,i=g),j>h){var l=i-g,o=j-h;i-=l>o?o:l,j=h}return f.node("select",f.group({min:i,max:j,i:1,node:"option",item:function(a){return[a,0,"value="+a+(d==a?" selected":"")]}}),c.klass.selectYear,(a?"":"disabled")+" "+f.ariaAttr({controls:b.$node[0].id+"_table"})+' title="'+c.labelYearSelect+'"')}return f.node("div",d,c.klass.year)};return f.node("div",(c.selectYears?r()+q():q()+r())+p()+p(1),c.klass.header)+f.node("table",o+f.node("tbody",f.group({min:0,max:e-1,i:1,node:"tr",item:function(a){var e=c.firstDay&&0===b.create([k.year,k.month,1]).day?-7:0;return[f.group({min:d*a-k.day+e+1,max:function(){return this.min+d-1},i:1,node:"td",item:function(a){a=b.create([k.year,k.month,a+(c.firstDay?1:0)]);var d=i&&i.pick==a.pick,e=j&&j.pick==a.pick,g=l&&b.disabled(a)||a.pick<m.pick||a.pick>n.pick;return[f.node("div",a.date,function(b){return b.push(k.month==a.month?c.klass.infocus:c.klass.outfocus),h.pick==a.pick&&b.push(c.klass.now),d&&b.push(c.klass.selected),e&&b.push(c.klass.highlighted),g&&b.push(c.klass.disabled),b.join(" ")}([c.klass.day]),"data-pick="+a.pick+" "+f.ariaAttr({role:"gridcell",selected:d&&b.$node.val()===f.trigger(b.formats.toString,b,[c.format,a])?!0:null,activedescendant:e?!0:null,disabled:g?!0:null})),"",f.ariaAttr({role:"presentation"})]}})]}})),c.klass.table,'id="'+b.$node[0].id+'_table" '+f.ariaAttr({role:"grid",controls:b.$node[0].id,readonly:!0}))+f.node("div",f.node("button",c.today,c.klass.buttonToday,"type=button data-pick="+h.pick+(a?"":" disabled")+" "+f.ariaAttr({controls:b.$node[0].id}))+f.node("button",c.clear,c.klass.buttonClear,"type=button data-clear=1"+(a?"":" disabled")+" "+f.ariaAttr({controls:b.$node[0].id})),c.klass.footer)},c.defaults=function(a){return{labelMonthNext:"Next month",labelMonthPrev:"Previous month",labelMonthSelect:"Select a month",labelYearSelect:"Select a year",monthsFull:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdaysFull:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],today:"Today",clear:"Clear",format:"d mmmm, yyyy",klass:{table:a+"table",header:a+"header",navPrev:a+"nav--prev",navNext:a+"nav--next",navDisabled:a+"nav--disabled",month:a+"month",year:a+"year",selectMonth:a+"select--month",selectYear:a+"select--year",weekdays:a+"weekday",day:a+"day",disabled:a+"day--disabled",selected:a+"day--selected",highlighted:a+"day--highlighted",now:a+"day--today",infocus:a+"day--infocus",outfocus:a+"day--outfocus",footer:a+"footer",buttonClear:a+"button--clear",buttonToday:a+"button--today"}}}(a.klasses().picker+"__"),a.extend("pickadate",c)});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/*!
|
2 |
+
* Date picker for pickadate.js v3.5.6
|
3 |
* http://amsul.github.io/pickadate.js/date.htm
|
4 |
*/
|
5 |
+
|
6 |
+
(function ( factory ) {
|
7 |
+
|
8 |
+
// AMD.
|
9 |
+
if ( typeof define == 'function' && define.amd )
|
10 |
+
define( ['picker', 'jquery'], factory )
|
11 |
+
|
12 |
+
// Node.js/browserify.
|
13 |
+
else if ( typeof exports == 'object' )
|
14 |
+
module.exports = factory( require('./picker.js'), require('jquery') )
|
15 |
+
|
16 |
+
// Browser globals.
|
17 |
+
else factory( Picker, jQuery )
|
18 |
+
|
19 |
+
}(function( Picker, $ ) {
|
20 |
+
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Globals and constants
|
24 |
+
*/
|
25 |
+
var DAYS_IN_WEEK = 7,
|
26 |
+
WEEKS_IN_CALENDAR = 6,
|
27 |
+
_ = Picker._
|
28 |
+
|
29 |
+
|
30 |
+
|
31 |
+
/**
|
32 |
+
* The date picker constructor
|
33 |
+
*/
|
34 |
+
function DatePicker( picker, settings ) {
|
35 |
+
|
36 |
+
var calendar = this,
|
37 |
+
element = picker.$node[ 0 ],
|
38 |
+
elementValue = element.value,
|
39 |
+
elementDataValue = picker.$node.data( 'value' ),
|
40 |
+
valueString = elementDataValue || elementValue,
|
41 |
+
formatString = elementDataValue ? settings.formatSubmit : settings.format,
|
42 |
+
isRTL = function() {
|
43 |
+
|
44 |
+
return element.currentStyle ?
|
45 |
+
|
46 |
+
// For IE.
|
47 |
+
element.currentStyle.direction == 'rtl' :
|
48 |
+
|
49 |
+
// For normal browsers.
|
50 |
+
getComputedStyle( picker.$root[0] ).direction == 'rtl'
|
51 |
+
}
|
52 |
+
|
53 |
+
calendar.settings = settings
|
54 |
+
calendar.$node = picker.$node
|
55 |
+
|
56 |
+
// The queue of methods that will be used to build item objects.
|
57 |
+
calendar.queue = {
|
58 |
+
min: 'measure create',
|
59 |
+
max: 'measure create',
|
60 |
+
now: 'now create',
|
61 |
+
select: 'parse create validate',
|
62 |
+
highlight: 'parse navigate create validate',
|
63 |
+
view: 'parse create validate viewset',
|
64 |
+
disable: 'deactivate',
|
65 |
+
enable: 'activate'
|
66 |
+
}
|
67 |
+
|
68 |
+
// The component's item object.
|
69 |
+
calendar.item = {}
|
70 |
+
|
71 |
+
calendar.item.clear = null
|
72 |
+
calendar.item.disable = ( settings.disable || [] ).slice( 0 )
|
73 |
+
calendar.item.enable = -(function( collectionDisabled ) {
|
74 |
+
return collectionDisabled[ 0 ] === true ? collectionDisabled.shift() : -1
|
75 |
+
})( calendar.item.disable )
|
76 |
+
|
77 |
+
calendar.
|
78 |
+
set( 'min', settings.min ).
|
79 |
+
set( 'max', settings.max ).
|
80 |
+
set( 'now' )
|
81 |
+
|
82 |
+
// When there’s a value, set the `select`, which in turn
|
83 |
+
// also sets the `highlight` and `view`.
|
84 |
+
if ( valueString ) {
|
85 |
+
calendar.set( 'select', valueString, {
|
86 |
+
format: formatString,
|
87 |
+
defaultValue: true
|
88 |
+
})
|
89 |
+
}
|
90 |
+
|
91 |
+
// If there’s no value, default to highlighting “today”.
|
92 |
+
else {
|
93 |
+
calendar.
|
94 |
+
set( 'select', null ).
|
95 |
+
set( 'highlight', calendar.item.now )
|
96 |
+
}
|
97 |
+
|
98 |
+
|
99 |
+
// The keycode to movement mapping.
|
100 |
+
calendar.key = {
|
101 |
+
40: 7, // Down
|
102 |
+
38: -7, // Up
|
103 |
+
39: function() { return isRTL() ? -1 : 1 }, // Right
|
104 |
+
37: function() { return isRTL() ? 1 : -1 }, // Left
|
105 |
+
go: function( timeChange ) {
|
106 |
+
var highlightedObject = calendar.item.highlight,
|
107 |
+
targetDate = new Date( highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange )
|
108 |
+
calendar.set(
|
109 |
+
'highlight',
|
110 |
+
targetDate,
|
111 |
+
{ interval: timeChange }
|
112 |
+
)
|
113 |
+
this.render()
|
114 |
+
}
|
115 |
+
}
|
116 |
+
|
117 |
+
|
118 |
+
// Bind some picker events.
|
119 |
+
picker.
|
120 |
+
on( 'render', function() {
|
121 |
+
picker.$root.find( '.' + settings.klass.selectMonth ).on( 'change', function() {
|
122 |
+
var value = this.value
|
123 |
+
if ( value ) {
|
124 |
+
picker.set( 'highlight', [ picker.get( 'view' ).year, value, picker.get( 'highlight' ).date ] )
|
125 |
+
picker.$root.find( '.' + settings.klass.selectMonth ).trigger( 'focus' )
|
126 |
+
}
|
127 |
+
})
|
128 |
+
picker.$root.find( '.' + settings.klass.selectYear ).on( 'change', function() {
|
129 |
+
var value = this.value
|
130 |
+
if ( value ) {
|
131 |
+
picker.set( 'highlight', [ value, picker.get( 'view' ).month, picker.get( 'highlight' ).date ] )
|
132 |
+
picker.$root.find( '.' + settings.klass.selectYear ).trigger( 'focus' )
|
133 |
+
}
|
134 |
+
})
|
135 |
+
}, 1 ).
|
136 |
+
on( 'open', function() {
|
137 |
+
var includeToday = ''
|
138 |
+
if ( calendar.disabled( calendar.get('now') ) ) {
|
139 |
+
includeToday = ':not(.' + settings.klass.buttonToday + ')'
|
140 |
+
}
|
141 |
+
picker.$root.find( 'button' + includeToday + ', select' ).attr( 'disabled', false )
|
142 |
+
}, 1 ).
|
143 |
+
on( 'close', function() {
|
144 |
+
picker.$root.find( 'button, select' ).attr( 'disabled', true )
|
145 |
+
}, 1 )
|
146 |
+
|
147 |
+
} //DatePicker
|
148 |
+
|
149 |
+
|
150 |
+
/**
|
151 |
+
* Set a datepicker item object.
|
152 |
+
*/
|
153 |
+
DatePicker.prototype.set = function( type, value, options ) {
|
154 |
+
|
155 |
+
var calendar = this,
|
156 |
+
calendarItem = calendar.item
|
157 |
+
|
158 |
+
// If the value is `null` just set it immediately.
|
159 |
+
if ( value === null ) {
|
160 |
+
if ( type == 'clear' ) type = 'select'
|
161 |
+
calendarItem[ type ] = value
|
162 |
+
return calendar
|
163 |
+
}
|
164 |
+
|
165 |
+
// Otherwise go through the queue of methods, and invoke the functions.
|
166 |
+
// Update this as the time unit, and set the final value as this item.
|
167 |
+
// * In the case of `enable`, keep the queue but set `disable` instead.
|
168 |
+
// And in the case of `flip`, keep the queue but set `enable` instead.
|
169 |
+
calendarItem[ ( type == 'enable' ? 'disable' : type == 'flip' ? 'enable' : type ) ] = calendar.queue[ type ].split( ' ' ).map( function( method ) {
|
170 |
+
value = calendar[ method ]( type, value, options )
|
171 |
+
return value
|
172 |
+
}).pop()
|
173 |
+
|
174 |
+
// Check if we need to cascade through more updates.
|
175 |
+
if ( type == 'select' ) {
|
176 |
+
calendar.set( 'highlight', calendarItem.select, options )
|
177 |
+
}
|
178 |
+
else if ( type == 'highlight' ) {
|
179 |
+
calendar.set( 'view', calendarItem.highlight, options )
|
180 |
+
}
|
181 |
+
else if ( type.match( /^(flip|min|max|disable|enable)$/ ) ) {
|
182 |
+
if ( calendarItem.select && calendar.disabled( calendarItem.select ) ) {
|
183 |
+
calendar.set( 'select', calendarItem.select, options )
|
184 |
+
}
|
185 |
+
if ( calendarItem.highlight && calendar.disabled( calendarItem.highlight ) ) {
|
186 |
+
calendar.set( 'highlight', calendarItem.highlight, options )
|
187 |
+
}
|
188 |
+
}
|
189 |
+
|
190 |
+
return calendar
|
191 |
+
} //DatePicker.prototype.set
|
192 |
+
|
193 |
+
|
194 |
+
/**
|
195 |
+
* Get a datepicker item object.
|
196 |
+
*/
|
197 |
+
DatePicker.prototype.get = function( type ) {
|
198 |
+
return this.item[ type ]
|
199 |
+
} //DatePicker.prototype.get
|
200 |
+
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Create a picker date object.
|
204 |
+
*/
|
205 |
+
DatePicker.prototype.create = function( type, value, options ) {
|
206 |
+
|
207 |
+
var isInfiniteValue,
|
208 |
+
calendar = this
|
209 |
+
|
210 |
+
// If there’s no value, use the type as the value.
|
211 |
+
value = value === undefined ? type : value
|
212 |
+
|
213 |
+
|
214 |
+
// If it’s infinity, update the value.
|
215 |
+
if ( value == -Infinity || value == Infinity ) {
|
216 |
+
isInfiniteValue = value
|
217 |
+
}
|
218 |
+
|
219 |
+
// If it’s an object, use the native date object.
|
220 |
+
else if ( $.isPlainObject( value ) && _.isInteger( value.pick ) ) {
|
221 |
+
value = value.obj
|
222 |
+
}
|
223 |
+
|
224 |
+
// If it’s an array, convert it into a date and make sure
|
225 |
+
// that it’s a valid date – otherwise default to today.
|
226 |
+
else if ( $.isArray( value ) ) {
|
227 |
+
value = new Date( value[ 0 ], value[ 1 ], value[ 2 ] )
|
228 |
+
value = _.isDate( value ) ? value : calendar.create().obj
|
229 |
+
}
|
230 |
+
|
231 |
+
// If it’s a number or date object, make a normalized date.
|
232 |
+
else if ( _.isInteger( value ) || _.isDate( value ) ) {
|
233 |
+
value = calendar.normalize( new Date( value ), options )
|
234 |
+
}
|
235 |
+
|
236 |
+
// If it’s a literal true or any other case, set it to now.
|
237 |
+
else /*if ( value === true )*/ {
|
238 |
+
value = calendar.now( type, value, options )
|
239 |
+
}
|
240 |
+
|
241 |
+
// Return the compiled object.
|
242 |
+
return {
|
243 |
+
year: isInfiniteValue || value.getFullYear(),
|
244 |
+
month: isInfiniteValue || value.getMonth(),
|
245 |
+
date: isInfiniteValue || value.getDate(),
|
246 |
+
day: isInfiniteValue || value.getDay(),
|
247 |
+
obj: isInfiniteValue || value,
|
248 |
+
pick: isInfiniteValue || value.getTime()
|
249 |
+
}
|
250 |
+
} //DatePicker.prototype.create
|
251 |
+
|
252 |
+
|
253 |
+
/**
|
254 |
+
* Create a range limit object using an array, date object,
|
255 |
+
* literal “true”, or integer relative to another time.
|
256 |
+
*/
|
257 |
+
DatePicker.prototype.createRange = function( from, to ) {
|
258 |
+
|
259 |
+
var calendar = this,
|
260 |
+
createDate = function( date ) {
|
261 |
+
if ( date === true || $.isArray( date ) || _.isDate( date ) ) {
|
262 |
+
return calendar.create( date )
|
263 |
+
}
|
264 |
+
return date
|
265 |
+
}
|
266 |
+
|
267 |
+
// Create objects if possible.
|
268 |
+
if ( !_.isInteger( from ) ) {
|
269 |
+
from = createDate( from )
|
270 |
+
}
|
271 |
+
if ( !_.isInteger( to ) ) {
|
272 |
+
to = createDate( to )
|
273 |
+
}
|
274 |
+
|
275 |
+
// Create relative dates.
|
276 |
+
if ( _.isInteger( from ) && $.isPlainObject( to ) ) {
|
277 |
+
from = [ to.year, to.month, to.date + from ];
|
278 |
+
}
|
279 |
+
else if ( _.isInteger( to ) && $.isPlainObject( from ) ) {
|
280 |
+
to = [ from.year, from.month, from.date + to ];
|
281 |
+
}
|
282 |
+
|
283 |
+
return {
|
284 |
+
from: createDate( from ),
|
285 |
+
to: createDate( to )
|
286 |
+
}
|
287 |
+
} //DatePicker.prototype.createRange
|
288 |
+
|
289 |
+
|
290 |
+
/**
|
291 |
+
* Check if a date unit falls within a date range object.
|
292 |
+
*/
|
293 |
+
DatePicker.prototype.withinRange = function( range, dateUnit ) {
|
294 |
+
range = this.createRange(range.from, range.to)
|
295 |
+
return dateUnit.pick >= range.from.pick && dateUnit.pick <= range.to.pick
|
296 |
+
}
|
297 |
+
|
298 |
+
|
299 |
+
/**
|
300 |
+
* Check if two date range objects overlap.
|
301 |
+
*/
|
302 |
+
DatePicker.prototype.overlapRanges = function( one, two ) {
|
303 |
+
|
304 |
+
var calendar = this
|
305 |
+
|
306 |
+
// Convert the ranges into comparable dates.
|
307 |
+
one = calendar.createRange( one.from, one.to )
|
308 |
+
two = calendar.createRange( two.from, two.to )
|
309 |
+
|
310 |
+
return calendar.withinRange( one, two.from ) || calendar.withinRange( one, two.to ) ||
|
311 |
+
calendar.withinRange( two, one.from ) || calendar.withinRange( two, one.to )
|
312 |
+
}
|
313 |
+
|
314 |
+
|
315 |
+
/**
|
316 |
+
* Get the date today.
|
317 |
+
*/
|
318 |
+
DatePicker.prototype.now = function( type, value, options ) {
|
319 |
+
value = new Date()
|
320 |
+
if ( options && options.rel ) {
|
321 |
+
value.setDate( value.getDate() + options.rel )
|
322 |
+
}
|
323 |
+
return this.normalize( value, options )
|
324 |
+
}
|
325 |
+
|
326 |
+
|
327 |
+
/**
|
328 |
+
* Navigate to next/prev month.
|
329 |
+
*/
|
330 |
+
DatePicker.prototype.navigate = function( type, value, options ) {
|
331 |
+
|
332 |
+
var targetDateObject,
|
333 |
+
targetYear,
|
334 |
+
targetMonth,
|
335 |
+
targetDate,
|
336 |
+
isTargetArray = $.isArray( value ),
|
337 |
+
isTargetObject = $.isPlainObject( value ),
|
338 |
+
viewsetObject = this.item.view/*,
|
339 |
+
safety = 100*/
|
340 |
+
|
341 |
+
|
342 |
+
if ( isTargetArray || isTargetObject ) {
|
343 |
+
|
344 |
+
if ( isTargetObject ) {
|
345 |
+
targetYear = value.year
|
346 |
+
targetMonth = value.month
|
347 |
+
targetDate = value.date
|
348 |
+
}
|
349 |
+
else {
|
350 |
+
targetYear = +value[0]
|
351 |
+
targetMonth = +value[1]
|
352 |
+
targetDate = +value[2]
|
353 |
+
}
|
354 |
+
|
355 |
+
// If we’re navigating months but the view is in a different
|
356 |
+
// month, navigate to the view’s year and month.
|
357 |
+
if ( options && options.nav && viewsetObject && viewsetObject.month !== targetMonth ) {
|
358 |
+
targetYear = viewsetObject.year
|
359 |
+
targetMonth = viewsetObject.month
|
360 |
+
}
|
361 |
+
|
362 |
+
// Figure out the expected target year and month.
|
363 |
+
targetDateObject = new Date( targetYear, targetMonth + ( options && options.nav ? options.nav : 0 ), 1 )
|
364 |
+
targetYear = targetDateObject.getFullYear()
|
365 |
+
targetMonth = targetDateObject.getMonth()
|
366 |
+
|
367 |
+
// If the month we’re going to doesn’t have enough days,
|
368 |
+
// keep decreasing the date until we reach the month’s last date.
|
369 |
+
while ( /*safety &&*/ new Date( targetYear, targetMonth, targetDate ).getMonth() !== targetMonth ) {
|
370 |
+
targetDate -= 1
|
371 |
+
/*safety -= 1
|
372 |
+
if ( !safety ) {
|
373 |
+
throw 'Fell into an infinite loop while navigating to ' + new Date( targetYear, targetMonth, targetDate ) + '.'
|
374 |
+
}*/
|
375 |
+
}
|
376 |
+
|
377 |
+
value = [ targetYear, targetMonth, targetDate ]
|
378 |
+
}
|
379 |
+
|
380 |
+
return value
|
381 |
+
} //DatePicker.prototype.navigate
|
382 |
+
|
383 |
+
|
384 |
+
/**
|
385 |
+
* Normalize a date by setting the hours to midnight.
|
386 |
+
*/
|
387 |
+
DatePicker.prototype.normalize = function( value/*, options*/ ) {
|
388 |
+
value.setHours( 0, 0, 0, 0 )
|
389 |
+
return value
|
390 |
+
}
|
391 |
+
|
392 |
+
|
393 |
+
/**
|
394 |
+
* Measure the range of dates.
|
395 |
+
*/
|
396 |
+
DatePicker.prototype.measure = function( type, value/*, options*/ ) {
|
397 |
+
|
398 |
+
var calendar = this
|
399 |
+
|
400 |
+
// If it’s anything false-y, remove the limits.
|
401 |
+
if ( !value ) {
|
402 |
+
value = type == 'min' ? -Infinity : Infinity
|
403 |
+
}
|
404 |
+
|
405 |
+
// If it’s a string, parse it.
|
406 |
+
else if ( typeof value == 'string' ) {
|
407 |
+
value = calendar.parse( type, value )
|
408 |
+
}
|
409 |
+
|
410 |
+
// If it's an integer, get a date relative to today.
|
411 |
+
else if ( _.isInteger( value ) ) {
|
412 |
+
value = calendar.now( type, value, { rel: value } )
|
413 |
+
}
|
414 |
+
|
415 |
+
return value
|
416 |
+
} ///DatePicker.prototype.measure
|
417 |
+
|
418 |
+
|
419 |
+
/**
|
420 |
+
* Create a viewset object based on navigation.
|
421 |
+
*/
|
422 |
+
DatePicker.prototype.viewset = function( type, dateObject/*, options*/ ) {
|
423 |
+
return this.create([ dateObject.year, dateObject.month, 1 ])
|
424 |
+
}
|
425 |
+
|
426 |
+
|
427 |
+
/**
|
428 |
+
* Validate a date as enabled and shift if needed.
|
429 |
+
*/
|
430 |
+
DatePicker.prototype.validate = function( type, dateObject, options ) {
|
431 |
+
|
432 |
+
var calendar = this,
|
433 |
+
|
434 |
+
// Keep a reference to the original date.
|
435 |
+
originalDateObject = dateObject,
|
436 |
+
|
437 |
+
// Make sure we have an interval.
|
438 |
+
interval = options && options.interval ? options.interval : 1,
|
439 |
+
|
440 |
+
// Check if the calendar enabled dates are inverted.
|
441 |
+
isFlippedBase = calendar.item.enable === -1,
|
442 |
+
|
443 |
+
// Check if we have any enabled dates after/before now.
|
444 |
+
hasEnabledBeforeTarget, hasEnabledAfterTarget,
|
445 |
+
|
446 |
+
// The min & max limits.
|
447 |
+
minLimitObject = calendar.item.min,
|
448 |
+
maxLimitObject = calendar.item.max,
|
449 |
+
|
450 |
+
// Check if we’ve reached the limit during shifting.
|
451 |
+
reachedMin, reachedMax,
|
452 |
+
|
453 |
+
// Check if the calendar is inverted and at least one weekday is enabled.
|
454 |
+
hasEnabledWeekdays = isFlippedBase && calendar.item.disable.filter( function( value ) {
|
455 |
+
|
456 |
+
// If there’s a date, check where it is relative to the target.
|
457 |
+
if ( $.isArray( value ) ) {
|
458 |
+
var dateTime = calendar.create( value ).pick
|
459 |
+
if ( dateTime < dateObject.pick ) hasEnabledBeforeTarget = true
|
460 |
+
else if ( dateTime > dateObject.pick ) hasEnabledAfterTarget = true
|
461 |
+
}
|
462 |
+
|
463 |
+
// Return only integers for enabled weekdays.
|
464 |
+
return _.isInteger( value )
|
465 |
+
}).length/*,
|
466 |
+
|
467 |
+
safety = 100*/
|
468 |
+
|
469 |
+
|
470 |
+
|
471 |
+
// Cases to validate for:
|
472 |
+
// [1] Not inverted and date disabled.
|
473 |
+
// [2] Inverted and some dates enabled.
|
474 |
+
// [3] Not inverted and out of range.
|
475 |
+
//
|
476 |
+
// Cases to **not** validate for:
|
477 |
+
// • Navigating months.
|
478 |
+
// • Not inverted and date enabled.
|
479 |
+
// • Inverted and all dates disabled.
|
480 |
+
// • ..and anything else.
|
481 |
+
if ( !options || (!options.nav && !options.defaultValue) ) if (
|
482 |
+
/* 1 */ ( !isFlippedBase && calendar.disabled( dateObject ) ) ||
|
483 |
+
/* 2 */ ( isFlippedBase && calendar.disabled( dateObject ) && ( hasEnabledWeekdays || hasEnabledBeforeTarget || hasEnabledAfterTarget ) ) ||
|
484 |
+
/* 3 */ ( !isFlippedBase && (dateObject.pick <= minLimitObject.pick || dateObject.pick >= maxLimitObject.pick) )
|
485 |
+
) {
|
486 |
+
|
487 |
+
|
488 |
+
// When inverted, flip the direction if there aren’t any enabled weekdays
|
489 |
+
// and there are no enabled dates in the direction of the interval.
|
490 |
+
if ( isFlippedBase && !hasEnabledWeekdays && ( ( !hasEnabledAfterTarget && interval > 0 ) || ( !hasEnabledBeforeTarget && interval < 0 ) ) ) {
|
491 |
+
interval *= -1
|
492 |
+
}
|
493 |
+
|
494 |
+
|
495 |
+
// Keep looping until we reach an enabled date.
|
496 |
+
while ( /*safety &&*/ calendar.disabled( dateObject ) ) {
|
497 |
+
|
498 |
+
/*safety -= 1
|
499 |
+
if ( !safety ) {
|
500 |
+
throw 'Fell into an infinite loop while validating ' + dateObject.obj + '.'
|
501 |
+
}*/
|
502 |
+
|
503 |
+
|
504 |
+
// If we’ve looped into the next/prev month with a large interval, return to the original date and flatten the interval.
|
505 |
+
if ( Math.abs( interval ) > 1 && ( dateObject.month < originalDateObject.month || dateObject.month > originalDateObject.month ) ) {
|
506 |
+
dateObject = originalDateObject
|
507 |
+
interval = interval > 0 ? 1 : -1
|
508 |
+
}
|
509 |
+
|
510 |
+
|
511 |
+
// If we’ve reached the min/max limit, reverse the direction, flatten the interval and set it to the limit.
|
512 |
+
if ( dateObject.pick <= minLimitObject.pick ) {
|
513 |
+
reachedMin = true
|
514 |
+
interval = 1
|
515 |
+
dateObject = calendar.create([
|
516 |
+
minLimitObject.year,
|
517 |
+
minLimitObject.month,
|
518 |
+
minLimitObject.date + (dateObject.pick === minLimitObject.pick ? 0 : -1)
|
519 |
+
])
|
520 |
+
}
|
521 |
+
else if ( dateObject.pick >= maxLimitObject.pick ) {
|
522 |
+
reachedMax = true
|
523 |
+
interval = -1
|
524 |
+
dateObject = calendar.create([
|
525 |
+
maxLimitObject.year,
|
526 |
+
maxLimitObject.month,
|
527 |
+
maxLimitObject.date + (dateObject.pick === maxLimitObject.pick ? 0 : 1)
|
528 |
+
])
|
529 |
+
}
|
530 |
+
|
531 |
+
|
532 |
+
// If we’ve reached both limits, just break out of the loop.
|
533 |
+
if ( reachedMin && reachedMax ) {
|
534 |
+
break
|
535 |
+
}
|
536 |
+
|
537 |
+
|
538 |
+
// Finally, create the shifted date using the interval and keep looping.
|
539 |
+
dateObject = calendar.create([ dateObject.year, dateObject.month, dateObject.date + interval ])
|
540 |
+
}
|
541 |
+
|
542 |
+
} //endif
|
543 |
+
|
544 |
+
|
545 |
+
// Return the date object settled on.
|
546 |
+
return dateObject
|
547 |
+
} //DatePicker.prototype.validate
|
548 |
+
|
549 |
+
|
550 |
+
/**
|
551 |
+
* Check if a date is disabled.
|
552 |
+
*/
|
553 |
+
DatePicker.prototype.disabled = function( dateToVerify ) {
|
554 |
+
|
555 |
+
var
|
556 |
+
calendar = this,
|
557 |
+
|
558 |
+
// Filter through the disabled dates to check if this is one.
|
559 |
+
isDisabledMatch = calendar.item.disable.filter( function( dateToDisable ) {
|
560 |
+
|
561 |
+
// If the date is a number, match the weekday with 0index and `firstDay` check.
|
562 |
+
if ( _.isInteger( dateToDisable ) ) {
|
563 |
+
return dateToVerify.day === ( calendar.settings.firstDay ? dateToDisable : dateToDisable - 1 ) % 7
|
564 |
+
}
|
565 |
+
|
566 |
+
// If it’s an array or a native JS date, create and match the exact date.
|
567 |
+
if ( $.isArray( dateToDisable ) || _.isDate( dateToDisable ) ) {
|
568 |
+
return dateToVerify.pick === calendar.create( dateToDisable ).pick
|
569 |
+
}
|
570 |
+
|
571 |
+
// If it’s an object, match a date within the “from” and “to” range.
|
572 |
+
if ( $.isPlainObject( dateToDisable ) ) {
|
573 |
+
return calendar.withinRange( dateToDisable, dateToVerify )
|
574 |
+
}
|
575 |
+
})
|
576 |
+
|
577 |
+
// If this date matches a disabled date, confirm it’s not inverted.
|
578 |
+
isDisabledMatch = isDisabledMatch.length && !isDisabledMatch.filter(function( dateToDisable ) {
|
579 |
+
return $.isArray( dateToDisable ) && dateToDisable[3] == 'inverted' ||
|
580 |
+
$.isPlainObject( dateToDisable ) && dateToDisable.inverted
|
581 |
+
}).length
|
582 |
+
|
583 |
+
// Check the calendar “enabled” flag and respectively flip the
|
584 |
+
// disabled state. Then also check if it’s beyond the min/max limits.
|
585 |
+
return calendar.item.enable === -1 ? !isDisabledMatch : isDisabledMatch ||
|
586 |
+
dateToVerify.pick < calendar.item.min.pick ||
|
587 |
+
dateToVerify.pick > calendar.item.max.pick
|
588 |
+
|
589 |
+
} //DatePicker.prototype.disabled
|
590 |
+
|
591 |
+
|
592 |
+
/**
|
593 |
+
* Parse a string into a usable type.
|
594 |
+
*/
|
595 |
+
DatePicker.prototype.parse = function( type, value, options ) {
|
596 |
+
|
597 |
+
var calendar = this,
|
598 |
+
parsingObject = {}
|
599 |
+
|
600 |
+
// If it’s already parsed, we’re good.
|
601 |
+
if ( !value || typeof value != 'string' ) {
|
602 |
+
return value
|
603 |
+
}
|
604 |
+
|
605 |
+
// We need a `.format` to parse the value with.
|
606 |
+
if ( !( options && options.format ) ) {
|
607 |
+
options = options || {}
|
608 |
+
options.format = calendar.settings.format
|
609 |
+
}
|
610 |
+
|
611 |
+
// Convert the format into an array and then map through it.
|
612 |
+
calendar.formats.toArray( options.format ).map( function( label ) {
|
613 |
+
|
614 |
+
var
|
615 |
+
// Grab the formatting label.
|
616 |
+
formattingLabel = calendar.formats[ label ],
|
617 |
+
|
618 |
+
// The format length is from the formatting label function or the
|
619 |
+
// label length without the escaping exclamation (!) mark.
|
620 |
+
formatLength = formattingLabel ? _.trigger( formattingLabel, calendar, [ value, parsingObject ] ) : label.replace( /^!/, '' ).length
|
621 |
+
|
622 |
+
// If there's a format label, split the value up to the format length.
|
623 |
+
// Then add it to the parsing object with appropriate label.
|
624 |
+
if ( formattingLabel ) {
|
625 |
+
parsingObject[ label ] = value.substr( 0, formatLength )
|
626 |
+
}
|
627 |
+
|
628 |
+
// Update the value as the substring from format length to end.
|
629 |
+
value = value.substr( formatLength )
|
630 |
+
})
|
631 |
+
|
632 |
+
// Compensate for month 0index.
|
633 |
+
return [
|
634 |
+
parsingObject.yyyy || parsingObject.yy,
|
635 |
+
+( parsingObject.mm || parsingObject.m ) - 1,
|
636 |
+
parsingObject.dd || parsingObject.d
|
637 |
+
]
|
638 |
+
} //DatePicker.prototype.parse
|
639 |
+
|
640 |
+
|
641 |
+
/**
|
642 |
+
* Various formats to display the object in.
|
643 |
+
*/
|
644 |
+
DatePicker.prototype.formats = (function() {
|
645 |
+
|
646 |
+
// Return the length of the first word in a collection.
|
647 |
+
function getWordLengthFromCollection( string, collection, dateObject ) {
|
648 |
+
|
649 |
+
// Grab the first word from the string.
|
650 |
+
// Regex pattern from http://stackoverflow.com/q/150033
|
651 |
+
var word = string.match( /[^\x00-\x7F]+|\w+/ )[ 0 ]
|
652 |
+
|
653 |
+
// If there's no month index, add it to the date object
|
654 |
+
if ( !dateObject.mm && !dateObject.m ) {
|
655 |
+
dateObject.m = collection.indexOf( word ) + 1
|
656 |
+
}
|
657 |
+
|
658 |
+
// Return the length of the word.
|
659 |
+
return word.length
|
660 |
+
}
|
661 |
+
|
662 |
+
// Get the length of the first word in a string.
|
663 |
+
function getFirstWordLength( string ) {
|
664 |
+
return string.match( /\w+/ )[ 0 ].length
|
665 |
+
}
|
666 |
+
|
667 |
+
return {
|
668 |
+
|
669 |
+
d: function( string, dateObject ) {
|
670 |
+
|
671 |
+
// If there's string, then get the digits length.
|
672 |
+
// Otherwise return the selected date.
|
673 |
+
return string ? _.digits( string ) : dateObject.date
|
674 |
+
},
|
675 |
+
dd: function( string, dateObject ) {
|
676 |
+
|
677 |
+
// If there's a string, then the length is always 2.
|
678 |
+
// Otherwise return the selected date with a leading zero.
|
679 |
+
return string ? 2 : _.lead( dateObject.date )
|
680 |
+
},
|
681 |
+
ddd: function( string, dateObject ) {
|
682 |
+
|
683 |
+
// If there's a string, then get the length of the first word.
|
684 |
+
// Otherwise return the short selected weekday.
|
685 |
+
return string ? getFirstWordLength( string ) : this.settings.weekdaysShort[ dateObject.day ]
|
686 |
+
},
|
687 |
+
dddd: function( string, dateObject ) {
|
688 |
+
|
689 |
+
// If there's a string, then get the length of the first word.
|
690 |
+
// Otherwise return the full selected weekday.
|
691 |
+
return string ? getFirstWordLength( string ) : this.settings.weekdaysFull[ dateObject.day ]
|
692 |
+
},
|
693 |
+
m: function( string, dateObject ) {
|
694 |
+
|
695 |
+
// If there's a string, then get the length of the digits
|
696 |
+
// Otherwise return the selected month with 0index compensation.
|
697 |
+
return string ? _.digits( string ) : dateObject.month + 1
|
698 |
+
},
|
699 |
+
mm: function( string, dateObject ) {
|
700 |
+
|
701 |
+
// If there's a string, then the length is always 2.
|
702 |
+
// Otherwise return the selected month with 0index and leading zero.
|
703 |
+
return string ? 2 : _.lead( dateObject.month + 1 )
|
704 |
+
},
|
705 |
+
mmm: function( string, dateObject ) {
|
706 |
+
|
707 |
+
var collection = this.settings.monthsShort
|
708 |
+
|
709 |
+
// If there's a string, get length of the relevant month from the short
|
710 |
+
// months collection. Otherwise return the selected month from that collection.
|
711 |
+
return string ? getWordLengthFromCollection( string, collection, dateObject ) : collection[ dateObject.month ]
|
712 |
+
},
|
713 |
+
mmmm: function( string, dateObject ) {
|
714 |
+
|
715 |
+
var collection = this.settings.monthsFull
|
716 |
+
|
717 |
+
// If there's a string, get length of the relevant month from the full
|
718 |
+
// months collection. Otherwise return the selected month from that collection.
|
719 |
+
return string ? getWordLengthFromCollection( string, collection, dateObject ) : collection[ dateObject.month ]
|
720 |
+
},
|
721 |
+
yy: function( string, dateObject ) {
|
722 |
+
|
723 |
+
// If there's a string, then the length is always 2.
|
724 |
+
// Otherwise return the selected year by slicing out the first 2 digits.
|
725 |
+
return string ? 2 : ( '' + dateObject.year ).slice( 2 )
|
726 |
+
},
|
727 |
+
yyyy: function( string, dateObject ) {
|
728 |
+
|
729 |
+
// If there's a string, then the length is always 4.
|
730 |
+
// Otherwise return the selected year.
|
731 |
+
return string ? 4 : dateObject.year
|
732 |
+
},
|
733 |
+
|
734 |
+
// Create an array by splitting the formatting string passed.
|
735 |
+
toArray: function( formatString ) { return formatString.split( /(d{1,4}|m{1,4}|y{4}|yy|!.)/g ) },
|
736 |
+
|
737 |
+
// Format an object into a string using the formatting options.
|
738 |
+
toString: function ( formatString, itemObject ) {
|
739 |
+
var calendar = this
|
740 |
+
return calendar.formats.toArray( formatString ).map( function( label ) {
|
741 |
+
return _.trigger( calendar.formats[ label ], calendar, [ 0, itemObject ] ) || label.replace( /^!/, '' )
|
742 |
+
}).join( '' )
|
743 |
+
}
|
744 |
+
}
|
745 |
+
})() //DatePicker.prototype.formats
|
746 |
+
|
747 |
+
|
748 |
+
|
749 |
+
|
750 |
+
/**
|
751 |
+
* Check if two date units are the exact.
|
752 |
+
*/
|
753 |
+
DatePicker.prototype.isDateExact = function( one, two ) {
|
754 |
+
|
755 |
+
var calendar = this
|
756 |
+
|
757 |
+
// When we’re working with weekdays, do a direct comparison.
|
758 |
+
if (
|
759 |
+
( _.isInteger( one ) && _.isInteger( two ) ) ||
|
760 |
+
( typeof one == 'boolean' && typeof two == 'boolean' )
|
761 |
+
) {
|
762 |
+
return one === two
|
763 |
+
}
|
764 |
+
|
765 |
+
// When we’re working with date representations, compare the “pick” value.
|
766 |
+
if (
|
767 |
+
( _.isDate( one ) || $.isArray( one ) ) &&
|
768 |
+
( _.isDate( two ) || $.isArray( two ) )
|
769 |
+
) {
|
770 |
+
return calendar.create( one ).pick === calendar.create( two ).pick
|
771 |
+
}
|
772 |
+
|
773 |
+
// When we’re working with range objects, compare the “from” and “to”.
|
774 |
+
if ( $.isPlainObject( one ) && $.isPlainObject( two ) ) {
|
775 |
+
return calendar.isDateExact( one.from, two.from ) && calendar.isDateExact( one.to, two.to )
|
776 |
+
}
|
777 |
+
|
778 |
+
return false
|
779 |
+
}
|
780 |
+
|
781 |
+
|
782 |
+
/**
|
783 |
+
* Check if two date units overlap.
|
784 |
+
*/
|
785 |
+
DatePicker.prototype.isDateOverlap = function( one, two ) {
|
786 |
+
|
787 |
+
var calendar = this,
|
788 |
+
firstDay = calendar.settings.firstDay ? 1 : 0
|
789 |
+
|
790 |
+
// When we’re working with a weekday index, compare the days.
|
791 |
+
if ( _.isInteger( one ) && ( _.isDate( two ) || $.isArray( two ) ) ) {
|
792 |
+
one = one % 7 + firstDay
|
793 |
+
return one === calendar.create( two ).day + 1
|
794 |
+
}
|
795 |
+
if ( _.isInteger( two ) && ( _.isDate( one ) || $.isArray( one ) ) ) {
|
796 |
+
two = two % 7 + firstDay
|
797 |
+
return two === calendar.create( one ).day + 1
|
798 |
+
}
|
799 |
+
|
800 |
+
// When we’re working with range objects, check if the ranges overlap.
|
801 |
+
if ( $.isPlainObject( one ) && $.isPlainObject( two ) ) {
|
802 |
+
return calendar.overlapRanges( one, two )
|
803 |
+
}
|
804 |
+
|
805 |
+
return false
|
806 |
+
}
|
807 |
+
|
808 |
+
|
809 |
+
/**
|
810 |
+
* Flip the “enabled” state.
|
811 |
+
*/
|
812 |
+
DatePicker.prototype.flipEnable = function(val) {
|
813 |
+
var itemObject = this.item
|
814 |
+
itemObject.enable = val || (itemObject.enable == -1 ? 1 : -1)
|
815 |
+
}
|
816 |
+
|
817 |
+
|
818 |
+
/**
|
819 |
+
* Mark a collection of dates as “disabled”.
|
820 |
+
*/
|
821 |
+
DatePicker.prototype.deactivate = function( type, datesToDisable ) {
|
822 |
+
|
823 |
+
var calendar = this,
|
824 |
+
disabledItems = calendar.item.disable.slice(0)
|
825 |
+
|
826 |
+
|
827 |
+
// If we’re flipping, that’s all we need to do.
|
828 |
+
if ( datesToDisable == 'flip' ) {
|
829 |
+
calendar.flipEnable()
|
830 |
+
}
|
831 |
+
|
832 |
+
else if ( datesToDisable === false ) {
|
833 |
+
calendar.flipEnable(1)
|
834 |
+
disabledItems = []
|
835 |
+
}
|
836 |
+
|
837 |
+
else if ( datesToDisable === true ) {
|
838 |
+
calendar.flipEnable(-1)
|
839 |
+
disabledItems = []
|
840 |
+
}
|
841 |
+
|
842 |
+
// Otherwise go through the dates to disable.
|
843 |
+
else {
|
844 |
+
|
845 |
+
datesToDisable.map(function( unitToDisable ) {
|
846 |
+
|
847 |
+
var matchFound
|
848 |
+
|
849 |
+
// When we have disabled items, check for matches.
|
850 |
+
// If something is matched, immediately break out.
|
851 |
+
for ( var index = 0; index < disabledItems.length; index += 1 ) {
|
852 |
+
if ( calendar.isDateExact( unitToDisable, disabledItems[index] ) ) {
|
853 |
+
matchFound = true
|
854 |
+
break
|
855 |
+
}
|
856 |
+
}
|
857 |
+
|
858 |
+
// If nothing was found, add the validated unit to the collection.
|
859 |
+
if ( !matchFound ) {
|
860 |
+
if (
|
861 |
+
_.isInteger( unitToDisable ) ||
|
862 |
+
_.isDate( unitToDisable ) ||
|
863 |
+
$.isArray( unitToDisable ) ||
|
864 |
+
( $.isPlainObject( unitToDisable ) && unitToDisable.from && unitToDisable.to )
|
865 |
+
) {
|
866 |
+
disabledItems.push( unitToDisable )
|
867 |
+
}
|
868 |
+
}
|
869 |
+
})
|
870 |
+
}
|
871 |
+
|
872 |
+
// Return the updated collection.
|
873 |
+
return disabledItems
|
874 |
+
} //DatePicker.prototype.deactivate
|
875 |
+
|
876 |
+
|
877 |
+
/**
|
878 |
+
* Mark a collection of dates as “enabled”.
|
879 |
+
*/
|
880 |
+
DatePicker.prototype.activate = function( type, datesToEnable ) {
|
881 |
+
|
882 |
+
var calendar = this,
|
883 |
+
disabledItems = calendar.item.disable,
|
884 |
+
disabledItemsCount = disabledItems.length
|
885 |
+
|
886 |
+
// If we’re flipping, that’s all we need to do.
|
887 |
+
if ( datesToEnable == 'flip' ) {
|
888 |
+
calendar.flipEnable()
|
889 |
+
}
|
890 |
+
|
891 |
+
else if ( datesToEnable === true ) {
|
892 |
+
calendar.flipEnable(1)
|
893 |
+
disabledItems = []
|
894 |
+
}
|
895 |
+
|
896 |
+
else if ( datesToEnable === false ) {
|
897 |
+
calendar.flipEnable(-1)
|
898 |
+
disabledItems = []
|
899 |
+
}
|
900 |
+
|
901 |
+
// Otherwise go through the disabled dates.
|
902 |
+
else {
|
903 |
+
|
904 |
+
datesToEnable.map(function( unitToEnable ) {
|
905 |
+
|
906 |
+
var matchFound,
|
907 |
+
disabledUnit,
|
908 |
+
index,
|
909 |
+
isExactRange
|
910 |
+
|
911 |
+
// Go through the disabled items and try to find a match.
|
912 |
+
for ( index = 0; index < disabledItemsCount; index += 1 ) {
|
913 |
+
|
914 |
+
disabledUnit = disabledItems[index]
|
915 |
+
|
916 |
+
// When an exact match is found, remove it from the collection.
|
917 |
+
if ( calendar.isDateExact( disabledUnit, unitToEnable ) ) {
|
918 |
+
matchFound = disabledItems[index] = null
|
919 |
+
isExactRange = true
|
920 |
+
break
|
921 |
+
}
|
922 |
+
|
923 |
+
// When an overlapped match is found, add the “inverted” state to it.
|
924 |
+
else if ( calendar.isDateOverlap( disabledUnit, unitToEnable ) ) {
|
925 |
+
if ( $.isPlainObject( unitToEnable ) ) {
|
926 |
+
unitToEnable.inverted = true
|
927 |
+
matchFound = unitToEnable
|
928 |
+
}
|
929 |
+
else if ( $.isArray( unitToEnable ) ) {
|
930 |
+
matchFound = unitToEnable
|
931 |
+
if ( !matchFound[3] ) matchFound.push( 'inverted' )
|
932 |
+
}
|
933 |
+
else if ( _.isDate( unitToEnable ) ) {
|
934 |
+
matchFound = [ unitToEnable.getFullYear(), unitToEnable.getMonth(), unitToEnable.getDate(), 'inverted' ]
|
935 |
+
}
|
936 |
+
break
|
937 |
+
}
|
938 |
+
}
|
939 |
+
|
940 |
+
// If a match was found, remove a previous duplicate entry.
|
941 |
+
if ( matchFound ) for ( index = 0; index < disabledItemsCount; index += 1 ) {
|
942 |
+
if ( calendar.isDateExact( disabledItems[index], unitToEnable ) ) {
|
943 |
+
disabledItems[index] = null
|
944 |
+
break
|
945 |
+
}
|
946 |
+
}
|
947 |
+
|
948 |
+
// In the event that we’re dealing with an exact range of dates,
|
949 |
+
// make sure there are no “inverted” dates because of it.
|
950 |
+
if ( isExactRange ) for ( index = 0; index < disabledItemsCount; index += 1 ) {
|
951 |
+
if ( calendar.isDateOverlap( disabledItems[index], unitToEnable ) ) {
|
952 |
+
disabledItems[index] = null
|
953 |
+
break
|
954 |
+
}
|
955 |
+
}
|
956 |
+
|
957 |
+
// If something is still matched, add it into the collection.
|
958 |
+
if ( matchFound ) {
|
959 |
+
disabledItems.push( matchFound )
|
960 |
+
}
|
961 |
+
})
|
962 |
+
}
|
963 |
+
|
964 |
+
// Return the updated collection.
|
965 |
+
return disabledItems.filter(function( val ) { return val != null })
|
966 |
+
} //DatePicker.prototype.activate
|
967 |
+
|
968 |
+
|
969 |
+
/**
|
970 |
+
* Create a string for the nodes in the picker.
|
971 |
+
*/
|
972 |
+
DatePicker.prototype.nodes = function( isOpen ) {
|
973 |
+
|
974 |
+
var
|
975 |
+
calendar = this,
|
976 |
+
settings = calendar.settings,
|
977 |
+
calendarItem = calendar.item,
|
978 |
+
nowObject = calendarItem.now,
|
979 |
+
selectedObject = calendarItem.select,
|
980 |
+
highlightedObject = calendarItem.highlight,
|
981 |
+
viewsetObject = calendarItem.view,
|
982 |
+
disabledCollection = calendarItem.disable,
|
983 |
+
minLimitObject = calendarItem.min,
|
984 |
+
maxLimitObject = calendarItem.max,
|
985 |
+
|
986 |
+
|
987 |
+
// Create the calendar table head using a copy of weekday labels collection.
|
988 |
+
// * We do a copy so we don't mutate the original array.
|
989 |
+
tableHead = (function( collection, fullCollection ) {
|
990 |
+
|
991 |
+
// If the first day should be Monday, move Sunday to the end.
|
992 |
+
if ( settings.firstDay ) {
|
993 |
+
collection.push( collection.shift() )
|
994 |
+
fullCollection.push( fullCollection.shift() )
|
995 |
+
}
|
996 |
+
|
997 |
+
// Create and return the table head group.
|
998 |
+
return _.node(
|
999 |
+
'thead',
|
1000 |
+
_.node(
|
1001 |
+
'tr',
|
1002 |
+
_.group({
|
1003 |
+
min: 0,
|
1004 |
+
max: DAYS_IN_WEEK - 1,
|
1005 |
+
i: 1,
|
1006 |
+
node: 'th',
|
1007 |
+
item: function( counter ) {
|
1008 |
+
return [
|
1009 |
+
collection[ counter ],
|
1010 |
+
settings.klass.weekdays,
|
1011 |
+
'scope=col title="' + fullCollection[ counter ] + '"'
|
1012 |
+
]
|
1013 |
+
}
|
1014 |
+
})
|
1015 |
+
)
|
1016 |
+
) //endreturn
|
1017 |
+
})( ( settings.showWeekdaysFull ? settings.weekdaysFull : settings.weekdaysShort ).slice( 0 ), settings.weekdaysFull.slice( 0 ) ), //tableHead
|
1018 |
+
|
1019 |
+
|
1020 |
+
// Create the nav for next/prev month.
|
1021 |
+
createMonthNav = function( next ) {
|
1022 |
+
|
1023 |
+
// Otherwise, return the created month tag.
|
1024 |
+
return _.node(
|
1025 |
+
'div',
|
1026 |
+
' ',
|
1027 |
+
settings.klass[ 'nav' + ( next ? 'Next' : 'Prev' ) ] + (
|
1028 |
+
|
1029 |
+
// If the focused month is outside the range, disabled the button.
|
1030 |
+
( next && viewsetObject.year >= maxLimitObject.year && viewsetObject.month >= maxLimitObject.month ) ||
|
1031 |
+
( !next && viewsetObject.year <= minLimitObject.year && viewsetObject.month <= minLimitObject.month ) ?
|
1032 |
+
' ' + settings.klass.navDisabled : ''
|
1033 |
+
),
|
1034 |
+
'data-nav=' + ( next || -1 ) + ' ' +
|
1035 |
+
_.ariaAttr({
|
1036 |
+
role: 'button',
|
1037 |
+
controls: calendar.$node[0].id + '_table'
|
1038 |
+
}) + ' ' +
|
1039 |
+
'title="' + (next ? settings.labelMonthNext : settings.labelMonthPrev ) + '"'
|
1040 |
+
) //endreturn
|
1041 |
+
}, //createMonthNav
|
1042 |
+
|
1043 |
+
|
1044 |
+
// Create the month label.
|
1045 |
+
createMonthLabel = function() {
|
1046 |
+
|
1047 |
+
var monthsCollection = settings.showMonthsShort ? settings.monthsShort : settings.monthsFull
|
1048 |
+
|
1049 |
+
// If there are months to select, add a dropdown menu.
|
1050 |
+
if ( settings.selectMonths ) {
|
1051 |
+
|
1052 |
+
return _.node( 'select',
|
1053 |
+
_.group({
|
1054 |
+
min: 0,
|
1055 |
+
max: 11,
|
1056 |
+
i: 1,
|
1057 |
+
node: 'option',
|
1058 |
+
item: function( loopedMonth ) {
|
1059 |
+
|
1060 |
+
return [
|
1061 |
+
|
1062 |
+
// The looped month and no classes.
|
1063 |
+
monthsCollection[ loopedMonth ], 0,
|
1064 |
+
|
1065 |
+
// Set the value and selected index.
|
1066 |
+
'value=' + loopedMonth +
|
1067 |
+
( viewsetObject.month == loopedMonth ? ' selected' : '' ) +
|
1068 |
+
(
|
1069 |
+
(
|
1070 |
+
( viewsetObject.year == minLimitObject.year && loopedMonth < minLimitObject.month ) ||
|
1071 |
+
( viewsetObject.year == maxLimitObject.year && loopedMonth > maxLimitObject.month )
|
1072 |
+
) ?
|
1073 |
+
' disabled' : ''
|
1074 |
+
)
|
1075 |
+
]
|
1076 |
+
}
|
1077 |
+
}),
|
1078 |
+
settings.klass.selectMonth,
|
1079 |
+
( isOpen ? '' : 'disabled' ) + ' ' +
|
1080 |
+
_.ariaAttr({ controls: calendar.$node[0].id + '_table' }) + ' ' +
|
1081 |
+
'title="' + settings.labelMonthSelect + '"'
|
1082 |
+
)
|
1083 |
+
}
|
1084 |
+
|
1085 |
+
// If there's a need for a month selector
|
1086 |
+
return _.node( 'div', monthsCollection[ viewsetObject.month ], settings.klass.month )
|
1087 |
+
}, //createMonthLabel
|
1088 |
+
|
1089 |
+
|
1090 |
+
// Create the year label.
|
1091 |
+
createYearLabel = function() {
|
1092 |
+
|
1093 |
+
var focusedYear = viewsetObject.year,
|
1094 |
+
|
1095 |
+
// If years selector is set to a literal "true", set it to 5. Otherwise
|
1096 |
+
// divide in half to get half before and half after focused year.
|
1097 |
+
numberYears = settings.selectYears === true ? 5 : ~~( settings.selectYears / 2 )
|
1098 |
+
|
1099 |
+
// If there are years to select, add a dropdown menu.
|
1100 |
+
if ( numberYears ) {
|
1101 |
+
|
1102 |
+
var
|
1103 |
+
minYear = minLimitObject.year,
|
1104 |
+
maxYear = maxLimitObject.year,
|
1105 |
+
lowestYear = focusedYear - numberYears,
|
1106 |
+
highestYear = focusedYear + numberYears
|
1107 |
+
|
1108 |
+
// If the min year is greater than the lowest year, increase the highest year
|
1109 |
+
// by the difference and set the lowest year to the min year.
|
1110 |
+
if ( minYear > lowestYear ) {
|
1111 |
+
highestYear += minYear - lowestYear
|
1112 |
+
lowestYear = minYear
|
1113 |
+
}
|
1114 |
+
|
1115 |
+
// If the max year is less than the highest year, decrease the lowest year
|
1116 |
+
// by the lower of the two: available and needed years. Then set the
|
1117 |
+
// highest year to the max year.
|
1118 |
+
if ( maxYear < highestYear ) {
|
1119 |
+
|
1120 |
+
var availableYears = lowestYear - minYear,
|
1121 |
+
neededYears = highestYear - maxYear
|
1122 |
+
|
1123 |
+
lowestYear -= availableYears > neededYears ? neededYears : availableYears
|
1124 |
+
highestYear = maxYear
|
1125 |
+
}
|
1126 |
+
|
1127 |
+
return _.node( 'select',
|
1128 |
+
_.group({
|
1129 |
+
min: lowestYear,
|
1130 |
+
max: highestYear,
|
1131 |
+
i: 1,
|
1132 |
+
node: 'option',
|
1133 |
+
item: function( loopedYear ) {
|
1134 |
+
return [
|
1135 |
+
|
1136 |
+
// The looped year and no classes.
|
1137 |
+
loopedYear, 0,
|
1138 |
+
|
1139 |
+
// Set the value and selected index.
|
1140 |
+
'value=' + loopedYear + ( focusedYear == loopedYear ? ' selected' : '' )
|
1141 |
+
]
|
1142 |
+
}
|
1143 |
+
}),
|
1144 |
+
settings.klass.selectYear,
|
1145 |
+
( isOpen ? '' : 'disabled' ) + ' ' + _.ariaAttr({ controls: calendar.$node[0].id + '_table' }) + ' ' +
|
1146 |
+
'title="' + settings.labelYearSelect + '"'
|
1147 |
+
)
|
1148 |
+
}
|
1149 |
+
|
1150 |
+
// Otherwise just return the year focused
|
1151 |
+
return _.node( 'div', focusedYear, settings.klass.year )
|
1152 |
+
} //createYearLabel
|
1153 |
+
|
1154 |
+
|
1155 |
+
// Create and return the entire calendar.
|
1156 |
+
return _.node(
|
1157 |
+
'div',
|
1158 |
+
( settings.selectYears ? createYearLabel() + createMonthLabel() : createMonthLabel() + createYearLabel() ) +
|
1159 |
+
createMonthNav() + createMonthNav( 1 ),
|
1160 |
+
settings.klass.header
|
1161 |
+
) + _.node(
|
1162 |
+
'table',
|
1163 |
+
tableHead +
|
1164 |
+
_.node(
|
1165 |
+
'tbody',
|
1166 |
+
_.group({
|
1167 |
+
min: 0,
|
1168 |
+
max: WEEKS_IN_CALENDAR - 1,
|
1169 |
+
i: 1,
|
1170 |
+
node: 'tr',
|
1171 |
+
item: function( rowCounter ) {
|
1172 |
+
|
1173 |
+
// If Monday is the first day and the month starts on Sunday, shift the date back a week.
|
1174 |
+
var shiftDateBy = settings.firstDay && calendar.create([ viewsetObject.year, viewsetObject.month, 1 ]).day === 0 ? -7 : 0
|
1175 |
+
|
1176 |
+
return [
|
1177 |
+
_.group({
|
1178 |
+
min: DAYS_IN_WEEK * rowCounter - viewsetObject.day + shiftDateBy + 1, // Add 1 for weekday 0index
|
1179 |
+
max: function() {
|
1180 |
+
return this.min + DAYS_IN_WEEK - 1
|
1181 |
+
},
|
1182 |
+
i: 1,
|
1183 |
+
node: 'td',
|
1184 |
+
item: function( targetDate ) {
|
1185 |
+
|
1186 |
+
// Convert the time date from a relative date to a target date.
|
1187 |
+
targetDate = calendar.create([ viewsetObject.year, viewsetObject.month, targetDate + ( settings.firstDay ? 1 : 0 ) ])
|
1188 |
+
|
1189 |
+
var isSelected = selectedObject && selectedObject.pick == targetDate.pick,
|
1190 |
+
isHighlighted = highlightedObject && highlightedObject.pick == targetDate.pick,
|
1191 |
+
isDisabled = disabledCollection && calendar.disabled( targetDate ) || targetDate.pick < minLimitObject.pick || targetDate.pick > maxLimitObject.pick,
|
1192 |
+
formattedDate = _.trigger( calendar.formats.toString, calendar, [ settings.format, targetDate ] )
|
1193 |
+
|
1194 |
+
return [
|
1195 |
+
_.node(
|
1196 |
+
'div',
|
1197 |
+
targetDate.date,
|
1198 |
+
(function( klasses ) {
|
1199 |
+
|
1200 |
+
// Add the `infocus` or `outfocus` classes based on month in view.
|
1201 |
+
klasses.push( viewsetObject.month == targetDate.month ? settings.klass.infocus : settings.klass.outfocus )
|
1202 |
+
|
1203 |
+
// Add the `today` class if needed.
|
1204 |
+
if ( nowObject.pick == targetDate.pick ) {
|
1205 |
+
klasses.push( settings.klass.now )
|
1206 |
+
}
|
1207 |
+
|
1208 |
+
// Add the `selected` class if something's selected and the time matches.
|
1209 |
+
if ( isSelected ) {
|
1210 |
+
klasses.push( settings.klass.selected )
|
1211 |
+
}
|
1212 |
+
|
1213 |
+
// Add the `highlighted` class if something's highlighted and the time matches.
|
1214 |
+
if ( isHighlighted ) {
|
1215 |
+
klasses.push( settings.klass.highlighted )
|
1216 |
+
}
|
1217 |
+
|
1218 |
+
// Add the `disabled` class if something's disabled and the object matches.
|
1219 |
+
if ( isDisabled ) {
|
1220 |
+
klasses.push( settings.klass.disabled )
|
1221 |
+
}
|
1222 |
+
|
1223 |
+
return klasses.join( ' ' )
|
1224 |
+
})([ settings.klass.day ]),
|
1225 |
+
'data-pick=' + targetDate.pick + ' ' + _.ariaAttr({
|
1226 |
+
role: 'gridcell',
|
1227 |
+
label: formattedDate,
|
1228 |
+
selected: isSelected && calendar.$node.val() === formattedDate ? true : null,
|
1229 |
+
activedescendant: isHighlighted ? true : null,
|
1230 |
+
disabled: isDisabled ? true : null
|
1231 |
+
})
|
1232 |
+
),
|
1233 |
+
'',
|
1234 |
+
_.ariaAttr({ role: 'presentation' })
|
1235 |
+
] //endreturn
|
1236 |
+
}
|
1237 |
+
})
|
1238 |
+
] //endreturn
|
1239 |
+
}
|
1240 |
+
})
|
1241 |
+
),
|
1242 |
+
settings.klass.table,
|
1243 |
+
'id="' + calendar.$node[0].id + '_table' + '" ' + _.ariaAttr({
|
1244 |
+
role: 'grid',
|
1245 |
+
controls: calendar.$node[0].id,
|
1246 |
+
readonly: true
|
1247 |
+
})
|
1248 |
+
) +
|
1249 |
+
|
1250 |
+
// * For Firefox forms to submit, make sure to set the buttons’ `type` attributes as “button”.
|
1251 |
+
_.node(
|
1252 |
+
'div',
|
1253 |
+
_.node( 'button', settings.today, settings.klass.buttonToday,
|
1254 |
+
'type=button data-pick=' + nowObject.pick +
|
1255 |
+
( isOpen && !calendar.disabled(nowObject) ? '' : ' disabled' ) + ' ' +
|
1256 |
+
_.ariaAttr({ controls: calendar.$node[0].id }) ) +
|
1257 |
+
_.node( 'button', settings.clear, settings.klass.buttonClear,
|
1258 |
+
'type=button data-clear=1' +
|
1259 |
+
( isOpen ? '' : ' disabled' ) + ' ' +
|
1260 |
+
_.ariaAttr({ controls: calendar.$node[0].id }) ) +
|
1261 |
+
_.node('button', settings.close, settings.klass.buttonClose,
|
1262 |
+
'type=button data-close=true ' +
|
1263 |
+
( isOpen ? '' : ' disabled' ) + ' ' +
|
1264 |
+
_.ariaAttr({ controls: calendar.$node[0].id }) ),
|
1265 |
+
settings.klass.footer
|
1266 |
+
) //endreturn
|
1267 |
+
} //DatePicker.prototype.nodes
|
1268 |
+
|
1269 |
+
|
1270 |
+
|
1271 |
+
|
1272 |
+
/**
|
1273 |
+
* The date picker defaults.
|
1274 |
+
*/
|
1275 |
+
DatePicker.defaults = (function( prefix ) {
|
1276 |
+
|
1277 |
+
return {
|
1278 |
+
|
1279 |
+
// The title label to use for the month nav buttons
|
1280 |
+
labelMonthNext: 'Next month',
|
1281 |
+
labelMonthPrev: 'Previous month',
|
1282 |
+
|
1283 |
+
// The title label to use for the dropdown selectors
|
1284 |
+
labelMonthSelect: 'Select a month',
|
1285 |
+
labelYearSelect: 'Select a year',
|
1286 |
+
|
1287 |
+
// Months and weekdays
|
1288 |
+
monthsFull: [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ],
|
1289 |
+
monthsShort: [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ],
|
1290 |
+
weekdaysFull: [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ],
|
1291 |
+
weekdaysShort: [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ],
|
1292 |
+
|
1293 |
+
// Today and clear
|
1294 |
+
today: 'Today',
|
1295 |
+
clear: 'Clear',
|
1296 |
+
close: 'Close',
|
1297 |
+
|
1298 |
+
// Picker close behavior
|
1299 |
+
closeOnSelect: true,
|
1300 |
+
closeOnClear: true,
|
1301 |
+
|
1302 |
+
// The format to show on the `input` element
|
1303 |
+
format: 'd mmmm, yyyy',
|
1304 |
+
|
1305 |
+
// Classes
|
1306 |
+
klass: {
|
1307 |
+
|
1308 |
+
table: prefix + 'table',
|
1309 |
+
|
1310 |
+
header: prefix + 'header',
|
1311 |
+
|
1312 |
+
navPrev: prefix + 'nav--prev',
|
1313 |
+
navNext: prefix + 'nav--next',
|
1314 |
+
navDisabled: prefix + 'nav--disabled',
|
1315 |
+
|
1316 |
+
month: prefix + 'month',
|
1317 |
+
year: prefix + 'year',
|
1318 |
+
|
1319 |
+
selectMonth: prefix + 'select--month',
|
1320 |
+
selectYear: prefix + 'select--year',
|
1321 |
+
|
1322 |
+
weekdays: prefix + 'weekday',
|
1323 |
+
|
1324 |
+
day: prefix + 'day',
|
1325 |
+
disabled: prefix + 'day--disabled',
|
1326 |
+
selected: prefix + 'day--selected',
|
1327 |
+
highlighted: prefix + 'day--highlighted',
|
1328 |
+
now: prefix + 'day--today',
|
1329 |
+
infocus: prefix + 'day--infocus',
|
1330 |
+
outfocus: prefix + 'day--outfocus',
|
1331 |
+
|
1332 |
+
footer: prefix + 'footer',
|
1333 |
+
|
1334 |
+
buttonClear: prefix + 'button--clear',
|
1335 |
+
buttonToday: prefix + 'button--today',
|
1336 |
+
buttonClose: prefix + 'button--close'
|
1337 |
+
}
|
1338 |
+
}
|
1339 |
+
})( Picker.klasses().picker + '__' )
|
1340 |
+
|
1341 |
+
|
1342 |
+
|
1343 |
+
|
1344 |
+
|
1345 |
+
/**
|
1346 |
+
* Extend the picker to add the date picker.
|
1347 |
+
*/
|
1348 |
+
Picker.extend( 'pickadate', DatePicker )
|
1349 |
+
|
1350 |
+
|
1351 |
+
}));
|
1352 |
+
|
1353 |
+
|
1354 |
+
|
assets/js/pickadate/picker.js
CHANGED
@@ -1,7 +1,1163 @@
|
|
1 |
/*!
|
2 |
-
* pickadate.js v3.5.
|
3 |
* By Amsul, http://amsul.ca
|
4 |
* Hosted on http://amsul.github.io/pickadate.js
|
5 |
* Licensed under MIT
|
6 |
*/
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/*!
|
2 |
+
* pickadate.js v3.5.6, 2015/04/20
|
3 |
* By Amsul, http://amsul.ca
|
4 |
* Hosted on http://amsul.github.io/pickadate.js
|
5 |
* Licensed under MIT
|
6 |
*/
|
7 |
+
|
8 |
+
(function ( factory ) {
|
9 |
+
|
10 |
+
// AMD.
|
11 |
+
if ( typeof define == 'function' && define.amd )
|
12 |
+
define( 'picker', ['jquery'], factory )
|
13 |
+
|
14 |
+
// Node.js/browserify.
|
15 |
+
else if ( typeof exports == 'object' )
|
16 |
+
module.exports = factory( require('jquery') )
|
17 |
+
|
18 |
+
// Browser globals.
|
19 |
+
else this.Picker = factory( jQuery )
|
20 |
+
|
21 |
+
}(function( $ ) {
|
22 |
+
|
23 |
+
var $window = $( window )
|
24 |
+
var $document = $( document )
|
25 |
+
var $html = $( document.documentElement )
|
26 |
+
var supportsTransitions = document.documentElement.style.transition != null
|
27 |
+
|
28 |
+
|
29 |
+
/**
|
30 |
+
* The picker constructor that creates a blank picker.
|
31 |
+
*/
|
32 |
+
function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
|
33 |
+
|
34 |
+
// If there’s no element, return the picker constructor.
|
35 |
+
if ( !ELEMENT ) return PickerConstructor
|
36 |
+
|
37 |
+
|
38 |
+
var
|
39 |
+
IS_DEFAULT_THEME = false,
|
40 |
+
|
41 |
+
|
42 |
+
// The state of the picker.
|
43 |
+
STATE = {
|
44 |
+
id: ELEMENT.id || 'P' + Math.abs( ~~(Math.random() * new Date()) )
|
45 |
+
},
|
46 |
+
|
47 |
+
|
48 |
+
// Merge the defaults and options passed.
|
49 |
+
SETTINGS = COMPONENT ? $.extend( true, {}, COMPONENT.defaults, OPTIONS ) : OPTIONS || {},
|
50 |
+
|
51 |
+
|
52 |
+
// Merge the default classes with the settings classes.
|
53 |
+
CLASSES = $.extend( {}, PickerConstructor.klasses(), SETTINGS.klass ),
|
54 |
+
|
55 |
+
|
56 |
+
// The element node wrapper into a jQuery object.
|
57 |
+
$ELEMENT = $( ELEMENT ),
|
58 |
+
|
59 |
+
|
60 |
+
// Pseudo picker constructor.
|
61 |
+
PickerInstance = function() {
|
62 |
+
return this.start()
|
63 |
+
},
|
64 |
+
|
65 |
+
|
66 |
+
// The picker prototype.
|
67 |
+
P = PickerInstance.prototype = {
|
68 |
+
|
69 |
+
constructor: PickerInstance,
|
70 |
+
|
71 |
+
$node: $ELEMENT,
|
72 |
+
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Initialize everything
|
76 |
+
*/
|
77 |
+
start: function() {
|
78 |
+
|
79 |
+
// If it’s already started, do nothing.
|
80 |
+
if ( STATE && STATE.start ) return P
|
81 |
+
|
82 |
+
|
83 |
+
// Update the picker states.
|
84 |
+
STATE.methods = {}
|
85 |
+
STATE.start = true
|
86 |
+
STATE.open = false
|
87 |
+
STATE.type = ELEMENT.type
|
88 |
+
|
89 |
+
|
90 |
+
// Confirm focus state, convert into text input to remove UA stylings,
|
91 |
+
// and set as readonly to prevent keyboard popup.
|
92 |
+
ELEMENT.autofocus = ELEMENT == getActiveElement()
|
93 |
+
ELEMENT.readOnly = !SETTINGS.editable
|
94 |
+
ELEMENT.id = ELEMENT.id || STATE.id
|
95 |
+
if ( ELEMENT.type != 'text' ) {
|
96 |
+
ELEMENT.type = 'text'
|
97 |
+
}
|
98 |
+
|
99 |
+
|
100 |
+
// Create a new picker component with the settings.
|
101 |
+
P.component = new COMPONENT(P, SETTINGS)
|
102 |
+
|
103 |
+
|
104 |
+
// Create the picker root and then prepare it.
|
105 |
+
P.$root = $( '<div class="' + CLASSES.picker + '" id="' + ELEMENT.id + '_root" />' )
|
106 |
+
prepareElementRoot()
|
107 |
+
|
108 |
+
|
109 |
+
// Create the picker holder and then prepare it.
|
110 |
+
P.$holder = $( createWrappedComponent() ).appendTo( P.$root )
|
111 |
+
prepareElementHolder()
|
112 |
+
|
113 |
+
|
114 |
+
// If there’s a format for the hidden input element, create the element.
|
115 |
+
if ( SETTINGS.formatSubmit ) {
|
116 |
+
prepareElementHidden()
|
117 |
+
}
|
118 |
+
|
119 |
+
|
120 |
+
// Prepare the input element.
|
121 |
+
prepareElement()
|
122 |
+
|
123 |
+
|
124 |
+
// Insert the hidden input as specified in the settings.
|
125 |
+
if ( SETTINGS.containerHidden ) $( SETTINGS.containerHidden ).append( P._hidden )
|
126 |
+
else $ELEMENT.after( P._hidden )
|
127 |
+
|
128 |
+
|
129 |
+
// Insert the root as specified in the settings.
|
130 |
+
if ( SETTINGS.container ) $( SETTINGS.container ).append( P.$root )
|
131 |
+
else $ELEMENT.after( P.$root )
|
132 |
+
|
133 |
+
|
134 |
+
// Bind the default component and settings events.
|
135 |
+
P.on({
|
136 |
+
start: P.component.onStart,
|
137 |
+
render: P.component.onRender,
|
138 |
+
stop: P.component.onStop,
|
139 |
+
open: P.component.onOpen,
|
140 |
+
close: P.component.onClose,
|
141 |
+
set: P.component.onSet
|
142 |
+
}).on({
|
143 |
+
start: SETTINGS.onStart,
|
144 |
+
render: SETTINGS.onRender,
|
145 |
+
stop: SETTINGS.onStop,
|
146 |
+
open: SETTINGS.onOpen,
|
147 |
+
close: SETTINGS.onClose,
|
148 |
+
set: SETTINGS.onSet
|
149 |
+
})
|
150 |
+
|
151 |
+
|
152 |
+
// Once we’re all set, check the theme in use.
|
153 |
+
IS_DEFAULT_THEME = isUsingDefaultTheme( P.$holder[0] )
|
154 |
+
|
155 |
+
|
156 |
+
// If the element has autofocus, open the picker.
|
157 |
+
if ( ELEMENT.autofocus ) {
|
158 |
+
P.open()
|
159 |
+
}
|
160 |
+
|
161 |
+
|
162 |
+
// Trigger queued the “start” and “render” events.
|
163 |
+
return P.trigger( 'start' ).trigger( 'render' )
|
164 |
+
}, //start
|
165 |
+
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Render a new picker
|
169 |
+
*/
|
170 |
+
render: function( entireComponent ) {
|
171 |
+
|
172 |
+
// Insert a new component holder in the root or box.
|
173 |
+
if ( entireComponent ) {
|
174 |
+
P.$holder = $( createWrappedComponent() )
|
175 |
+
prepareElementHolder()
|
176 |
+
P.$root.html( P.$holder )
|
177 |
+
}
|
178 |
+
else P.$root.find( '.' + CLASSES.box ).html( P.component.nodes( STATE.open ) )
|
179 |
+
|
180 |
+
// Trigger the queued “render” events.
|
181 |
+
return P.trigger( 'render' )
|
182 |
+
}, //render
|
183 |
+
|
184 |
+
|
185 |
+
/**
|
186 |
+
* Destroy everything
|
187 |
+
*/
|
188 |
+
stop: function() {
|
189 |
+
|
190 |
+
// If it’s already stopped, do nothing.
|
191 |
+
if ( !STATE.start ) return P
|
192 |
+
|
193 |
+
// Then close the picker.
|
194 |
+
P.close()
|
195 |
+
|
196 |
+
// Remove the hidden field.
|
197 |
+
if ( P._hidden ) {
|
198 |
+
P._hidden.parentNode.removeChild( P._hidden )
|
199 |
+
}
|
200 |
+
|
201 |
+
// Remove the root.
|
202 |
+
P.$root.remove()
|
203 |
+
|
204 |
+
// Remove the input class, remove the stored data, and unbind
|
205 |
+
// the events (after a tick for IE - see `P.close`).
|
206 |
+
$ELEMENT.removeClass( CLASSES.input ).removeData( NAME )
|
207 |
+
setTimeout( function() {
|
208 |
+
$ELEMENT.off( '.' + STATE.id )
|
209 |
+
}, 0)
|
210 |
+
|
211 |
+
// Restore the element state
|
212 |
+
ELEMENT.type = STATE.type
|
213 |
+
ELEMENT.readOnly = false
|
214 |
+
|
215 |
+
// Trigger the queued “stop” events.
|
216 |
+
P.trigger( 'stop' )
|
217 |
+
|
218 |
+
// Reset the picker states.
|
219 |
+
STATE.methods = {}
|
220 |
+
STATE.start = false
|
221 |
+
|
222 |
+
return P
|
223 |
+
}, //stop
|
224 |
+
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Open up the picker
|
228 |
+
*/
|
229 |
+
open: function( dontGiveFocus ) {
|
230 |
+
|
231 |
+
// If it’s already open, do nothing.
|
232 |
+
if ( STATE.open ) return P
|
233 |
+
|
234 |
+
// Add the “active” class.
|
235 |
+
$ELEMENT.addClass( CLASSES.active )
|
236 |
+
aria( ELEMENT, 'expanded', true )
|
237 |
+
|
238 |
+
// * A Firefox bug, when `html` has `overflow:hidden`, results in
|
239 |
+
// killing transitions :(. So add the “opened” state on the next tick.
|
240 |
+
// Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=625289
|
241 |
+
setTimeout( function() {
|
242 |
+
|
243 |
+
// Add the “opened” class to the picker root.
|
244 |
+
P.$root.addClass( CLASSES.opened )
|
245 |
+
aria( P.$root[0], 'hidden', false )
|
246 |
+
|
247 |
+
}, 0 )
|
248 |
+
|
249 |
+
// If we have to give focus, bind the element and doc events.
|
250 |
+
if ( dontGiveFocus !== false ) {
|
251 |
+
|
252 |
+
// Set it as open.
|
253 |
+
STATE.open = true
|
254 |
+
|
255 |
+
// Prevent the page from scrolling.
|
256 |
+
if ( IS_DEFAULT_THEME ) {
|
257 |
+
$html.
|
258 |
+
css( 'overflow', 'hidden' ).
|
259 |
+
css( 'padding-right', '+=' + getScrollbarWidth() )
|
260 |
+
}
|
261 |
+
|
262 |
+
// Pass focus to the root element’s jQuery object.
|
263 |
+
focusPickerOnceOpened()
|
264 |
+
|
265 |
+
// Bind the document events.
|
266 |
+
$document.on( 'click.' + STATE.id + ' focusin.' + STATE.id, function( event ) {
|
267 |
+
|
268 |
+
var target = event.target
|
269 |
+
|
270 |
+
// If the target of the event is not the element, close the picker picker.
|
271 |
+
// * Don’t worry about clicks or focusins on the root because those don’t bubble up.
|
272 |
+
// Also, for Firefox, a click on an `option` element bubbles up directly
|
273 |
+
// to the doc. So make sure the target wasn't the doc.
|
274 |
+
// * In Firefox stopPropagation() doesn’t prevent right-click events from bubbling,
|
275 |
+
// which causes the picker to unexpectedly close when right-clicking it. So make
|
276 |
+
// sure the event wasn’t a right-click.
|
277 |
+
if ( target != ELEMENT && target != document && event.which != 3 ) {
|
278 |
+
|
279 |
+
// If the target was the holder that covers the screen,
|
280 |
+
// keep the element focused to maintain tabindex.
|
281 |
+
P.close( target === P.$holder[0] )
|
282 |
+
}
|
283 |
+
|
284 |
+
}).on( 'keydown.' + STATE.id, function( event ) {
|
285 |
+
|
286 |
+
var
|
287 |
+
// Get the keycode.
|
288 |
+
keycode = event.keyCode,
|
289 |
+
|
290 |
+
// Translate that to a selection change.
|
291 |
+
keycodeToMove = P.component.key[ keycode ],
|
292 |
+
|
293 |
+
// Grab the target.
|
294 |
+
target = event.target
|
295 |
+
|
296 |
+
|
297 |
+
// On escape, close the picker and give focus.
|
298 |
+
if ( keycode == 27 ) {
|
299 |
+
P.close( true )
|
300 |
+
}
|
301 |
+
|
302 |
+
|
303 |
+
// Check if there is a key movement or “enter” keypress on the element.
|
304 |
+
else if ( target == P.$holder[0] && ( keycodeToMove || keycode == 13 ) ) {
|
305 |
+
|
306 |
+
// Prevent the default action to stop page movement.
|
307 |
+
event.preventDefault()
|
308 |
+
|
309 |
+
// Trigger the key movement action.
|
310 |
+
if ( keycodeToMove ) {
|
311 |
+
PickerConstructor._.trigger( P.component.key.go, P, [ PickerConstructor._.trigger( keycodeToMove ) ] )
|
312 |
+
}
|
313 |
+
|
314 |
+
// On “enter”, if the highlighted item isn’t disabled, set the value and close.
|
315 |
+
else if ( !P.$root.find( '.' + CLASSES.highlighted ).hasClass( CLASSES.disabled ) ) {
|
316 |
+
P.set( 'select', P.component.item.highlight )
|
317 |
+
if ( SETTINGS.closeOnSelect ) {
|
318 |
+
P.close( true )
|
319 |
+
}
|
320 |
+
}
|
321 |
+
}
|
322 |
+
|
323 |
+
|
324 |
+
// If the target is within the root and “enter” is pressed,
|
325 |
+
// prevent the default action and trigger a click on the target instead.
|
326 |
+
else if ( $.contains( P.$root[0], target ) && keycode == 13 ) {
|
327 |
+
event.preventDefault()
|
328 |
+
target.click()
|
329 |
+
}
|
330 |
+
})
|
331 |
+
}
|
332 |
+
|
333 |
+
// Trigger the queued “open” events.
|
334 |
+
return P.trigger( 'open' )
|
335 |
+
}, //open
|
336 |
+
|
337 |
+
|
338 |
+
/**
|
339 |
+
* Close the picker
|
340 |
+
*/
|
341 |
+
close: function( giveFocus ) {
|
342 |
+
|
343 |
+
// If we need to give focus, do it before changing states.
|
344 |
+
if ( giveFocus ) {
|
345 |
+
if ( SETTINGS.editable ) {
|
346 |
+
ELEMENT.focus()
|
347 |
+
}
|
348 |
+
else {
|
349 |
+
// ....ah yes! It would’ve been incomplete without a crazy workaround for IE :|
|
350 |
+
// The focus is triggered *after* the close has completed - causing it
|
351 |
+
// to open again. So unbind and rebind the event at the next tick.
|
352 |
+
P.$holder.off( 'focus.toOpen' ).focus()
|
353 |
+
setTimeout( function() {
|
354 |
+
P.$holder.on( 'focus.toOpen', handleFocusToOpenEvent )
|
355 |
+
}, 0 )
|
356 |
+
}
|
357 |
+
}
|
358 |
+
|
359 |
+
// Remove the “active” class.
|
360 |
+
$ELEMENT.removeClass( CLASSES.active )
|
361 |
+
aria( ELEMENT, 'expanded', false )
|
362 |
+
|
363 |
+
// * A Firefox bug, when `html` has `overflow:hidden`, results in
|
364 |
+
// killing transitions :(. So remove the “opened” state on the next tick.
|
365 |
+
// Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=625289
|
366 |
+
setTimeout( function() {
|
367 |
+
|
368 |
+
// Remove the “opened” and “focused” class from the picker root.
|
369 |
+
P.$root.removeClass( CLASSES.opened + ' ' + CLASSES.focused )
|
370 |
+
aria( P.$root[0], 'hidden', true )
|
371 |
+
|
372 |
+
}, 0 )
|
373 |
+
|
374 |
+
// If it’s already closed, do nothing more.
|
375 |
+
if ( !STATE.open ) return P
|
376 |
+
|
377 |
+
// Set it as closed.
|
378 |
+
STATE.open = false
|
379 |
+
|
380 |
+
// Allow the page to scroll.
|
381 |
+
if ( IS_DEFAULT_THEME ) {
|
382 |
+
$html.
|
383 |
+
css( 'overflow', '' ).
|
384 |
+
css( 'padding-right', '-=' + getScrollbarWidth() )
|
385 |
+
}
|
386 |
+
|
387 |
+
// Unbind the document events.
|
388 |
+
$document.off( '.' + STATE.id )
|
389 |
+
|
390 |
+
// Trigger the queued “close” events.
|
391 |
+
return P.trigger( 'close' )
|
392 |
+
}, //close
|
393 |
+
|
394 |
+
|
395 |
+
/**
|
396 |
+
* Clear the values
|
397 |
+
*/
|
398 |
+
clear: function( options ) {
|
399 |
+
return P.set( 'clear', null, options )
|
400 |
+
}, //clear
|
401 |
+
|
402 |
+
|
403 |
+
/**
|
404 |
+
* Set something
|
405 |
+
*/
|
406 |
+
set: function( thing, value, options ) {
|
407 |
+
|
408 |
+
var thingItem, thingValue,
|
409 |
+
thingIsObject = $.isPlainObject( thing ),
|
410 |
+
thingObject = thingIsObject ? thing : {}
|
411 |
+
|
412 |
+
// Make sure we have usable options.
|
413 |
+
options = thingIsObject && $.isPlainObject( value ) ? value : options || {}
|
414 |
+
|
415 |
+
if ( thing ) {
|
416 |
+
|
417 |
+
// If the thing isn’t an object, make it one.
|
418 |
+
if ( !thingIsObject ) {
|
419 |
+
thingObject[ thing ] = value
|
420 |
+
}
|
421 |
+
|
422 |
+
// Go through the things of items to set.
|
423 |
+
for ( thingItem in thingObject ) {
|
424 |
+
|
425 |
+
// Grab the value of the thing.
|
426 |
+
thingValue = thingObject[ thingItem ]
|
427 |
+
|
428 |
+
// First, if the item exists and there’s a value, set it.
|
429 |
+
if ( thingItem in P.component.item ) {
|
430 |
+
if ( thingValue === undefined ) thingValue = null
|
431 |
+
P.component.set( thingItem, thingValue, options )
|
432 |
+
}
|
433 |
+
|
434 |
+
// Then, check to update the element value and broadcast a change.
|
435 |
+
if ( thingItem == 'select' || thingItem == 'clear' ) {
|
436 |
+
$ELEMENT.
|
437 |
+
val( thingItem == 'clear' ? '' : P.get( thingItem, SETTINGS.format ) ).
|
438 |
+
trigger( 'change' )
|
439 |
+
}
|
440 |
+
}
|
441 |
+
|
442 |
+
// Render a new picker.
|
443 |
+
P.render()
|
444 |
+
}
|
445 |
+
|
446 |
+
// When the method isn’t muted, trigger queued “set” events and pass the `thingObject`.
|
447 |
+
return options.muted ? P : P.trigger( 'set', thingObject )
|
448 |
+
}, //set
|
449 |
+
|
450 |
+
|
451 |
+
/**
|
452 |
+
* Get something
|
453 |
+
*/
|
454 |
+
get: function( thing, format ) {
|
455 |
+
|
456 |
+
// Make sure there’s something to get.
|
457 |
+
thing = thing || 'value'
|
458 |
+
|
459 |
+
// If a picker state exists, return that.
|
460 |
+
if ( STATE[ thing ] != null ) {
|
461 |
+
return STATE[ thing ]
|
462 |
+
}
|
463 |
+
|
464 |
+
// Return the submission value, if that.
|
465 |
+
if ( thing == 'valueSubmit' ) {
|
466 |
+
if ( P._hidden ) {
|
467 |
+
return P._hidden.value
|
468 |
+
}
|
469 |
+
thing = 'value'
|
470 |
+
}
|
471 |
+
|
472 |
+
// Return the value, if that.
|
473 |
+
if ( thing == 'value' ) {
|
474 |
+
return ELEMENT.value
|
475 |
+
}
|
476 |
+
|
477 |
+
// Check if a component item exists, return that.
|
478 |
+
if ( thing in P.component.item ) {
|
479 |
+
if ( typeof format == 'string' ) {
|
480 |
+
var thingValue = P.component.get( thing )
|
481 |
+
return thingValue ?
|
482 |
+
PickerConstructor._.trigger(
|
483 |
+
P.component.formats.toString,
|
484 |
+
P.component,
|
485 |
+
[ format, thingValue ]
|
486 |
+
) : ''
|
487 |
+
}
|
488 |
+
return P.component.get( thing )
|
489 |
+
}
|
490 |
+
}, //get
|
491 |
+
|
492 |
+
|
493 |
+
|
494 |
+
/**
|
495 |
+
* Bind events on the things.
|
496 |
+
*/
|
497 |
+
on: function( thing, method, internal ) {
|
498 |
+
|
499 |
+
var thingName, thingMethod,
|
500 |
+
thingIsObject = $.isPlainObject( thing ),
|
501 |
+
thingObject = thingIsObject ? thing : {}
|
502 |
+
|
503 |
+
if ( thing ) {
|
504 |
+
|
505 |
+
// If the thing isn’t an object, make it one.
|
506 |
+
if ( !thingIsObject ) {
|
507 |
+
thingObject[ thing ] = method
|
508 |
+
}
|
509 |
+
|
510 |
+
// Go through the things to bind to.
|
511 |
+
for ( thingName in thingObject ) {
|
512 |
+
|
513 |
+
// Grab the method of the thing.
|
514 |
+
thingMethod = thingObject[ thingName ]
|
515 |
+
|
516 |
+
// If it was an internal binding, prefix it.
|
517 |
+
if ( internal ) {
|
518 |
+
thingName = '_' + thingName
|
519 |
+
}
|
520 |
+
|
521 |
+
// Make sure the thing methods collection exists.
|
522 |
+
STATE.methods[ thingName ] = STATE.methods[ thingName ] || []
|
523 |
+
|
524 |
+
// Add the method to the relative method collection.
|
525 |
+
STATE.methods[ thingName ].push( thingMethod )
|
526 |
+
}
|
527 |
+
}
|
528 |
+
|
529 |
+
return P
|
530 |
+
}, //on
|
531 |
+
|
532 |
+
|
533 |
+
|
534 |
+
/**
|
535 |
+
* Unbind events on the things.
|
536 |
+
*/
|
537 |
+
off: function() {
|
538 |
+
var i, thingName,
|
539 |
+
names = arguments;
|
540 |
+
for ( i = 0, namesCount = names.length; i < namesCount; i += 1 ) {
|
541 |
+
thingName = names[i]
|
542 |
+
if ( thingName in STATE.methods ) {
|
543 |
+
delete STATE.methods[thingName]
|
544 |
+
}
|
545 |
+
}
|
546 |
+
return P
|
547 |
+
},
|
548 |
+
|
549 |
+
|
550 |
+
/**
|
551 |
+
* Fire off method events.
|
552 |
+
*/
|
553 |
+
trigger: function( name, data ) {
|
554 |
+
var _trigger = function( name ) {
|
555 |
+
var methodList = STATE.methods[ name ]
|
556 |
+
if ( methodList ) {
|
557 |
+
methodList.map( function( method ) {
|
558 |
+
PickerConstructor._.trigger( method, P, [ data ] )
|
559 |
+
})
|
560 |
+
}
|
561 |
+
}
|
562 |
+
_trigger( '_' + name )
|
563 |
+
_trigger( name )
|
564 |
+
return P
|
565 |
+
} //trigger
|
566 |
+
} //PickerInstance.prototype
|
567 |
+
|
568 |
+
|
569 |
+
/**
|
570 |
+
* Wrap the picker holder components together.
|
571 |
+
*/
|
572 |
+
function createWrappedComponent() {
|
573 |
+
|
574 |
+
// Create a picker wrapper holder
|
575 |
+
return PickerConstructor._.node( 'div',
|
576 |
+
|
577 |
+
// Create a picker wrapper node
|
578 |
+
PickerConstructor._.node( 'div',
|
579 |
+
|
580 |
+
// Create a picker frame
|
581 |
+
PickerConstructor._.node( 'div',
|
582 |
+
|
583 |
+
// Create a picker box node
|
584 |
+
PickerConstructor._.node( 'div',
|
585 |
+
|
586 |
+
// Create the components nodes.
|
587 |
+
P.component.nodes( STATE.open ),
|
588 |
+
|
589 |
+
// The picker box class
|
590 |
+
CLASSES.box
|
591 |
+
),
|
592 |
+
|
593 |
+
// Picker wrap class
|
594 |
+
CLASSES.wrap
|
595 |
+
),
|
596 |
+
|
597 |
+
// Picker frame class
|
598 |
+
CLASSES.frame
|
599 |
+
),
|
600 |
+
|
601 |
+
// Picker holder class
|
602 |
+
CLASSES.holder,
|
603 |
+
|
604 |
+
'tabindex="-1"'
|
605 |
+
) //endreturn
|
606 |
+
} //createWrappedComponent
|
607 |
+
|
608 |
+
|
609 |
+
|
610 |
+
/**
|
611 |
+
* Prepare the input element with all bindings.
|
612 |
+
*/
|
613 |
+
function prepareElement() {
|
614 |
+
|
615 |
+
$ELEMENT.
|
616 |
+
|
617 |
+
// Store the picker data by component name.
|
618 |
+
data(NAME, P).
|
619 |
+
|
620 |
+
// Add the “input” class name.
|
621 |
+
addClass(CLASSES.input).
|
622 |
+
|
623 |
+
// If there’s a `data-value`, update the value of the element.
|
624 |
+
val( $ELEMENT.data('value') ?
|
625 |
+
P.get('select', SETTINGS.format) :
|
626 |
+
ELEMENT.value
|
627 |
+
)
|
628 |
+
|
629 |
+
|
630 |
+
// Only bind keydown events if the element isn’t editable.
|
631 |
+
if ( !SETTINGS.editable ) {
|
632 |
+
|
633 |
+
$ELEMENT.
|
634 |
+
|
635 |
+
// On focus/click, open the picker.
|
636 |
+
on( 'focus.' + STATE.id + ' click.' + STATE.id, function(event) {
|
637 |
+
event.preventDefault()
|
638 |
+
P.open()
|
639 |
+
}).
|
640 |
+
|
641 |
+
// Handle keyboard event based on the picker being opened or not.
|
642 |
+
on( 'keydown.' + STATE.id, handleKeydownEvent )
|
643 |
+
}
|
644 |
+
|
645 |
+
|
646 |
+
// Update the aria attributes.
|
647 |
+
aria(ELEMENT, {
|
648 |
+
haspopup: true,
|
649 |
+
expanded: false,
|
650 |
+
readonly: false,
|
651 |
+
owns: ELEMENT.id + '_root'
|
652 |
+
})
|
653 |
+
}
|
654 |
+
|
655 |
+
|
656 |
+
/**
|
657 |
+
* Prepare the root picker element with all bindings.
|
658 |
+
*/
|
659 |
+
function prepareElementRoot() {
|
660 |
+
aria( P.$root[0], 'hidden', true )
|
661 |
+
}
|
662 |
+
|
663 |
+
|
664 |
+
/**
|
665 |
+
* Prepare the holder picker element with all bindings.
|
666 |
+
*/
|
667 |
+
function prepareElementHolder() {
|
668 |
+
|
669 |
+
P.$holder.
|
670 |
+
|
671 |
+
on({
|
672 |
+
|
673 |
+
// For iOS8.
|
674 |
+
keydown: handleKeydownEvent,
|
675 |
+
|
676 |
+
'focus.toOpen': handleFocusToOpenEvent,
|
677 |
+
|
678 |
+
blur: function() {
|
679 |
+
// Remove the “target” class.
|
680 |
+
$ELEMENT.removeClass( CLASSES.target )
|
681 |
+
},
|
682 |
+
|
683 |
+
// When something within the holder is focused, stop from bubbling
|
684 |
+
// to the doc and remove the “focused” state from the root.
|
685 |
+
focusin: function( event ) {
|
686 |
+
P.$root.removeClass( CLASSES.focused )
|
687 |
+
event.stopPropagation()
|
688 |
+
},
|
689 |
+
|
690 |
+
// When something within the holder is clicked, stop it
|
691 |
+
// from bubbling to the doc.
|
692 |
+
'mousedown click': function( event ) {
|
693 |
+
|
694 |
+
var target = event.target
|
695 |
+
|
696 |
+
// Make sure the target isn’t the root holder so it can bubble up.
|
697 |
+
if ( target != P.$holder[0] ) {
|
698 |
+
|
699 |
+
event.stopPropagation()
|
700 |
+
|
701 |
+
// * For mousedown events, cancel the default action in order to
|
702 |
+
// prevent cases where focus is shifted onto external elements
|
703 |
+
// when using things like jQuery mobile or MagnificPopup (ref: #249 & #120).
|
704 |
+
// Also, for Firefox, don’t prevent action on the `option` element.
|
705 |
+
if ( event.type == 'mousedown' && !$( target ).is( 'input, select, textarea, button, option' )) {
|
706 |
+
|
707 |
+
event.preventDefault()
|
708 |
+
|
709 |
+
// Re-focus onto the holder so that users can click away
|
710 |
+
// from elements focused within the picker.
|
711 |
+
P.$holder[0].focus()
|
712 |
+
}
|
713 |
+
}
|
714 |
+
}
|
715 |
+
|
716 |
+
}).
|
717 |
+
|
718 |
+
// If there’s a click on an actionable element, carry out the actions.
|
719 |
+
on( 'click', '[data-pick], [data-nav], [data-clear], [data-close]', function() {
|
720 |
+
|
721 |
+
var $target = $( this ),
|
722 |
+
targetData = $target.data(),
|
723 |
+
targetDisabled = $target.hasClass( CLASSES.navDisabled ) || $target.hasClass( CLASSES.disabled ),
|
724 |
+
|
725 |
+
// * For IE, non-focusable elements can be active elements as well
|
726 |
+
// (http://stackoverflow.com/a/2684561).
|
727 |
+
activeElement = getActiveElement()
|
728 |
+
activeElement = activeElement && ( activeElement.type || activeElement.href )
|
729 |
+
|
730 |
+
// If it’s disabled or nothing inside is actively focused, re-focus the element.
|
731 |
+
if ( targetDisabled || activeElement && !$.contains( P.$root[0], activeElement ) ) {
|
732 |
+
P.$holder[0].focus()
|
733 |
+
}
|
734 |
+
|
735 |
+
// If something is superficially changed, update the `highlight` based on the `nav`.
|
736 |
+
if ( !targetDisabled && targetData.nav ) {
|
737 |
+
P.set( 'highlight', P.component.item.highlight, { nav: targetData.nav } )
|
738 |
+
}
|
739 |
+
|
740 |
+
// If something is picked, set `select` then close with focus.
|
741 |
+
else if ( !targetDisabled && 'pick' in targetData ) {
|
742 |
+
P.set( 'select', targetData.pick )
|
743 |
+
if ( SETTINGS.closeOnSelect ) {
|
744 |
+
P.close( true )
|
745 |
+
}
|
746 |
+
}
|
747 |
+
|
748 |
+
// If a “clear” button is pressed, empty the values and close with focus.
|
749 |
+
else if ( targetData.clear ) {
|
750 |
+
P.clear()
|
751 |
+
if ( SETTINGS.closeOnClear ) {
|
752 |
+
P.close( true )
|
753 |
+
}
|
754 |
+
}
|
755 |
+
|
756 |
+
else if ( targetData.close ) {
|
757 |
+
P.close( true )
|
758 |
+
}
|
759 |
+
|
760 |
+
}) //P.$holder
|
761 |
+
|
762 |
+
}
|
763 |
+
|
764 |
+
|
765 |
+
/**
|
766 |
+
* Prepare the hidden input element along with all bindings.
|
767 |
+
*/
|
768 |
+
function prepareElementHidden() {
|
769 |
+
|
770 |
+
var name
|
771 |
+
|
772 |
+
if ( SETTINGS.hiddenName === true ) {
|
773 |
+
name = ELEMENT.name
|
774 |
+
ELEMENT.name = ''
|
775 |
+
}
|
776 |
+
else {
|
777 |
+
name = [
|
778 |
+
typeof SETTINGS.hiddenPrefix == 'string' ? SETTINGS.hiddenPrefix : '',
|
779 |
+
typeof SETTINGS.hiddenSuffix == 'string' ? SETTINGS.hiddenSuffix : '_submit'
|
780 |
+
]
|
781 |
+
name = name[0] + ELEMENT.name + name[1]
|
782 |
+
}
|
783 |
+
|
784 |
+
P._hidden = $(
|
785 |
+
'<input ' +
|
786 |
+
'type=hidden ' +
|
787 |
+
|
788 |
+
// Create the name using the original input’s with a prefix and suffix.
|
789 |
+
'name="' + name + '"' +
|
790 |
+
|
791 |
+
// If the element has a value, set the hidden value as well.
|
792 |
+
(
|
793 |
+
$ELEMENT.data('value') || ELEMENT.value ?
|
794 |
+
' value="' + P.get('select', SETTINGS.formatSubmit) + '"' :
|
795 |
+
''
|
796 |
+
) +
|
797 |
+
'>'
|
798 |
+
)[0]
|
799 |
+
|
800 |
+
$ELEMENT.
|
801 |
+
|
802 |
+
// If the value changes, update the hidden input with the correct format.
|
803 |
+
on('change.' + STATE.id, function() {
|
804 |
+
P._hidden.value = ELEMENT.value ?
|
805 |
+
P.get('select', SETTINGS.formatSubmit) :
|
806 |
+
''
|
807 |
+
})
|
808 |
+
}
|
809 |
+
|
810 |
+
|
811 |
+
// Wait for transitions to end before focusing the holder. Otherwise, while
|
812 |
+
// using the `container` option, the view jumps to the container.
|
813 |
+
function focusPickerOnceOpened() {
|
814 |
+
|
815 |
+
if (IS_DEFAULT_THEME && supportsTransitions) {
|
816 |
+
P.$holder.find('.' + CLASSES.frame).one('transitionend', function() {
|
817 |
+
P.$holder[0].focus()
|
818 |
+
})
|
819 |
+
}
|
820 |
+
else {
|
821 |
+
P.$holder[0].focus()
|
822 |
+
}
|
823 |
+
}
|
824 |
+
|
825 |
+
|
826 |
+
function handleFocusToOpenEvent(event) {
|
827 |
+
|
828 |
+
// Stop the event from propagating to the doc.
|
829 |
+
event.stopPropagation()
|
830 |
+
|
831 |
+
// Add the “target” class.
|
832 |
+
$ELEMENT.addClass( CLASSES.target )
|
833 |
+
|
834 |
+
// Add the “focused” class to the root.
|
835 |
+
P.$root.addClass( CLASSES.focused )
|
836 |
+
|
837 |
+
// And then finally open the picker.
|
838 |
+
P.open()
|
839 |
+
}
|
840 |
+
|
841 |
+
|
842 |
+
// For iOS8.
|
843 |
+
function handleKeydownEvent( event ) {
|
844 |
+
|
845 |
+
var keycode = event.keyCode,
|
846 |
+
|
847 |
+
// Check if one of the delete keys was pressed.
|
848 |
+
isKeycodeDelete = /^(8|46)$/.test(keycode)
|
849 |
+
|
850 |
+
// For some reason IE clears the input value on “escape”.
|
851 |
+
if ( keycode == 27 ) {
|
852 |
+
P.close( true )
|
853 |
+
return false
|
854 |
+
}
|
855 |
+
|
856 |
+
// Check if `space` or `delete` was pressed or the picker is closed with a key movement.
|
857 |
+
if ( keycode == 32 || isKeycodeDelete || !STATE.open && P.component.key[keycode] ) {
|
858 |
+
|
859 |
+
// Prevent it from moving the page and bubbling to doc.
|
860 |
+
event.preventDefault()
|
861 |
+
event.stopPropagation()
|
862 |
+
|
863 |
+
// If `delete` was pressed, clear the values and close the picker.
|
864 |
+
// Otherwise open the picker.
|
865 |
+
if ( isKeycodeDelete ) { P.clear().close() }
|
866 |
+
else { P.open() }
|
867 |
+
}
|
868 |
+
}
|
869 |
+
|
870 |
+
|
871 |
+
// Return a new picker instance.
|
872 |
+
return new PickerInstance()
|
873 |
+
} //PickerConstructor
|
874 |
+
|
875 |
+
|
876 |
+
|
877 |
+
/**
|
878 |
+
* The default classes and prefix to use for the HTML classes.
|
879 |
+
*/
|
880 |
+
PickerConstructor.klasses = function( prefix ) {
|
881 |
+
prefix = prefix || 'picker'
|
882 |
+
return {
|
883 |
+
|
884 |
+
picker: prefix,
|
885 |
+
opened: prefix + '--opened',
|
886 |
+
focused: prefix + '--focused',
|
887 |
+
|
888 |
+
input: prefix + '__input',
|
889 |
+
active: prefix + '__input--active',
|
890 |
+
target: prefix + '__input--target',
|
891 |
+
|
892 |
+
holder: prefix + '__holder',
|
893 |
+
|
894 |
+
frame: prefix + '__frame',
|
895 |
+
wrap: prefix + '__wrap',
|
896 |
+
|
897 |
+
box: prefix + '__box'
|
898 |
+
}
|
899 |
+
} //PickerConstructor.klasses
|
900 |
+
|
901 |
+
|
902 |
+
|
903 |
+
/**
|
904 |
+
* Check if the default theme is being used.
|
905 |
+
*/
|
906 |
+
function isUsingDefaultTheme( element ) {
|
907 |
+
|
908 |
+
var theme,
|
909 |
+
prop = 'position'
|
910 |
+
|
911 |
+
// For IE.
|
912 |
+
if ( element.currentStyle ) {
|
913 |
+
theme = element.currentStyle[prop]
|
914 |
+
}
|
915 |
+
|
916 |
+
// For normal browsers.
|
917 |
+
else if ( window.getComputedStyle ) {
|
918 |
+
theme = getComputedStyle( element )[prop]
|
919 |
+
}
|
920 |
+
|
921 |
+
return theme == 'fixed'
|
922 |
+
}
|
923 |
+
|
924 |
+
|
925 |
+
|
926 |
+
/**
|
927 |
+
* Get the width of the browser’s scrollbar.
|
928 |
+
* Taken from: https://github.com/VodkaBears/Remodal/blob/master/src/jquery.remodal.js
|
929 |
+
*/
|
930 |
+
function getScrollbarWidth() {
|
931 |
+
|
932 |
+
if ( $html.height() <= $window.height() ) {
|
933 |
+
return 0
|
934 |
+
}
|
935 |
+
|
936 |
+
var $outer = $( '<div style="visibility:hidden;width:100px" />' ).
|
937 |
+
appendTo( 'body' )
|
938 |
+
|
939 |
+
// Get the width without scrollbars.
|
940 |
+
var widthWithoutScroll = $outer[0].offsetWidth
|
941 |
+
|
942 |
+
// Force adding scrollbars.
|
943 |
+
$outer.css( 'overflow', 'scroll' )
|
944 |
+
|
945 |
+
// Add the inner div.
|
946 |
+
var $inner = $( '<div style="width:100%" />' ).appendTo( $outer )
|
947 |
+
|
948 |
+
// Get the width with scrollbars.
|
949 |
+
var widthWithScroll = $inner[0].offsetWidth
|
950 |
+
|
951 |
+
// Remove the divs.
|
952 |
+
$outer.remove()
|
953 |
+
|
954 |
+
// Return the difference between the widths.
|
955 |
+
return widthWithoutScroll - widthWithScroll
|
956 |
+
}
|
957 |
+
|
958 |
+
|
959 |
+
|
960 |
+
/**
|
961 |
+
* PickerConstructor helper methods.
|
962 |
+
*/
|
963 |
+
PickerConstructor._ = {
|
964 |
+
|
965 |
+
/**
|
966 |
+
* Create a group of nodes. Expects:
|
967 |
+
* `
|
968 |
+
{
|
969 |
+
min: {Integer},
|
970 |
+
max: {Integer},
|
971 |
+
i: {Integer},
|
972 |
+
node: {String},
|
973 |
+
item: {Function}
|
974 |
+
}
|
975 |
+
* `
|
976 |
+
*/
|
977 |
+
group: function( groupObject ) {
|
978 |
+
|
979 |
+
var
|
980 |
+
// Scope for the looped object
|
981 |
+
loopObjectScope,
|
982 |
+
|
983 |
+
// Create the nodes list
|
984 |
+
nodesList = '',
|
985 |
+
|
986 |
+
// The counter starts from the `min`
|
987 |
+
counter = PickerConstructor._.trigger( groupObject.min, groupObject )
|
988 |
+
|
989 |
+
|
990 |
+
// Loop from the `min` to `max`, incrementing by `i`
|
991 |
+
for ( ; counter <= PickerConstructor._.trigger( groupObject.max, groupObject, [ counter ] ); counter += groupObject.i ) {
|
992 |
+
|
993 |
+
// Trigger the `item` function within scope of the object
|
994 |
+
loopObjectScope = PickerConstructor._.trigger( groupObject.item, groupObject, [ counter ] )
|
995 |
+
|
996 |
+
// Splice the subgroup and create nodes out of the sub nodes
|
997 |
+
nodesList += PickerConstructor._.node(
|
998 |
+
groupObject.node,
|
999 |
+
loopObjectScope[ 0 ], // the node
|
1000 |
+
loopObjectScope[ 1 ], // the classes
|
1001 |
+
loopObjectScope[ 2 ] // the attributes
|
1002 |
+
)
|
1003 |
+
}
|
1004 |
+
|
1005 |
+
// Return the list of nodes
|
1006 |
+
return nodesList
|
1007 |
+
}, //group
|
1008 |
+
|
1009 |
+
|
1010 |
+
/**
|
1011 |
+
* Create a dom node string
|
1012 |
+
*/
|
1013 |
+
node: function( wrapper, item, klass, attribute ) {
|
1014 |
+
|
1015 |
+
// If the item is false-y, just return an empty string
|
1016 |
+
if ( !item ) return ''
|
1017 |
+
|
1018 |
+
// If the item is an array, do a join
|
1019 |
+
item = $.isArray( item ) ? item.join( '' ) : item
|
1020 |
+
|
1021 |
+
// Check for the class
|
1022 |
+
klass = klass ? ' class="' + klass + '"' : ''
|
1023 |
+
|
1024 |
+
// Check for any attributes
|
1025 |
+
attribute = attribute ? ' ' + attribute : ''
|
1026 |
+
|
1027 |
+
// Return the wrapped item
|
1028 |
+
return '<' + wrapper + klass + attribute + '>' + item + '</' + wrapper + '>'
|
1029 |
+
}, //node
|
1030 |
+
|
1031 |
+
|
1032 |
+
/**
|
1033 |
+
* Lead numbers below 10 with a zero.
|
1034 |
+
*/
|
1035 |
+
lead: function( number ) {
|
1036 |
+
return ( number < 10 ? '0': '' ) + number
|
1037 |
+
},
|
1038 |
+
|
1039 |
+
|
1040 |
+
/**
|
1041 |
+
* Trigger a function otherwise return the value.
|
1042 |
+
*/
|
1043 |
+
trigger: function( callback, scope, args ) {
|
1044 |
+
return typeof callback == 'function' ? callback.apply( scope, args || [] ) : callback
|
1045 |
+
},
|
1046 |
+
|
1047 |
+
|
1048 |
+
/**
|
1049 |
+
* If the second character is a digit, length is 2 otherwise 1.
|
1050 |
+
*/
|
1051 |
+
digits: function( string ) {
|
1052 |
+
return ( /\d/ ).test( string[ 1 ] ) ? 2 : 1
|
1053 |
+
},
|
1054 |
+
|
1055 |
+
|
1056 |
+
/**
|
1057 |
+
* Tell if something is a date object.
|
1058 |
+
*/
|
1059 |
+
isDate: function( value ) {
|
1060 |
+
return {}.toString.call( value ).indexOf( 'Date' ) > -1 && this.isInteger( value.getDate() )
|
1061 |
+
},
|
1062 |
+
|
1063 |
+
|
1064 |
+
/**
|
1065 |
+
* Tell if something is an integer.
|
1066 |
+
*/
|
1067 |
+
isInteger: function( value ) {
|
1068 |
+
return {}.toString.call( value ).indexOf( 'Number' ) > -1 && value % 1 === 0
|
1069 |
+
},
|
1070 |
+
|
1071 |
+
|
1072 |
+
/**
|
1073 |
+
* Create ARIA attribute strings.
|
1074 |
+
*/
|
1075 |
+
ariaAttr: ariaAttr
|
1076 |
+
} //PickerConstructor._
|
1077 |
+
|
1078 |
+
|
1079 |
+
|
1080 |
+
/**
|
1081 |
+
* Extend the picker with a component and defaults.
|
1082 |
+
*/
|
1083 |
+
PickerConstructor.extend = function( name, Component ) {
|
1084 |
+
|
1085 |
+
// Extend jQuery.
|
1086 |
+
$.fn[ name ] = function( options, action ) {
|
1087 |
+
|
1088 |
+
// Grab the component data.
|
1089 |
+
var componentData = this.data( name )
|
1090 |
+
|
1091 |
+
// If the picker is requested, return the data object.
|
1092 |
+
if ( options == 'picker' ) {
|
1093 |
+
return componentData
|
1094 |
+
}
|
1095 |
+
|
1096 |
+
// If the component data exists and `options` is a string, carry out the action.
|
1097 |
+
if ( componentData && typeof options == 'string' ) {
|
1098 |
+
return PickerConstructor._.trigger( componentData[ options ], componentData, [ action ] )
|
1099 |
+
}
|
1100 |
+
|
1101 |
+
// Otherwise go through each matched element and if the component
|
1102 |
+
// doesn’t exist, create a new picker using `this` element
|
1103 |
+
// and merging the defaults and options with a deep copy.
|
1104 |
+
return this.each( function() {
|
1105 |
+
var $this = $( this )
|
1106 |
+
if ( !$this.data( name ) ) {
|
1107 |
+
new PickerConstructor( this, name, Component, options )
|
1108 |
+
}
|
1109 |
+
})
|
1110 |
+
}
|
1111 |
+
|
1112 |
+
// Set the defaults.
|
1113 |
+
$.fn[ name ].defaults = Component.defaults
|
1114 |
+
} //PickerConstructor.extend
|
1115 |
+
|
1116 |
+
|
1117 |
+
|
1118 |
+
function aria(element, attribute, value) {
|
1119 |
+
if ( $.isPlainObject(attribute) ) {
|
1120 |
+
for ( var key in attribute ) {
|
1121 |
+
ariaSet(element, key, attribute[key])
|
1122 |
+
}
|
1123 |
+
}
|
1124 |
+
else {
|
1125 |
+
ariaSet(element, attribute, value)
|
1126 |
+
}
|
1127 |
+
}
|
1128 |
+
function ariaSet(element, attribute, value) {
|
1129 |
+
element.setAttribute(
|
1130 |
+
(attribute == 'role' ? '' : 'aria-') + attribute,
|
1131 |
+
value
|
1132 |
+
)
|
1133 |
+
}
|
1134 |
+
function ariaAttr(attribute, data) {
|
1135 |
+
if ( !$.isPlainObject(attribute) ) {
|
1136 |
+
attribute = { attribute: data }
|
1137 |
+
}
|
1138 |
+
data = ''
|
1139 |
+
for ( var key in attribute ) {
|
1140 |
+
var attr = (key == 'role' ? '' : 'aria-') + key,
|
1141 |
+
attrVal = attribute[key]
|
1142 |
+
data += attrVal == null ? '' : attr + '="' + attribute[key] + '"'
|
1143 |
+
}
|
1144 |
+
return data
|
1145 |
+
}
|
1146 |
+
|
1147 |
+
// IE8 bug throws an error for activeElements within iframes.
|
1148 |
+
function getActiveElement() {
|
1149 |
+
try {
|
1150 |
+
return document.activeElement
|
1151 |
+
} catch ( err ) { }
|
1152 |
+
}
|
1153 |
+
|
1154 |
+
|
1155 |
+
|
1156 |
+
// Expose the picker constructor.
|
1157 |
+
return PickerConstructor
|
1158 |
+
|
1159 |
+
|
1160 |
+
}));
|
1161 |
+
|
1162 |
+
|
1163 |
+
|
assets/js/pickadate/picker.time.js
CHANGED
@@ -1,5 +1,1013 @@
|
|
1 |
/*!
|
2 |
-
* Time picker for pickadate.js v3.5.
|
3 |
* http://amsul.github.io/pickadate.js/time.htm
|
4 |
*/
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/*!
|
2 |
+
* Time picker for pickadate.js v3.5.6
|
3 |
* http://amsul.github.io/pickadate.js/time.htm
|
4 |
*/
|
5 |
+
|
6 |
+
(function ( factory ) {
|
7 |
+
|
8 |
+
// AMD.
|
9 |
+
if ( typeof define == 'function' && define.amd )
|
10 |
+
define( ['picker', 'jquery'], factory )
|
11 |
+
|
12 |
+
// Node.js/browserify.
|
13 |
+
else if ( typeof exports == 'object' )
|
14 |
+
module.exports = factory( require('./picker.js'), require('jquery') )
|
15 |
+
|
16 |
+
// Browser globals.
|
17 |
+
else factory( Picker, jQuery )
|
18 |
+
|
19 |
+
}(function( Picker, $ ) {
|
20 |
+
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Globals and constants
|
24 |
+
*/
|
25 |
+
var HOURS_IN_DAY = 24,
|
26 |
+
MINUTES_IN_HOUR = 60,
|
27 |
+
HOURS_TO_NOON = 12,
|
28 |
+
MINUTES_IN_DAY = HOURS_IN_DAY * MINUTES_IN_HOUR,
|
29 |
+
_ = Picker._
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
+
/**
|
34 |
+
* The time picker constructor
|
35 |
+
*/
|
36 |
+
function TimePicker( picker, settings ) {
|
37 |
+
|
38 |
+
var clock = this,
|
39 |
+
elementValue = picker.$node[ 0 ].value,
|
40 |
+
elementDataValue = picker.$node.data( 'value' ),
|
41 |
+
valueString = elementDataValue || elementValue,
|
42 |
+
formatString = elementDataValue ? settings.formatSubmit : settings.format
|
43 |
+
|
44 |
+
clock.settings = settings
|
45 |
+
clock.$node = picker.$node
|
46 |
+
|
47 |
+
// The queue of methods that will be used to build item objects.
|
48 |
+
clock.queue = {
|
49 |
+
interval: 'i',
|
50 |
+
min: 'measure create',
|
51 |
+
max: 'measure create',
|
52 |
+
now: 'now create',
|
53 |
+
select: 'parse create validate',
|
54 |
+
highlight: 'parse create validate',
|
55 |
+
view: 'parse create validate',
|
56 |
+
disable: 'deactivate',
|
57 |
+
enable: 'activate'
|
58 |
+
}
|
59 |
+
|
60 |
+
// The component's item object.
|
61 |
+
clock.item = {}
|
62 |
+
|
63 |
+
clock.item.clear = null
|
64 |
+
clock.item.interval = settings.interval || 30
|
65 |
+
clock.item.disable = ( settings.disable || [] ).slice( 0 )
|
66 |
+
clock.item.enable = -(function( collectionDisabled ) {
|
67 |
+
return collectionDisabled[ 0 ] === true ? collectionDisabled.shift() : -1
|
68 |
+
})( clock.item.disable )
|
69 |
+
|
70 |
+
clock.
|
71 |
+
set( 'min', settings.min ).
|
72 |
+
set( 'max', settings.max ).
|
73 |
+
set( 'now' )
|
74 |
+
|
75 |
+
// When there’s a value, set the `select`, which in turn
|
76 |
+
// also sets the `highlight` and `view`.
|
77 |
+
if ( valueString ) {
|
78 |
+
clock.set( 'select', valueString, {
|
79 |
+
format: formatString
|
80 |
+
})
|
81 |
+
}
|
82 |
+
|
83 |
+
// If there’s no value, default to highlighting “today”.
|
84 |
+
else {
|
85 |
+
clock.
|
86 |
+
set( 'select', null ).
|
87 |
+
set( 'highlight', clock.item.now )
|
88 |
+
}
|
89 |
+
|
90 |
+
// The keycode to movement mapping.
|
91 |
+
clock.key = {
|
92 |
+
40: 1, // Down
|
93 |
+
38: -1, // Up
|
94 |
+
39: 1, // Right
|
95 |
+
37: -1, // Left
|
96 |
+
go: function( timeChange ) {
|
97 |
+
clock.set(
|
98 |
+
'highlight',
|
99 |
+
clock.item.highlight.pick + timeChange * clock.item.interval,
|
100 |
+
{ interval: timeChange * clock.item.interval }
|
101 |
+
)
|
102 |
+
this.render()
|
103 |
+
}
|
104 |
+
}
|
105 |
+
|
106 |
+
|
107 |
+
// Bind some picker events.
|
108 |
+
picker.
|
109 |
+
on( 'render', function() {
|
110 |
+
var $pickerHolder = picker.$root.children(),
|
111 |
+
$viewset = $pickerHolder.find( '.' + settings.klass.viewset ),
|
112 |
+
vendors = function( prop ) {
|
113 |
+
return ['webkit', 'moz', 'ms', 'o', ''].map(function( vendor ) {
|
114 |
+
return ( vendor ? '-' + vendor + '-' : '' ) + prop
|
115 |
+
})
|
116 |
+
},
|
117 |
+
animations = function( $el, state ) {
|
118 |
+
vendors( 'transform' ).map(function( prop ) {
|
119 |
+
$el.css( prop, state )
|
120 |
+
})
|
121 |
+
vendors( 'transition' ).map(function( prop ) {
|
122 |
+
$el.css( prop, state )
|
123 |
+
})
|
124 |
+
}
|
125 |
+
if ( $viewset.length ) {
|
126 |
+
animations( $pickerHolder, 'none' )
|
127 |
+
$pickerHolder[ 0 ].scrollTop = ~~$viewset.position().top - ( $viewset[ 0 ].clientHeight * 2 )
|
128 |
+
animations( $pickerHolder, '' )
|
129 |
+
}
|
130 |
+
}, 1 ).
|
131 |
+
on( 'open', function() {
|
132 |
+
picker.$root.find( 'button' ).attr( 'disabled', false )
|
133 |
+
}, 1 ).
|
134 |
+
on( 'close', function() {
|
135 |
+
picker.$root.find( 'button' ).attr( 'disabled', true )
|
136 |
+
}, 1 )
|
137 |
+
|
138 |
+
} //TimePicker
|
139 |
+
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Set a timepicker item object.
|
143 |
+
*/
|
144 |
+
TimePicker.prototype.set = function( type, value, options ) {
|
145 |
+
|
146 |
+
var clock = this,
|
147 |
+
clockItem = clock.item
|
148 |
+
|
149 |
+
// If the value is `null` just set it immediately.
|
150 |
+
if ( value === null ) {
|
151 |
+
if ( type == 'clear' ) type = 'select'
|
152 |
+
clockItem[ type ] = value
|
153 |
+
return clock
|
154 |
+
}
|
155 |
+
|
156 |
+
// Otherwise go through the queue of methods, and invoke the functions.
|
157 |
+
// Update this as the time unit, and set the final value as this item.
|
158 |
+
// * In the case of `enable`, keep the queue but set `disable` instead.
|
159 |
+
// And in the case of `flip`, keep the queue but set `enable` instead.
|
160 |
+
clockItem[ ( type == 'enable' ? 'disable' : type == 'flip' ? 'enable' : type ) ] = clock.queue[ type ].split( ' ' ).map( function( method ) {
|
161 |
+
value = clock[ method ]( type, value, options )
|
162 |
+
return value
|
163 |
+
}).pop()
|
164 |
+
|
165 |
+
// Check if we need to cascade through more updates.
|
166 |
+
if ( type == 'select' ) {
|
167 |
+
clock.set( 'highlight', clockItem.select, options )
|
168 |
+
}
|
169 |
+
else if ( type == 'highlight' ) {
|
170 |
+
clock.set( 'view', clockItem.highlight, options )
|
171 |
+
}
|
172 |
+
else if ( type == 'interval' ) {
|
173 |
+
clock.
|
174 |
+
set( 'min', clockItem.min, options ).
|
175 |
+
set( 'max', clockItem.max, options )
|
176 |
+
}
|
177 |
+
else if ( type.match( /^(flip|min|max|disable|enable)$/ ) ) {
|
178 |
+
if ( clockItem.select && clock.disabled( clockItem.select ) ) {
|
179 |
+
clock.set( 'select', value, options )
|
180 |
+
}
|
181 |
+
if ( clockItem.highlight && clock.disabled( clockItem.highlight ) ) {
|
182 |
+
clock.set( 'highlight', value, options )
|
183 |
+
}
|
184 |
+
if ( type == 'min' ) {
|
185 |
+
clock.set( 'max', clockItem.max, options )
|
186 |
+
}
|
187 |
+
}
|
188 |
+
|
189 |
+
return clock
|
190 |
+
} //TimePicker.prototype.set
|
191 |
+
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Get a timepicker item object.
|
195 |
+
*/
|
196 |
+
TimePicker.prototype.get = function( type ) {
|
197 |
+
return this.item[ type ]
|
198 |
+
} //TimePicker.prototype.get
|
199 |
+
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Create a picker time object.
|
203 |
+
*/
|
204 |
+
TimePicker.prototype.create = function( type, value, options ) {
|
205 |
+
|
206 |
+
var clock = this
|
207 |
+
|
208 |
+
// If there’s no value, use the type as the value.
|
209 |
+
value = value === undefined ? type : value
|
210 |
+
|
211 |
+
// If it’s a date object, convert it into an array.
|
212 |
+
if ( _.isDate( value ) ) {
|
213 |
+
value = [ value.getHours(), value.getMinutes() ]
|
214 |
+
}
|
215 |
+
|
216 |
+
// If it’s an object, use the “pick” value.
|
217 |
+
if ( $.isPlainObject( value ) && _.isInteger( value.pick ) ) {
|
218 |
+
value = value.pick
|
219 |
+
}
|
220 |
+
|
221 |
+
// If it’s an array, convert it into minutes.
|
222 |
+
else if ( $.isArray( value ) ) {
|
223 |
+
value = +value[ 0 ] * MINUTES_IN_HOUR + (+value[ 1 ])
|
224 |
+
}
|
225 |
+
|
226 |
+
// If no valid value is passed, set it to “now”.
|
227 |
+
else if ( !_.isInteger( value ) ) {
|
228 |
+
value = clock.now( type, value, options )
|
229 |
+
}
|
230 |
+
|
231 |
+
// If we’re setting the max, make sure it’s greater than the min.
|
232 |
+
if ( type == 'max' && value < clock.item.min.pick ) {
|
233 |
+
value += MINUTES_IN_DAY
|
234 |
+
}
|
235 |
+
|
236 |
+
// If the value doesn’t fall directly on the interval,
|
237 |
+
// add one interval to indicate it as “passed”.
|
238 |
+
if ( type != 'min' && type != 'max' && (value - clock.item.min.pick) % clock.item.interval !== 0 ) {
|
239 |
+
value += clock.item.interval
|
240 |
+
}
|
241 |
+
|
242 |
+
// Normalize it into a “reachable” interval.
|
243 |
+
value = clock.normalize( type, value, options )
|
244 |
+
|
245 |
+
// Return the compiled object.
|
246 |
+
return {
|
247 |
+
|
248 |
+
// Divide to get hours from minutes.
|
249 |
+
hour: ~~( HOURS_IN_DAY + value / MINUTES_IN_HOUR ) % HOURS_IN_DAY,
|
250 |
+
|
251 |
+
// The remainder is the minutes.
|
252 |
+
mins: ( MINUTES_IN_HOUR + value % MINUTES_IN_HOUR ) % MINUTES_IN_HOUR,
|
253 |
+
|
254 |
+
// The time in total minutes.
|
255 |
+
time: ( MINUTES_IN_DAY + value ) % MINUTES_IN_DAY,
|
256 |
+
|
257 |
+
// Reference to the “relative” value to pick.
|
258 |
+
pick: value % MINUTES_IN_DAY
|
259 |
+
}
|
260 |
+
} //TimePicker.prototype.create
|
261 |
+
|
262 |
+
|
263 |
+
/**
|
264 |
+
* Create a range limit object using an array, date object,
|
265 |
+
* literal “true”, or integer relative to another time.
|
266 |
+
*/
|
267 |
+
TimePicker.prototype.createRange = function( from, to ) {
|
268 |
+
|
269 |
+
var clock = this,
|
270 |
+
createTime = function( time ) {
|
271 |
+
if ( time === true || $.isArray( time ) || _.isDate( time ) ) {
|
272 |
+
return clock.create( time )
|
273 |
+
}
|
274 |
+
return time
|
275 |
+
}
|
276 |
+
|
277 |
+
// Create objects if possible.
|
278 |
+
if ( !_.isInteger( from ) ) {
|
279 |
+
from = createTime( from )
|
280 |
+
}
|
281 |
+
if ( !_.isInteger( to ) ) {
|
282 |
+
to = createTime( to )
|
283 |
+
}
|
284 |
+
|
285 |
+
// Create relative times.
|
286 |
+
if ( _.isInteger( from ) && $.isPlainObject( to ) ) {
|
287 |
+
from = [ to.hour, to.mins + ( from * clock.settings.interval ) ];
|
288 |
+
}
|
289 |
+
else if ( _.isInteger( to ) && $.isPlainObject( from ) ) {
|
290 |
+
to = [ from.hour, from.mins + ( to * clock.settings.interval ) ];
|
291 |
+
}
|
292 |
+
|
293 |
+
return {
|
294 |
+
from: createTime( from ),
|
295 |
+
to: createTime( to )
|
296 |
+
}
|
297 |
+
} //TimePicker.prototype.createRange
|
298 |
+
|
299 |
+
|
300 |
+
/**
|
301 |
+
* Check if a time unit falls within a time range object.
|
302 |
+
*/
|
303 |
+
TimePicker.prototype.withinRange = function( range, timeUnit ) {
|
304 |
+
range = this.createRange(range.from, range.to)
|
305 |
+
return timeUnit.pick >= range.from.pick && timeUnit.pick <= range.to.pick
|
306 |
+
}
|
307 |
+
|
308 |
+
|
309 |
+
/**
|
310 |
+
* Check if two time range objects overlap.
|
311 |
+
*/
|
312 |
+
TimePicker.prototype.overlapRanges = function( one, two ) {
|
313 |
+
|
314 |
+
var clock = this
|
315 |
+
|
316 |
+
// Convert the ranges into comparable times.
|
317 |
+
one = clock.createRange( one.from, one.to )
|
318 |
+
two = clock.createRange( two.from, two.to )
|
319 |
+
|
320 |
+
return clock.withinRange( one, two.from ) || clock.withinRange( one, two.to ) ||
|
321 |
+
clock.withinRange( two, one.from ) || clock.withinRange( two, one.to )
|
322 |
+
}
|
323 |
+
|
324 |
+
|
325 |
+
/**
|
326 |
+
* Get the time relative to now.
|
327 |
+
*/
|
328 |
+
TimePicker.prototype.now = function( type, value/*, options*/ ) {
|
329 |
+
|
330 |
+
var interval = this.item.interval,
|
331 |
+
date = new Date(),
|
332 |
+
nowMinutes = date.getHours() * MINUTES_IN_HOUR + date.getMinutes(),
|
333 |
+
isValueInteger = _.isInteger( value ),
|
334 |
+
isBelowInterval
|
335 |
+
|
336 |
+
// Make sure “now” falls within the interval range.
|
337 |
+
nowMinutes -= nowMinutes % interval
|
338 |
+
|
339 |
+
// Check if the difference is less than the interval itself.
|
340 |
+
isBelowInterval = value < 0 && interval * value + nowMinutes <= -interval
|
341 |
+
|
342 |
+
// Add an interval because the time has “passed”.
|
343 |
+
nowMinutes += type == 'min' && isBelowInterval ? 0 : interval
|
344 |
+
|
345 |
+
// If the value is a number, adjust by that many intervals.
|
346 |
+
if ( isValueInteger ) {
|
347 |
+
nowMinutes += interval * (
|
348 |
+
isBelowInterval && type != 'max' ?
|
349 |
+
value + 1 :
|
350 |
+
value
|
351 |
+
)
|
352 |
+
}
|
353 |
+
|
354 |
+
// Return the final calculation.
|
355 |
+
return nowMinutes
|
356 |
+
} //TimePicker.prototype.now
|
357 |
+
|
358 |
+
|
359 |
+
/**
|
360 |
+
* Normalize minutes to be “reachable” based on the min and interval.
|
361 |
+
*/
|
362 |
+
TimePicker.prototype.normalize = function( type, value/*, options*/ ) {
|
363 |
+
|
364 |
+
var interval = this.item.interval,
|
365 |
+
minTime = this.item.min && this.item.min.pick || 0
|
366 |
+
|
367 |
+
// If setting min time, don’t shift anything.
|
368 |
+
// Otherwise get the value and min difference and then
|
369 |
+
// normalize the difference with the interval.
|
370 |
+
value -= type == 'min' ? 0 : ( value - minTime ) % interval
|
371 |
+
|
372 |
+
// Return the adjusted value.
|
373 |
+
return value
|
374 |
+
} //TimePicker.prototype.normalize
|
375 |
+
|
376 |
+
|
377 |
+
/**
|
378 |
+
* Measure the range of minutes.
|
379 |
+
*/
|
380 |
+
TimePicker.prototype.measure = function( type, value, options ) {
|
381 |
+
|
382 |
+
var clock = this
|
383 |
+
|
384 |
+
// If it’s anything false-y, set it to the default.
|
385 |
+
if ( !value ) {
|
386 |
+
value = type == 'min' ? [ 0, 0 ] : [ HOURS_IN_DAY - 1, MINUTES_IN_HOUR - 1 ]
|
387 |
+
}
|
388 |
+
|
389 |
+
// If it’s a string, parse it.
|
390 |
+
if ( typeof value == 'string' ) {
|
391 |
+
value = clock.parse( type, value )
|
392 |
+
}
|
393 |
+
|
394 |
+
// If it’s a literal true, or an integer, make it relative to now.
|
395 |
+
else if ( value === true || _.isInteger( value ) ) {
|
396 |
+
value = clock.now( type, value, options )
|
397 |
+
}
|
398 |
+
|
399 |
+
// If it’s an object already, just normalize it.
|
400 |
+
else if ( $.isPlainObject( value ) && _.isInteger( value.pick ) ) {
|
401 |
+
value = clock.normalize( type, value.pick, options )
|
402 |
+
}
|
403 |
+
|
404 |
+
return value
|
405 |
+
} ///TimePicker.prototype.measure
|
406 |
+
|
407 |
+
|
408 |
+
/**
|
409 |
+
* Validate an object as enabled.
|
410 |
+
*/
|
411 |
+
TimePicker.prototype.validate = function( type, timeObject, options ) {
|
412 |
+
|
413 |
+
var clock = this,
|
414 |
+
interval = options && options.interval ? options.interval : clock.item.interval
|
415 |
+
|
416 |
+
// Check if the object is disabled.
|
417 |
+
if ( clock.disabled( timeObject ) ) {
|
418 |
+
|
419 |
+
// Shift with the interval until we reach an enabled time.
|
420 |
+
timeObject = clock.shift( timeObject, interval )
|
421 |
+
}
|
422 |
+
|
423 |
+
// Scope the object into range.
|
424 |
+
timeObject = clock.scope( timeObject )
|
425 |
+
|
426 |
+
// Do a second check to see if we landed on a disabled min/max.
|
427 |
+
// In that case, shift using the opposite interval as before.
|
428 |
+
if ( clock.disabled( timeObject ) ) {
|
429 |
+
timeObject = clock.shift( timeObject, interval * -1 )
|
430 |
+
}
|
431 |
+
|
432 |
+
// Return the final object.
|
433 |
+
return timeObject
|
434 |
+
} //TimePicker.prototype.validate
|
435 |
+
|
436 |
+
|
437 |
+
/**
|
438 |
+
* Check if an object is disabled.
|
439 |
+
*/
|
440 |
+
TimePicker.prototype.disabled = function( timeToVerify ) {
|
441 |
+
|
442 |
+
var clock = this,
|
443 |
+
|
444 |
+
// Filter through the disabled times to check if this is one.
|
445 |
+
isDisabledMatch = clock.item.disable.filter( function( timeToDisable ) {
|
446 |
+
|
447 |
+
// If the time is a number, match the hours.
|
448 |
+
if ( _.isInteger( timeToDisable ) ) {
|
449 |
+
return timeToVerify.hour == timeToDisable
|
450 |
+
}
|
451 |
+
|
452 |
+
// If it’s an array, create the object and match the times.
|
453 |
+
if ( $.isArray( timeToDisable ) || _.isDate( timeToDisable ) ) {
|
454 |
+
return timeToVerify.pick == clock.create( timeToDisable ).pick
|
455 |
+
}
|
456 |
+
|
457 |
+
// If it’s an object, match a time within the “from” and “to” range.
|
458 |
+
if ( $.isPlainObject( timeToDisable ) ) {
|
459 |
+
return clock.withinRange( timeToDisable, timeToVerify )
|
460 |
+
}
|
461 |
+
})
|
462 |
+
|
463 |
+
// If this time matches a disabled time, confirm it’s not inverted.
|
464 |
+
isDisabledMatch = isDisabledMatch.length && !isDisabledMatch.filter(function( timeToDisable ) {
|
465 |
+
return $.isArray( timeToDisable ) && timeToDisable[2] == 'inverted' ||
|
466 |
+
$.isPlainObject( timeToDisable ) && timeToDisable.inverted
|
467 |
+
}).length
|
468 |
+
|
469 |
+
// If the clock is "enabled" flag is flipped, flip the condition.
|
470 |
+
return clock.item.enable === -1 ? !isDisabledMatch : isDisabledMatch ||
|
471 |
+
timeToVerify.pick < clock.item.min.pick ||
|
472 |
+
timeToVerify.pick > clock.item.max.pick
|
473 |
+
} //TimePicker.prototype.disabled
|
474 |
+
|
475 |
+
|
476 |
+
/**
|
477 |
+
* Shift an object by an interval until we reach an enabled object.
|
478 |
+
*/
|
479 |
+
TimePicker.prototype.shift = function( timeObject, interval ) {
|
480 |
+
|
481 |
+
var clock = this,
|
482 |
+
minLimit = clock.item.min.pick,
|
483 |
+
maxLimit = clock.item.max.pick/*,
|
484 |
+
safety = 1000*/
|
485 |
+
|
486 |
+
interval = interval || clock.item.interval
|
487 |
+
|
488 |
+
// Keep looping as long as the time is disabled.
|
489 |
+
while ( /*safety &&*/ clock.disabled( timeObject ) ) {
|
490 |
+
|
491 |
+
/*safety -= 1
|
492 |
+
if ( !safety ) {
|
493 |
+
throw 'Fell into an infinite loop while shifting to ' + timeObject.hour + ':' + timeObject.mins + '.'
|
494 |
+
}*/
|
495 |
+
|
496 |
+
// Increase/decrease the time by the interval and keep looping.
|
497 |
+
timeObject = clock.create( timeObject.pick += interval )
|
498 |
+
|
499 |
+
// If we've looped beyond the limits, break out of the loop.
|
500 |
+
if ( timeObject.pick <= minLimit || timeObject.pick >= maxLimit ) {
|
501 |
+
break
|
502 |
+
}
|
503 |
+
}
|
504 |
+
|
505 |
+
// Return the final object.
|
506 |
+
return timeObject
|
507 |
+
} //TimePicker.prototype.shift
|
508 |
+
|
509 |
+
|
510 |
+
/**
|
511 |
+
* Scope an object to be within range of min and max.
|
512 |
+
*/
|
513 |
+
TimePicker.prototype.scope = function( timeObject ) {
|
514 |
+
var minLimit = this.item.min.pick,
|
515 |
+
maxLimit = this.item.max.pick
|
516 |
+
return this.create( timeObject.pick > maxLimit ? maxLimit : timeObject.pick < minLimit ? minLimit : timeObject )
|
517 |
+
} //TimePicker.prototype.scope
|
518 |
+
|
519 |
+
|
520 |
+
/**
|
521 |
+
* Parse a string into a usable type.
|
522 |
+
*/
|
523 |
+
TimePicker.prototype.parse = function( type, value, options ) {
|
524 |
+
|
525 |
+
var hour, minutes, isPM, item, parseValue,
|
526 |
+
clock = this,
|
527 |
+
parsingObject = {}
|
528 |
+
|
529 |
+
// If it’s already parsed, we’re good.
|
530 |
+
if ( !value || typeof value != 'string' ) {
|
531 |
+
return value
|
532 |
+
}
|
533 |
+
|
534 |
+
// We need a `.format` to parse the value with.
|
535 |
+
if ( !( options && options.format ) ) {
|
536 |
+
options = options || {}
|
537 |
+
options.format = clock.settings.format
|
538 |
+
}
|
539 |
+
|
540 |
+
// Convert the format into an array and then map through it.
|
541 |
+
clock.formats.toArray( options.format ).map( function( label ) {
|
542 |
+
|
543 |
+
var
|
544 |
+
substring,
|
545 |
+
|
546 |
+
// Grab the formatting label.
|
547 |
+
formattingLabel = clock.formats[ label ],
|
548 |
+
|
549 |
+
// The format length is from the formatting label function or the
|
550 |
+
// label length without the escaping exclamation (!) mark.
|
551 |
+
formatLength = formattingLabel ?
|
552 |
+
_.trigger( formattingLabel, clock, [ value, parsingObject ] ) :
|
553 |
+
label.replace( /^!/, '' ).length
|
554 |
+
|
555 |
+
// If there's a format label, split the value up to the format length.
|
556 |
+
// Then add it to the parsing object with appropriate label.
|
557 |
+
if ( formattingLabel ) {
|
558 |
+
substring = value.substr( 0, formatLength )
|
559 |
+
parsingObject[ label ] = substring.match(/^\d+$/) ? +substring : substring
|
560 |
+
}
|
561 |
+
|
562 |
+
// Update the time value as the substring from format length to end.
|
563 |
+
value = value.substr( formatLength )
|
564 |
+
})
|
565 |
+
|
566 |
+
// Grab the hour and minutes from the parsing object.
|
567 |
+
for ( item in parsingObject ) {
|
568 |
+
parseValue = parsingObject[item]
|
569 |
+
if ( _.isInteger(parseValue) ) {
|
570 |
+
if ( item.match(/^(h|hh)$/i) ) {
|
571 |
+
hour = parseValue
|
572 |
+
if ( item == 'h' || item == 'hh' ) {
|
573 |
+
hour %= 12
|
574 |
+
}
|
575 |
+
}
|
576 |
+
else if ( item == 'i' ) {
|
577 |
+
minutes = parseValue
|
578 |
+
}
|
579 |
+
}
|
580 |
+
else if ( item.match(/^a$/i) && parseValue.match(/^p/i) && ('h' in parsingObject || 'hh' in parsingObject) ) {
|
581 |
+
isPM = true
|
582 |
+
}
|
583 |
+
}
|
584 |
+
|
585 |
+
// Calculate it in minutes and return.
|
586 |
+
return (isPM ? hour + 12 : hour) * MINUTES_IN_HOUR + minutes
|
587 |
+
} //TimePicker.prototype.parse
|
588 |
+
|
589 |
+
|
590 |
+
/**
|
591 |
+
* Various formats to display the object in.
|
592 |
+
*/
|
593 |
+
TimePicker.prototype.formats = {
|
594 |
+
|
595 |
+
h: function( string, timeObject ) {
|
596 |
+
|
597 |
+
// If there's string, then get the digits length.
|
598 |
+
// Otherwise return the selected hour in "standard" format.
|
599 |
+
return string ? _.digits( string ) : timeObject.hour % HOURS_TO_NOON || HOURS_TO_NOON
|
600 |
+
},
|
601 |
+
hh: function( string, timeObject ) {
|
602 |
+
|
603 |
+
// If there's a string, then the length is always 2.
|
604 |
+
// Otherwise return the selected hour in "standard" format with a leading zero.
|
605 |
+
return string ? 2 : _.lead( timeObject.hour % HOURS_TO_NOON || HOURS_TO_NOON )
|
606 |
+
},
|
607 |
+
H: function( string, timeObject ) {
|
608 |
+
|
609 |
+
// If there's string, then get the digits length.
|
610 |
+
// Otherwise return the selected hour in "military" format as a string.
|
611 |
+
return string ? _.digits( string ) : '' + ( timeObject.hour % 24 )
|
612 |
+
},
|
613 |
+
HH: function( string, timeObject ) {
|
614 |
+
|
615 |
+
// If there's string, then get the digits length.
|
616 |
+
// Otherwise return the selected hour in "military" format with a leading zero.
|
617 |
+
return string ? _.digits( string ) : _.lead( timeObject.hour % 24 )
|
618 |
+
},
|
619 |
+
i: function( string, timeObject ) {
|
620 |
+
|
621 |
+
// If there's a string, then the length is always 2.
|
622 |
+
// Otherwise return the selected minutes.
|
623 |
+
return string ? 2 : _.lead( timeObject.mins )
|
624 |
+
},
|
625 |
+
a: function( string, timeObject ) {
|
626 |
+
|
627 |
+
// If there's a string, then the length is always 4.
|
628 |
+
// Otherwise check if it's more than "noon" and return either am/pm.
|
629 |
+
return string ? 4 : MINUTES_IN_DAY / 2 > timeObject.time % MINUTES_IN_DAY ? 'a.m.' : 'p.m.'
|
630 |
+
},
|
631 |
+
A: function( string, timeObject ) {
|
632 |
+
|
633 |
+
// If there's a string, then the length is always 2.
|
634 |
+
// Otherwise check if it's more than "noon" and return either am/pm.
|
635 |
+
return string ? 2 : MINUTES_IN_DAY / 2 > timeObject.time % MINUTES_IN_DAY ? 'AM' : 'PM'
|
636 |
+
},
|
637 |
+
|
638 |
+
// Create an array by splitting the formatting string passed.
|
639 |
+
toArray: function( formatString ) { return formatString.split( /(h{1,2}|H{1,2}|i|a|A|!.)/g ) },
|
640 |
+
|
641 |
+
// Format an object into a string using the formatting options.
|
642 |
+
toString: function ( formatString, itemObject ) {
|
643 |
+
var clock = this
|
644 |
+
return clock.formats.toArray( formatString ).map( function( label ) {
|
645 |
+
return _.trigger( clock.formats[ label ], clock, [ 0, itemObject ] ) || label.replace( /^!/, '' )
|
646 |
+
}).join( '' )
|
647 |
+
}
|
648 |
+
} //TimePicker.prototype.formats
|
649 |
+
|
650 |
+
|
651 |
+
|
652 |
+
|
653 |
+
/**
|
654 |
+
* Check if two time units are the exact.
|
655 |
+
*/
|
656 |
+
TimePicker.prototype.isTimeExact = function( one, two ) {
|
657 |
+
|
658 |
+
var clock = this
|
659 |
+
|
660 |
+
// When we’re working with minutes, do a direct comparison.
|
661 |
+
if (
|
662 |
+
( _.isInteger( one ) && _.isInteger( two ) ) ||
|
663 |
+
( typeof one == 'boolean' && typeof two == 'boolean' )
|
664 |
+
) {
|
665 |
+
return one === two
|
666 |
+
}
|
667 |
+
|
668 |
+
// When we’re working with time representations, compare the “pick” value.
|
669 |
+
if (
|
670 |
+
( _.isDate( one ) || $.isArray( one ) ) &&
|
671 |
+
( _.isDate( two ) || $.isArray( two ) )
|
672 |
+
) {
|
673 |
+
return clock.create( one ).pick === clock.create( two ).pick
|
674 |
+
}
|
675 |
+
|
676 |
+
// When we’re working with range objects, compare the “from” and “to”.
|
677 |
+
if ( $.isPlainObject( one ) && $.isPlainObject( two ) ) {
|
678 |
+
return clock.isTimeExact( one.from, two.from ) && clock.isTimeExact( one.to, two.to )
|
679 |
+
}
|
680 |
+
|
681 |
+
return false
|
682 |
+
}
|
683 |
+
|
684 |
+
|
685 |
+
/**
|
686 |
+
* Check if two time units overlap.
|
687 |
+
*/
|
688 |
+
TimePicker.prototype.isTimeOverlap = function( one, two ) {
|
689 |
+
|
690 |
+
var clock = this
|
691 |
+
|
692 |
+
// When we’re working with an integer, compare the hours.
|
693 |
+
if ( _.isInteger( one ) && ( _.isDate( two ) || $.isArray( two ) ) ) {
|
694 |
+
return one === clock.create( two ).hour
|
695 |
+
}
|
696 |
+
if ( _.isInteger( two ) && ( _.isDate( one ) || $.isArray( one ) ) ) {
|
697 |
+
return two === clock.create( one ).hour
|
698 |
+
}
|
699 |
+
|
700 |
+
// When we’re working with range objects, check if the ranges overlap.
|
701 |
+
if ( $.isPlainObject( one ) && $.isPlainObject( two ) ) {
|
702 |
+
return clock.overlapRanges( one, two )
|
703 |
+
}
|
704 |
+
|
705 |
+
return false
|
706 |
+
}
|
707 |
+
|
708 |
+
|
709 |
+
/**
|
710 |
+
* Flip the “enabled” state.
|
711 |
+
*/
|
712 |
+
TimePicker.prototype.flipEnable = function(val) {
|
713 |
+
var itemObject = this.item
|
714 |
+
itemObject.enable = val || (itemObject.enable == -1 ? 1 : -1)
|
715 |
+
}
|
716 |
+
|
717 |
+
|
718 |
+
/**
|
719 |
+
* Mark a collection of times as “disabled”.
|
720 |
+
*/
|
721 |
+
TimePicker.prototype.deactivate = function( type, timesToDisable ) {
|
722 |
+
|
723 |
+
var clock = this,
|
724 |
+
disabledItems = clock.item.disable.slice(0)
|
725 |
+
|
726 |
+
|
727 |
+
// If we’re flipping, that’s all we need to do.
|
728 |
+
if ( timesToDisable == 'flip' ) {
|
729 |
+
clock.flipEnable()
|
730 |
+
}
|
731 |
+
|
732 |
+
else if ( timesToDisable === false ) {
|
733 |
+
clock.flipEnable(1)
|
734 |
+
disabledItems = []
|
735 |
+
}
|
736 |
+
|
737 |
+
else if ( timesToDisable === true ) {
|
738 |
+
clock.flipEnable(-1)
|
739 |
+
disabledItems = []
|
740 |
+
}
|
741 |
+
|
742 |
+
// Otherwise go through the times to disable.
|
743 |
+
else {
|
744 |
+
|
745 |
+
timesToDisable.map(function( unitToDisable ) {
|
746 |
+
|
747 |
+
var matchFound
|
748 |
+
|
749 |
+
// When we have disabled items, check for matches.
|
750 |
+
// If something is matched, immediately break out.
|
751 |
+
for ( var index = 0; index < disabledItems.length; index += 1 ) {
|
752 |
+
if ( clock.isTimeExact( unitToDisable, disabledItems[index] ) ) {
|
753 |
+
matchFound = true
|
754 |
+
break
|
755 |
+
}
|
756 |
+
}
|
757 |
+
|
758 |
+
// If nothing was found, add the validated unit to the collection.
|
759 |
+
if ( !matchFound ) {
|
760 |
+
if (
|
761 |
+
_.isInteger( unitToDisable ) ||
|
762 |
+
_.isDate( unitToDisable ) ||
|
763 |
+
$.isArray( unitToDisable ) ||
|
764 |
+
( $.isPlainObject( unitToDisable ) && unitToDisable.from && unitToDisable.to )
|
765 |
+
) {
|
766 |
+
disabledItems.push( unitToDisable )
|
767 |
+
}
|
768 |
+
}
|
769 |
+
})
|
770 |
+
}
|
771 |
+
|
772 |
+
// Return the updated collection.
|
773 |
+
return disabledItems
|
774 |
+
} //TimePicker.prototype.deactivate
|
775 |
+
|
776 |
+
|
777 |
+
/**
|
778 |
+
* Mark a collection of times as “enabled”.
|
779 |
+
*/
|
780 |
+
TimePicker.prototype.activate = function( type, timesToEnable ) {
|
781 |
+
|
782 |
+
var clock = this,
|
783 |
+
disabledItems = clock.item.disable,
|
784 |
+
disabledItemsCount = disabledItems.length
|
785 |
+
|
786 |
+
// If we’re flipping, that’s all we need to do.
|
787 |
+
if ( timesToEnable == 'flip' ) {
|
788 |
+
clock.flipEnable()
|
789 |
+
}
|
790 |
+
|
791 |
+
else if ( timesToEnable === true ) {
|
792 |
+
clock.flipEnable(1)
|
793 |
+
disabledItems = []
|
794 |
+
}
|
795 |
+
|
796 |
+
else if ( timesToEnable === false ) {
|
797 |
+
clock.flipEnable(-1)
|
798 |
+
disabledItems = []
|
799 |
+
}
|
800 |
+
|
801 |
+
// Otherwise go through the disabled times.
|
802 |
+
else {
|
803 |
+
|
804 |
+
timesToEnable.map(function( unitToEnable ) {
|
805 |
+
|
806 |
+
var matchFound,
|
807 |
+
disabledUnit,
|
808 |
+
index,
|
809 |
+
isRangeMatched
|
810 |
+
|
811 |
+
// Go through the disabled items and try to find a match.
|
812 |
+
for ( index = 0; index < disabledItemsCount; index += 1 ) {
|
813 |
+
|
814 |
+
disabledUnit = disabledItems[index]
|
815 |
+
|
816 |
+
// When an exact match is found, remove it from the collection.
|
817 |
+
if ( clock.isTimeExact( disabledUnit, unitToEnable ) ) {
|
818 |
+
matchFound = disabledItems[index] = null
|
819 |
+
isRangeMatched = true
|
820 |
+
break
|
821 |
+
}
|
822 |
+
|
823 |
+
// When an overlapped match is found, add the “inverted” state to it.
|
824 |
+
else if ( clock.isTimeOverlap( disabledUnit, unitToEnable ) ) {
|
825 |
+
if ( $.isPlainObject( unitToEnable ) ) {
|
826 |
+
unitToEnable.inverted = true
|
827 |
+
matchFound = unitToEnable
|
828 |
+
}
|
829 |
+
else if ( $.isArray( unitToEnable ) ) {
|
830 |
+
matchFound = unitToEnable
|
831 |
+
if ( !matchFound[2] ) matchFound.push( 'inverted' )
|
832 |
+
}
|
833 |
+
else if ( _.isDate( unitToEnable ) ) {
|
834 |
+
matchFound = [ unitToEnable.getFullYear(), unitToEnable.getMonth(), unitToEnable.getDate(), 'inverted' ]
|
835 |
+
}
|
836 |
+
break
|
837 |
+
}
|
838 |
+
}
|
839 |
+
|
840 |
+
// If a match was found, remove a previous duplicate entry.
|
841 |
+
if ( matchFound ) for ( index = 0; index < disabledItemsCount; index += 1 ) {
|
842 |
+
if ( clock.isTimeExact( disabledItems[index], unitToEnable ) ) {
|
843 |
+
disabledItems[index] = null
|
844 |
+
break
|
845 |
+
}
|
846 |
+
}
|
847 |
+
|
848 |
+
// In the event that we’re dealing with an overlap of range times,
|
849 |
+
// make sure there are no “inverted” times because of it.
|
850 |
+
if ( isRangeMatched ) for ( index = 0; index < disabledItemsCount; index += 1 ) {
|
851 |
+
if ( clock.isTimeOverlap( disabledItems[index], unitToEnable ) ) {
|
852 |
+
disabledItems[index] = null
|
853 |
+
break
|
854 |
+
}
|
855 |
+
}
|
856 |
+
|
857 |
+
// If something is still matched, add it into the collection.
|
858 |
+
if ( matchFound ) {
|
859 |
+
disabledItems.push( matchFound )
|
860 |
+
}
|
861 |
+
})
|
862 |
+
}
|
863 |
+
|
864 |
+
// Return the updated collection.
|
865 |
+
return disabledItems.filter(function( val ) { return val != null })
|
866 |
+
} //TimePicker.prototype.activate
|
867 |
+
|
868 |
+
|
869 |
+
/**
|
870 |
+
* The division to use for the range intervals.
|
871 |
+
*/
|
872 |
+
TimePicker.prototype.i = function( type, value/*, options*/ ) {
|
873 |
+
return _.isInteger( value ) && value > 0 ? value : this.item.interval
|
874 |
+
}
|
875 |
+
|
876 |
+
|
877 |
+
/**
|
878 |
+
* Create a string for the nodes in the picker.
|
879 |
+
*/
|
880 |
+
TimePicker.prototype.nodes = function( isOpen ) {
|
881 |
+
|
882 |
+
var
|
883 |
+
clock = this,
|
884 |
+
settings = clock.settings,
|
885 |
+
selectedObject = clock.item.select,
|
886 |
+
highlightedObject = clock.item.highlight,
|
887 |
+
viewsetObject = clock.item.view,
|
888 |
+
disabledCollection = clock.item.disable
|
889 |
+
|
890 |
+
return _.node(
|
891 |
+
'ul',
|
892 |
+
_.group({
|
893 |
+
min: clock.item.min.pick,
|
894 |
+
max: clock.item.max.pick,
|
895 |
+
i: clock.item.interval,
|
896 |
+
node: 'li',
|
897 |
+
item: function( loopedTime ) {
|
898 |
+
loopedTime = clock.create( loopedTime )
|
899 |
+
var timeMinutes = loopedTime.pick,
|
900 |
+
isSelected = selectedObject && selectedObject.pick == timeMinutes,
|
901 |
+
isHighlighted = highlightedObject && highlightedObject.pick == timeMinutes,
|
902 |
+
isDisabled = disabledCollection && clock.disabled( loopedTime ),
|
903 |
+
formattedTime = _.trigger( clock.formats.toString, clock, [ settings.format, loopedTime ] )
|
904 |
+
return [
|
905 |
+
_.trigger( clock.formats.toString, clock, [ _.trigger( settings.formatLabel, clock, [ loopedTime ] ) || settings.format, loopedTime ] ),
|
906 |
+
(function( klasses ) {
|
907 |
+
|
908 |
+
if ( isSelected ) {
|
909 |
+
klasses.push( settings.klass.selected )
|
910 |
+
}
|
911 |
+
|
912 |
+
if ( isHighlighted ) {
|
913 |
+
klasses.push( settings.klass.highlighted )
|
914 |
+
}
|
915 |
+
|
916 |
+
if ( viewsetObject && viewsetObject.pick == timeMinutes ) {
|
917 |
+
klasses.push( settings.klass.viewset )
|
918 |
+
}
|
919 |
+
|
920 |
+
if ( isDisabled ) {
|
921 |
+
klasses.push( settings.klass.disabled )
|
922 |
+
}
|
923 |
+
|
924 |
+
return klasses.join( ' ' )
|
925 |
+
})( [ settings.klass.listItem ] ),
|
926 |
+
'data-pick=' + loopedTime.pick + ' ' + _.ariaAttr({
|
927 |
+
role: 'option',
|
928 |
+
label: formattedTime,
|
929 |
+
selected: isSelected && clock.$node.val() === formattedTime ? true : null,
|
930 |
+
activedescendant: isHighlighted ? true : null,
|
931 |
+
disabled: isDisabled ? true : null
|
932 |
+
})
|
933 |
+
]
|
934 |
+
}
|
935 |
+
}) +
|
936 |
+
|
937 |
+
// * For Firefox forms to submit, make sure to set the button’s `type` attribute as “button”.
|
938 |
+
_.node(
|
939 |
+
'li',
|
940 |
+
_.node(
|
941 |
+
'button',
|
942 |
+
settings.clear,
|
943 |
+
settings.klass.buttonClear,
|
944 |
+
'type=button data-clear=1' + ( isOpen ? '' : ' disabled' ) + ' ' +
|
945 |
+
_.ariaAttr({ controls: clock.$node[0].id })
|
946 |
+
),
|
947 |
+
'', _.ariaAttr({ role: 'presentation' })
|
948 |
+
),
|
949 |
+
settings.klass.list,
|
950 |
+
_.ariaAttr({ role: 'listbox', controls: clock.$node[0].id })
|
951 |
+
)
|
952 |
+
} //TimePicker.prototype.nodes
|
953 |
+
|
954 |
+
|
955 |
+
|
956 |
+
|
957 |
+
|
958 |
+
|
959 |
+
|
960 |
+
/**
|
961 |
+
* Extend the picker to add the component with the defaults.
|
962 |
+
*/
|
963 |
+
TimePicker.defaults = (function( prefix ) {
|
964 |
+
|
965 |
+
return {
|
966 |
+
|
967 |
+
// Clear
|
968 |
+
clear: 'Clear',
|
969 |
+
|
970 |
+
// The format to show on the `input` element
|
971 |
+
format: 'h:i A',
|
972 |
+
|
973 |
+
// The interval between each time
|
974 |
+
interval: 30,
|
975 |
+
|
976 |
+
// Picker close behavior
|
977 |
+
closeOnSelect: true,
|
978 |
+
closeOnClear: true,
|
979 |
+
|
980 |
+
// Classes
|
981 |
+
klass: {
|
982 |
+
|
983 |
+
picker: prefix + ' ' + prefix + '--time',
|
984 |
+
holder: prefix + '__holder',
|
985 |
+
|
986 |
+
list: prefix + '__list',
|
987 |
+
listItem: prefix + '__list-item',
|
988 |
+
|
989 |
+
disabled: prefix + '__list-item--disabled',
|
990 |
+
selected: prefix + '__list-item--selected',
|
991 |
+
highlighted: prefix + '__list-item--highlighted',
|
992 |
+
viewset: prefix + '__list-item--viewset',
|
993 |
+
now: prefix + '__list-item--now',
|
994 |
+
|
995 |
+
buttonClear: prefix + '__button--clear'
|
996 |
+
}
|
997 |
+
}
|
998 |
+
})( Picker.klasses().picker )
|
999 |
+
|
1000 |
+
|
1001 |
+
|
1002 |
+
|
1003 |
+
|
1004 |
+
/**
|
1005 |
+
* Extend the picker to add the time picker.
|
1006 |
+
*/
|
1007 |
+
Picker.extend( 'pickatime', TimePicker )
|
1008 |
+
|
1009 |
+
|
1010 |
+
}));
|
1011 |
+
|
1012 |
+
|
1013 |
+
|
assets/js/um-functions.js
CHANGED
@@ -8,15 +8,15 @@ function um_conditional(){
|
|
8 |
var found = 0;
|
9 |
var um_field_key = jQuery(this).data('key');
|
10 |
for (var i = 0; i < 5; i++) {
|
11 |
-
|
12 |
var action0 = jQuery(this).data('cond-'+i+'-action');
|
13 |
var field0 = jQuery(this).data('cond-'+i+'-field');
|
14 |
var operator0 = jQuery(this).data('cond-'+i+'-operator');
|
15 |
var value0 = jQuery(this).data('cond-'+i+'-value');
|
16 |
-
|
17 |
-
|
18 |
if ( action0 == 'show' && field0 == live_field && typeof value0 !== 'undefined' ) {
|
19 |
-
|
20 |
if ( operator0 == 'empty' ) {
|
21 |
if ( !live_value || live_value == '' || found > 0 ) {
|
22 |
jQuery(this).fadeIn();
|
@@ -25,10 +25,10 @@ function um_conditional(){
|
|
25 |
jQuery(this).hide();
|
26 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').hide();
|
27 |
um_reset_field('div.um-field[data-cond-'+i+'-field='+um_field_key+']');
|
28 |
-
|
29 |
}
|
30 |
}
|
31 |
-
|
32 |
if ( operator0 == 'not empty' ) {
|
33 |
if ( live_value && live_value != '' || found > 0 ) {
|
34 |
jQuery(this).fadeIn();
|
@@ -37,10 +37,10 @@ function um_conditional(){
|
|
37 |
jQuery(this).hide();
|
38 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').hide();
|
39 |
um_reset_field('div.um-field[data-cond-'+i+'-field='+um_field_key+']');
|
40 |
-
|
41 |
}
|
42 |
}
|
43 |
-
|
44 |
if ( operator0 == 'equals to' ) {
|
45 |
if ( value0 == live_value || found > 0 ) {
|
46 |
jQuery(this).fadeIn();
|
@@ -49,10 +49,10 @@ function um_conditional(){
|
|
49 |
jQuery(this).hide();
|
50 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').hide();
|
51 |
um_reset_field('div.um-field[data-cond-'+i+'-field='+um_field_key+']');
|
52 |
-
|
53 |
}
|
54 |
}
|
55 |
-
|
56 |
if ( operator0 == 'not equals' ) {
|
57 |
if ( jQuery.isNumeric( value0 ) && parseInt( live_value ) != parseInt( value0 ) && live_value || found > 0 ) {
|
58 |
jQuery(this).fadeIn();
|
@@ -64,10 +64,10 @@ function um_conditional(){
|
|
64 |
jQuery(this).hide();
|
65 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').hide();
|
66 |
um_reset_field('div.um-field[data-cond-'+i+'-field='+um_field_key+']');
|
67 |
-
|
68 |
}
|
69 |
}
|
70 |
-
|
71 |
if ( operator0 == 'greater than' ) {
|
72 |
if ( jQuery.isNumeric( value0 ) && parseInt( live_value ) > parseInt( value0 ) || found > 0) {
|
73 |
jQuery(this).fadeIn();
|
@@ -76,10 +76,10 @@ function um_conditional(){
|
|
76 |
jQuery(this).hide();
|
77 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').hide();
|
78 |
um_reset_field('div.um-field[data-cond-'+i+'-field='+um_field_key+']');
|
79 |
-
|
80 |
}
|
81 |
}
|
82 |
-
|
83 |
if ( operator0 == 'less than' ) {
|
84 |
if ( jQuery.isNumeric( value0 ) && parseInt( live_value ) < parseInt( value0 ) && live_value || found > 0) {
|
85 |
jQuery(this).fadeIn();
|
@@ -88,10 +88,10 @@ function um_conditional(){
|
|
88 |
jQuery(this).hide();
|
89 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').hide();
|
90 |
um_reset_field('div.um-field[data-cond-'+i+'-field='+um_field_key+']');
|
91 |
-
|
92 |
}
|
93 |
}
|
94 |
-
|
95 |
if ( operator0 == 'contains' ) {
|
96 |
if ( live_value && live_value.indexOf( value0 ) >= 0 || found > 0 ) {
|
97 |
jQuery(this).fadeIn();
|
@@ -100,14 +100,14 @@ function um_conditional(){
|
|
100 |
jQuery(this).hide();
|
101 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').hide();
|
102 |
um_reset_field('div.um-field[data-cond-'+i+'-field='+um_field_key+']');
|
103 |
-
|
104 |
}
|
105 |
}
|
106 |
-
|
107 |
}
|
108 |
-
|
109 |
if ( action0 == 'hide' && field0 == live_field && typeof value0 !== 'undefined' ) {
|
110 |
-
|
111 |
if ( operator0 == 'empty' ) {
|
112 |
if ( !live_value || live_value == '' ) {
|
113 |
jQuery(this).hide();
|
@@ -117,7 +117,7 @@ function um_conditional(){
|
|
117 |
|
118 |
}
|
119 |
}
|
120 |
-
|
121 |
if ( operator0 == 'not empty' ) {
|
122 |
if ( live_value && live_value != '' ) {
|
123 |
jQuery(this).hide();
|
@@ -125,10 +125,10 @@ function um_conditional(){
|
|
125 |
} else {
|
126 |
jQuery(this).fadeIn();
|
127 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').show();
|
128 |
-
|
129 |
}
|
130 |
}
|
131 |
-
|
132 |
if ( operator0 == 'equals to' ) {
|
133 |
if ( value0 == live_value ) {
|
134 |
jQuery(this).hide();
|
@@ -136,10 +136,10 @@ function um_conditional(){
|
|
136 |
} else {
|
137 |
jQuery(this).fadeIn();
|
138 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').show();
|
139 |
-
|
140 |
}
|
141 |
}
|
142 |
-
|
143 |
if ( operator0 == 'not equals' ) {
|
144 |
if ( jQuery.isNumeric( value0 ) && parseInt( live_value ) != parseInt( value0 ) && live_value ) {
|
145 |
jQuery(this).hide();
|
@@ -150,10 +150,10 @@ function um_conditional(){
|
|
150 |
} else {
|
151 |
jQuery(this).fadeIn();
|
152 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').show();
|
153 |
-
|
154 |
}
|
155 |
}
|
156 |
-
|
157 |
if ( operator0 == 'greater than' ) {
|
158 |
if ( jQuery.isNumeric( value0 ) && parseInt( live_value ) > parseInt( value0 ) ) {
|
159 |
jQuery(this).hide();
|
@@ -161,10 +161,10 @@ function um_conditional(){
|
|
161 |
} else {
|
162 |
jQuery(this).fadeIn();
|
163 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').show();
|
164 |
-
|
165 |
}
|
166 |
}
|
167 |
-
|
168 |
if ( operator0 == 'less than' ) {
|
169 |
if ( jQuery.isNumeric( value0 ) && parseInt( live_value ) < parseInt( value0 ) && live_value ) {
|
170 |
jQuery(this).hide();
|
@@ -172,10 +172,10 @@ function um_conditional(){
|
|
172 |
} else {
|
173 |
jQuery(this).fadeIn();
|
174 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').show();
|
175 |
-
|
176 |
}
|
177 |
}
|
178 |
-
|
179 |
if ( operator0 == 'contains' ) {
|
180 |
if ( live_value && live_value.indexOf( value0 ) >= 0 ) {
|
181 |
jQuery(this).hide();
|
@@ -183,41 +183,120 @@ function um_conditional(){
|
|
183 |
} else {
|
184 |
jQuery(this).fadeIn();
|
185 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').show();
|
186 |
-
|
187 |
}
|
188 |
}
|
189 |
//console.log( 'hide',i,value0, live_value );
|
190 |
|
191 |
}
|
192 |
-
|
193 |
}
|
194 |
|
195 |
});
|
196 |
|
197 |
}
|
198 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
function UM_hide_menus() {
|
200 |
|
201 |
menu = jQuery('.um-dropdown');
|
202 |
menu.parents('div').find('a').removeClass('active');
|
203 |
menu.hide();
|
204 |
-
|
205 |
}
|
206 |
|
207 |
function UM_domenus(){
|
208 |
|
209 |
jQuery('.um-dropdown').each(function(){
|
210 |
-
|
211 |
var menu = jQuery(this);
|
212 |
var element = jQuery(this).attr('data-element');
|
213 |
var position = jQuery(this).attr('data-position');
|
214 |
-
|
215 |
jQuery(element).addClass('um-trigger-menu-on-'+menu.attr('data-trigger'));
|
216 |
|
217 |
if ( jQuery(window).width() <= 1200 && element == 'div.um-profile-edit' ) {
|
218 |
position = 'lc';
|
219 |
}
|
220 |
-
|
221 |
if ( position == 'lc' ){
|
222 |
|
223 |
if ( 200 > jQuery(element).find('img').width() ) {
|
@@ -225,9 +304,9 @@ function UM_domenus(){
|
|
225 |
} else {
|
226 |
left_p = ( ( jQuery(element).width() - jQuery(element).find('img').width() ) / 2 );
|
227 |
}
|
228 |
-
|
229 |
top_ = parseInt( jQuery(element).find('a').css('top') );
|
230 |
-
|
231 |
if ( top_ ) {
|
232 |
top_p = jQuery(element).find('img').height() + 4 + top_;
|
233 |
left_gap = 4;
|
@@ -235,13 +314,13 @@ function UM_domenus(){
|
|
235 |
top_p = jQuery(element).find('img').height() + 4;
|
236 |
left_gap = 0;
|
237 |
}
|
238 |
-
|
239 |
if ( top_p == 4 && element == 'div.um-cover' ) {
|
240 |
top_p = jQuery(element).height() / 2 + ( menu.height() / 2 );
|
241 |
} else if ( top_p == 4 ) {
|
242 |
top_p = jQuery(element).height() + 20;
|
243 |
}
|
244 |
-
|
245 |
gap_right = jQuery(element).width() + 17;
|
246 |
menu.css({
|
247 |
'top' : 0,
|
@@ -250,17 +329,17 @@ function UM_domenus(){
|
|
250 |
'right' : gap_right + 'px',
|
251 |
'text-align' : 'center'
|
252 |
});
|
253 |
-
|
254 |
menu.find('.um-dropdown-arr').find('i').removeClass().addClass('um-icon-arrow-right-b');
|
255 |
-
|
256 |
menu.find('.um-dropdown-arr').css({
|
257 |
'top' : '4px',
|
258 |
'left' : 'auto',
|
259 |
'right' : '-17px'
|
260 |
});
|
261 |
-
|
262 |
}
|
263 |
-
|
264 |
if ( position == 'bc' ){
|
265 |
|
266 |
if ( 200 > jQuery(element).find('img').width() ) {
|
@@ -268,9 +347,9 @@ function UM_domenus(){
|
|
268 |
} else {
|
269 |
left_p = ( ( jQuery(element).width() - jQuery(element).find('img').width() ) / 2 );
|
270 |
}
|
271 |
-
|
272 |
top_ = parseInt( jQuery(element).find('a').css('top') );
|
273 |
-
|
274 |
if ( top_ ) {
|
275 |
top_p = jQuery(element).find('img').height() + 4 + top_;
|
276 |
left_gap = 4;
|
@@ -278,7 +357,7 @@ function UM_domenus(){
|
|
278 |
top_p = jQuery(element).find('img').height() + 4;
|
279 |
left_gap = 0;
|
280 |
}
|
281 |
-
|
282 |
if ( top_p == 4 && element == 'div.um-cover' ) {
|
283 |
top_p = jQuery(element).height() / 2 + ( menu.height() / 2 );
|
284 |
} else if ( top_p == 4 ) {
|
@@ -292,64 +371,64 @@ function UM_domenus(){
|
|
292 |
'right' : 'auto',
|
293 |
'text-align' : 'center'
|
294 |
});
|
295 |
-
|
296 |
menu.find('.um-dropdown-arr').find('i').removeClass().addClass('um-icon-arrow-up-b');
|
297 |
-
|
298 |
menu.find('.um-dropdown-arr').css({
|
299 |
'top' : '-17px',
|
300 |
'left' : ( menu.width() / 2 ) - 12,
|
301 |
'right' : 'auto'
|
302 |
});
|
303 |
-
|
304 |
}
|
305 |
});
|
306 |
-
|
307 |
}
|
308 |
|
309 |
function um_responsive(){
|
310 |
|
311 |
jQuery('.um').each(function(){
|
312 |
-
|
313 |
element_width = jQuery(this).width();
|
314 |
|
315 |
if ( element_width <= 340 ) {
|
316 |
-
|
317 |
jQuery(this).removeClass('uimob340');
|
318 |
jQuery(this).removeClass('uimob500');
|
319 |
jQuery(this).removeClass('uimob800');
|
320 |
jQuery(this).removeClass('uimob960');
|
321 |
-
|
322 |
jQuery(this).addClass('uimob340');
|
323 |
|
324 |
} else if ( element_width <= 500 ) {
|
325 |
-
|
326 |
jQuery(this).removeClass('uimob340');
|
327 |
jQuery(this).removeClass('uimob500');
|
328 |
jQuery(this).removeClass('uimob800');
|
329 |
jQuery(this).removeClass('uimob960');
|
330 |
-
|
331 |
jQuery(this).addClass('uimob500');
|
332 |
|
333 |
} else if ( element_width <= 800 ) {
|
334 |
-
|
335 |
jQuery(this).removeClass('uimob340');
|
336 |
jQuery(this).removeClass('uimob500');
|
337 |
jQuery(this).removeClass('uimob800');
|
338 |
jQuery(this).removeClass('uimob960');
|
339 |
-
|
340 |
jQuery(this).addClass('uimob800');
|
341 |
|
342 |
} else if ( element_width <= 960 ) {
|
343 |
-
|
344 |
jQuery(this).removeClass('uimob340');
|
345 |
jQuery(this).removeClass('uimob500');
|
346 |
jQuery(this).removeClass('uimob800');
|
347 |
jQuery(this).removeClass('uimob960');
|
348 |
-
|
349 |
jQuery(this).addClass('uimob960');
|
350 |
|
351 |
} else if ( element_width > 960 ) {
|
352 |
-
|
353 |
jQuery(this).removeClass('uimob340');
|
354 |
jQuery(this).removeClass('uimob500');
|
355 |
jQuery(this).removeClass('uimob800');
|
@@ -360,13 +439,13 @@ function um_responsive(){
|
|
360 |
if ( jQuery('.um-account-nav').length > 0 && jQuery('.um-account-side').is(':visible') && jQuery('.um-account-tab:visible').length == 0 ) {
|
361 |
jQuery('.um-account-side li a.current').trigger('click');
|
362 |
}
|
363 |
-
|
364 |
jQuery(this).css('opacity',1);
|
365 |
|
366 |
});
|
367 |
|
368 |
jQuery('.um-cover, .um-member-cover').each(function(){
|
369 |
-
|
370 |
var elem = jQuery(this);
|
371 |
var ratio = elem.data('ratio');
|
372 |
var width = elem.width();
|
@@ -375,7 +454,7 @@ function um_responsive(){
|
|
375 |
calcHeight = Math.round( width / ratios[0] ) + 'px';
|
376 |
elem.height( calcHeight );
|
377 |
elem.find('.um-cover-add').height( calcHeight );
|
378 |
-
|
379 |
});
|
380 |
|
381 |
jQuery('.um-members').each(function(){
|
@@ -383,7 +462,7 @@ function um_responsive(){
|
|
383 |
});
|
384 |
|
385 |
UM_domenus();
|
386 |
-
|
387 |
}
|
388 |
|
389 |
function UM_Member_Grid( container ) {
|
@@ -402,7 +481,7 @@ function initImageUpload_UM( trigger ) {
|
|
402 |
} else {
|
403 |
upload_help_text = '';
|
404 |
}
|
405 |
-
|
406 |
if ( trigger.data('icon') ) {
|
407 |
icon = '<span class="icon"><i class="'+ trigger.data('icon') + '"></i></span>';
|
408 |
} else {
|
@@ -434,42 +513,42 @@ function initImageUpload_UM( trigger ) {
|
|
434 |
showFileCounter: false,
|
435 |
showStatusAfterSuccess: true,
|
436 |
onSubmit:function(files){
|
437 |
-
|
438 |
trigger.parents('.um-modal-body').find('.um-error-block').remove();
|
439 |
-
|
440 |
},
|
441 |
onSuccess:function(files,data,xhr){
|
442 |
-
|
443 |
trigger.selectedFiles = 0;
|
444 |
-
|
445 |
data = jQuery.parseJSON(data);
|
446 |
if (data.error && data.error != '') {
|
447 |
|
448 |
trigger.parents('.um-modal-body').append('<div class="um-error-block">'+data.error+'</div>');
|
449 |
trigger.parents('.um-modal-body').find('.upload-statusbar').hide(0);
|
450 |
um_modal_responsive();
|
451 |
-
|
452 |
} else {
|
453 |
|
454 |
jQuery.each( data, function(key, value) {
|
455 |
-
|
456 |
var img_id = trigger.parents('.um-modal-body').find('.um-single-image-preview img');
|
457 |
var img_id_h = trigger.parents('.um-modal-body').find('.um-single-image-preview');
|
458 |
-
|
459 |
img_id.attr("src", value);
|
460 |
img_id.load(function(){
|
461 |
-
|
462 |
trigger.parents('.um-modal-body').find('.um-modal-btn.um-finish-upload.disabled').removeClass('disabled');
|
463 |
trigger.parents('.um-modal-body').find('.ajax-upload-dragdrop,.upload-statusbar').hide(0);
|
464 |
img_id_h.show(0);
|
465 |
um_modal_responsive();
|
466 |
-
|
467 |
});
|
468 |
-
|
469 |
});
|
470 |
|
471 |
}
|
472 |
-
|
473 |
}
|
474 |
});
|
475 |
|
@@ -482,7 +561,7 @@ function initFileUpload_UM( trigger ) {
|
|
482 |
} else {
|
483 |
upload_help_text = '';
|
484 |
}
|
485 |
-
|
486 |
if ( trigger.data('icon') ) {
|
487 |
icon = '<span class="icon"><i class="'+ trigger.data('icon') + '"></i></span>';
|
488 |
} else {
|
@@ -494,7 +573,7 @@ function initFileUpload_UM( trigger ) {
|
|
494 |
} else {
|
495 |
upload_text = '';
|
496 |
}
|
497 |
-
|
498 |
trigger.uploadFile({
|
499 |
url: um_scripts.fileupload,
|
500 |
method: "POST",
|
@@ -514,29 +593,29 @@ function initFileUpload_UM( trigger ) {
|
|
514 |
showFileCounter: false,
|
515 |
showStatusAfterSuccess: true,
|
516 |
onSubmit:function(files){
|
517 |
-
|
518 |
trigger.parents('.um-modal-body').find('.um-error-block').remove();
|
519 |
-
|
520 |
},
|
521 |
onSuccess:function(files,data,xhr){
|
522 |
-
|
523 |
trigger.selectedFiles = 0;
|
524 |
-
|
525 |
data = jQuery.parseJSON(data);
|
526 |
if (data.error && data.error != '') {
|
527 |
|
528 |
trigger.parents('.um-modal-body').append('<div class="um-error-block">'+data.error+'</div>');
|
529 |
trigger.parents('.um-modal-body').find('.upload-statusbar').hide(0);
|
530 |
um_modal_responsive();
|
531 |
-
|
532 |
} else {
|
533 |
|
534 |
jQuery.each( data, function(key, value) {
|
535 |
-
|
536 |
trigger.parents('.um-modal-body').find('.um-modal-btn.um-finish-upload.disabled').removeClass('disabled');
|
537 |
trigger.parents('.um-modal-body').find('.ajax-upload-dragdrop,.upload-statusbar').hide(0);
|
538 |
trigger.parents('.um-modal-body').find('.um-single-file-preview').show(0);
|
539 |
-
|
540 |
if (key == 'icon') {
|
541 |
trigger.parents('.um-modal-body').find('.um-single-fileinfo i').removeClass().addClass(value);
|
542 |
} else if ( key == 'icon_bg' ) {
|
@@ -546,28 +625,28 @@ function initFileUpload_UM( trigger ) {
|
|
546 |
} else {
|
547 |
trigger.parents('.um-modal-body').find('.um-single-fileinfo a').attr('href', value);
|
548 |
}
|
549 |
-
|
550 |
});
|
551 |
-
|
552 |
um_modal_responsive();
|
553 |
-
|
554 |
}
|
555 |
-
|
556 |
}
|
557 |
});
|
558 |
-
|
559 |
}
|
560 |
|
561 |
function initCrop_UM() {
|
562 |
|
563 |
var target_img = jQuery('.um-modal:visible .um-single-image-preview img');
|
564 |
var target_img_parent = jQuery('.um-modal:visible .um-single-image-preview');
|
565 |
-
|
566 |
var crop_data = target_img.parent().attr('data-crop');
|
567 |
var min_width = target_img.parent().attr('data-min_width');
|
568 |
var min_height = target_img.parent().attr('data-min_height');
|
569 |
var ratio = target_img.parent().attr('data-ratio');
|
570 |
-
|
571 |
if ( jQuery('.um-modal').find('#um_upload_single').attr('data-ratio') ) {
|
572 |
var ratio = jQuery('.um-modal').find('#um_upload_single').attr('data-ratio');
|
573 |
var ratio_split = ratio.split(':');
|
@@ -575,9 +654,9 @@ function initCrop_UM() {
|
|
575 |
}
|
576 |
|
577 |
if ( target_img.length ) {
|
578 |
-
|
579 |
if ( target_img.attr('src') != '' ) {
|
580 |
-
|
581 |
var max_height = jQuery(window).height() - ( jQuery('.um-modal-footer a').height() + 20 ) - 50 - ( jQuery('.um-modal-header:visible').height() );
|
582 |
target_img.css({'height' : 'auto'});
|
583 |
target_img_parent.css({'height' : 'auto'});
|
@@ -590,7 +669,7 @@ function initCrop_UM() {
|
|
590 |
}
|
591 |
|
592 |
if ( crop_data == 'square' ) {
|
593 |
-
|
594 |
var opts = {
|
595 |
minWidth: min_width,
|
596 |
minHeight: min_height,
|
@@ -603,7 +682,7 @@ function initCrop_UM() {
|
|
603 |
target_img.parent().attr('data-coord', Math.round(data.x) + ',' + Math.round(data.y) + ',' + Math.round(data.width) + ',' + Math.round(data.height) );
|
604 |
}
|
605 |
};
|
606 |
-
|
607 |
} else if ( crop_data == 'cover' ) {
|
608 |
|
609 |
var opts = {
|
@@ -618,9 +697,9 @@ function initCrop_UM() {
|
|
618 |
target_img.parent().attr('data-coord', Math.round(data.x) + ',' + Math.round(data.y) + ',' + Math.round(data.width) + ',' + Math.round(data.height) );
|
619 |
}
|
620 |
};
|
621 |
-
|
622 |
} else if ( crop_data == 'user' ) {
|
623 |
-
|
624 |
var opts = {
|
625 |
minWidth: min_width,
|
626 |
minHeight: min_height,
|
@@ -633,169 +712,169 @@ function initCrop_UM() {
|
|
633 |
target_img.parent().attr('data-coord', Math.round(data.x) + ',' + Math.round(data.y) + ',' + Math.round(data.width) + ',' + Math.round(data.height) );
|
634 |
}
|
635 |
};
|
636 |
-
|
637 |
}
|
638 |
|
639 |
if ( crop_data != 0 ) {
|
640 |
target_img.cropper( opts );
|
641 |
}
|
642 |
-
|
643 |
}
|
644 |
}
|
645 |
-
|
646 |
}
|
647 |
|
648 |
function um_new_modal( id, size, isPhoto, source ){
|
649 |
-
|
650 |
var modal = jQuery('body').find('.um-modal-overlay');
|
651 |
-
|
652 |
if ( modal.length == 0 ) {
|
653 |
|
654 |
jQuery('.tipsy').hide();
|
655 |
|
656 |
UM_hide_menus();
|
657 |
-
|
658 |
jQuery('body,html,textarea').css("overflow", "hidden");
|
659 |
-
|
660 |
jQuery(document).bind("touchmove", function(e){e.preventDefault();});
|
661 |
jQuery('.um-modal').on('touchmove', function(e){e.stopPropagation();});
|
662 |
-
|
663 |
if ( isPhoto ) {
|
664 |
jQuery('body').append('<div class="um-modal-overlay" /><div class="um-modal is-photo" />');
|
665 |
} else {
|
666 |
jQuery('body').append('<div class="um-modal-overlay" /><div class="um-modal no-photo" />');
|
667 |
}
|
668 |
-
|
669 |
jQuery('#' + id).prependTo('.um-modal');
|
670 |
-
|
671 |
if ( isPhoto ) {
|
672 |
-
|
673 |
jQuery('.um-modal').find('.um-modal-photo').html('<img />');
|
674 |
-
|
675 |
var photo_ = jQuery('.um-modal-photo img');
|
676 |
var photo_maxw = jQuery(window).width() - 60;
|
677 |
var photo_maxh = jQuery(window).height() - ( jQuery(window).height() * 0.25 );
|
678 |
|
679 |
photo_.attr("src", source);
|
680 |
photo_.load(function(){
|
681 |
-
|
682 |
jQuery('#' + id).show();
|
683 |
jQuery('.um-modal').show();
|
684 |
-
|
685 |
photo_.css({'opacity': 0});
|
686 |
photo_.css({'max-width': photo_maxw });
|
687 |
photo_.css({'max-height': photo_maxh });
|
688 |
-
|
689 |
jQuery('.um-modal').css({
|
690 |
'width': photo_.width(),
|
691 |
'margin-left': '-' + photo_.width() / 2 + 'px'
|
692 |
});
|
693 |
-
|
694 |
photo_.animate({'opacity' : 1}, 1000);
|
695 |
-
|
696 |
um_modal_responsive();
|
697 |
-
|
698 |
});
|
699 |
|
700 |
} else {
|
701 |
-
|
702 |
jQuery('#' + id).show();
|
703 |
jQuery('.um-modal').show();
|
704 |
|
705 |
um_modal_size( size );
|
706 |
-
|
707 |
initImageUpload_UM( jQuery('.um-modal:visible').find('.um-single-image-upload') );
|
708 |
initFileUpload_UM( jQuery('.um-modal:visible').find('.um-single-file-upload') );
|
709 |
-
|
710 |
um_modal_responsive();
|
711 |
-
|
712 |
}
|
713 |
-
|
714 |
}
|
715 |
-
|
716 |
}
|
717 |
|
718 |
function um_modal_responsive() {
|
719 |
-
|
720 |
var modal = jQuery('.um-modal:visible');
|
721 |
var photo_modal = jQuery('.um-modal-body.photo:visible');
|
722 |
-
|
723 |
if ( photo_modal.length ) {
|
724 |
-
|
725 |
modal.removeClass('uimob340');
|
726 |
modal.removeClass('uimob500');
|
727 |
-
|
728 |
var photo_ = jQuery('.um-modal-photo img');
|
729 |
var photo_maxw = jQuery(window).width() - 60;
|
730 |
var photo_maxh = jQuery(window).height() - ( jQuery(window).height() * 0.25 );
|
731 |
-
|
732 |
photo_.css({'opacity': 0});
|
733 |
photo_.css({'max-width': photo_maxw });
|
734 |
photo_.css({'max-height': photo_maxh });
|
735 |
-
|
736 |
jQuery('.um-modal').css({
|
737 |
'width': photo_.width(),
|
738 |
'margin-left': '-' + photo_.width() / 2 + 'px'
|
739 |
});
|
740 |
-
|
741 |
photo_.animate({'opacity' : 1}, 1000);
|
742 |
|
743 |
var half_gap = ( jQuery(window).height() - modal.innerHeight() ) / 2 + 'px';
|
744 |
modal.animate({ 'bottom' : half_gap }, 300);
|
745 |
-
|
746 |
} else if ( modal.length ) {
|
747 |
|
748 |
var element_width = jQuery(window).width();
|
749 |
-
|
750 |
modal.removeClass('uimob340');
|
751 |
modal.removeClass('uimob500');
|
752 |
-
|
753 |
if ( element_width <= 340 ) {
|
754 |
-
|
755 |
modal.addClass('uimob340');
|
756 |
initCrop_UM();
|
757 |
modal.animate({ 'bottom' : 0 }, 300);
|
758 |
-
|
759 |
} else if ( element_width <= 500 ) {
|
760 |
-
|
761 |
modal.addClass('uimob500');
|
762 |
initCrop_UM();
|
763 |
modal.animate({ 'bottom' : 0 }, 300);
|
764 |
-
|
765 |
} else if ( element_width <= 800 ) {
|
766 |
-
|
767 |
initCrop_UM();
|
768 |
var half_gap = ( jQuery(window).height() - modal.innerHeight() ) / 2 + 'px';
|
769 |
modal.animate({ 'bottom' : half_gap }, 300);
|
770 |
-
|
771 |
} else if ( element_width <= 960 ) {
|
772 |
-
|
773 |
initCrop_UM();
|
774 |
var half_gap = ( jQuery(window).height() - modal.innerHeight() ) / 2 + 'px';
|
775 |
modal.animate({ 'bottom' : half_gap }, 300);
|
776 |
-
|
777 |
} else if ( element_width > 960 ) {
|
778 |
-
|
779 |
initCrop_UM();
|
780 |
var half_gap = ( jQuery(window).height() - modal.innerHeight() ) / 2 + 'px';
|
781 |
modal.animate({ 'bottom' : half_gap }, 300);
|
782 |
-
|
783 |
}
|
784 |
-
|
785 |
}
|
786 |
}
|
787 |
|
788 |
function um_remove_modal(){
|
789 |
|
790 |
jQuery('img.cropper-hidden').cropper('destroy');
|
791 |
-
|
792 |
jQuery('body,html,textarea').css("overflow", "auto");
|
793 |
-
|
794 |
jQuery(document).unbind('touchmove');
|
795 |
|
796 |
jQuery('.um-modal div[id^="um_"]').hide().appendTo('body');
|
797 |
jQuery('.um-modal,.um-modal-overlay').remove();
|
798 |
-
|
799 |
}
|
800 |
|
801 |
function um_modal_size( aclass ) {
|
@@ -843,15 +922,15 @@ function responsive_Modal() {
|
|
843 |
}
|
844 |
|
845 |
if ( jQuery('.um-popup-autogrow:visible').length ) {
|
846 |
-
|
847 |
jQuery('.um-popup-autogrow:visible').css({'height': ag_height + 'px'});
|
848 |
jQuery('.um-popup-autogrow:visible').mCustomScrollbar({ theme:"dark-3", mouseWheelPixels:500 }).mCustomScrollbar("scrollTo", "bottom",{ scrollInertia:0} );
|
849 |
-
|
850 |
} else if ( jQuery('.um-popup-autogrow2:visible').length ) {
|
851 |
-
|
852 |
jQuery('.um-popup-autogrow2:visible').css({'max-height': ag_height + 'px'});
|
853 |
jQuery('.um-popup-autogrow2:visible').mCustomScrollbar({ theme:"dark-3", mouseWheelPixels:500 });
|
854 |
-
|
855 |
}
|
856 |
}
|
857 |
}
|
@@ -865,4 +944,22 @@ function um_reset_field( dOm ){
|
|
865 |
.val('')
|
866 |
.removeAttr('checked')
|
867 |
.removeAttr('selected');
|
868 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
var found = 0;
|
9 |
var um_field_key = jQuery(this).data('key');
|
10 |
for (var i = 0; i < 5; i++) {
|
11 |
+
|
12 |
var action0 = jQuery(this).data('cond-'+i+'-action');
|
13 |
var field0 = jQuery(this).data('cond-'+i+'-field');
|
14 |
var operator0 = jQuery(this).data('cond-'+i+'-operator');
|
15 |
var value0 = jQuery(this).data('cond-'+i+'-value');
|
16 |
+
|
17 |
+
|
18 |
if ( action0 == 'show' && field0 == live_field && typeof value0 !== 'undefined' ) {
|
19 |
+
|
20 |
if ( operator0 == 'empty' ) {
|
21 |
if ( !live_value || live_value == '' || found > 0 ) {
|
22 |
jQuery(this).fadeIn();
|
25 |
jQuery(this).hide();
|
26 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').hide();
|
27 |
um_reset_field('div.um-field[data-cond-'+i+'-field='+um_field_key+']');
|
28 |
+
|
29 |
}
|
30 |
}
|
31 |
+
|
32 |
if ( operator0 == 'not empty' ) {
|
33 |
if ( live_value && live_value != '' || found > 0 ) {
|
34 |
jQuery(this).fadeIn();
|
37 |
jQuery(this).hide();
|
38 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').hide();
|
39 |
um_reset_field('div.um-field[data-cond-'+i+'-field='+um_field_key+']');
|
40 |
+
|
41 |
}
|
42 |
}
|
43 |
+
|
44 |
if ( operator0 == 'equals to' ) {
|
45 |
if ( value0 == live_value || found > 0 ) {
|
46 |
jQuery(this).fadeIn();
|
49 |
jQuery(this).hide();
|
50 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').hide();
|
51 |
um_reset_field('div.um-field[data-cond-'+i+'-field='+um_field_key+']');
|
52 |
+
|
53 |
}
|
54 |
}
|
55 |
+
|
56 |
if ( operator0 == 'not equals' ) {
|
57 |
if ( jQuery.isNumeric( value0 ) && parseInt( live_value ) != parseInt( value0 ) && live_value || found > 0 ) {
|
58 |
jQuery(this).fadeIn();
|
64 |
jQuery(this).hide();
|
65 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').hide();
|
66 |
um_reset_field('div.um-field[data-cond-'+i+'-field='+um_field_key+']');
|
67 |
+
|
68 |
}
|
69 |
}
|
70 |
+
|
71 |
if ( operator0 == 'greater than' ) {
|
72 |
if ( jQuery.isNumeric( value0 ) && parseInt( live_value ) > parseInt( value0 ) || found > 0) {
|
73 |
jQuery(this).fadeIn();
|
76 |
jQuery(this).hide();
|
77 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').hide();
|
78 |
um_reset_field('div.um-field[data-cond-'+i+'-field='+um_field_key+']');
|
79 |
+
|
80 |
}
|
81 |
}
|
82 |
+
|
83 |
if ( operator0 == 'less than' ) {
|
84 |
if ( jQuery.isNumeric( value0 ) && parseInt( live_value ) < parseInt( value0 ) && live_value || found > 0) {
|
85 |
jQuery(this).fadeIn();
|
88 |
jQuery(this).hide();
|
89 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').hide();
|
90 |
um_reset_field('div.um-field[data-cond-'+i+'-field='+um_field_key+']');
|
91 |
+
|
92 |
}
|
93 |
}
|
94 |
+
|
95 |
if ( operator0 == 'contains' ) {
|
96 |
if ( live_value && live_value.indexOf( value0 ) >= 0 || found > 0 ) {
|
97 |
jQuery(this).fadeIn();
|
100 |
jQuery(this).hide();
|
101 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').hide();
|
102 |
um_reset_field('div.um-field[data-cond-'+i+'-field='+um_field_key+']');
|
103 |
+
|
104 |
}
|
105 |
}
|
106 |
+
|
107 |
}
|
108 |
+
|
109 |
if ( action0 == 'hide' && field0 == live_field && typeof value0 !== 'undefined' ) {
|
110 |
+
|
111 |
if ( operator0 == 'empty' ) {
|
112 |
if ( !live_value || live_value == '' ) {
|
113 |
jQuery(this).hide();
|
117 |
|
118 |
}
|
119 |
}
|
120 |
+
|
121 |
if ( operator0 == 'not empty' ) {
|
122 |
if ( live_value && live_value != '' ) {
|
123 |
jQuery(this).hide();
|
125 |
} else {
|
126 |
jQuery(this).fadeIn();
|
127 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').show();
|
128 |
+
|
129 |
}
|
130 |
}
|
131 |
+
|
132 |
if ( operator0 == 'equals to' ) {
|
133 |
if ( value0 == live_value ) {
|
134 |
jQuery(this).hide();
|
136 |
} else {
|
137 |
jQuery(this).fadeIn();
|
138 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').show();
|
139 |
+
|
140 |
}
|
141 |
}
|
142 |
+
|
143 |
if ( operator0 == 'not equals' ) {
|
144 |
if ( jQuery.isNumeric( value0 ) && parseInt( live_value ) != parseInt( value0 ) && live_value ) {
|
145 |
jQuery(this).hide();
|
150 |
} else {
|
151 |
jQuery(this).fadeIn();
|
152 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').show();
|
153 |
+
|
154 |
}
|
155 |
}
|
156 |
+
|
157 |
if ( operator0 == 'greater than' ) {
|
158 |
if ( jQuery.isNumeric( value0 ) && parseInt( live_value ) > parseInt( value0 ) ) {
|
159 |
jQuery(this).hide();
|
161 |
} else {
|
162 |
jQuery(this).fadeIn();
|
163 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').show();
|
164 |
+
|
165 |
}
|
166 |
}
|
167 |
+
|
168 |
if ( operator0 == 'less than' ) {
|
169 |
if ( jQuery.isNumeric( value0 ) && parseInt( live_value ) < parseInt( value0 ) && live_value ) {
|
170 |
jQuery(this).hide();
|
172 |
} else {
|
173 |
jQuery(this).fadeIn();
|
174 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').show();
|
175 |
+
|
176 |
}
|
177 |
}
|
178 |
+
|
179 |
if ( operator0 == 'contains' ) {
|
180 |
if ( live_value && live_value.indexOf( value0 ) >= 0 ) {
|
181 |
jQuery(this).hide();
|
183 |
} else {
|
184 |
jQuery(this).fadeIn();
|
185 |
jQuery('div.um-field[data-cond-'+i+'-field='+um_field_key+']').show();
|
186 |
+
|
187 |
}
|
188 |
}
|
189 |
//console.log( 'hide',i,value0, live_value );
|
190 |
|
191 |
}
|
192 |
+
|
193 |
}
|
194 |
|
195 |
});
|
196 |
|
197 |
}
|
198 |
|
199 |
+
function UM_check_password_matched() {
|
200 |
+
jQuery(document).on('input[data-key=user_password],input[data-key=confirm_user_password]').on('keyup', function(e) {
|
201 |
+
var value = jQuery('input[data-key=user_password]').val();
|
202 |
+
var match = jQuery('input[data-key=confirm_user_password]').val();
|
203 |
+
var field = jQuery('input[data-key=user_password],input[data-key=confirm_user_password]');
|
204 |
+
|
205 |
+
if(!value && !match) {
|
206 |
+
field.removeClass('um-validate-matched').removeClass('um-validate-not-matched');
|
207 |
+
} else if(value !== match) {
|
208 |
+
field.removeClass('um-validate-matched').addClass('um-validate-not-matched');
|
209 |
+
} else {
|
210 |
+
field.removeClass('um-validate-not-matched').addClass('um-validate-matched');
|
211 |
+
}
|
212 |
+
});
|
213 |
+
}
|
214 |
+
|
215 |
+
var xhrValidateUsername = false;
|
216 |
+
function UM_check_username() {
|
217 |
+
jQuery(document).on('input[data-key=user_login]').on('keyup', function() {
|
218 |
+
var field = jQuery('input[data-key=user_login]');
|
219 |
+
var value = field.val();
|
220 |
+
|
221 |
+
if(field.parents('.um-field').find('.um-field-error').length) {
|
222 |
+
var error = field.parents('.um-field').find('.um-field-error');
|
223 |
+
} else {
|
224 |
+
var error = jQuery('<div class="um-field-error"><span class="um-field-arrow"><i class="um-faicon-caret-up"></i></span>Your username is already taken</div>');
|
225 |
+
}
|
226 |
+
|
227 |
+
// abort previous xhr request
|
228 |
+
if(xhrValidateUsername) {
|
229 |
+
xhrValidateUsername.abort();
|
230 |
+
}
|
231 |
+
|
232 |
+
if(!value) {
|
233 |
+
field.removeClass('um-searching-username');
|
234 |
+
|
235 |
+
return;
|
236 |
+
}
|
237 |
+
|
238 |
+
field.addClass('um-searching-username');
|
239 |
+
|
240 |
+
xhrValidateUsername = jQuery.ajax({
|
241 |
+
url : um_scripts.ajaxurl,
|
242 |
+
type : 'post',
|
243 |
+
data : {
|
244 |
+
action : 'ultimatemember_check_username_exists',
|
245 |
+
username : value
|
246 |
+
},
|
247 |
+
complete: function(){
|
248 |
+
field.removeClass('um-searching-username');
|
249 |
+
},
|
250 |
+
success: function(exists){
|
251 |
+
if(parseInt(exists) > 0) {
|
252 |
+
field.removeClass('um-validate-username-unique').addClass('um-validate-username-exists');
|
253 |
+
|
254 |
+
if(!field.parents('.um-field').find('.um-field-error').length) {
|
255 |
+
field.parents('.um-field').append(error);
|
256 |
+
}
|
257 |
+
|
258 |
+
error.show();
|
259 |
+
} else {
|
260 |
+
field.removeClass('um-validate-username-exists').addClass('um-validate-username-unique');
|
261 |
+
error.hide();
|
262 |
+
}
|
263 |
+
}
|
264 |
+
});
|
265 |
+
});
|
266 |
+
}
|
267 |
+
|
268 |
+
jQuery(document).ready(function(){
|
269 |
+
if(jQuery('input[data-key=user_password],input[data-key=confirm_user_password]').length == 2) {
|
270 |
+
UM_check_password_matched();
|
271 |
+
}
|
272 |
+
|
273 |
+
if(jQuery('input[data-key=user_login]').length) {
|
274 |
+
UM_check_username();
|
275 |
+
}
|
276 |
+
});
|
277 |
+
|
278 |
function UM_hide_menus() {
|
279 |
|
280 |
menu = jQuery('.um-dropdown');
|
281 |
menu.parents('div').find('a').removeClass('active');
|
282 |
menu.hide();
|
283 |
+
|
284 |
}
|
285 |
|
286 |
function UM_domenus(){
|
287 |
|
288 |
jQuery('.um-dropdown').each(function(){
|
289 |
+
|
290 |
var menu = jQuery(this);
|
291 |
var element = jQuery(this).attr('data-element');
|
292 |
var position = jQuery(this).attr('data-position');
|
293 |
+
|
294 |
jQuery(element).addClass('um-trigger-menu-on-'+menu.attr('data-trigger'));
|
295 |
|
296 |
if ( jQuery(window).width() <= 1200 && element == 'div.um-profile-edit' ) {
|
297 |
position = 'lc';
|
298 |
}
|
299 |
+
|
300 |
if ( position == 'lc' ){
|
301 |
|
302 |
if ( 200 > jQuery(element).find('img').width() ) {
|
304 |
} else {
|
305 |
left_p = ( ( jQuery(element).width() - jQuery(element).find('img').width() ) / 2 );
|
306 |
}
|
307 |
+
|
308 |
top_ = parseInt( jQuery(element).find('a').css('top') );
|
309 |
+
|
310 |
if ( top_ ) {
|
311 |
top_p = jQuery(element).find('img').height() + 4 + top_;
|
312 |
left_gap = 4;
|
314 |
top_p = jQuery(element).find('img').height() + 4;
|
315 |
left_gap = 0;
|
316 |
}
|
317 |
+
|
318 |
if ( top_p == 4 && element == 'div.um-cover' ) {
|
319 |
top_p = jQuery(element).height() / 2 + ( menu.height() / 2 );
|
320 |
} else if ( top_p == 4 ) {
|
321 |
top_p = jQuery(element).height() + 20;
|
322 |
}
|
323 |
+
|
324 |
gap_right = jQuery(element).width() + 17;
|
325 |
menu.css({
|
326 |
'top' : 0,
|
329 |
'right' : gap_right + 'px',
|
330 |
'text-align' : 'center'
|
331 |
});
|
332 |
+
|
333 |
menu.find('.um-dropdown-arr').find('i').removeClass().addClass('um-icon-arrow-right-b');
|
334 |
+
|
335 |
menu.find('.um-dropdown-arr').css({
|
336 |
'top' : '4px',
|
337 |
'left' : 'auto',
|
338 |
'right' : '-17px'
|
339 |
});
|
340 |
+
|
341 |
}
|
342 |
+
|
343 |
if ( position == 'bc' ){
|
344 |
|
345 |
if ( 200 > jQuery(element).find('img').width() ) {
|
347 |
} else {
|
348 |
left_p = ( ( jQuery(element).width() - jQuery(element).find('img').width() ) / 2 );
|
349 |
}
|
350 |
+
|
351 |
top_ = parseInt( jQuery(element).find('a').css('top') );
|
352 |
+
|
353 |
if ( top_ ) {
|
354 |
top_p = jQuery(element).find('img').height() + 4 + top_;
|
355 |
left_gap = 4;
|
357 |
top_p = jQuery(element).find('img').height() + 4;
|
358 |
left_gap = 0;
|
359 |
}
|
360 |
+
|
361 |
if ( top_p == 4 && element == 'div.um-cover' ) {
|
362 |
top_p = jQuery(element).height() / 2 + ( menu.height() / 2 );
|
363 |
} else if ( top_p == 4 ) {
|
371 |
'right' : 'auto',
|
372 |
'text-align' : 'center'
|
373 |
});
|
374 |
+
|
375 |
menu.find('.um-dropdown-arr').find('i').removeClass().addClass('um-icon-arrow-up-b');
|
376 |
+
|
377 |
menu.find('.um-dropdown-arr').css({
|
378 |
'top' : '-17px',
|
379 |
'left' : ( menu.width() / 2 ) - 12,
|
380 |
'right' : 'auto'
|
381 |
});
|
382 |
+
|
383 |
}
|
384 |
});
|
385 |
+
|
386 |
}
|
387 |
|
388 |
function um_responsive(){
|
389 |
|
390 |
jQuery('.um').each(function(){
|
391 |
+
|
392 |
element_width = jQuery(this).width();
|
393 |
|
394 |
if ( element_width <= 340 ) {
|
395 |
+
|
396 |
jQuery(this).removeClass('uimob340');
|
397 |
jQuery(this).removeClass('uimob500');
|
398 |
jQuery(this).removeClass('uimob800');
|
399 |
jQuery(this).removeClass('uimob960');
|
400 |
+
|
401 |
jQuery(this).addClass('uimob340');
|
402 |
|
403 |
} else if ( element_width <= 500 ) {
|
404 |
+
|
405 |
jQuery(this).removeClass('uimob340');
|
406 |
jQuery(this).removeClass('uimob500');
|
407 |
jQuery(this).removeClass('uimob800');
|
408 |
jQuery(this).removeClass('uimob960');
|
409 |
+
|
410 |
jQuery(this).addClass('uimob500');
|
411 |
|
412 |
} else if ( element_width <= 800 ) {
|
413 |
+
|
414 |
jQuery(this).removeClass('uimob340');
|
415 |
jQuery(this).removeClass('uimob500');
|
416 |
jQuery(this).removeClass('uimob800');
|
417 |
jQuery(this).removeClass('uimob960');
|
418 |
+
|
419 |
jQuery(this).addClass('uimob800');
|
420 |
|
421 |
} else if ( element_width <= 960 ) {
|
422 |
+
|
423 |
jQuery(this).removeClass('uimob340');
|
424 |
jQuery(this).removeClass('uimob500');
|
425 |
jQuery(this).removeClass('uimob800');
|
426 |
jQuery(this).removeClass('uimob960');
|
427 |
+
|
428 |
jQuery(this).addClass('uimob960');
|
429 |
|
430 |
} else if ( element_width > 960 ) {
|
431 |
+
|
432 |
jQuery(this).removeClass('uimob340');
|
433 |
jQuery(this).removeClass('uimob500');
|
434 |
jQuery(this).removeClass('uimob800');
|
439 |
if ( jQuery('.um-account-nav').length > 0 && jQuery('.um-account-side').is(':visible') && jQuery('.um-account-tab:visible').length == 0 ) {
|
440 |
jQuery('.um-account-side li a.current').trigger('click');
|
441 |
}
|
442 |
+
|
443 |
jQuery(this).css('opacity',1);
|
444 |
|
445 |
});
|
446 |
|
447 |
jQuery('.um-cover, .um-member-cover').each(function(){
|
448 |
+
|
449 |
var elem = jQuery(this);
|
450 |
var ratio = elem.data('ratio');
|
451 |
var width = elem.width();
|
454 |
calcHeight = Math.round( width / ratios[0] ) + 'px';
|
455 |
elem.height( calcHeight );
|
456 |
elem.find('.um-cover-add').height( calcHeight );
|
457 |
+
|
458 |
});
|
459 |
|
460 |
jQuery('.um-members').each(function(){
|
462 |
});
|
463 |
|
464 |
UM_domenus();
|
465 |
+
|
466 |
}
|
467 |
|
468 |
function UM_Member_Grid( container ) {
|
481 |
} else {
|
482 |
upload_help_text = '';
|
483 |
}
|
484 |
+
|
485 |
if ( trigger.data('icon') ) {
|
486 |
icon = '<span class="icon"><i class="'+ trigger.data('icon') + '"></i></span>';
|
487 |
} else {
|
513 |
showFileCounter: false,
|
514 |
showStatusAfterSuccess: true,
|
515 |
onSubmit:function(files){
|
516 |
+
|
517 |
trigger.parents('.um-modal-body').find('.um-error-block').remove();
|
518 |
+
|
519 |
},
|
520 |
onSuccess:function(files,data,xhr){
|
521 |
+
|
522 |
trigger.selectedFiles = 0;
|
523 |
+
|
524 |
data = jQuery.parseJSON(data);
|
525 |
if (data.error && data.error != '') {
|
526 |
|
527 |
trigger.parents('.um-modal-body').append('<div class="um-error-block">'+data.error+'</div>');
|
528 |
trigger.parents('.um-modal-body').find('.upload-statusbar').hide(0);
|
529 |
um_modal_responsive();
|
530 |
+
|
531 |
} else {
|
532 |
|
533 |
jQuery.each( data, function(key, value) {
|
534 |
+
|
535 |
var img_id = trigger.parents('.um-modal-body').find('.um-single-image-preview img');
|
536 |
var img_id_h = trigger.parents('.um-modal-body').find('.um-single-image-preview');
|
537 |
+
|
538 |
img_id.attr("src", value);
|
539 |
img_id.load(function(){
|
540 |
+
|
541 |
trigger.parents('.um-modal-body').find('.um-modal-btn.um-finish-upload.disabled').removeClass('disabled');
|
542 |
trigger.parents('.um-modal-body').find('.ajax-upload-dragdrop,.upload-statusbar').hide(0);
|
543 |
img_id_h.show(0);
|
544 |
um_modal_responsive();
|
545 |
+
|
546 |
});
|
547 |
+
|
548 |
});
|
549 |
|
550 |
}
|
551 |
+
|
552 |
}
|
553 |
});
|
554 |
|
561 |
} else {
|
562 |
upload_help_text = '';
|
563 |
}
|
564 |
+
|
565 |
if ( trigger.data('icon') ) {
|
566 |
icon = '<span class="icon"><i class="'+ trigger.data('icon') + '"></i></span>';
|
567 |
} else {
|
573 |
} else {
|
574 |
upload_text = '';
|
575 |
}
|
576 |
+
|
577 |
trigger.uploadFile({
|
578 |
url: um_scripts.fileupload,
|
579 |
method: "POST",
|
593 |
showFileCounter: false,
|
594 |
showStatusAfterSuccess: true,
|
595 |
onSubmit:function(files){
|
596 |
+
|
597 |
trigger.parents('.um-modal-body').find('.um-error-block').remove();
|
598 |
+
|
599 |
},
|
600 |
onSuccess:function(files,data,xhr){
|
601 |
+
|
602 |
trigger.selectedFiles = 0;
|
603 |
+
|
604 |
data = jQuery.parseJSON(data);
|
605 |
if (data.error && data.error != '') {
|
606 |
|
607 |
trigger.parents('.um-modal-body').append('<div class="um-error-block">'+data.error+'</div>');
|
608 |
trigger.parents('.um-modal-body').find('.upload-statusbar').hide(0);
|
609 |
um_modal_responsive();
|
610 |
+
|
611 |
} else {
|
612 |
|
613 |
jQuery.each( data, function(key, value) {
|
614 |
+
|
615 |
trigger.parents('.um-modal-body').find('.um-modal-btn.um-finish-upload.disabled').removeClass('disabled');
|
616 |
trigger.parents('.um-modal-body').find('.ajax-upload-dragdrop,.upload-statusbar').hide(0);
|
617 |
trigger.parents('.um-modal-body').find('.um-single-file-preview').show(0);
|
618 |
+
|
619 |
if (key == 'icon') {
|
620 |
trigger.parents('.um-modal-body').find('.um-single-fileinfo i').removeClass().addClass(value);
|
621 |
} else if ( key == 'icon_bg' ) {
|
625 |
} else {
|
626 |
trigger.parents('.um-modal-body').find('.um-single-fileinfo a').attr('href', value);
|
627 |
}
|
628 |
+
|
629 |
});
|
630 |
+
|
631 |
um_modal_responsive();
|
632 |
+
|
633 |
}
|
634 |
+
|
635 |
}
|
636 |
});
|
637 |
+
|
638 |
}
|
639 |
|
640 |
function initCrop_UM() {
|
641 |
|
642 |
var target_img = jQuery('.um-modal:visible .um-single-image-preview img');
|
643 |
var target_img_parent = jQuery('.um-modal:visible .um-single-image-preview');
|
644 |
+
|
645 |
var crop_data = target_img.parent().attr('data-crop');
|
646 |
var min_width = target_img.parent().attr('data-min_width');
|
647 |
var min_height = target_img.parent().attr('data-min_height');
|
648 |
var ratio = target_img.parent().attr('data-ratio');
|
649 |
+
|
650 |
if ( jQuery('.um-modal').find('#um_upload_single').attr('data-ratio') ) {
|
651 |
var ratio = jQuery('.um-modal').find('#um_upload_single').attr('data-ratio');
|
652 |
var ratio_split = ratio.split(':');
|
654 |
}
|
655 |
|
656 |
if ( target_img.length ) {
|
657 |
+
|
658 |
if ( target_img.attr('src') != '' ) {
|
659 |
+
|
660 |
var max_height = jQuery(window).height() - ( jQuery('.um-modal-footer a').height() + 20 ) - 50 - ( jQuery('.um-modal-header:visible').height() );
|
661 |
target_img.css({'height' : 'auto'});
|
662 |
target_img_parent.css({'height' : 'auto'});
|
669 |
}
|
670 |
|
671 |
if ( crop_data == 'square' ) {
|
672 |
+
|
673 |
var opts = {
|
674 |
minWidth: min_width,
|
675 |
minHeight: min_height,
|
682 |
target_img.parent().attr('data-coord', Math.round(data.x) + ',' + Math.round(data.y) + ',' + Math.round(data.width) + ',' + Math.round(data.height) );
|
683 |
}
|
684 |
};
|
685 |
+
|
686 |
} else if ( crop_data == 'cover' ) {
|
687 |
|
688 |
var opts = {
|
697 |
target_img.parent().attr('data-coord', Math.round(data.x) + ',' + Math.round(data.y) + ',' + Math.round(data.width) + ',' + Math.round(data.height) );
|
698 |
}
|
699 |
};
|
700 |
+
|
701 |
} else if ( crop_data == 'user' ) {
|
702 |
+
|
703 |
var opts = {
|
704 |
minWidth: min_width,
|
705 |
minHeight: min_height,
|
712 |
target_img.parent().attr('data-coord', Math.round(data.x) + ',' + Math.round(data.y) + ',' + Math.round(data.width) + ',' + Math.round(data.height) );
|
713 |
}
|
714 |
};
|
715 |
+
|
716 |
}
|
717 |
|
718 |
if ( crop_data != 0 ) {
|
719 |
target_img.cropper( opts );
|
720 |
}
|
721 |
+
|
722 |
}
|
723 |
}
|
724 |
+
|
725 |
}
|
726 |
|
727 |
function um_new_modal( id, size, isPhoto, source ){
|
728 |
+
|
729 |
var modal = jQuery('body').find('.um-modal-overlay');
|
730 |
+
|
731 |
if ( modal.length == 0 ) {
|
732 |
|
733 |
jQuery('.tipsy').hide();
|
734 |
|
735 |
UM_hide_menus();
|
736 |
+
|
737 |
jQuery('body,html,textarea').css("overflow", "hidden");
|
738 |
+
|
739 |
jQuery(document).bind("touchmove", function(e){e.preventDefault();});
|
740 |
jQuery('.um-modal').on('touchmove', function(e){e.stopPropagation();});
|
741 |
+
|
742 |
if ( isPhoto ) {
|
743 |
jQuery('body').append('<div class="um-modal-overlay" /><div class="um-modal is-photo" />');
|
744 |
} else {
|
745 |
jQuery('body').append('<div class="um-modal-overlay" /><div class="um-modal no-photo" />');
|
746 |
}
|
747 |
+
|
748 |
jQuery('#' + id).prependTo('.um-modal');
|
749 |
+
|
750 |
if ( isPhoto ) {
|
751 |
+
|
752 |
jQuery('.um-modal').find('.um-modal-photo').html('<img />');
|
753 |
+
|
754 |
var photo_ = jQuery('.um-modal-photo img');
|
755 |
var photo_maxw = jQuery(window).width() - 60;
|
756 |
var photo_maxh = jQuery(window).height() - ( jQuery(window).height() * 0.25 );
|
757 |
|
758 |
photo_.attr("src", source);
|
759 |
photo_.load(function(){
|
760 |
+
|
761 |
jQuery('#' + id).show();
|
762 |
jQuery('.um-modal').show();
|
763 |
+
|
764 |
photo_.css({'opacity': 0});
|
765 |
photo_.css({'max-width': photo_maxw });
|
766 |
photo_.css({'max-height': photo_maxh });
|
767 |
+
|
768 |
jQuery('.um-modal').css({
|
769 |
'width': photo_.width(),
|
770 |
'margin-left': '-' + photo_.width() / 2 + 'px'
|
771 |
});
|
772 |
+
|
773 |
photo_.animate({'opacity' : 1}, 1000);
|
774 |
+
|
775 |
um_modal_responsive();
|
776 |
+
|
777 |
});
|
778 |
|
779 |
} else {
|
780 |
+
|
781 |
jQuery('#' + id).show();
|
782 |
jQuery('.um-modal').show();
|
783 |
|
784 |
um_modal_size( size );
|
785 |
+
|
786 |
initImageUpload_UM( jQuery('.um-modal:visible').find('.um-single-image-upload') );
|
787 |
initFileUpload_UM( jQuery('.um-modal:visible').find('.um-single-file-upload') );
|
788 |
+
|
789 |
um_modal_responsive();
|
790 |
+
|
791 |
}
|
792 |
+
|
793 |
}
|
794 |
+
|
795 |
}
|
796 |
|
797 |
function um_modal_responsive() {
|
798 |
+
|
799 |
var modal = jQuery('.um-modal:visible');
|
800 |
var photo_modal = jQuery('.um-modal-body.photo:visible');
|
801 |
+
|
802 |
if ( photo_modal.length ) {
|
803 |
+
|
804 |
modal.removeClass('uimob340');
|
805 |
modal.removeClass('uimob500');
|
806 |
+
|
807 |
var photo_ = jQuery('.um-modal-photo img');
|
808 |
var photo_maxw = jQuery(window).width() - 60;
|
809 |
var photo_maxh = jQuery(window).height() - ( jQuery(window).height() * 0.25 );
|
810 |
+
|
811 |
photo_.css({'opacity': 0});
|
812 |
photo_.css({'max-width': photo_maxw });
|
813 |
photo_.css({'max-height': photo_maxh });
|
814 |
+
|
815 |
jQuery('.um-modal').css({
|
816 |
'width': photo_.width(),
|
817 |
'margin-left': '-' + photo_.width() / 2 + 'px'
|
818 |
});
|
819 |
+
|
820 |
photo_.animate({'opacity' : 1}, 1000);
|
821 |
|
822 |
var half_gap = ( jQuery(window).height() - modal.innerHeight() ) / 2 + 'px';
|
823 |
modal.animate({ 'bottom' : half_gap }, 300);
|
824 |
+
|
825 |
} else if ( modal.length ) {
|
826 |
|
827 |
var element_width = jQuery(window).width();
|
828 |
+
|
829 |
modal.removeClass('uimob340');
|
830 |
modal.removeClass('uimob500');
|
831 |
+
|
832 |
if ( element_width <= 340 ) {
|
833 |
+
|
834 |
modal.addClass('uimob340');
|
835 |
initCrop_UM();
|
836 |
modal.animate({ 'bottom' : 0 }, 300);
|
837 |
+
|
838 |
} else if ( element_width <= 500 ) {
|
839 |
+
|
840 |
modal.addClass('uimob500');
|
841 |
initCrop_UM();
|
842 |
modal.animate({ 'bottom' : 0 }, 300);
|
843 |
+
|
844 |
} else if ( element_width <= 800 ) {
|
845 |
+
|
846 |
initCrop_UM();
|
847 |
var half_gap = ( jQuery(window).height() - modal.innerHeight() ) / 2 + 'px';
|
848 |
modal.animate({ 'bottom' : half_gap }, 300);
|
849 |
+
|
850 |
} else if ( element_width <= 960 ) {
|
851 |
+
|
852 |
initCrop_UM();
|
853 |
var half_gap = ( jQuery(window).height() - modal.innerHeight() ) / 2 + 'px';
|
854 |
modal.animate({ 'bottom' : half_gap }, 300);
|
855 |
+
|
856 |
} else if ( element_width > 960 ) {
|
857 |
+
|
858 |
initCrop_UM();
|
859 |
var half_gap = ( jQuery(window).height() - modal.innerHeight() ) / 2 + 'px';
|
860 |
modal.animate({ 'bottom' : half_gap }, 300);
|
861 |
+
|
862 |
}
|
863 |
+
|
864 |
}
|
865 |
}
|
866 |
|
867 |
function um_remove_modal(){
|
868 |
|
869 |
jQuery('img.cropper-hidden').cropper('destroy');
|
870 |
+
|
871 |
jQuery('body,html,textarea').css("overflow", "auto");
|
872 |
+
|
873 |
jQuery(document).unbind('touchmove');
|
874 |
|
875 |
jQuery('.um-modal div[id^="um_"]').hide().appendTo('body');
|
876 |
jQuery('.um-modal,.um-modal-overlay').remove();
|
877 |
+
|
878 |
}
|
879 |
|
880 |
function um_modal_size( aclass ) {
|
922 |
}
|
923 |
|
924 |
if ( jQuery('.um-popup-autogrow:visible').length ) {
|
925 |
+
|
926 |
jQuery('.um-popup-autogrow:visible').css({'height': ag_height + 'px'});
|
927 |
jQuery('.um-popup-autogrow:visible').mCustomScrollbar({ theme:"dark-3", mouseWheelPixels:500 }).mCustomScrollbar("scrollTo", "bottom",{ scrollInertia:0} );
|
928 |
+
|
929 |
} else if ( jQuery('.um-popup-autogrow2:visible').length ) {
|
930 |
+
|
931 |
jQuery('.um-popup-autogrow2:visible').css({'max-height': ag_height + 'px'});
|
932 |
jQuery('.um-popup-autogrow2:visible').mCustomScrollbar({ theme:"dark-3", mouseWheelPixels:500 });
|
933 |
+
|
934 |
}
|
935 |
}
|
936 |
}
|
944 |
.val('')
|
945 |
.removeAttr('checked')
|
946 |
.removeAttr('selected');
|
947 |
+
}
|
948 |
+
|
949 |
+
jQuery(function(){
|
950 |
+
|
951 |
+
// Submit search form on keypress 'Enter'
|
952 |
+
jQuery(".um-search form *").keypress(function(e){
|
953 |
+
if (e.which == 13) {
|
954 |
+
jQuery('.um-search form').submit();
|
955 |
+
return false;
|
956 |
+
}
|
957 |
+
});
|
958 |
+
|
959 |
+
// Fixed touchscreen sensitivity
|
960 |
+
jQuery(document).on('touchend', function(){
|
961 |
+
jQuery(".select2-search, .select2-focusser").remove();
|
962 |
+
})
|
963 |
+
|
964 |
+
});
|
965 |
+
|
assets/js/um-profile.js
CHANGED
@@ -79,4 +79,22 @@ jQuery(document).ready(function() {
|
|
79 |
|
80 |
});
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
});
|
79 |
|
80 |
});
|
81 |
|
82 |
+
// Bio characters limit
|
83 |
+
function um_update_bio_countdown() {
|
84 |
+
if( typeof jQuery('textarea[id=um-meta-bio]').val() !== 'undefined' ){
|
85 |
+
var um_bio_limit = jQuery('textarea[id=um-meta-bio]').attr( "data-character-limit" );
|
86 |
+
var remaining = um_bio_limit - jQuery('textarea[id=um-meta-bio]').val().length;
|
87 |
+
jQuery('span.um-meta-bio-character span.um-bio-limit').text( remaining );
|
88 |
+
if( remaining < 5 ){
|
89 |
+
jQuery('span.um-meta-bio-character').css('color','red');
|
90 |
+
}else{
|
91 |
+
jQuery('span.um-meta-bio-character').css('color','');
|
92 |
+
}
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
um_update_bio_countdown();
|
97 |
+
jQuery('textarea[id=um-meta-bio]').change(um_update_bio_countdown);
|
98 |
+
jQuery('textarea[id=um-meta-bio]').keyup(um_update_bio_countdown);
|
99 |
+
|
100 |
});
|
assets/js/um-tipsy.js
CHANGED
@@ -178,14 +178,16 @@
|
|
178 |
};
|
179 |
|
180 |
if (!options.live) this.each(function() { get(this); });
|
181 |
-
|
182 |
if (options.trigger != 'manual') {
|
183 |
-
var
|
184 |
-
eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus',
|
185 |
eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur';
|
186 |
-
|
|
|
|
|
|
|
187 |
}
|
188 |
-
|
189 |
return this;
|
190 |
|
191 |
};
|
178 |
};
|
179 |
|
180 |
if (!options.live) this.each(function() { get(this); });
|
181 |
+
|
182 |
if (options.trigger != 'manual') {
|
183 |
+
var eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus',
|
|
|
184 |
eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur';
|
185 |
+
if (options.live)
|
186 |
+
$(document).on(eventIn, this.selector, enter).on(eventOut, this.selector, leave);
|
187 |
+
else
|
188 |
+
this.bind(eventIn, enter).bind(eventOut, leave);
|
189 |
}
|
190 |
+
|
191 |
return this;
|
192 |
|
193 |
};
|
assets/js/um.min.js
CHANGED
@@ -99,8 +99,6 @@ function(c){return b[c]})}('<0 6="5-container"><0 6="5-canvas"></0><0 6="5-dragg
|
|
99 |
"div,span,directive,data,point,cropper,class,line,dashed");n.DEFAULTS={aspectRatio:"auto",autoCropArea:0.8,data:{},done:h.noop,preview:"",multiple:false,autoCrop:true,dragCrop:true,dashed:true,modal:true,movable:true,resizable:true,zoomable:true,rotatable:true,checkImageOrigin:true,minWidth:0,minHeight:0,maxWidth:Infinity,maxHeight:Infinity,build:null,built:null,dragstart:null,dragmove:null,dragend:null};n.setDefaults=function(a){h.extend(n.DEFAULTS,a)};n.other=h.fn.cropper;h.fn.cropper=function(a){var b=
|
100 |
w(arguments,1),c;this.each(function(){var e=h(this),d=e.data("cropper"),g;d||e.data("cropper",d=new n(this,a));if(typeof a==="string"&&h.isFunction(g=d[a]))c=g.apply(d,b)});return typeof c!=="undefined"?c:this};h.fn.cropper.Constructor=n;h.fn.cropper.setDefaults=n.setDefaults;h.fn.cropper.noConflict=function(){h.fn.cropper=n.other;return this}});
|
101 |
|
102 |
-
!function(a){function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(this),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()}function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}}function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b}var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(){function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;b<a.length;b+=1)c.push(a[b].listener);return c},d.getListenersAsObject=function(a){var b,c=this.getListeners(a);return c instanceof Array&&(b={},b[a]=c),b||c},d.addListener=function(a,c){var d,e=this.getListenersAsObject(a),f="object"==typeof c;for(d in e)e.hasOwnProperty(d)&&-1===b(e[d],c)&&e[d].push(f?c:{listener:c,once:!1});return this},d.on=c("addListener"),d.addOnceListener=function(a,b){return this.addListener(a,{listener:b,once:!0})},d.once=c("addOnceListener"),d.defineEvent=function(a){return this.getListeners(a),this},d.defineEvents=function(a){for(var b=0;b<a.length;b+=1)this.defineEvent(a[b]);return this},d.removeListener=function(a,c){var d,e,f=this.getListenersAsObject(a);for(e in f)f.hasOwnProperty(e)&&(d=b(f[e],c),-1!==d&&f[e].splice(d,1));return this},d.off=c("removeListener"),d.addListeners=function(a,b){return this.manipulateListeners(!1,a,b)},d.removeListeners=function(a,b){return this.manipulateListeners(!0,a,b)},d.manipulateListeners=function(a,b,c){var d,e,f=a?this.removeListener:this.addListener,g=a?this.removeListeners:this.addListeners;if("object"!=typeof b||b instanceof RegExp)for(d=c.length;d--;)f.call(this,b,c[d]);else for(d in b)b.hasOwnProperty(d)&&(e=b[d])&&("function"==typeof e?f.call(this,d,e):g.call(this,d,e));return this},d.removeEvent=function(a){var b,c=typeof a,d=this._getEvents();if("string"===c)delete d[a];else if(a instanceof RegExp)for(b in d)d.hasOwnProperty(b)&&a.test(b)&&delete d[b];else delete this._events;return this},d.removeAllListeners=c("removeEvent"),d.emitEvent=function(a,b){var c,d,e,f,g=this.getListenersAsObject(a);for(e in g)if(g.hasOwnProperty(e))for(d=g[e].length;d--;)c=g[e][d],c.once===!0&&this.removeListener(a,c.listener),f=c.listener.apply(this,b||[]),f===this._getOnceReturnValue()&&this.removeListener(a,c.listener);return this},d.trigger=c("emitEvent"),d.emit=function(a){var b=Array.prototype.slice.call(arguments,1);return this.emitEvent(a,b)},d.setOnceReturnValue=function(a){return this._onceReturnValue=a,this},d._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},d._getEvents=function(){return this._events||(this._events={})},a.noConflict=function(){return e.EventEmitter=f,a},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return a}):"object"==typeof module&&module.exports?module.exports=a:e.EventEmitter=a}.call(this),function(a){function b(a){if(a){if("string"==typeof d[a])return a;a=a.charAt(0).toUpperCase()+a.slice(1);for(var b,e=0,f=c.length;f>e;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a){function b(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function c(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=f.length;c>b;b++){var d=f[b];a[d]=0}return a}function d(d){function g(){if(!m){m=!0;var c=a.getComputedStyle;if(j=function(){var a=c?function(a){return c(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||e("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizeiframe"),c}}(),k=d("boxSizing")){var f=document.createElement("div");f.style.width="200px",f.style.padding="1px 2px 3px 4px",f.style.borderStyle="solid",f.style.borderWidth="1px 2px 3px 4px",f.style[k]="border-box";var g=document.body||document.documentElement;g.appendChild(f);var h=j(f);l=200===b(h.width),g.removeChild(f)}}}function h(a){if(g(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var d=j(a);if("none"===d.display)return c();var e={};e.width=a.offsetWidth,e.height=a.offsetHeight;for(var h=e.isBorderBox=!(!k||!d[k]||"border-box"!==d[k]),m=0,n=f.length;n>m;m++){var o=f[m],p=d[o];p=i(a,p);var q=parseFloat(p);e[o]=isNaN(q)?0:q}var r=e.paddingLeft+e.paddingRight,s=e.paddingTop+e.paddingBottom,t=e.marginLeft+e.marginRight,u=e.marginTop+e.marginBottom,v=e.borderLeftWidth+e.borderRightWidth,w=e.borderTopWidth+e.borderBottomWidth,x=h&&l,y=b(d.width);y!==!1&&(e.width=y+(x?0:r+v));var z=b(d.height);return z!==!1&&(e.height=z+(x?0:s+w)),e.innerWidth=e.width-(r+v),e.innerHeight=e.height-(s+w),e.outerWidth=e.width+t,e.outerHeight=e.height+u,e}}function i(a,b){if(getComputedStyle||-1===b.indexOf("%"))return b;var c=a.style,d=c.left,e=a.runtimeStyle,f=e&&e.left;return f&&(e.left=a.currentStyle.left),c.left=b,b=c.pixelLeft,c.left=d,f&&(e.left=f),b}var j,k,l,m=!1;return h}var e="undefined"==typeof console?noop:function(a){console.error(a)},f=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],d):"object"==typeof exports?module.exports=d(require("desandro-get-style-property")):a.getSize=d(a.getStyleProperty)}(window),function(a){function b(a,b){return a[g](b)}function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1}function e(a,d){return c(a),b(a,d)}var f,g=function(){if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}function c(a){for(var b in a)return!1;return b=null,!0}function d(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function e(a,e,f){function h(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}var i=f("transition"),j=f("transform"),k=i&&j,l=!!f("perspective"),m={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[i],n=["transform","transition","transitionDuration","transitionProperty"],o=function(){for(var a={},b=0,c=n.length;c>b;b++){var d=n[b],e=f(d);e&&e!==d&&(a[d]=e)}return a}();b(h.prototype,a.prototype),h.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},h.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},h.prototype.getSize=function(){this.size=e(this.element)},h.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=o[c]||c;b[d]=a[c]}},h.prototype.getPosition=function(){var a=g(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=parseInt(a[c?"left":"right"],10),f=parseInt(a[d?"top":"bottom"],10);e=isNaN(e)?0:e,f=isNaN(f)?0:f;var h=this.layout.size;e-=c?h.paddingLeft:h.paddingRight,f-=d?h.paddingTop:h.paddingBottom,this.position.x=e,this.position.y=f},h.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={};b.isOriginLeft?(c.left=this.position.x+a.paddingLeft+"px",c.right=""):(c.right=this.position.x+a.paddingRight+"px",c.left=""),b.isOriginTop?(c.top=this.position.y+a.paddingTop+"px",c.bottom=""):(c.bottom=this.position.y+a.paddingBottom+"px",c.top=""),this.css(c),this.emitEvent("layout",[this])};var p=l?function(a,b){return"translate3d("+a+"px, "+b+"px, 0)"}:function(a,b){return"translate("+a+"px, "+b+"px)"};h.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={},k=this.layout.options;h=k.isOriginLeft?h:-h,i=k.isOriginTop?i:-i,j.transform=p(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},h.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},h.prototype.moveTo=k?h.prototype._transitionTo:h.prototype.goTo,h.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},h.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},h.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var q=j&&d(j)+",opacity";h.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:q,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(m,this,!1))},h.prototype.transition=h.prototype[i?"_transition":"_nonTransition"],h.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},h.prototype.onotransitionend=function(a){this.ontransitionend(a)};var r={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};h.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,d=r[a.propertyName]||a.propertyName;if(delete b.ingProperties[d],c(b.ingProperties)&&this.disableTransition(),d in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[d]),d in b.onEnd){var e=b.onEnd[d];e.call(this),delete b.onEnd[d]}this.emitEvent("transitionEnd",[this])}},h.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(m,this,!1),this.isTransitioning=!1},h.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var s={transitionProperty:"",transitionDuration:""};return h.prototype.removeTransitionStyles=function(){this.css(s)},h.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},h.prototype.remove=function(){if(!i||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.on("transitionEnd",function(){return a.removeElem(),!0}),this.hide()},h.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options;this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0})},h.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options;this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:"none"})}}})},h.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},h}var f=a.getComputedStyle,g=f?function(a){return f(a,null)}:function(a){return a.currentStyle};"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],e):"object"==typeof exports?module.exports=e(require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property")):(a.Outlayer={},a.Outlayer.Item=e(a.EventEmitter,a.getSize,a.getStyleProperty))}(window),function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}function c(a){return"[object Array]"===l.call(a)}function d(a){var b=[];if(c(a))b=a;else if(a&&"number"==typeof a.length)for(var d=0,e=a.length;e>d;d++)b.push(a[d]);else b.push(a);return b}function e(a,b){var c=n(b,a);-1!==c&&b.splice(c,1)}function f(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()}function g(c,g,l,n,o,p){function q(a,c){if("string"==typeof a&&(a=h.querySelector(a)),!a||!m(a))return void(i&&i.error("Bad "+this.constructor.namespace+" element: "+a));this.element=a,this.options=b({},this.constructor.defaults),this.option(c);var d=++r;this.element.outlayerGUID=d,s[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var r=0,s={};return q.namespace="outlayer",q.Item=p,q.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},b(q.prototype,l.prototype),q.prototype.option=function(a){b(this.options,a)},q.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),b(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},q.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},q.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},q.prototype._filterFindItemElements=function(a){a=d(a);for(var b=this.options.itemSelector,c=[],e=0,f=a.length;f>e;e++){var g=a[e];if(m(g))if(b){o(g,b)&&c.push(g);for(var h=g.querySelectorAll(b),i=0,j=h.length;j>i;i++)c.push(h[i])}else c.push(g)}return c},q.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},q.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},q.prototype._init=q.prototype.layout,q.prototype._resetLayout=function(){this.getSize()},q.prototype.getSize=function(){this.size=n(this.element)},q.prototype._getMeasurement=function(a,b){var c,d=this.options[a];d?("string"==typeof d?c=this.element.querySelector(d):m(d)&&(c=d),this[a]=c?n(c)[b]:d):this[a]=0},q.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},q.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},q.prototype._layoutItems=function(a,b){function c(){d.emitEvent("layoutComplete",[d,a])}var d=this;if(!a||!a.length)return void c();this._itemsOn(a,"layout",c);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f],i=this._getItemLayoutPosition(h);i.item=h,i.isInstant=b||h.isLayoutInstant,e.push(i)}this._processLayoutQueue(e)},q.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},q.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},q.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},q.prototype._postLayout=function(){this.resizeContainer()},q.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},q.prototype._getContainerSize=k,q.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},q.prototype._itemsOn=function(a,b,c){function d(){return e++,e===f&&c.call(g),!0}for(var e=0,f=a.length,g=this,h=0,i=a.length;i>h;h++){var j=a[h];j.on(b,d)}},q.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},q.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},q.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},q.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e(d,this.stamps),this.unignore(d)}},q.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=d(a)):void 0},q.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},q.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},q.prototype._manageStamp=k,q.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,d=n(a),e={left:b.left-c.left-d.marginLeft,top:b.top-c.top-d.marginTop,right:c.right-b.right-d.marginRight,bottom:c.bottom-b.bottom-d.marginBottom};return e},q.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},q.prototype.bindResize=function(){this.isResizeBound||(c.bind(a,"resize",this),this.isResizeBound=!0)},q.prototype.unbindResize=function(){this.isResizeBound&&c.unbind(a,"resize",this),this.isResizeBound=!1},q.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},q.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},q.prototype.needsResizeLayout=function(){var a=n(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},q.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},q.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},q.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},q.prototype.reveal=function(a){var b=a&&a.length;if(b)for(var c=0;b>c;c++){var d=a[c];d.reveal()}},q.prototype.hide=function(a){var b=a&&a.length;if(b)for(var c=0;b>c;c++){var d=a[c];d.hide()}},q.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},q.prototype.getItems=function(a){if(a&&a.length){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c],f=this.getItem(e);f&&b.push(f)}return b}},q.prototype.remove=function(a){a=d(a);var b=this.getItems(a);if(b&&b.length){this._itemsOn(b,"remove",function(){this.emitEvent("removeComplete",[this,b])});for(var c=0,f=b.length;f>c;c++){var g=b[c];g.remove(),e(g,this.items)}}},q.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize();var e=this.element.outlayerGUID;delete s[e],delete this.element.outlayerGUID,j&&j.removeData(this.element,this.constructor.namespace)},q.data=function(a){var b=a&&a.outlayerGUID;return b&&s[b]},q.create=function(a,c){function d(){q.apply(this,arguments)}return Object.create?d.prototype=Object.create(q.prototype):b(d.prototype,q.prototype),d.prototype.constructor=d,d.defaults=b({},q.defaults),b(d.defaults,c),d.prototype.settings={},d.namespace=a,d.data=q.data,d.Item=function(){p.apply(this,arguments)},d.Item.prototype=new p,g(function(){for(var b=f(a),c=h.querySelectorAll(".js-"+b),e="data-"+b+"-options",g=0,k=c.length;k>g;g++){var l,m=c[g],n=m.getAttribute(e);try{l=n&&JSON.parse(n)}catch(o){i&&i.error("Error parsing "+e+" on "+m.nodeName.toLowerCase()+(m.id?"#"+m.id:"")+": "+o);continue}var p=new d(m,l);j&&j.data(m,a,p)}}),j&&j.bridget&&j.bridget(a,d),d},q.Item=p,q}var h=a.document,i=a.console,j=a.jQuery,k=function(){},l=Object.prototype.toString,m="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1===a.nodeType&&"string"==typeof a.nodeName},n=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1};"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],g):"object"==typeof exports?module.exports=g(require("eventie"),require("doc-ready"),require("wolfy87-eventemitter"),require("get-size"),require("desandro-matches-selector"),require("./item")):a.Outlayer=g(a.eventie,a.docReady,a.EventEmitter,a.getSize,a.matchesSelector,a.Outlayer.Item)}(window),function(a){function b(a,b){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}this.columnWidth+=this.gutter,this.cols=Math.floor((this.containerWidth+this.gutter)/this.columnWidth),this.cols=Math.max(this.cols,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d}var c=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++){var e=a[c];if(e===b)return c}return-1};"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size")):a.Masonry=b(a.Outlayer,a.getSize)}(window);
|
103 |
-
|
104 |
(function(b){function j(a,c){this.$element=b(a);this.options=c;this.enabled=true;this.fixTitle()}j.prototype={show:function(){var a=this.getTitle();if(a&&this.enabled){var c=this.tip();c.find(".tipsy-inner")[this.options.html?"html":"text"](a);c[0].className="tipsy";c.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).prependTo(document.body);a=b.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight});var d=c[0].offsetWidth,h=c[0].offsetHeight,
|
105 |
f=typeof this.options.gravity=="function"?this.options.gravity.call(this.$element[0]):this.options.gravity,g;switch(f.charAt(0)){case "n":g={top:a.top+a.height+this.options.offset,left:a.left+a.width/2-d/2};break;case "s":g={top:a.top-h-this.options.offset,left:a.left+a.width/2-d/2};break;case "e":g={top:a.top+a.height/2-h/2,left:a.left-d-this.options.offset};break;case "w":extra_gap=0;if(b("body").css("position").length>0&&b("body").css("position")=="relative")if(b("#wpadminbar").length)extra_gap=
|
106 |
b("#wpadminbar").height();g={top:a.top+a.height/2-h/2-extra_gap,left:a.left+a.width+this.options.offset}}if(f.length==2)g.left=f.charAt(1)=="w"?a.left+a.width/2-15:a.left+a.width/2-d+15;c.css(g).addClass("tipsy-"+f);c.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+f.charAt(0);this.options.className&&c.addClass(typeof this.options.className=="function"?this.options.className.call(this.$element[0]):this.options.className);this.options.fade?c.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity}):
|
99 |
"div,span,directive,data,point,cropper,class,line,dashed");n.DEFAULTS={aspectRatio:"auto",autoCropArea:0.8,data:{},done:h.noop,preview:"",multiple:false,autoCrop:true,dragCrop:true,dashed:true,modal:true,movable:true,resizable:true,zoomable:true,rotatable:true,checkImageOrigin:true,minWidth:0,minHeight:0,maxWidth:Infinity,maxHeight:Infinity,build:null,built:null,dragstart:null,dragmove:null,dragend:null};n.setDefaults=function(a){h.extend(n.DEFAULTS,a)};n.other=h.fn.cropper;h.fn.cropper=function(a){var b=
|
100 |
w(arguments,1),c;this.each(function(){var e=h(this),d=e.data("cropper"),g;d||e.data("cropper",d=new n(this,a));if(typeof a==="string"&&h.isFunction(g=d[a]))c=g.apply(d,b)});return typeof c!=="undefined"?c:this};h.fn.cropper.Constructor=n;h.fn.cropper.setDefaults=n.setDefaults;h.fn.cropper.noConflict=function(){h.fn.cropper=n.other;return this}});
|
101 |
|
|
|
|
|
102 |
(function(b){function j(a,c){this.$element=b(a);this.options=c;this.enabled=true;this.fixTitle()}j.prototype={show:function(){var a=this.getTitle();if(a&&this.enabled){var c=this.tip();c.find(".tipsy-inner")[this.options.html?"html":"text"](a);c[0].className="tipsy";c.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).prependTo(document.body);a=b.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight});var d=c[0].offsetWidth,h=c[0].offsetHeight,
|
103 |
f=typeof this.options.gravity=="function"?this.options.gravity.call(this.$element[0]):this.options.gravity,g;switch(f.charAt(0)){case "n":g={top:a.top+a.height+this.options.offset,left:a.left+a.width/2-d/2};break;case "s":g={top:a.top-h-this.options.offset,left:a.left+a.width/2-d/2};break;case "e":g={top:a.top+a.height/2-h/2,left:a.left-d-this.options.offset};break;case "w":extra_gap=0;if(b("body").css("position").length>0&&b("body").css("position")=="relative")if(b("#wpadminbar").length)extra_gap=
|
104 |
b("#wpadminbar").height();g={top:a.top+a.height/2-h/2-extra_gap,left:a.left+a.width+this.options.offset}}if(f.length==2)g.left=f.charAt(1)=="w"?a.left+a.width/2-15:a.left+a.width/2-d+15;c.css(g).addClass("tipsy-"+f);c.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+f.charAt(0);this.options.className&&c.addClass(typeof this.options.className=="function"?this.options.className.call(this.$element[0]):this.options.className);this.options.fade?c.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity}):
|
core/um-account.php
CHANGED
@@ -3,42 +3,44 @@
|
|
3 |
class UM_Account {
|
4 |
|
5 |
function __construct() {
|
6 |
-
|
7 |
add_shortcode('ultimatemember_account', array(&$this, 'ultimatemember_account'), 1);
|
8 |
-
|
9 |
add_filter('um_account_page_default_tabs_hook', array(&$this, 'core_tabs'), 1);
|
10 |
-
|
11 |
add_action('template_redirect', array(&$this, 'account'), 10001 );
|
12 |
-
|
13 |
add_action('template_redirect', array(&$this, 'form_init'), 10002);
|
14 |
-
|
|
|
|
|
15 |
$this->current_tab = 'general';
|
16 |
|
17 |
}
|
18 |
-
|
19 |
/***
|
20 |
*** @get core account tabs
|
21 |
***/
|
22 |
function core_tabs() {
|
23 |
-
|
24 |
$tabs[100]['general']['icon'] = 'um-faicon-user';
|
25 |
$tabs[100]['general']['title'] = __('Account','ultimatemember');
|
26 |
-
|
27 |
$tabs[200]['password']['icon'] = 'um-faicon-asterisk';
|
28 |
$tabs[200]['password']['title'] = __('Change Password','ultimatemember');
|
29 |
-
|
30 |
$tabs[300]['privacy']['icon'] = 'um-faicon-lock';
|
31 |
$tabs[300]['privacy']['title'] = __('Privacy','ultimatemember');
|
32 |
-
|
33 |
$tabs[400]['notifications']['icon'] = 'um-faicon-envelope';
|
34 |
$tabs[400]['notifications']['title'] = __('Notifications','ultimatemember');
|
35 |
-
|
36 |
$tabs[9999]['delete']['icon'] = 'um-faicon-trash-o';
|
37 |
$tabs[9999]['delete']['title'] = __('Delete Account','ultimatemember');
|
38 |
-
|
39 |
return $tabs;
|
40 |
}
|
41 |
-
|
42 |
/***
|
43 |
*** @account page form
|
44 |
***/
|
@@ -46,17 +48,17 @@ class UM_Account {
|
|
46 |
global $ultimatemember;
|
47 |
|
48 |
if ( um_submitting_account_page() ) {
|
49 |
-
|
50 |
$ultimatemember->form->post_form = $_POST;
|
51 |
|
52 |
do_action('um_submit_account_errors_hook', $ultimatemember->form->post_form );
|
53 |
-
|
54 |
if ( !isset($ultimatemember->form->errors) ) {
|
55 |
-
|
56 |
if ( get_query_var('um_tab') ) {
|
57 |
$this->current_tab = get_query_var('um_tab');
|
58 |
}
|
59 |
-
|
60 |
do_action('um_submit_account_details', $ultimatemember->form->post_form );
|
61 |
|
62 |
}
|
@@ -64,177 +66,179 @@ class UM_Account {
|
|
64 |
}
|
65 |
|
66 |
}
|
67 |
-
|
68 |
/***
|
69 |
*** @can access account page
|
70 |
***/
|
71 |
function account(){
|
72 |
global $ultimatemember;
|
73 |
-
|
74 |
if ( um_is_core_page('account') && !is_user_logged_in() ) {
|
75 |
exit( wp_redirect( add_query_arg('redirect_to', urlencode( um_get_core_page('account') ) , um_get_core_page('login') ) ) );
|
76 |
}
|
77 |
-
|
78 |
if ( um_is_core_page('account') ) {
|
79 |
-
|
80 |
$ultimatemember->fields->set_mode = 'account';
|
81 |
-
|
82 |
$ultimatemember->fields->editing = true;
|
83 |
-
|
84 |
if ( get_query_var('um_tab') ) {
|
85 |
$this->current_tab = get_query_var('um_tab');
|
86 |
}
|
87 |
-
|
88 |
}
|
89 |
-
|
90 |
}
|
91 |
-
|
92 |
/***
|
93 |
*** @get tab link
|
94 |
***/
|
95 |
function tab_link( $id ) {
|
96 |
-
|
97 |
if ( get_option('permalink_structure') ) {
|
98 |
-
|
99 |
$url = trailingslashit( untrailingslashit( um_get_core_page('account') ) );
|
100 |
$url = $url . $id . '/';
|
101 |
-
|
102 |
} else {
|
103 |
-
|
104 |
$url = add_query_arg( 'um_tab', $id, um_get_core_page('account') );
|
105 |
-
|
106 |
}
|
107 |
-
|
108 |
return $url;
|
109 |
}
|
110 |
-
|
111 |
/***
|
112 |
*** @Add class based on shortcode
|
113 |
***/
|
114 |
function get_class( $mode ){
|
115 |
-
|
116 |
global $ultimatemember;
|
117 |
-
|
118 |
$classes = 'um-'.$mode;
|
119 |
-
|
120 |
if ( is_admin() ) {
|
121 |
$classes .= ' um-in-admin';
|
122 |
}
|
123 |
-
|
124 |
if ( $ultimatemember->fields->editing == true ) {
|
125 |
$classes .= ' um-editing';
|
126 |
}
|
127 |
-
|
128 |
if ( $ultimatemember->fields->viewing == true ) {
|
129 |
$classes .= ' um-viewing';
|
130 |
}
|
131 |
-
|
132 |
$classes = apply_filters('um_form_official_classes__hook', $classes);
|
133 |
return $classes;
|
134 |
}
|
135 |
-
|
136 |
/***
|
137 |
*** @get tab output
|
138 |
***/
|
139 |
function get_tab_output( $id ) {
|
140 |
global $ultimatemember;
|
141 |
-
|
142 |
$output = null;
|
143 |
-
|
144 |
switch( $id ) {
|
145 |
-
|
146 |
case 'notifications':
|
147 |
-
|
148 |
$output = apply_filters("um_account_content_hook_{$id}", $output);
|
149 |
return $output;
|
150 |
-
|
151 |
break;
|
152 |
|
153 |
case 'privacy':
|
154 |
-
|
155 |
$args = 'profile_privacy,hide_in_members';
|
156 |
$args = apply_filters('um_account_tab_privacy_fields', $args );
|
157 |
-
|
158 |
$fields = $ultimatemember->builtin->get_specific_fields( $args );
|
159 |
foreach( $fields as $key => $data ){
|
160 |
$output .= $ultimatemember->fields->edit_field( $key, $data );
|
161 |
}
|
162 |
-
|
163 |
return $output;
|
164 |
-
|
165 |
break;
|
166 |
-
|
167 |
case 'delete':
|
168 |
-
|
169 |
$args = 'single_user_password';
|
170 |
-
|
171 |
$fields = $ultimatemember->builtin->get_specific_fields( $args );
|
172 |
foreach( $fields as $key => $data ){
|
173 |
$output .= $ultimatemember->fields->edit_field( $key, $data );
|
174 |
}
|
175 |
-
|
176 |
return $output;
|
177 |
-
|
178 |
break;
|
179 |
-
|
180 |
case 'general':
|
181 |
-
|
182 |
$args = 'user_login,first_name,last_name,user_email';
|
183 |
-
|
184 |
if ( !um_get_option('account_name') ) {
|
185 |
$args = 'user_login,user_email';
|
186 |
}
|
187 |
-
|
188 |
if ( !um_get_option('account_email') && !um_user('can_edit_everyone') ) {
|
189 |
$args = str_replace(',user_email','', $args );
|
190 |
}
|
191 |
-
|
192 |
$fields = $ultimatemember->builtin->get_specific_fields( $args );
|
193 |
foreach( $fields as $key => $data ){
|
194 |
$output .= $ultimatemember->fields->edit_field( $key, $data );
|
195 |
}
|
196 |
-
|
197 |
return $output;
|
198 |
-
|
199 |
break;
|
200 |
-
|
201 |
case 'password':
|
202 |
-
|
203 |
$args = 'user_password';
|
204 |
-
|
205 |
$fields = $ultimatemember->builtin->get_specific_fields( $args );
|
206 |
foreach( $fields as $key => $data ){
|
207 |
$output .= $ultimatemember->fields->edit_field( $key, $data );
|
208 |
}
|
209 |
-
|
210 |
return $output;
|
211 |
-
|
212 |
break;
|
213 |
-
|
214 |
default :
|
215 |
-
|
216 |
$output = apply_filters("um_account_content_hook_{$id}", $output);
|
217 |
return $output;
|
218 |
-
|
219 |
break;
|
220 |
|
221 |
}
|
222 |
}
|
223 |
-
|
224 |
/***
|
225 |
*** @Shortcode
|
226 |
***/
|
227 |
function ultimatemember_account( $args = array() ) {
|
228 |
return $this->load( $args );
|
229 |
}
|
230 |
-
|
231 |
/***
|
232 |
*** @Load a module with global function
|
233 |
***/
|
234 |
function load( $args ) {
|
235 |
-
|
236 |
global $ultimatemember;
|
237 |
-
|
|
|
|
|
238 |
ob_start();
|
239 |
|
240 |
$defaults = array(
|
@@ -243,35 +247,35 @@ class UM_Account {
|
|
243 |
'form_id' => 'um_account_id',
|
244 |
);
|
245 |
$args = wp_parse_args( $args, $defaults );
|
246 |
-
|
247 |
if ( isset( $args['use_globals'] ) && $args['use_globals'] == 1 ) {
|
248 |
$args = array_merge( $args, $this->get_css_args( $args ) );
|
249 |
} else {
|
250 |
$args = array_merge( $this->get_css_args( $args ), $args );
|
251 |
}
|
252 |
-
|
253 |
$args = apply_filters('um_account_shortcode_args_filter', $args);
|
254 |
|
255 |
extract( $args, EXTR_SKIP );
|
256 |
-
|
257 |
do_action("um_pre_{$mode}_shortcode", $args);
|
258 |
-
|
259 |
do_action("um_before_form_is_loaded", $args);
|
260 |
-
|
261 |
do_action("um_before_{$mode}_form_is_loaded", $args);
|
262 |
-
|
263 |
$this->template_load( $template, $args );
|
264 |
-
|
265 |
if ( !is_admin() && !defined( 'DOING_AJAX' ) ) {
|
266 |
$this->dynamic_css( $args );
|
267 |
}
|
268 |
-
|
269 |
$output = ob_get_contents();
|
270 |
ob_end_clean();
|
271 |
return $output;
|
272 |
|
273 |
}
|
274 |
-
|
275 |
/***
|
276 |
*** @Get dynamic css args
|
277 |
***/
|
@@ -280,7 +284,7 @@ class UM_Account {
|
|
280 |
$arr = array_merge( $arr, array( 'form_id' => $args['form_id'], 'mode' => $args['mode'] ) );
|
281 |
return $arr;
|
282 |
}
|
283 |
-
|
284 |
/***
|
285 |
*** @Load dynamic css
|
286 |
***/
|
@@ -304,4 +308,16 @@ class UM_Account {
|
|
304 |
$ultimatemember->shortcodes->load_template( $template );
|
305 |
}
|
306 |
|
307 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
class UM_Account {
|
4 |
|
5 |
function __construct() {
|
6 |
+
|
7 |
add_shortcode('ultimatemember_account', array(&$this, 'ultimatemember_account'), 1);
|
8 |
+
|
9 |
add_filter('um_account_page_default_tabs_hook', array(&$this, 'core_tabs'), 1);
|
10 |
+
|
11 |
add_action('template_redirect', array(&$this, 'account'), 10001 );
|
12 |
+
|
13 |
add_action('template_redirect', array(&$this, 'form_init'), 10002);
|
14 |
+
|
15 |
+
add_filter('um_predefined_fields_hook', array(&$this,'predefined_fields_hook'),1 );
|
16 |
+
|
17 |
$this->current_tab = 'general';
|
18 |
|
19 |
}
|
20 |
+
|
21 |
/***
|
22 |
*** @get core account tabs
|
23 |
***/
|
24 |
function core_tabs() {
|
25 |
+
|
26 |
$tabs[100]['general']['icon'] = 'um-faicon-user';
|
27 |
$tabs[100]['general']['title'] = __('Account','ultimatemember');
|
28 |
+
|
29 |
$tabs[200]['password']['icon'] = 'um-faicon-asterisk';
|
30 |
$tabs[200]['password']['title'] = __('Change Password','ultimatemember');
|
31 |
+
|
32 |
$tabs[300]['privacy']['icon'] = 'um-faicon-lock';
|
33 |
$tabs[300]['privacy']['title'] = __('Privacy','ultimatemember');
|
34 |
+
|
35 |
$tabs[400]['notifications']['icon'] = 'um-faicon-envelope';
|
36 |
$tabs[400]['notifications']['title'] = __('Notifications','ultimatemember');
|
37 |
+
|
38 |
$tabs[9999]['delete']['icon'] = 'um-faicon-trash-o';
|
39 |
$tabs[9999]['delete']['title'] = __('Delete Account','ultimatemember');
|
40 |
+
|
41 |
return $tabs;
|
42 |
}
|
43 |
+
|
44 |
/***
|
45 |
*** @account page form
|
46 |
***/
|
48 |
global $ultimatemember;
|
49 |
|
50 |
if ( um_submitting_account_page() ) {
|
51 |
+
|
52 |
$ultimatemember->form->post_form = $_POST;
|
53 |
|
54 |
do_action('um_submit_account_errors_hook', $ultimatemember->form->post_form );
|
55 |
+
|
56 |
if ( !isset($ultimatemember->form->errors) ) {
|
57 |
+
|
58 |
if ( get_query_var('um_tab') ) {
|
59 |
$this->current_tab = get_query_var('um_tab');
|
60 |
}
|
61 |
+
|
62 |
do_action('um_submit_account_details', $ultimatemember->form->post_form );
|
63 |
|
64 |
}
|
66 |
}
|
67 |
|
68 |
}
|
69 |
+
|
70 |
/***
|
71 |
*** @can access account page
|
72 |
***/
|
73 |
function account(){
|
74 |
global $ultimatemember;
|
75 |
+
|
76 |
if ( um_is_core_page('account') && !is_user_logged_in() ) {
|
77 |
exit( wp_redirect( add_query_arg('redirect_to', urlencode( um_get_core_page('account') ) , um_get_core_page('login') ) ) );
|
78 |
}
|
79 |
+
|
80 |
if ( um_is_core_page('account') ) {
|
81 |
+
|
82 |
$ultimatemember->fields->set_mode = 'account';
|
83 |
+
|
84 |
$ultimatemember->fields->editing = true;
|
85 |
+
|
86 |
if ( get_query_var('um_tab') ) {
|
87 |
$this->current_tab = get_query_var('um_tab');
|
88 |
}
|
89 |
+
|
90 |
}
|
91 |
+
|
92 |
}
|
93 |
+
|
94 |
/***
|
95 |
*** @get tab link
|
96 |
***/
|
97 |
function tab_link( $id ) {
|
98 |
+
|
99 |
if ( get_option('permalink_structure') ) {
|
100 |
+
|
101 |
$url = trailingslashit( untrailingslashit( um_get_core_page('account') ) );
|
102 |
$url = $url . $id . '/';
|
103 |
+
|
104 |
} else {
|
105 |
+
|
106 |
$url = add_query_arg( 'um_tab', $id, um_get_core_page('account') );
|
107 |
+
|
108 |
}
|
109 |
+
|
110 |
return $url;
|
111 |
}
|
112 |
+
|
113 |
/***
|
114 |
*** @Add class based on shortcode
|
115 |
***/
|
116 |
function get_class( $mode ){
|
117 |
+
|
118 |
global $ultimatemember;
|
119 |
+
|
120 |
$classes = 'um-'.$mode;
|
121 |
+
|
122 |
if ( is_admin() ) {
|
123 |
$classes .= ' um-in-admin';
|
124 |
}
|
125 |
+
|
126 |
if ( $ultimatemember->fields->editing == true ) {
|
127 |
$classes .= ' um-editing';
|
128 |
}
|
129 |
+
|
130 |
if ( $ultimatemember->fields->viewing == true ) {
|
131 |
$classes .= ' um-viewing';
|
132 |
}
|
133 |
+
|
134 |
$classes = apply_filters('um_form_official_classes__hook', $classes);
|
135 |
return $classes;
|
136 |
}
|
137 |
+
|
138 |
/***
|
139 |
*** @get tab output
|
140 |
***/
|
141 |
function get_tab_output( $id ) {
|
142 |
global $ultimatemember;
|
143 |
+
|
144 |
$output = null;
|
145 |
+
|
146 |
switch( $id ) {
|
147 |
+
|
148 |
case 'notifications':
|
149 |
+
|
150 |
$output = apply_filters("um_account_content_hook_{$id}", $output);
|
151 |
return $output;
|
152 |
+
|
153 |
break;
|
154 |
|
155 |
case 'privacy':
|
156 |
+
|
157 |
$args = 'profile_privacy,hide_in_members';
|
158 |
$args = apply_filters('um_account_tab_privacy_fields', $args );
|
159 |
+
|
160 |
$fields = $ultimatemember->builtin->get_specific_fields( $args );
|
161 |
foreach( $fields as $key => $data ){
|
162 |
$output .= $ultimatemember->fields->edit_field( $key, $data );
|
163 |
}
|
164 |
+
|
165 |
return $output;
|
166 |
+
|
167 |
break;
|
168 |
+
|
169 |
case 'delete':
|
170 |
+
|
171 |
$args = 'single_user_password';
|
172 |
+
|
173 |
$fields = $ultimatemember->builtin->get_specific_fields( $args );
|
174 |
foreach( $fields as $key => $data ){
|
175 |
$output .= $ultimatemember->fields->edit_field( $key, $data );
|
176 |
}
|
177 |
+
|
178 |
return $output;
|
179 |
+
|
180 |
break;
|
181 |
+
|
182 |
case 'general':
|
183 |
+
|
184 |
$args = 'user_login,first_name,last_name,user_email';
|
185 |
+
|
186 |
if ( !um_get_option('account_name') ) {
|
187 |
$args = 'user_login,user_email';
|
188 |
}
|
189 |
+
|
190 |
if ( !um_get_option('account_email') && !um_user('can_edit_everyone') ) {
|
191 |
$args = str_replace(',user_email','', $args );
|
192 |
}
|
193 |
+
|
194 |
$fields = $ultimatemember->builtin->get_specific_fields( $args );
|
195 |
foreach( $fields as $key => $data ){
|
196 |
$output .= $ultimatemember->fields->edit_field( $key, $data );
|
197 |
}
|
198 |
+
|
199 |
return $output;
|
200 |
+
|
201 |
break;
|
202 |
+
|
203 |
case 'password':
|
204 |
+
|
205 |
$args = 'user_password';
|
206 |
+
|
207 |
$fields = $ultimatemember->builtin->get_specific_fields( $args );
|
208 |
foreach( $fields as $key => $data ){
|
209 |
$output .= $ultimatemember->fields->edit_field( $key, $data );
|
210 |
}
|
211 |
+
|
212 |
return $output;
|
213 |
+
|
214 |
break;
|
215 |
+
|
216 |
default :
|
217 |
+
|
218 |
$output = apply_filters("um_account_content_hook_{$id}", $output);
|
219 |
return $output;
|
220 |
+
|
221 |
break;
|
222 |
|
223 |
}
|
224 |
}
|
225 |
+
|
226 |
/***
|
227 |
*** @Shortcode
|
228 |
***/
|
229 |
function ultimatemember_account( $args = array() ) {
|
230 |
return $this->load( $args );
|
231 |
}
|
232 |
+
|
233 |
/***
|
234 |
*** @Load a module with global function
|
235 |
***/
|
236 |
function load( $args ) {
|
237 |
+
|
238 |
global $ultimatemember;
|
239 |
+
|
240 |
+
$ultimatemember->user->set( get_current_user_id() );
|
241 |
+
|
242 |
ob_start();
|
243 |
|
244 |
$defaults = array(
|
247 |
'form_id' => 'um_account_id',
|
248 |
);
|
249 |
$args = wp_parse_args( $args, $defaults );
|
250 |
+
|
251 |
if ( isset( $args['use_globals'] ) && $args['use_globals'] == 1 ) {
|
252 |
$args = array_merge( $args, $this->get_css_args( $args ) );
|
253 |
} else {
|
254 |
$args = array_merge( $this->get_css_args( $args ), $args );
|
255 |
}
|
256 |
+
|
257 |
$args = apply_filters('um_account_shortcode_args_filter', $args);
|
258 |
|
259 |
extract( $args, EXTR_SKIP );
|
260 |
+
|
261 |
do_action("um_pre_{$mode}_shortcode", $args);
|
262 |
+
|
263 |
do_action("um_before_form_is_loaded", $args);
|
264 |
+
|
265 |
do_action("um_before_{$mode}_form_is_loaded", $args);
|
266 |
+
|
267 |
$this->template_load( $template, $args );
|
268 |
+
|
269 |
if ( !is_admin() && !defined( 'DOING_AJAX' ) ) {
|
270 |
$this->dynamic_css( $args );
|
271 |
}
|
272 |
+
|
273 |
$output = ob_get_contents();
|
274 |
ob_end_clean();
|
275 |
return $output;
|
276 |
|
277 |
}
|
278 |
+
|
279 |
/***
|
280 |
*** @Get dynamic css args
|
281 |
***/
|
284 |
$arr = array_merge( $arr, array( 'form_id' => $args['form_id'], 'mode' => $args['mode'] ) );
|
285 |
return $arr;
|
286 |
}
|
287 |
+
|
288 |
/***
|
289 |
*** @Load dynamic css
|
290 |
***/
|
308 |
$ultimatemember->shortcodes->load_template( $template );
|
309 |
}
|
310 |
|
311 |
+
/***
|
312 |
+
** @filter account fields
|
313 |
+
****/
|
314 |
+
function predefined_fields_hook( $predefined_fields ){
|
315 |
+
|
316 |
+
$account_hide_in_directory = um_get_option('account_hide_in_directory');
|
317 |
+
if( ! $account_hide_in_directory ){
|
318 |
+
unset( $predefined_fields['hide_in_members'] );
|
319 |
+
}
|
320 |
+
|
321 |
+
return $predefined_fields;
|
322 |
+
}
|
323 |
+
}
|
core/um-actions-access.php
CHANGED
@@ -67,13 +67,23 @@
|
|
67 |
if( is_front_page() || is_home() ){
|
68 |
return;
|
69 |
}
|
|
|
|
|
70 |
|
71 |
-
if ( is_single() || get_the_category() ) {
|
72 |
-
|
73 |
|
74 |
-
$
|
75 |
-
|
76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
$opt = get_option("category_$term_id");
|
78 |
|
79 |
if ( isset( $opt['_um_accessible'] ) ) {
|
@@ -127,26 +137,29 @@
|
|
127 |
add_action('um_access_post_settings','um_access_post_settings');
|
128 |
function um_access_post_settings() {
|
129 |
global $post, $ultimatemember;
|
130 |
-
|
131 |
// woo commerce shop ID
|
132 |
if( function_exists('is_shop') && is_shop() ) {
|
133 |
|
134 |
$post_id = get_option('woocommerce_shop_page_id');
|
135 |
-
|
136 |
} else if ( is_archive() || is_front_page() || is_home() || is_search() || in_the_loop() ) {
|
137 |
|
138 |
return;
|
139 |
|
140 |
} else {
|
141 |
-
|
142 |
if ( !get_post_type() || !isset($post->ID) ) return;
|
143 |
|
144 |
}
|
145 |
|
|
|
|
|
146 |
if ( !isset( $post_id ) )
|
147 |
$post_id = $post->ID;
|
148 |
|
149 |
$args = $ultimatemember->access->get_meta( $post_id );
|
|
|
150 |
extract($args);
|
151 |
|
152 |
if ( !isset( $args['custom_access_settings'] ) || $args['custom_access_settings'] == 0 ) {
|
@@ -171,6 +184,7 @@
|
|
171 |
case 0:
|
172 |
$ultimatemember->access->allow_access = true;
|
173 |
$ultimatemember->access->redirect_handler = false; // open to everyone
|
|
|
174 |
break;
|
175 |
|
176 |
case 1:
|
@@ -215,5 +229,5 @@
|
|
215 |
$ultimatemember->access->redirect_handler = $redirect_to;
|
216 |
}
|
217 |
}
|
218 |
-
|
219 |
}
|
67 |
if( is_front_page() || is_home() ){
|
68 |
return;
|
69 |
}
|
70 |
+
|
71 |
+
if ( is_single() || get_post_taxonomies( $post ) ) {
|
72 |
|
|
|
|
|
73 |
|
74 |
+
$taxonomies = get_post_taxonomies( $post );
|
75 |
+
$categories_ids = array();
|
76 |
+
|
77 |
+
foreach ($taxonomies as $key => $value) {
|
78 |
+
$term_list = wp_get_post_terms($post->ID, $value, array("fields" => "ids"));
|
79 |
+
foreach( $term_list as $term_id ){
|
80 |
+
array_push( $categories_ids , $term_id);
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
|
85 |
+
foreach( $categories_ids as $term => $term_id ) {
|
86 |
+
|
87 |
$opt = get_option("category_$term_id");
|
88 |
|
89 |
if ( isset( $opt['_um_accessible'] ) ) {
|
137 |
add_action('um_access_post_settings','um_access_post_settings');
|
138 |
function um_access_post_settings() {
|
139 |
global $post, $ultimatemember;
|
140 |
+
|
141 |
// woo commerce shop ID
|
142 |
if( function_exists('is_shop') && is_shop() ) {
|
143 |
|
144 |
$post_id = get_option('woocommerce_shop_page_id');
|
145 |
+
|
146 |
} else if ( is_archive() || is_front_page() || is_home() || is_search() || in_the_loop() ) {
|
147 |
|
148 |
return;
|
149 |
|
150 |
} else {
|
151 |
+
|
152 |
if ( !get_post_type() || !isset($post->ID) ) return;
|
153 |
|
154 |
}
|
155 |
|
156 |
+
|
157 |
+
|
158 |
if ( !isset( $post_id ) )
|
159 |
$post_id = $post->ID;
|
160 |
|
161 |
$args = $ultimatemember->access->get_meta( $post_id );
|
162 |
+
|
163 |
extract($args);
|
164 |
|
165 |
if ( !isset( $args['custom_access_settings'] ) || $args['custom_access_settings'] == 0 ) {
|
184 |
case 0:
|
185 |
$ultimatemember->access->allow_access = true;
|
186 |
$ultimatemember->access->redirect_handler = false; // open to everyone
|
187 |
+
|
188 |
break;
|
189 |
|
190 |
case 1:
|
229 |
$ultimatemember->access->redirect_handler = $redirect_to;
|
230 |
}
|
231 |
}
|
232 |
+
|
233 |
}
|
core/um-actions-account.php
CHANGED
@@ -7,8 +7,12 @@
|
|
7 |
function um_submit_account_details( $args ) {
|
8 |
global $ultimatemember;
|
9 |
|
|
|
|
|
10 |
if ( $_POST['user_password'] && $_POST['confirm_user_password'] ) {
|
11 |
$changes['user_pass'] = $_POST['user_password'];
|
|
|
|
|
12 |
}
|
13 |
|
14 |
foreach( $_POST as $k => $v ) {
|
@@ -16,7 +20,7 @@
|
|
16 |
$changes[ $k ] = $v;
|
17 |
}
|
18 |
}
|
19 |
-
|
20 |
if ( isset( $changes['hide_in_members'] ) && $changes['hide_in_members'] == __('No','ultimatemember') ) {
|
21 |
delete_user_meta( um_user('ID'), 'hide_in_members' );
|
22 |
unset( $changes['hide_in_members'] );
|
@@ -24,11 +28,11 @@
|
|
24 |
|
25 |
// fired on account page, just before updating profile
|
26 |
do_action('um_account_pre_update_profile', $changes, um_user('ID') );
|
27 |
-
|
28 |
$ultimatemember->user->update_profile( $changes );
|
29 |
|
30 |
// delete account
|
31 |
-
if ( $_POST['single_user_password'] &&
|
32 |
if ( current_user_can('delete_users') || um_user('can_delete_profile') ) {
|
33 |
if ( !um_user('super_admin') ) {
|
34 |
$ultimatemember->user->delete();
|
@@ -42,17 +46,15 @@
|
|
42 |
}
|
43 |
}
|
44 |
}
|
45 |
-
|
46 |
do_action('um_post_account_update');
|
47 |
-
|
48 |
do_action('um_after_user_account_updated', get_current_user_id() );
|
49 |
-
|
50 |
-
$tab = ( get_query_var('um_tab') ) ? get_query_var('um_tab') : 'general';
|
51 |
-
|
52 |
$url = $ultimatemember->account->tab_link( $tab );
|
53 |
-
|
54 |
$url = add_query_arg( 'updated', 'account', $url );
|
55 |
-
|
56 |
if ( function_exists('icl_get_current_language') ) {
|
57 |
if ( icl_get_current_language() != icl_get_default_language() ) {
|
58 |
$url = $ultimatemember->permalinks->get_current_url( true );
|
@@ -60,76 +62,76 @@
|
|
60 |
exit( wp_redirect( $url ) );
|
61 |
}
|
62 |
}
|
63 |
-
|
64 |
exit( wp_redirect( $url ) );
|
65 |
-
|
66 |
}
|
67 |
-
|
68 |
/***
|
69 |
*** @validate for errors in account page
|
70 |
***/
|
71 |
add_action('um_submit_account_errors_hook','um_submit_account_errors_hook');
|
72 |
function um_submit_account_errors_hook( $args ) {
|
73 |
global $ultimatemember;
|
74 |
-
|
75 |
// errors on general tab
|
76 |
if ( isset($_POST['um_account_submit']) && $_POST['um_account_submit'] != __('Delete Account','ultimatemember') ) {
|
77 |
-
|
78 |
if ( isset($_POST['first_name']) && strlen(trim( $_POST['first_name'] ) ) == 0 ) {
|
79 |
$ultimatemember->form->add_error('first_name', __('You must provide your first name','ultimatemember') );
|
80 |
}
|
81 |
-
|
82 |
if ( isset($_POST['last_name']) && strlen(trim( $_POST['last_name'] ) ) == 0 ) {
|
83 |
$ultimatemember->form->add_error('last_name', __('You must provide your last name','ultimatemember') );
|
84 |
}
|
85 |
-
|
86 |
if ( isset($_POST['user_email']) && strlen(trim( $_POST['user_email'] ) ) == 0 ) {
|
87 |
$ultimatemember->form->add_error('user_email', __('You must provide your e-mail','ultimatemember') );
|
88 |
}
|
89 |
-
|
90 |
if ( isset($_POST['user_email']) && !is_email( $_POST['user_email'] ) ) {
|
91 |
$ultimatemember->form->add_error('user_email', __('Please provide a valid e-mail','ultimatemember') );
|
92 |
}
|
93 |
-
|
94 |
if ( email_exists( $_POST['user_email'] ) && email_exists( $_POST['user_email'] ) != get_current_user_id() ) {
|
95 |
$ultimatemember->form->add_error('user_email', __('Email already linked to another account','ultimatemember') );
|
96 |
}
|
97 |
-
|
98 |
}
|
99 |
$ultimatemember->account->current_tab = 'general';
|
100 |
-
|
101 |
// change password
|
102 |
-
if ( $_POST['current_user_password'] != '' ) {
|
103 |
-
if ( !wp_check_password( $_POST['current_user_password'], um_user('user_pass'), um_user('ID') ) ) {
|
104 |
$ultimatemember->form->add_error('current_user_password', __('This is not your password','ultimatemember') );
|
105 |
$ultimatemember->account->current_tab = 'password';
|
106 |
} else { // correct password
|
107 |
-
|
108 |
if ( $_POST['user_password'] != $_POST['confirm_user_password'] && $_POST['user_password'] ) {
|
109 |
$ultimatemember->form->add_error('user_password', __('Your new password does not match','ultimatemember') );
|
110 |
$ultimatemember->account->current_tab = 'password';
|
111 |
}
|
112 |
-
|
113 |
if ( um_get_option('account_require_strongpass') ) {
|
114 |
-
|
115 |
if ( strlen( utf8_decode( $_POST['user_password'] ) ) < 8 ) {
|
116 |
$ultimatemember->form->add_error('user_password', __('Your password must contain at least 8 characters','ultimatemember') );
|
117 |
-
}
|
118 |
-
|
119 |
if ( strlen( utf8_decode( $_POST['user_password'] ) ) > 30 ) {
|
120 |
$ultimatemember->form->add_error('user_password', __('Your password must contain less than 30 characters','ultimatemember') );
|
121 |
}
|
122 |
-
|
123 |
if ( !$ultimatemember->validation->strong_pass( $_POST['user_password'] ) ) {
|
124 |
$ultimatemember->form->add_error('user_password', __('Your password must contain at least one lowercase letter, one capital letter and one number','ultimatemember') );
|
125 |
$ultimatemember->account->current_tab = 'password';
|
126 |
}
|
127 |
-
|
128 |
}
|
129 |
-
|
130 |
}
|
131 |
}
|
132 |
-
|
133 |
// delete account
|
134 |
if ( isset($_POST['um_account_submit']) && $_POST['um_account_submit'] == __('Delete Account','ultimatemember') ) {
|
135 |
if ( strlen(trim( $_POST['single_user_password'] ) ) == 0 ) {
|
@@ -141,23 +143,23 @@
|
|
141 |
}
|
142 |
$ultimatemember->account->current_tab = 'delete';
|
143 |
}
|
144 |
-
|
145 |
}
|
146 |
-
|
147 |
/***
|
148 |
*** @hidden inputs for account page
|
149 |
***/
|
150 |
add_action('um_account_page_hidden_fields','um_account_page_hidden_fields');
|
151 |
function um_account_page_hidden_fields( $args ) {
|
152 |
-
|
153 |
?>
|
154 |
-
|
155 |
<input type="hidden" name="_um_account" id="_um_account" value="1" />
|
156 |
-
|
157 |
<?php
|
158 |
-
|
159 |
}
|
160 |
-
|
161 |
/***
|
162 |
*** @display tab "Delete"
|
163 |
***/
|
@@ -165,27 +167,27 @@
|
|
165 |
function um_account_tab__delete( $info ) {
|
166 |
global $ultimatemember;
|
167 |
extract( $info );
|
168 |
-
|
169 |
$output = $ultimatemember->account->get_tab_output('delete');
|
170 |
-
|
171 |
if ( $output ) { ?>
|
172 |
-
|
173 |
<div class="um-account-heading uimob300-hide uimob500-hide"><i class="<?php echo $icon; ?>"></i><?php echo $title; ?></div>
|
174 |
-
|
175 |
<?php echo wpautop( um_get_option('delete_account_text') ); ?>
|
176 |
-
|
177 |
<?php echo $output; ?>
|
178 |
-
|
179 |
<?php do_action('um_after_account_delete'); ?>
|
180 |
-
|
181 |
<div class="um-col-alt um-col-alt-b">
|
182 |
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Delete Account','ultimatemember'); ?>" class="um-button" /></div>
|
183 |
<?php do_action('um_after_account_delete_button'); ?>
|
184 |
<div class="um-clear"></div>
|
185 |
</div>
|
186 |
-
|
187 |
<?php
|
188 |
-
|
189 |
}
|
190 |
|
191 |
}
|
@@ -197,25 +199,25 @@
|
|
197 |
function um_account_tab__privacy( $info ) {
|
198 |
global $ultimatemember;
|
199 |
extract( $info );
|
200 |
-
|
201 |
$output = $ultimatemember->account->get_tab_output('privacy');
|
202 |
|
203 |
if ( $output ) { ?>
|
204 |
-
|
205 |
<div class="um-account-heading uimob340-hide uimob500-hide"><i class="<?php echo $icon; ?>"></i><?php echo $title; ?></div>
|
206 |
-
|
207 |
<?php echo $output; ?>
|
208 |
-
|
209 |
<?php do_action('um_after_account_privacy'); ?>
|
210 |
-
|
211 |
<div class="um-col-alt um-col-alt-b">
|
212 |
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Privacy','ultimatemember'); ?>" class="um-button" /></div>
|
213 |
<?php do_action('um_after_account_privacy_button'); ?>
|
214 |
<div class="um-clear"></div>
|
215 |
</div>
|
216 |
-
|
217 |
<?php
|
218 |
-
|
219 |
}
|
220 |
|
221 |
}
|
@@ -229,27 +231,27 @@
|
|
229 |
extract( $info );
|
230 |
|
231 |
$output = $ultimatemember->account->get_tab_output('general');
|
232 |
-
|
233 |
if ( $output ) { ?>
|
234 |
-
|
235 |
<div class="um-account-heading uimob340-hide uimob500-hide"><i class="<?php echo $icon; ?>"></i><?php echo $title; ?></div>
|
236 |
-
|
237 |
<?php echo $output; ?>
|
238 |
-
|
239 |
<?php do_action('um_after_account_general'); ?>
|
240 |
-
|
241 |
<div class="um-col-alt um-col-alt-b">
|
242 |
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Account','ultimatemember'); ?>" class="um-button" /></div>
|
243 |
<?php do_action('um_after_account_general_button'); ?>
|
244 |
<div class="um-clear"></div>
|
245 |
</div>
|
246 |
-
|
247 |
<?php
|
248 |
|
249 |
}
|
250 |
|
251 |
}
|
252 |
-
|
253 |
/***
|
254 |
*** @display tab "Password"
|
255 |
***/
|
@@ -257,29 +259,29 @@
|
|
257 |
function um_account_tab__password( $info ) {
|
258 |
global $ultimatemember;
|
259 |
extract( $info );
|
260 |
-
|
261 |
$output = $ultimatemember->account->get_tab_output('password');
|
262 |
-
|
263 |
if ( $output ) { ?>
|
264 |
-
|
265 |
<div class="um-account-heading uimob340-hide uimob500-hide"><i class="<?php echo $icon; ?>"></i><?php echo $title; ?></div>
|
266 |
-
|
267 |
<?php echo $output; ?>
|
268 |
-
|
269 |
<?php do_action('um_after_account_password'); ?>
|
270 |
-
|
271 |
<div class="um-col-alt um-col-alt-b">
|
272 |
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Password','ultimatemember'); ?>" class="um-button" /></div>
|
273 |
<?php do_action('um_after_account_password_button'); ?>
|
274 |
<div class="um-clear"></div>
|
275 |
</div>
|
276 |
-
|
277 |
<?php
|
278 |
-
|
279 |
}
|
280 |
|
281 |
}
|
282 |
-
|
283 |
/***
|
284 |
*** @display tab "Notifications"
|
285 |
***/
|
@@ -287,35 +289,35 @@
|
|
287 |
function um_account_tab__notifications( $info ) {
|
288 |
global $ultimatemember;
|
289 |
extract( $info );
|
290 |
-
|
291 |
$output = $ultimatemember->account->get_tab_output('notifications');
|
292 |
-
|
293 |
if ( $output ) { ?>
|
294 |
-
|
295 |
<div class="um-account-heading uimob340-hide uimob500-hide"><i class="<?php echo $icon; ?>"></i><?php echo $title; ?></div>
|
296 |
-
|
297 |
<?php if ( class_exists('UM_Messaging_API') || class_exists('UM_Followers_API') ) { ?>
|
298 |
<div class="um-field">
|
299 |
<div class="um-field-label"><label for=""><?php _e('Email me when','ultimatemember'); ?></label><div class="um-clear"></div></div>
|
300 |
</div>
|
301 |
<?php } ?>
|
302 |
-
|
303 |
<?php echo $output; ?>
|
304 |
-
|
305 |
<?php do_action('um_after_account_notifications'); ?>
|
306 |
-
|
307 |
<div class="um-col-alt um-col-alt-b">
|
308 |
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Notifications','ultimatemember'); ?>" class="um-button" /></div>
|
309 |
<?php do_action('um_after_account_notifications_button'); ?>
|
310 |
<div class="um-clear"></div>
|
311 |
</div>
|
312 |
-
|
313 |
<?php
|
314 |
|
315 |
}
|
316 |
|
317 |
}
|
318 |
-
|
319 |
/***
|
320 |
*** @display account photo and username
|
321 |
***/
|
@@ -323,21 +325,24 @@
|
|
323 |
function um_account_user_photo_hook__mobile( $args ) {
|
324 |
global $ultimatemember;
|
325 |
extract( $args );
|
326 |
-
|
327 |
?>
|
328 |
-
|
329 |
<div class="um-account-meta radius-<?php echo um_get_option('profile_photocorner'); ?> uimob340-show uimob500-show">
|
330 |
-
|
331 |
<div class="um-account-meta-img"><a href="<?php echo um_user_profile_url(); ?>"><?php echo get_avatar( um_user('ID'), 120); ?></a></div>
|
332 |
-
|
333 |
-
<div class="um-account-name"
|
334 |
-
|
|
|
|
|
|
|
335 |
</div>
|
336 |
-
|
337 |
<?php
|
338 |
-
|
339 |
}
|
340 |
-
|
341 |
/***
|
342 |
*** @display account photo and username
|
343 |
***/
|
@@ -345,31 +350,34 @@
|
|
345 |
function um_account_user_photo_hook( $args ) {
|
346 |
global $ultimatemember;
|
347 |
extract( $args );
|
348 |
-
|
349 |
?>
|
350 |
-
|
351 |
<div class="um-account-meta radius-<?php echo um_get_option('profile_photocorner'); ?>">
|
352 |
-
|
353 |
<div class="um-account-meta-img uimob800-hide"><a href="<?php echo um_user_profile_url(); ?>"><?php echo get_avatar( um_user('ID'), 120); ?></a></div>
|
354 |
-
|
355 |
<?php if ( $ultimatemember->mobile->isMobile() ) { ?>
|
356 |
-
|
357 |
<div class="um-account-meta-img-b uimob800-show" title="<?php echo um_user('display_name'); ?>"><a href="<?php echo um_user_profile_url(); ?>"><?php echo get_avatar( um_user('ID'), 120); ?></a></div>
|
358 |
-
|
359 |
<?php } else { ?>
|
360 |
-
|
361 |
<div class="um-account-meta-img-b uimob800-show um-tip-w" title="<?php echo um_user('display_name'); ?>"><a href="<?php echo um_user_profile_url(); ?>"><?php echo get_avatar( um_user('ID'), 120); ?></a></div>
|
362 |
-
|
363 |
<?php } ?>
|
364 |
-
|
365 |
-
<div class="um-account-name uimob800-hide"
|
366 |
-
|
|
|
|
|
|
|
367 |
</div>
|
368 |
-
|
369 |
<?php
|
370 |
-
|
371 |
}
|
372 |
-
|
373 |
/***
|
374 |
*** @display account page tabs
|
375 |
***/
|
@@ -377,49 +385,49 @@
|
|
377 |
function um_account_display_tabs_hook( $args ) {
|
378 |
global $ultimatemember;
|
379 |
extract( $args );
|
380 |
-
|
381 |
$ultimatemember->account->tabs = apply_filters('um_account_page_default_tabs_hook', $tabs=array() );
|
382 |
-
|
383 |
ksort( $ultimatemember->account->tabs );
|
384 |
-
|
385 |
?>
|
386 |
|
387 |
<ul>
|
388 |
-
|
389 |
<?php
|
390 |
-
|
391 |
-
foreach( $ultimatemember->account->tabs as $k => $arr ) {
|
392 |
-
foreach( $arr as $id => $info ) { extract( $info );
|
393 |
-
|
394 |
$current_tab = $ultimatemember->account->current_tab;
|
395 |
-
|
396 |
if ( isset($info['custom']) || um_get_option('account_tab_'.$id ) == 1 || $id == 'general' ) { ?>
|
397 |
-
|
398 |
<li>
|
399 |
<a data-tab="<?php echo $id; ?>" href="<?php echo $ultimatemember->account->tab_link($id); ?>" class="um-account-link <?php if ( $id == $current_tab ) echo 'current'; ?>">
|
400 |
-
|
401 |
<?php if ( $ultimatemember->mobile->isMobile() ) { ?>
|
402 |
<span class="um-account-icontip uimob800-show" title="<?php echo $title; ?>"><i class="<?php echo $icon; ?>"></i></span>
|
403 |
<?php } else { ?>
|
404 |
<span class="um-account-icontip uimob800-show um-tip-w" title="<?php echo $title; ?>"><i class="<?php echo $icon; ?>"></i></span>
|
405 |
<?php } ?>
|
406 |
-
|
407 |
<span class="um-account-icon uimob800-hide"><i class="<?php echo $icon; ?>"></i></span>
|
408 |
<span class="um-account-title uimob800-hide"><?php echo $title; ?></span>
|
409 |
<span class="um-account-arrow uimob800-hide"><?php echo ( is_rtl() ) ? '<i class="um-faicon-angle-left"></i>' : '<i class="um-faicon-angle-right"></i>'; ?></span>
|
410 |
</a>
|
411 |
</li>
|
412 |
-
|
413 |
<?php
|
414 |
-
|
415 |
}
|
416 |
-
}
|
417 |
}
|
418 |
-
|
419 |
?>
|
420 |
-
|
421 |
</ul>
|
422 |
-
|
423 |
<?php
|
424 |
|
425 |
-
}
|
7 |
function um_submit_account_details( $args ) {
|
8 |
global $ultimatemember;
|
9 |
|
10 |
+
$tab = ( get_query_var('um_tab') ) ? get_query_var('um_tab') : 'general';
|
11 |
+
|
12 |
if ( $_POST['user_password'] && $_POST['confirm_user_password'] ) {
|
13 |
$changes['user_pass'] = $_POST['user_password'];
|
14 |
+
add_filter('send_password_change_email','um_send_password_change_email');
|
15 |
+
|
16 |
}
|
17 |
|
18 |
foreach( $_POST as $k => $v ) {
|
20 |
$changes[ $k ] = $v;
|
21 |
}
|
22 |
}
|
23 |
+
|
24 |
if ( isset( $changes['hide_in_members'] ) && $changes['hide_in_members'] == __('No','ultimatemember') ) {
|
25 |
delete_user_meta( um_user('ID'), 'hide_in_members' );
|
26 |
unset( $changes['hide_in_members'] );
|
28 |
|
29 |
// fired on account page, just before updating profile
|
30 |
do_action('um_account_pre_update_profile', $changes, um_user('ID') );
|
31 |
+
|
32 |
$ultimatemember->user->update_profile( $changes );
|
33 |
|
34 |
// delete account
|
35 |
+
if ( $_POST['single_user_password'] && $tab == 'delete' ) {
|
36 |
if ( current_user_can('delete_users') || um_user('can_delete_profile') ) {
|
37 |
if ( !um_user('super_admin') ) {
|
38 |
$ultimatemember->user->delete();
|
46 |
}
|
47 |
}
|
48 |
}
|
49 |
+
|
50 |
do_action('um_post_account_update');
|
51 |
+
|
52 |
do_action('um_after_user_account_updated', get_current_user_id() );
|
53 |
+
|
|
|
|
|
54 |
$url = $ultimatemember->account->tab_link( $tab );
|
55 |
+
|
56 |
$url = add_query_arg( 'updated', 'account', $url );
|
57 |
+
|
58 |
if ( function_exists('icl_get_current_language') ) {
|
59 |
if ( icl_get_current_language() != icl_get_default_language() ) {
|
60 |
$url = $ultimatemember->permalinks->get_current_url( true );
|
62 |
exit( wp_redirect( $url ) );
|
63 |
}
|
64 |
}
|
65 |
+
|
66 |
exit( wp_redirect( $url ) );
|
67 |
+
|
68 |
}
|
69 |
+
|
70 |
/***
|
71 |
*** @validate for errors in account page
|
72 |
***/
|
73 |
add_action('um_submit_account_errors_hook','um_submit_account_errors_hook');
|
74 |
function um_submit_account_errors_hook( $args ) {
|
75 |
global $ultimatemember;
|
76 |
+
|
77 |
// errors on general tab
|
78 |
if ( isset($_POST['um_account_submit']) && $_POST['um_account_submit'] != __('Delete Account','ultimatemember') ) {
|
79 |
+
|
80 |
if ( isset($_POST['first_name']) && strlen(trim( $_POST['first_name'] ) ) == 0 ) {
|
81 |
$ultimatemember->form->add_error('first_name', __('You must provide your first name','ultimatemember') );
|
82 |
}
|
83 |
+
|
84 |
if ( isset($_POST['last_name']) && strlen(trim( $_POST['last_name'] ) ) == 0 ) {
|
85 |
$ultimatemember->form->add_error('last_name', __('You must provide your last name','ultimatemember') );
|
86 |
}
|
87 |
+
|
88 |
if ( isset($_POST['user_email']) && strlen(trim( $_POST['user_email'] ) ) == 0 ) {
|
89 |
$ultimatemember->form->add_error('user_email', __('You must provide your e-mail','ultimatemember') );
|
90 |
}
|
91 |
+
|
92 |
if ( isset($_POST['user_email']) && !is_email( $_POST['user_email'] ) ) {
|
93 |
$ultimatemember->form->add_error('user_email', __('Please provide a valid e-mail','ultimatemember') );
|
94 |
}
|
95 |
+
|
96 |
if ( email_exists( $_POST['user_email'] ) && email_exists( $_POST['user_email'] ) != get_current_user_id() ) {
|
97 |
$ultimatemember->form->add_error('user_email', __('Email already linked to another account','ultimatemember') );
|
98 |
}
|
99 |
+
|
100 |
}
|
101 |
$ultimatemember->account->current_tab = 'general';
|
102 |
+
|
103 |
// change password
|
104 |
+
if ( $_POST['current_user_password'] != '' || $_POST['user_password'] != '' || $_POST['confirm_user_password'] != '') {
|
105 |
+
if ( $_POST['current_user_password'] == '' || !wp_check_password( $_POST['current_user_password'], um_user('user_pass'), um_user('ID') ) ) {
|
106 |
$ultimatemember->form->add_error('current_user_password', __('This is not your password','ultimatemember') );
|
107 |
$ultimatemember->account->current_tab = 'password';
|
108 |
} else { // correct password
|
109 |
+
|
110 |
if ( $_POST['user_password'] != $_POST['confirm_user_password'] && $_POST['user_password'] ) {
|
111 |
$ultimatemember->form->add_error('user_password', __('Your new password does not match','ultimatemember') );
|
112 |
$ultimatemember->account->current_tab = 'password';
|
113 |
}
|
114 |
+
|
115 |
if ( um_get_option('account_require_strongpass') ) {
|
116 |
+
|
117 |
if ( strlen( utf8_decode( $_POST['user_password'] ) ) < 8 ) {
|
118 |
$ultimatemember->form->add_error('user_password', __('Your password must contain at least 8 characters','ultimatemember') );
|
119 |
+
}
|
120 |
+
|
121 |
if ( strlen( utf8_decode( $_POST['user_password'] ) ) > 30 ) {
|
122 |
$ultimatemember->form->add_error('user_password', __('Your password must contain less than 30 characters','ultimatemember') );
|
123 |
}
|
124 |
+
|
125 |
if ( !$ultimatemember->validation->strong_pass( $_POST['user_password'] ) ) {
|
126 |
$ultimatemember->form->add_error('user_password', __('Your password must contain at least one lowercase letter, one capital letter and one number','ultimatemember') );
|
127 |
$ultimatemember->account->current_tab = 'password';
|
128 |
}
|
129 |
+
|
130 |
}
|
131 |
+
|
132 |
}
|
133 |
}
|
134 |
+
|
135 |
// delete account
|
136 |
if ( isset($_POST['um_account_submit']) && $_POST['um_account_submit'] == __('Delete Account','ultimatemember') ) {
|
137 |
if ( strlen(trim( $_POST['single_user_password'] ) ) == 0 ) {
|
143 |
}
|
144 |
$ultimatemember->account->current_tab = 'delete';
|
145 |
}
|
146 |
+
|
147 |
}
|
148 |
+
|
149 |
/***
|
150 |
*** @hidden inputs for account page
|
151 |
***/
|
152 |
add_action('um_account_page_hidden_fields','um_account_page_hidden_fields');
|
153 |
function um_account_page_hidden_fields( $args ) {
|
154 |
+
|
155 |
?>
|
156 |
+
|
157 |
<input type="hidden" name="_um_account" id="_um_account" value="1" />
|
158 |
+
|
159 |
<?php
|
160 |
+
|
161 |
}
|
162 |
+
|
163 |
/***
|
164 |
*** @display tab "Delete"
|
165 |
***/
|
167 |
function um_account_tab__delete( $info ) {
|
168 |
global $ultimatemember;
|
169 |
extract( $info );
|
170 |
+
|
171 |
$output = $ultimatemember->account->get_tab_output('delete');
|
172 |
+
|
173 |
if ( $output ) { ?>
|
174 |
+
|
175 |
<div class="um-account-heading uimob300-hide uimob500-hide"><i class="<?php echo $icon; ?>"></i><?php echo $title; ?></div>
|
176 |
+
|
177 |
<?php echo wpautop( um_get_option('delete_account_text') ); ?>
|
178 |
+
|
179 |
<?php echo $output; ?>
|
180 |
+
|
181 |
<?php do_action('um_after_account_delete'); ?>
|
182 |
+
|
183 |
<div class="um-col-alt um-col-alt-b">
|
184 |
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Delete Account','ultimatemember'); ?>" class="um-button" /></div>
|
185 |
<?php do_action('um_after_account_delete_button'); ?>
|
186 |
<div class="um-clear"></div>
|
187 |
</div>
|
188 |
+
|
189 |
<?php
|
190 |
+
|
191 |
}
|
192 |
|
193 |
}
|
199 |
function um_account_tab__privacy( $info ) {
|
200 |
global $ultimatemember;
|
201 |
extract( $info );
|
202 |
+
|
203 |
$output = $ultimatemember->account->get_tab_output('privacy');
|
204 |
|
205 |
if ( $output ) { ?>
|
206 |
+
|
207 |
<div class="um-account-heading uimob340-hide uimob500-hide"><i class="<?php echo $icon; ?>"></i><?php echo $title; ?></div>
|
208 |
+
|
209 |
<?php echo $output; ?>
|
210 |
+
|
211 |
<?php do_action('um_after_account_privacy'); ?>
|
212 |
+
|
213 |
<div class="um-col-alt um-col-alt-b">
|
214 |
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Privacy','ultimatemember'); ?>" class="um-button" /></div>
|
215 |
<?php do_action('um_after_account_privacy_button'); ?>
|
216 |
<div class="um-clear"></div>
|
217 |
</div>
|
218 |
+
|
219 |
<?php
|
220 |
+
|
221 |
}
|
222 |
|
223 |
}
|
231 |
extract( $info );
|
232 |
|
233 |
$output = $ultimatemember->account->get_tab_output('general');
|
234 |
+
|
235 |
if ( $output ) { ?>
|
236 |
+
|
237 |
<div class="um-account-heading uimob340-hide uimob500-hide"><i class="<?php echo $icon; ?>"></i><?php echo $title; ?></div>
|
238 |
+
|
239 |
<?php echo $output; ?>
|
240 |
+
|
241 |
<?php do_action('um_after_account_general'); ?>
|
242 |
+
|
243 |
<div class="um-col-alt um-col-alt-b">
|
244 |
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Account','ultimatemember'); ?>" class="um-button" /></div>
|
245 |
<?php do_action('um_after_account_general_button'); ?>
|
246 |
<div class="um-clear"></div>
|
247 |
</div>
|
248 |
+
|
249 |
<?php
|
250 |
|
251 |
}
|
252 |
|
253 |
}
|
254 |
+
|
255 |
/***
|
256 |
*** @display tab "Password"
|
257 |
***/
|
259 |
function um_account_tab__password( $info ) {
|
260 |
global $ultimatemember;
|
261 |
extract( $info );
|
262 |
+
|
263 |
$output = $ultimatemember->account->get_tab_output('password');
|
264 |
+
|
265 |
if ( $output ) { ?>
|
266 |
+
|
267 |
<div class="um-account-heading uimob340-hide uimob500-hide"><i class="<?php echo $icon; ?>"></i><?php echo $title; ?></div>
|
268 |
+
|
269 |
<?php echo $output; ?>
|
270 |
+
|
271 |
<?php do_action('um_after_account_password'); ?>
|
272 |
+
|
273 |
<div class="um-col-alt um-col-alt-b">
|
274 |
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Password','ultimatemember'); ?>" class="um-button" /></div>
|
275 |
<?php do_action('um_after_account_password_button'); ?>
|
276 |
<div class="um-clear"></div>
|
277 |
</div>
|
278 |
+
|
279 |
<?php
|
280 |
+
|
281 |
}
|
282 |
|
283 |
}
|
284 |
+
|
285 |
/***
|
286 |
*** @display tab "Notifications"
|
287 |
***/
|
289 |
function um_account_tab__notifications( $info ) {
|
290 |
global $ultimatemember;
|
291 |
extract( $info );
|
292 |
+
|
293 |
$output = $ultimatemember->account->get_tab_output('notifications');
|
294 |
+
|
295 |
if ( $output ) { ?>
|
296 |
+
|
297 |
<div class="um-account-heading uimob340-hide uimob500-hide"><i class="<?php echo $icon; ?>"></i><?php echo $title; ?></div>
|
298 |
+
|
299 |
<?php if ( class_exists('UM_Messaging_API') || class_exists('UM_Followers_API') ) { ?>
|
300 |
<div class="um-field">
|
301 |
<div class="um-field-label"><label for=""><?php _e('Email me when','ultimatemember'); ?></label><div class="um-clear"></div></div>
|
302 |
</div>
|
303 |
<?php } ?>
|
304 |
+
|
305 |
<?php echo $output; ?>
|
306 |
+
|
307 |
<?php do_action('um_after_account_notifications'); ?>
|
308 |
+
|
309 |
<div class="um-col-alt um-col-alt-b">
|
310 |
<div class="um-left"><input type="submit" name="um_account_submit" id="um_account_submit" value="<?php _e('Update Notifications','ultimatemember'); ?>" class="um-button" /></div>
|
311 |
<?php do_action('um_after_account_notifications_button'); ?>
|
312 |
<div class="um-clear"></div>
|
313 |
</div>
|
314 |
+
|
315 |
<?php
|
316 |
|
317 |
}
|
318 |
|
319 |
}
|
320 |
+
|
321 |
/***
|
322 |
*** @display account photo and username
|
323 |
***/
|
325 |
function um_account_user_photo_hook__mobile( $args ) {
|
326 |
global $ultimatemember;
|
327 |
extract( $args );
|
328 |
+
|
329 |
?>
|
330 |
+
|
331 |
<div class="um-account-meta radius-<?php echo um_get_option('profile_photocorner'); ?> uimob340-show uimob500-show">
|
332 |
+
|
333 |
<div class="um-account-meta-img"><a href="<?php echo um_user_profile_url(); ?>"><?php echo get_avatar( um_user('ID'), 120); ?></a></div>
|
334 |
+
|
335 |
+
<div class="um-account-name">
|
336 |
+
<a href="<?php echo um_user_profile_url(); ?>"><?php echo um_user('display_name'); ?></a>
|
337 |
+
<div class="um-account-profile-link"><a href="<?php echo um_user_profile_url(); ?>" class="um-link"><?php _e('View profile','ultimatemember'); ?></a></div>
|
338 |
+
</div>
|
339 |
+
|
340 |
</div>
|
341 |
+
|
342 |
<?php
|
343 |
+
|
344 |
}
|
345 |
+
|
346 |
/***
|
347 |
*** @display account photo and username
|
348 |
***/
|
350 |
function um_account_user_photo_hook( $args ) {
|
351 |
global $ultimatemember;
|
352 |
extract( $args );
|
353 |
+
|
354 |
?>
|
355 |
+
|
356 |
<div class="um-account-meta radius-<?php echo um_get_option('profile_photocorner'); ?>">
|
357 |
+
|
358 |
<div class="um-account-meta-img uimob800-hide"><a href="<?php echo um_user_profile_url(); ?>"><?php echo get_avatar( um_user('ID'), 120); ?></a></div>
|
359 |
+
|
360 |
<?php if ( $ultimatemember->mobile->isMobile() ) { ?>
|
361 |
+
|
362 |
<div class="um-account-meta-img-b uimob800-show" title="<?php echo um_user('display_name'); ?>"><a href="<?php echo um_user_profile_url(); ?>"><?php echo get_avatar( um_user('ID'), 120); ?></a></div>
|
363 |
+
|
364 |
<?php } else { ?>
|
365 |
+
|
366 |
<div class="um-account-meta-img-b uimob800-show um-tip-w" title="<?php echo um_user('display_name'); ?>"><a href="<?php echo um_user_profile_url(); ?>"><?php echo get_avatar( um_user('ID'), 120); ?></a></div>
|
367 |
+
|
368 |
<?php } ?>
|
369 |
+
|
370 |
+
<div class="um-account-name uimob800-hide">
|
371 |
+
<a href="<?php echo um_user_profile_url(); ?>"><?php echo um_user('display_name', 'html'); ?></a>
|
372 |
+
<div class="um-account-profile-link"><a href="<?php echo um_user_profile_url(); ?>" class="um-link"><?php _e('View profile','ultimatemember'); ?></a></div>
|
373 |
+
</div>
|
374 |
+
|
375 |
</div>
|
376 |
+
|
377 |
<?php
|
378 |
+
|
379 |
}
|
380 |
+
|
381 |
/***
|
382 |
*** @display account page tabs
|
383 |
***/
|
385 |
function um_account_display_tabs_hook( $args ) {
|
386 |
global $ultimatemember;
|
387 |
extract( $args );
|
388 |
+
|
389 |
$ultimatemember->account->tabs = apply_filters('um_account_page_default_tabs_hook', $tabs=array() );
|
390 |
+
|
391 |
ksort( $ultimatemember->account->tabs );
|
392 |
+
|
393 |
?>
|
394 |
|
395 |
<ul>
|
396 |
+
|
397 |
<?php
|
398 |
+
|
399 |
+
foreach( $ultimatemember->account->tabs as $k => $arr ) {
|
400 |
+
foreach( $arr as $id => $info ) { extract( $info );
|
401 |
+
|
402 |
$current_tab = $ultimatemember->account->current_tab;
|
403 |
+
|
404 |
if ( isset($info['custom']) || um_get_option('account_tab_'.$id ) == 1 || $id == 'general' ) { ?>
|
405 |
+
|
406 |
<li>
|
407 |
<a data-tab="<?php echo $id; ?>" href="<?php echo $ultimatemember->account->tab_link($id); ?>" class="um-account-link <?php if ( $id == $current_tab ) echo 'current'; ?>">
|
408 |
+
|
409 |
<?php if ( $ultimatemember->mobile->isMobile() ) { ?>
|
410 |
<span class="um-account-icontip uimob800-show" title="<?php echo $title; ?>"><i class="<?php echo $icon; ?>"></i></span>
|
411 |
<?php } else { ?>
|
412 |
<span class="um-account-icontip uimob800-show um-tip-w" title="<?php echo $title; ?>"><i class="<?php echo $icon; ?>"></i></span>
|
413 |
<?php } ?>
|
414 |
+
|
415 |
<span class="um-account-icon uimob800-hide"><i class="<?php echo $icon; ?>"></i></span>
|
416 |
<span class="um-account-title uimob800-hide"><?php echo $title; ?></span>
|
417 |
<span class="um-account-arrow uimob800-hide"><?php echo ( is_rtl() ) ? '<i class="um-faicon-angle-left"></i>' : '<i class="um-faicon-angle-right"></i>'; ?></span>
|
418 |
</a>
|
419 |
</li>
|
420 |
+
|
421 |
<?php
|
422 |
+
|
423 |
}
|
424 |
+
}
|
425 |
}
|
426 |
+
|
427 |
?>
|
428 |
+
|
429 |
</ul>
|
430 |
+
|
431 |
<?php
|
432 |
|
433 |
+
}
|
core/um-actions-ajax.php
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/***
|
4 |
*** @fallback for ajax urls
|
5 |
***/
|
6 |
add_action('wp_head','ultimatemember_ajax_urls');
|
7 |
add_action('admin_head','ultimatemember_ajax_urls');
|
8 |
function ultimatemember_ajax_urls() { ?>
|
9 |
-
|
10 |
<script type="text/javascript">
|
11 |
-
|
12 |
var ultimatemember_image_upload_url = '<?php echo um_url . 'core/lib/upload/um-image-upload.php'; ?>';
|
13 |
var ultimatemember_file_upload_url = '<?php echo um_url . 'core/lib/upload/um-file-upload.php'; ?>';
|
14 |
var ultimatemember_ajax_url = '<?php echo admin_url('admin-ajax.php'); ?>';
|
15 |
-
|
16 |
</script>
|
17 |
-
|
18 |
<?php
|
19 |
|
20 |
}
|
21 |
-
|
22 |
/***
|
23 |
*** @remove any file silently
|
24 |
***/
|
@@ -29,7 +29,7 @@
|
|
29 |
extract($_REQUEST);
|
30 |
$ultimatemember->files->delete_file( $src );
|
31 |
}
|
32 |
-
|
33 |
/***
|
34 |
*** @remove profile photo silently
|
35 |
***/
|
@@ -38,13 +38,13 @@
|
|
38 |
function ultimatemember_delete_profile_photo(){
|
39 |
global $ultimatemember;
|
40 |
extract($_REQUEST);
|
41 |
-
|
42 |
if ( !um_current_user_can('edit', $user_id ) ) die( __('You can not edit this user') );
|
43 |
|
44 |
$ultimatemember->files->delete_core_user_photo( $user_id, 'profile_photo' );
|
45 |
|
46 |
}
|
47 |
-
|
48 |
/***
|
49 |
*** @remove cover photo silently
|
50 |
***/
|
@@ -53,13 +53,13 @@
|
|
53 |
function ultimatemember_delete_cover_photo(){
|
54 |
global $ultimatemember;
|
55 |
extract($_REQUEST);
|
56 |
-
|
57 |
if ( !um_current_user_can('edit', $user_id ) ) die( __('You can not edit this user') );
|
58 |
|
59 |
$ultimatemember->files->delete_core_user_photo( $user_id, 'cover_photo' );
|
60 |
|
61 |
}
|
62 |
-
|
63 |
/***
|
64 |
*** @resampling/crop images
|
65 |
***/
|
@@ -68,35 +68,35 @@
|
|
68 |
function ultimatemember_resize_image(){
|
69 |
global $ultimatemember;
|
70 |
$output = 0;
|
71 |
-
|
72 |
extract($_REQUEST);
|
73 |
-
|
74 |
if ( !isset($src) || !isset($coord) ) die( __('Invalid parameters') );
|
75 |
-
|
76 |
$coord_n = substr_count($coord, ",");
|
77 |
if ( $coord_n != 3 ) die( __('Invalid coordinates') );
|
78 |
-
|
79 |
$um_is_temp_image = um_is_temp_image( $src );
|
80 |
if ( !$um_is_temp_image ) die( __('Invalid Image file') );
|
81 |
-
|
82 |
$crop = explode(',', $coord );
|
83 |
$crop = array_map('intval', $crop);
|
84 |
-
|
85 |
$uri = $ultimatemember->files->resize_image( $um_is_temp_image, $crop );
|
86 |
|
87 |
// If you're updating a user
|
88 |
if ( isset( $user_id ) && $user_id > 0 ) {
|
89 |
$uri = $ultimatemember->files->new_user_upload( $user_id, $um_is_temp_image, $key );
|
90 |
}
|
91 |
-
|
92 |
$output = $uri;
|
93 |
-
|
94 |
delete_option( "um_cache_userdata_{$user_id}" );
|
95 |
-
|
96 |
if(is_array($output)){ print_r($output); }else{ echo $output; } die;
|
97 |
|
98 |
}
|
99 |
-
|
100 |
/***
|
101 |
*** @run an ajax action on the fly
|
102 |
***/
|
@@ -105,9 +105,9 @@
|
|
105 |
function ultimatemember_muted_action(){
|
106 |
global $ultimatemember;
|
107 |
extract($_REQUEST);
|
108 |
-
|
109 |
if ( !um_current_user_can('edit', $user_id ) ) die( __('You can not edit this user') );
|
110 |
-
|
111 |
switch( $hook ) {
|
112 |
default:
|
113 |
do_action("um_run_ajax_function__{$hook}", $_REQUEST);
|
@@ -115,7 +115,7 @@
|
|
115 |
}
|
116 |
|
117 |
}
|
118 |
-
|
119 |
/***
|
120 |
*** @run an ajax pagination on the fly
|
121 |
***/
|
@@ -124,14 +124,33 @@
|
|
124 |
function ultimatemember_ajax_paginate(){
|
125 |
global $ultimatemember;
|
126 |
extract($_REQUEST);
|
127 |
-
|
128 |
ob_start();
|
129 |
-
|
130 |
do_action("um_ajax_load_posts__{$hook}", $args);
|
131 |
-
|
132 |
$output = ob_get_contents();
|
133 |
ob_end_clean();
|
134 |
-
|
135 |
die($output);
|
136 |
|
137 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
+
|
3 |
/***
|
4 |
*** @fallback for ajax urls
|
5 |
***/
|
6 |
add_action('wp_head','ultimatemember_ajax_urls');
|
7 |
add_action('admin_head','ultimatemember_ajax_urls');
|
8 |
function ultimatemember_ajax_urls() { ?>
|
9 |
+
|
10 |
<script type="text/javascript">
|
11 |
+
|
12 |
var ultimatemember_image_upload_url = '<?php echo um_url . 'core/lib/upload/um-image-upload.php'; ?>';
|
13 |
var ultimatemember_file_upload_url = '<?php echo um_url . 'core/lib/upload/um-file-upload.php'; ?>';
|
14 |
var ultimatemember_ajax_url = '<?php echo admin_url('admin-ajax.php'); ?>';
|
15 |
+
|
16 |
</script>
|
17 |
+
|
18 |
<?php
|
19 |
|
20 |
}
|
21 |
+
|
22 |
/***
|
23 |
*** @remove any file silently
|
24 |
***/
|
29 |
extract($_REQUEST);
|
30 |
$ultimatemember->files->delete_file( $src );
|
31 |
}
|
32 |
+
|
33 |
/***
|
34 |
*** @remove profile photo silently
|
35 |
***/
|
38 |
function ultimatemember_delete_profile_photo(){
|
39 |
global $ultimatemember;
|
40 |
extract($_REQUEST);
|
41 |
+
|
42 |
if ( !um_current_user_can('edit', $user_id ) ) die( __('You can not edit this user') );
|
43 |
|
44 |
$ultimatemember->files->delete_core_user_photo( $user_id, 'profile_photo' );
|
45 |
|
46 |
}
|
47 |
+
|
48 |
/***
|
49 |
*** @remove cover photo silently
|
50 |
***/
|
53 |
function ultimatemember_delete_cover_photo(){
|
54 |
global $ultimatemember;
|
55 |
extract($_REQUEST);
|
56 |
+
|
57 |
if ( !um_current_user_can('edit', $user_id ) ) die( __('You can not edit this user') );
|
58 |
|
59 |
$ultimatemember->files->delete_core_user_photo( $user_id, 'cover_photo' );
|
60 |
|
61 |
}
|
62 |
+
|
63 |
/***
|
64 |
*** @resampling/crop images
|
65 |
***/
|
68 |
function ultimatemember_resize_image(){
|
69 |
global $ultimatemember;
|
70 |
$output = 0;
|
71 |
+
|
72 |
extract($_REQUEST);
|
73 |
+
|
74 |
if ( !isset($src) || !isset($coord) ) die( __('Invalid parameters') );
|
75 |
+
|
76 |
$coord_n = substr_count($coord, ",");
|
77 |
if ( $coord_n != 3 ) die( __('Invalid coordinates') );
|
78 |
+
|
79 |
$um_is_temp_image = um_is_temp_image( $src );
|
80 |
if ( !$um_is_temp_image ) die( __('Invalid Image file') );
|
81 |
+
|
82 |
$crop = explode(',', $coord );
|
83 |
$crop = array_map('intval', $crop);
|
84 |
+
|
85 |
$uri = $ultimatemember->files->resize_image( $um_is_temp_image, $crop );
|
86 |
|
87 |
// If you're updating a user
|
88 |
if ( isset( $user_id ) && $user_id > 0 ) {
|
89 |
$uri = $ultimatemember->files->new_user_upload( $user_id, $um_is_temp_image, $key );
|
90 |
}
|
91 |
+
|
92 |
$output = $uri;
|
93 |
+
|
94 |
delete_option( "um_cache_userdata_{$user_id}" );
|
95 |
+
|
96 |
if(is_array($output)){ print_r($output); }else{ echo $output; } die;
|
97 |
|
98 |
}
|
99 |
+
|
100 |
/***
|
101 |
*** @run an ajax action on the fly
|
102 |
***/
|
105 |
function ultimatemember_muted_action(){
|
106 |
global $ultimatemember;
|
107 |
extract($_REQUEST);
|
108 |
+
|
109 |
if ( !um_current_user_can('edit', $user_id ) ) die( __('You can not edit this user') );
|
110 |
+
|
111 |
switch( $hook ) {
|
112 |
default:
|
113 |
do_action("um_run_ajax_function__{$hook}", $_REQUEST);
|
115 |
}
|
116 |
|
117 |
}
|
118 |
+
|
119 |
/***
|
120 |
*** @run an ajax pagination on the fly
|
121 |
***/
|
124 |
function ultimatemember_ajax_paginate(){
|
125 |
global $ultimatemember;
|
126 |
extract($_REQUEST);
|
127 |
+
|
128 |
ob_start();
|
129 |
+
|
130 |
do_action("um_ajax_load_posts__{$hook}", $args);
|
131 |
+
|
132 |
$output = ob_get_contents();
|
133 |
ob_end_clean();
|
134 |
+
|
135 |
die($output);
|
136 |
|
137 |
+
}
|
138 |
+
|
139 |
+
/***
|
140 |
+
*** @run check if username exists
|
141 |
+
***/
|
142 |
+
add_action('wp_ajax_nopriv_ultimatemember_check_username_exists', 'ultimatemember_check_username_exists');
|
143 |
+
add_action('wp_ajax_ultimatemember_check_username_exists', 'ultimatemember_check_username_exists');
|
144 |
+
function ultimatemember_check_username_exists() {
|
145 |
+
$username = isset($_REQUEST['username']) ? $_REQUEST['username'] : '';
|
146 |
+
$exists = username_exists( $username );
|
147 |
+
$exists = apply_filters( 'um_validate_username_exists', $exists, $username );
|
148 |
+
|
149 |
+
if( $exists ) {
|
150 |
+
echo 1;
|
151 |
+
} else {
|
152 |
+
echo 0;
|
153 |
+
}
|
154 |
+
|
155 |
+
die();
|
156 |
+
}
|
core/um-actions-form.php
CHANGED
@@ -6,69 +6,69 @@
|
|
6 |
add_action('um_submit_form_errors_hook__registration', 'um_submit_form_errors_hook__registration', 10);
|
7 |
function um_submit_form_errors_hook__registration($args){
|
8 |
global $ultimatemember;
|
9 |
-
|
10 |
$can_register = get_option('users_can_register');
|
11 |
if ( !$can_register ) {
|
12 |
exit( wp_redirect( esc_url( add_query_arg('err', 'registration_disabled') ) ) );
|
13 |
}
|
14 |
-
|
15 |
}
|
16 |
-
|
17 |
/***
|
18 |
*** @Error handling: blocked emails
|
19 |
***/
|
20 |
add_action('um_submit_form_errors_hook__blockedemails', 'um_submit_form_errors_hook__blockedemails', 10);
|
21 |
function um_submit_form_errors_hook__blockedemails($args){
|
22 |
global $ultimatemember;
|
23 |
-
|
24 |
$emails = um_get_option('blocked_emails');
|
25 |
if ( !$emails )
|
26 |
return;
|
27 |
-
|
28 |
$emails = array_map("rtrim", explode("\n", $emails));
|
29 |
-
|
30 |
if ( isset( $args['user_email'] ) && is_email( $args['user_email'] ) ) {
|
31 |
-
|
32 |
$domain = explode('@', $args['user_email'] );
|
33 |
$check_domain = str_replace($domain[0], '*', $args['user_email']);
|
34 |
|
35 |
if ( in_array( $args['user_email'], $emails ) )
|
36 |
exit( wp_redirect( esc_url( add_query_arg('err', 'blocked_email') ) ) );
|
37 |
-
|
38 |
if ( in_array( $check_domain, $emails ) )
|
39 |
exit( wp_redirect( esc_url( add_query_arg('err', 'blocked_domain') ) ) );
|
40 |
-
|
41 |
}
|
42 |
-
|
43 |
if ( isset( $args['username'] ) && is_email( $args['username'] ) ) {
|
44 |
-
|
45 |
$domain = explode('@', $args['username'] );
|
46 |
$check_domain = str_replace($domain[0], '*', $args['username']);
|
47 |
-
|
48 |
if ( in_array( $args['username'], $emails ) )
|
49 |
exit( wp_redirect( esc_url( add_query_arg('err', 'blocked_email') ) ) );
|
50 |
|
51 |
if ( in_array( $check_domain, $emails ) )
|
52 |
exit( wp_redirect( esc_url( add_query_arg('err', 'blocked_domain') ) ) );
|
53 |
-
|
54 |
}
|
55 |
-
|
56 |
}
|
57 |
-
|
58 |
/***
|
59 |
*** @Error handling: blocked IPs
|
60 |
***/
|
61 |
add_action('um_submit_form_errors_hook__blockedips', 'um_submit_form_errors_hook__blockedips', 10);
|
62 |
function um_submit_form_errors_hook__blockedips($args){
|
63 |
global $ultimatemember;
|
64 |
-
|
65 |
$ips = um_get_option('blocked_ips');
|
66 |
if ( !$ips )
|
67 |
return;
|
68 |
-
|
69 |
$ips = array_map("rtrim", explode("\n", $ips));
|
70 |
$user_ip = um_user_ip();
|
71 |
-
|
72 |
foreach($ips as $ip) {
|
73 |
$ip = str_replace('*','',$ip);
|
74 |
if (strpos($user_ip, $ip) === 0) {
|
@@ -76,72 +76,70 @@
|
|
76 |
}
|
77 |
}
|
78 |
}
|
79 |
-
|
80 |
/***
|
81 |
*** @Error handling: blocked words during sign up
|
82 |
***/
|
83 |
add_action('um_submit_form_errors_hook__blockedwords', 'um_submit_form_errors_hook__blockedwords', 10);
|
84 |
function um_submit_form_errors_hook__blockedwords($args){
|
85 |
global $ultimatemember;
|
86 |
-
|
87 |
$form_id = $args['form_id'];
|
88 |
$mode = $args['mode'];
|
89 |
$fields = unserialize( $args['custom_fields'] );
|
90 |
-
|
91 |
$words = um_get_option('blocked_words');
|
92 |
if ( $words != '' ) {
|
93 |
-
|
94 |
$words = array_map("rtrim", explode("\n", $words));
|
95 |
-
if( isset( $fields )
|
96 |
foreach( $fields as $key => $array ) {
|
97 |
-
if ( isset(
|
98 |
-
if (
|
99 |
-
|
100 |
-
$ultimatemember->form->add_error( $key, __('You are not allowed to use this word as your username.','ultimatemember') );
|
101 |
-
}
|
102 |
}
|
103 |
}
|
104 |
}
|
105 |
}
|
106 |
|
107 |
}
|
108 |
-
|
109 |
}
|
110 |
-
|
111 |
/***
|
112 |
*** @Error handling
|
113 |
***/
|
114 |
add_action('um_submit_form_errors_hook', 'um_submit_form_errors_hook', 10);
|
115 |
function um_submit_form_errors_hook( $args ){
|
116 |
global $ultimatemember;
|
117 |
-
|
118 |
$form_id = $args['form_id'];
|
119 |
-
|
120 |
$mode = $args['mode'];
|
121 |
-
|
122 |
$fields = unserialize( $args['custom_fields'] );
|
123 |
-
|
124 |
if ( $mode == 'register' ){
|
125 |
-
|
126 |
do_action("um_submit_form_errors_hook__registration", $args );
|
127 |
-
|
128 |
}
|
129 |
-
|
130 |
do_action("um_submit_form_errors_hook__blockedips", $args );
|
131 |
do_action("um_submit_form_errors_hook__blockedemails", $args );
|
132 |
|
133 |
if ( $mode == 'login' ) {
|
134 |
-
|
135 |
do_action('um_submit_form_errors_hook_login', $args );
|
136 |
do_action('um_submit_form_errors_hook_logincheck', $args );
|
137 |
-
|
138 |
} else {
|
139 |
-
|
140 |
do_action('um_submit_form_errors_hook_', $args );
|
141 |
do_action("um_submit_form_errors_hook__blockedwords", $args );
|
142 |
-
|
143 |
}
|
144 |
-
|
145 |
}
|
146 |
|
147 |
/***
|
@@ -150,34 +148,34 @@
|
|
150 |
add_action('um_submit_form_errors_hook_', 'um_submit_form_errors_hook_', 10);
|
151 |
function um_submit_form_errors_hook_( $args ){
|
152 |
global $ultimatemember;
|
153 |
-
|
154 |
$form_id = $args['form_id'];
|
155 |
$mode = $args['mode'];
|
156 |
$fields = unserialize( $args['custom_fields'] );
|
157 |
-
|
158 |
if( isset( $fields ) && ! empty( $fields ) ){
|
159 |
foreach( $fields as $key => $array ) {
|
160 |
-
|
161 |
$array = apply_filters('um_get_custom_field_array', $array, $fields );
|
162 |
|
163 |
if ( isset( $array['type'] ) && $array['type'] == 'checkbox' && isset( $array['required'] ) && $array['required'] == 1 && !isset( $args[$key] ) ) {
|
164 |
$ultimatemember->form->add_error($key, sprintf(__('%s is required.','ultimatemember'), $array['title'] ) );
|
165 |
}
|
166 |
-
|
167 |
if ( isset( $array['type'] ) && $array['type'] == 'radio' && isset( $array['required'] ) && $array['required'] == 1 && !isset( $args[$key] ) && !in_array($key, array('role_radio','role_select') ) ) {
|
168 |
$ultimatemember->form->add_error($key, sprintf(__('%s is required.','ultimatemember'), $array['title'] ) );
|
169 |
}
|
170 |
-
|
171 |
if ( isset( $array['type'] ) && $array['type'] == 'multiselect' && isset( $array['required'] ) && $array['required'] == 1 && !isset( $args[$key] ) && !in_array($key, array('role_radio','role_select') ) ) {
|
172 |
$ultimatemember->form->add_error($key, sprintf(__('%s is required.','ultimatemember'), $array['title'] ) );
|
173 |
}
|
174 |
-
|
175 |
if ( $key == 'role_select' || $key == 'role_radio' ) {
|
176 |
if ( isset( $array['required'] ) && $array['required'] == 1 && ( !isset( $args['role'] ) || empty( $args['role'] ) ) ) {
|
177 |
$ultimatemember->form->add_error('role', __('Please specify account type.','ultimatemember') );
|
178 |
}
|
179 |
}
|
180 |
-
|
181 |
if ( isset( $args[$key] ) ) {
|
182 |
|
183 |
if ( isset( $array['required'] ) && $array['required'] == 1 ) {
|
@@ -185,37 +183,37 @@
|
|
185 |
$ultimatemember->form->add_error($key, sprintf( __('%s is required','ultimatemember'), $array['label'] ) );
|
186 |
}
|
187 |
}
|
188 |
-
|
189 |
if ( isset( $array['max_words'] ) && $array['max_words'] > 0 ) {
|
190 |
if ( str_word_count( $args[$key] ) > $array['max_words'] ) {
|
191 |
$ultimatemember->form->add_error($key, sprintf(__('You are only allowed to enter a maximum of %s words','ultimatemember'), $array['max_words']) );
|
192 |
}
|
193 |
}
|
194 |
-
|
195 |
if ( isset( $array['min_chars'] ) && $array['min_chars'] > 0 ) {
|
196 |
if ( $args[$key] && strlen( utf8_decode( $args[$key] ) ) < $array['min_chars'] ) {
|
197 |
$ultimatemember->form->add_error($key, sprintf(__('Your %s must contain at least %s characters','ultimatemember'), $array['label'], $array['min_chars']) );
|
198 |
-
}
|
199 |
}
|
200 |
-
|
201 |
if ( isset( $array['max_chars'] ) && $array['max_chars'] > 0 ) {
|
202 |
if ( $args[$key] && strlen( utf8_decode( $args[$key] ) ) > $array['max_chars'] ) {
|
203 |
$ultimatemember->form->add_error($key, sprintf(__('Your %s must contain less than %s characters','ultimatemember'), $array['label'], $array['max_chars']) );
|
204 |
}
|
205 |
}
|
206 |
-
|
207 |
if ( isset( $array['html'] ) && $array['html'] == 0 ) {
|
208 |
if ( wp_strip_all_tags( $args[$key] ) != trim( $args[$key] ) ) {
|
209 |
$ultimatemember->form->add_error($key, __('You can not use HTML tags here','ultimatemember') );
|
210 |
}
|
211 |
}
|
212 |
-
|
213 |
if ( isset( $array['force_good_pass'] ) && $array['force_good_pass'] == 1 ) {
|
214 |
if ( !$ultimatemember->validation->strong_pass( $args[$key] ) ) {
|
215 |
$ultimatemember->form->add_error($key, __('Your password must contain at least one lowercase letter, one capital letter and one number','ultimatemember') );
|
216 |
}
|
217 |
}
|
218 |
-
|
219 |
if ( isset( $array['force_confirm_pass'] ) && $array['force_confirm_pass'] == 1 ) {
|
220 |
if ( $args[ 'confirm_' . $key] == '' && !$ultimatemember->form->has_error($key) ) {
|
221 |
$ultimatemember->form->add_error( 'confirm_' . $key , __('Please confirm your password','ultimatemember') );
|
@@ -224,58 +222,58 @@
|
|
224 |
$ultimatemember->form->add_error( 'confirm_' . $key , __('Your passwords do not match','ultimatemember') );
|
225 |
}
|
226 |
}
|
227 |
-
|
228 |
if ( isset( $array['min_selections'] ) && $array['min_selections'] > 0 ) {
|
229 |
if ( ( !isset($args[$key]) ) || ( isset( $args[$key] ) && is_array($args[$key]) && count( $args[$key] ) < $array['min_selections'] ) ) {
|
230 |
$ultimatemember->form->add_error($key, sprintf(__('Please select at least %s choices','ultimatemember'), $array['min_selections'] ) );
|
231 |
}
|
232 |
}
|
233 |
-
|
234 |
if ( isset( $array['max_selections'] ) && $array['max_selections'] > 0 ) {
|
235 |
if ( isset( $args[$key] ) && is_array($args[$key]) && count( $args[$key] ) > $array['max_selections'] ) {
|
236 |
$ultimatemember->form->add_error($key, sprintf(__('You can only select up to %s choices','ultimatemember'), $array['max_selections'] ) );
|
237 |
}
|
238 |
}
|
239 |
-
|
240 |
if ( isset( $array['validate'] ) && !empty( $array['validate'] ) ) {
|
241 |
-
|
242 |
switch( $array['validate'] ) {
|
243 |
-
|
244 |
case 'custom':
|
245 |
$custom = $array['custom_validate'];
|
246 |
do_action("um_custom_field_validation_{$custom}", $key, $array, $args );
|
247 |
break;
|
248 |
-
|
249 |
case 'numeric':
|
250 |
if ( $args[$key] && !is_numeric( $args[$key] ) ) {
|
251 |
$ultimatemember->form->add_error($key, __('Please enter numbers only in this field','ultimatemember') );
|
252 |
}
|
253 |
break;
|
254 |
-
|
255 |
case 'phone_number':
|
256 |
if ( !$ultimatemember->validation->is_phone_number( $args[$key] ) ) {
|
257 |
$ultimatemember->form->add_error($key, __('Please enter a valid phone number','ultimatemember') );
|
258 |
}
|
259 |
break;
|
260 |
-
|
261 |
case 'youtube_url':
|
262 |
if ( !$ultimatemember->validation->is_url( $args[$key], 'youtube.com' ) ) {
|
263 |
$ultimatemember->form->add_error($key, sprintf(__('Please enter a valid %s username or profile URL','ultimatemember'), $array['label'] ) );
|
264 |
}
|
265 |
break;
|
266 |
-
|
267 |
case 'soundcloud_url':
|
268 |
if ( !$ultimatemember->validation->is_url( $args[$key], 'soundcloud.com' ) ) {
|
269 |
$ultimatemember->form->add_error($key, sprintf(__('Please enter a valid %s username or profile URL','ultimatemember'), $array['label'] ) );
|
270 |
}
|
271 |
break;
|
272 |
-
|
273 |
case 'facebook_url':
|
274 |
if ( !$ultimatemember->validation->is_url( $args[$key], 'facebook.com' ) ) {
|
275 |
$ultimatemember->form->add_error($key, sprintf(__('Please enter a valid %s username or profile URL','ultimatemember'), $array['label'] ) );
|
276 |
}
|
277 |
break;
|
278 |
-
|
279 |
case 'twitter_url':
|
280 |
if ( !$ultimatemember->validation->is_url( $args[$key], 'twitter.com' ) ) {
|
281 |
$ultimatemember->form->add_error($key, sprintf(__('Please enter a valid %s username or profile URL','ultimatemember'), $array['label'] ) );
|
@@ -287,33 +285,39 @@
|
|
287 |
$ultimatemember->form->add_error($key, sprintf(__('Please enter a valid %s username or profile URL','ultimatemember'), $array['label'] ) );
|
288 |
}
|
289 |
break;
|
290 |
-
|
291 |
case 'google_url':
|
292 |
if ( !$ultimatemember->validation->is_url( $args[$key], 'plus.google.com' ) ) {
|
293 |
$ultimatemember->form->add_error($key, sprintf(__('Please enter a valid %s username or profile URL','ultimatemember'), $array['label'] ) );
|
294 |
}
|
295 |
break;
|
296 |
-
|
297 |
case 'linkedin_url':
|
298 |
if ( !$ultimatemember->validation->is_url( $args[$key], 'linkedin.com' ) ) {
|
299 |
$ultimatemember->form->add_error($key, sprintf(__('Please enter a valid %s username or profile URL','ultimatemember'), $array['label'] ) );
|
300 |
}
|
301 |
break;
|
302 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
303 |
case 'url':
|
304 |
if ( !$ultimatemember->validation->is_url( $args[$key] ) ) {
|
305 |
$ultimatemember->form->add_error($key, __('Please enter a valid URL','ultimatemember') );
|
306 |
}
|
307 |
break;
|
308 |
-
|
309 |
case 'skype':
|
310 |
if ( !$ultimatemember->validation->is_url( $args[$key], 'skype.com' ) ) {
|
311 |
$ultimatemember->form->add_error($key, sprintf(__('Please enter a valid %s username or profile URL','ultimatemember'), $array['label'] ) );
|
312 |
}
|
313 |
break;
|
314 |
-
|
315 |
case 'unique_username':
|
316 |
-
|
317 |
if ( $args[$key] == '' ) {
|
318 |
$ultimatemember->form->add_error($key, __('You must provide a username','ultimatemember') );
|
319 |
} else if ( $mode == 'register' && username_exists( sanitize_user( $args[$key] ) ) ) {
|
@@ -323,11 +327,11 @@
|
|
323 |
} else if ( !$ultimatemember->validation->safe_username( $args[$key] ) ) {
|
324 |
$ultimatemember->form->add_error($key, __('Your username contains invalid characters','ultimatemember') );
|
325 |
}
|
326 |
-
|
327 |
break;
|
328 |
-
|
329 |
case 'unique_username_or_email':
|
330 |
-
|
331 |
if ( $args[$key] == '' ) {
|
332 |
$ultimatemember->form->add_error($key, __('You must provide a username','ultimatemember') );
|
333 |
} else if ( $mode == 'register' && username_exists( sanitize_user( $args[$key] ) ) ) {
|
@@ -337,13 +341,13 @@
|
|
337 |
} else if ( !$ultimatemember->validation->safe_username( $args[$key] ) ) {
|
338 |
$ultimatemember->form->add_error($key, __('Your username contains invalid characters','ultimatemember') );
|
339 |
}
|
340 |
-
|
341 |
break;
|
342 |
-
|
343 |
case 'unique_email':
|
344 |
-
|
345 |
if ( in_array( $key, array('user_email') ) ) {
|
346 |
-
|
347 |
if ( $args[$key] == '' && in_array( $key, array('user_email') ) ) {
|
348 |
$ultimatemember->form->add_error($key, __('You must provide your email','ultimatemember') );
|
349 |
} else if ( $mode == 'register' && email_exists( $args[$key] ) ) {
|
@@ -353,23 +357,23 @@
|
|
353 |
} else if ( !$ultimatemember->validation->safe_username( $args[$key] ) ) {
|
354 |
$ultimatemember->form->add_error($key, __('Your email contains invalid characters','ultimatemember') );
|
355 |
}
|
356 |
-
|
357 |
} else {
|
358 |
-
|
359 |
if ( $args[$key] != '' && !is_email($args[$key]) ) {
|
360 |
$ultimatemember->form->add_error($key, __('This is not a valid email','ultimatemember') );
|
361 |
} else if ( $args[$key] != '' && email_exists( $args[$key] ) ) {
|
362 |
$ultimatemember->form->add_error($key, __('This email is already linked to an existing account','ultimatemember') );
|
363 |
}
|
364 |
-
|
365 |
}
|
366 |
-
|
367 |
break;
|
368 |
|
369 |
case 'unique_value':
|
370 |
|
371 |
if ( $args[$key] != '' ) {
|
372 |
-
|
373 |
$args_unique_meta = array(
|
374 |
'meta_key' => $key,
|
375 |
'meta_value' => $args[ $key ],
|
@@ -378,26 +382,26 @@
|
|
378 |
);
|
379 |
|
380 |
$meta_key_exists = get_users( $args_unique_meta );
|
381 |
-
|
382 |
if( $meta_key_exists ){
|
383 |
$ultimatemember->form->add_error( $key , __('You must provide a unique value','ultimatemember') );
|
384 |
}
|
385 |
}
|
386 |
break;
|
387 |
-
|
388 |
}
|
389 |
-
|
390 |
}
|
391 |
-
|
392 |
}
|
393 |
-
|
394 |
if ( isset( $args['description'] ) ) {
|
395 |
$max_chars = um_get_option('profile_bio_maxchars');
|
396 |
if ( strlen( utf8_decode( $args['description'] ) ) > $max_chars && $max_chars ) {
|
397 |
$ultimatemember->form->add_error('description', sprintf(__('Your user description must contain less than %s characters','ultimatemember'), $max_chars ) );
|
398 |
}
|
399 |
}
|
400 |
-
|
401 |
} // end if ( isset in args array )
|
402 |
}
|
403 |
-
}
|
6 |
add_action('um_submit_form_errors_hook__registration', 'um_submit_form_errors_hook__registration', 10);
|
7 |
function um_submit_form_errors_hook__registration($args){
|
8 |
global $ultimatemember;
|
9 |
+
|
10 |
$can_register = get_option('users_can_register');
|
11 |
if ( !$can_register ) {
|
12 |
exit( wp_redirect( esc_url( add_query_arg('err', 'registration_disabled') ) ) );
|
13 |
}
|
14 |
+
|
15 |
}
|
16 |
+
|
17 |
/***
|
18 |
*** @Error handling: blocked emails
|
19 |
***/
|
20 |
add_action('um_submit_form_errors_hook__blockedemails', 'um_submit_form_errors_hook__blockedemails', 10);
|
21 |
function um_submit_form_errors_hook__blockedemails($args){
|
22 |
global $ultimatemember;
|
23 |
+
|
24 |
$emails = um_get_option('blocked_emails');
|
25 |
if ( !$emails )
|
26 |
return;
|
27 |
+
|
28 |
$emails = array_map("rtrim", explode("\n", $emails));
|
29 |
+
|
30 |
if ( isset( $args['user_email'] ) && is_email( $args['user_email'] ) ) {
|
31 |
+
|
32 |
$domain = explode('@', $args['user_email'] );
|
33 |
$check_domain = str_replace($domain[0], '*', $args['user_email']);
|
34 |
|
35 |
if ( in_array( $args['user_email'], $emails ) )
|
36 |
exit( wp_redirect( esc_url( add_query_arg('err', 'blocked_email') ) ) );
|
37 |
+
|
38 |
if ( in_array( $check_domain, $emails ) )
|
39 |
exit( wp_redirect( esc_url( add_query_arg('err', 'blocked_domain') ) ) );
|
40 |
+
|
41 |
}
|
42 |
+
|
43 |
if ( isset( $args['username'] ) && is_email( $args['username'] ) ) {
|
44 |
+
|
45 |
$domain = explode('@', $args['username'] );
|
46 |
$check_domain = str_replace($domain[0], '*', $args['username']);
|
47 |
+
|
48 |
if ( in_array( $args['username'], $emails ) )
|
49 |
exit( wp_redirect( esc_url( add_query_arg('err', 'blocked_email') ) ) );
|
50 |
|
51 |
if ( in_array( $check_domain, $emails ) )
|
52 |
exit( wp_redirect( esc_url( add_query_arg('err', 'blocked_domain') ) ) );
|
53 |
+
|
54 |
}
|
55 |
+
|
56 |
}
|
57 |
+
|
58 |
/***
|
59 |
*** @Error handling: blocked IPs
|
60 |
***/
|
61 |
add_action('um_submit_form_errors_hook__blockedips', 'um_submit_form_errors_hook__blockedips', 10);
|
62 |
function um_submit_form_errors_hook__blockedips($args){
|
63 |
global $ultimatemember;
|
64 |
+
|
65 |
$ips = um_get_option('blocked_ips');
|
66 |
if ( !$ips )
|
67 |
return;
|
68 |
+
|
69 |
$ips = array_map("rtrim", explode("\n", $ips));
|
70 |
$user_ip = um_user_ip();
|
71 |
+
|
72 |
foreach($ips as $ip) {
|
73 |
$ip = str_replace('*','',$ip);
|
74 |
if (strpos($user_ip, $ip) === 0) {
|
76 |
}
|
77 |
}
|
78 |
}
|
79 |
+
|
80 |
/***
|
81 |
*** @Error handling: blocked words during sign up
|
82 |
***/
|
83 |
add_action('um_submit_form_errors_hook__blockedwords', 'um_submit_form_errors_hook__blockedwords', 10);
|
84 |
function um_submit_form_errors_hook__blockedwords($args){
|
85 |
global $ultimatemember;
|
86 |
+
|
87 |
$form_id = $args['form_id'];
|
88 |
$mode = $args['mode'];
|
89 |
$fields = unserialize( $args['custom_fields'] );
|
90 |
+
|
91 |
$words = um_get_option('blocked_words');
|
92 |
if ( $words != '' ) {
|
93 |
+
|
94 |
$words = array_map("rtrim", explode("\n", $words));
|
95 |
+
if( isset( $fields ) ){
|
96 |
foreach( $fields as $key => $array ) {
|
97 |
+
if ( isset($array['validate']) && in_array( $array['validate'], array('unique_username','unique_email','unique_username_or_email') ) ) {
|
98 |
+
if ( !$ultimatemember->form->has_error( $key ) && in_array( $args[$key], $words ) ) {
|
99 |
+
$ultimatemember->form->add_error( $key, __('You are not allowed to use this word as your username.','ultimatemember') );
|
|
|
|
|
100 |
}
|
101 |
}
|
102 |
}
|
103 |
}
|
104 |
|
105 |
}
|
106 |
+
|
107 |
}
|
108 |
+
|
109 |
/***
|
110 |
*** @Error handling
|
111 |
***/
|
112 |
add_action('um_submit_form_errors_hook', 'um_submit_form_errors_hook', 10);
|
113 |
function um_submit_form_errors_hook( $args ){
|
114 |
global $ultimatemember;
|
115 |
+
|
116 |
$form_id = $args['form_id'];
|
117 |
+
|
118 |
$mode = $args['mode'];
|
119 |
+
|
120 |
$fields = unserialize( $args['custom_fields'] );
|
121 |
+
|
122 |
if ( $mode == 'register' ){
|
123 |
+
|
124 |
do_action("um_submit_form_errors_hook__registration", $args );
|
125 |
+
|
126 |
}
|
127 |
+
|
128 |
do_action("um_submit_form_errors_hook__blockedips", $args );
|
129 |
do_action("um_submit_form_errors_hook__blockedemails", $args );
|
130 |
|
131 |
if ( $mode == 'login' ) {
|
132 |
+
|
133 |
do_action('um_submit_form_errors_hook_login', $args );
|
134 |
do_action('um_submit_form_errors_hook_logincheck', $args );
|
135 |
+
|
136 |
} else {
|
137 |
+
|
138 |
do_action('um_submit_form_errors_hook_', $args );
|
139 |
do_action("um_submit_form_errors_hook__blockedwords", $args );
|
140 |
+
|
141 |
}
|
142 |
+
|
143 |
}
|
144 |
|
145 |
/***
|
148 |
add_action('um_submit_form_errors_hook_', 'um_submit_form_errors_hook_', 10);
|
149 |
function um_submit_form_errors_hook_( $args ){
|
150 |
global $ultimatemember;
|
151 |
+
|
152 |
$form_id = $args['form_id'];
|
153 |
$mode = $args['mode'];
|
154 |
$fields = unserialize( $args['custom_fields'] );
|
155 |
+
|
156 |
if( isset( $fields ) && ! empty( $fields ) ){
|
157 |
foreach( $fields as $key => $array ) {
|
158 |
+
|
159 |
$array = apply_filters('um_get_custom_field_array', $array, $fields );
|
160 |
|
161 |
if ( isset( $array['type'] ) && $array['type'] == 'checkbox' && isset( $array['required'] ) && $array['required'] == 1 && !isset( $args[$key] ) ) {
|
162 |
$ultimatemember->form->add_error($key, sprintf(__('%s is required.','ultimatemember'), $array['title'] ) );
|
163 |
}
|
164 |
+
|
165 |
if ( isset( $array['type'] ) && $array['type'] == 'radio' && isset( $array['required'] ) && $array['required'] == 1 && !isset( $args[$key] ) && !in_array($key, array('role_radio','role_select') ) ) {
|
166 |
$ultimatemember->form->add_error($key, sprintf(__('%s is required.','ultimatemember'), $array['title'] ) );
|
167 |
}
|
168 |
+
|
169 |
if ( isset( $array['type'] ) && $array['type'] == 'multiselect' && isset( $array['required'] ) && $array['required'] == 1 && !isset( $args[$key] ) && !in_array($key, array('role_radio','role_select') ) ) {
|
170 |
$ultimatemember->form->add_error($key, sprintf(__('%s is required.','ultimatemember'), $array['title'] ) );
|
171 |
}
|
172 |
+
|
173 |
if ( $key == 'role_select' || $key == 'role_radio' ) {
|
174 |
if ( isset( $array['required'] ) && $array['required'] == 1 && ( !isset( $args['role'] ) || empty( $args['role'] ) ) ) {
|
175 |
$ultimatemember->form->add_error('role', __('Please specify account type.','ultimatemember') );
|
176 |
}
|
177 |
}
|
178 |
+
|
179 |
if ( isset( $args[$key] ) ) {
|
180 |
|
181 |
if ( isset( $array['required'] ) && $array['required'] == 1 ) {
|
183 |
$ultimatemember->form->add_error($key, sprintf( __('%s is required','ultimatemember'), $array['label'] ) );
|
184 |
}
|
185 |
}
|
186 |
+
|
187 |
if ( isset( $array['max_words'] ) && $array['max_words'] > 0 ) {
|
188 |
if ( str_word_count( $args[$key] ) > $array['max_words'] ) {
|
189 |
$ultimatemember->form->add_error($key, sprintf(__('You are only allowed to enter a maximum of %s words','ultimatemember'), $array['max_words']) );
|
190 |
}
|
191 |
}
|
192 |
+
|
193 |
if ( isset( $array['min_chars'] ) && $array['min_chars'] > 0 ) {
|
194 |
if ( $args[$key] && strlen( utf8_decode( $args[$key] ) ) < $array['min_chars'] ) {
|
195 |
$ultimatemember->form->add_error($key, sprintf(__('Your %s must contain at least %s characters','ultimatemember'), $array['label'], $array['min_chars']) );
|
196 |
+
}
|
197 |
}
|
198 |
+
|
199 |
if ( isset( $array['max_chars'] ) && $array['max_chars'] > 0 ) {
|
200 |
if ( $args[$key] && strlen( utf8_decode( $args[$key] ) ) > $array['max_chars'] ) {
|
201 |
$ultimatemember->form->add_error($key, sprintf(__('Your %s must contain less than %s characters','ultimatemember'), $array['label'], $array['max_chars']) );
|
202 |
}
|
203 |
}
|
204 |
+
|
205 |
if ( isset( $array['html'] ) && $array['html'] == 0 ) {
|
206 |
if ( wp_strip_all_tags( $args[$key] ) != trim( $args[$key] ) ) {
|
207 |
$ultimatemember->form->add_error($key, __('You can not use HTML tags here','ultimatemember') );
|
208 |
}
|
209 |
}
|
210 |
+
|
211 |
if ( isset( $array['force_good_pass'] ) && $array['force_good_pass'] == 1 ) {
|
212 |
if ( !$ultimatemember->validation->strong_pass( $args[$key] ) ) {
|
213 |
$ultimatemember->form->add_error($key, __('Your password must contain at least one lowercase letter, one capital letter and one number','ultimatemember') );
|
214 |
}
|
215 |
}
|
216 |
+
|
217 |
if ( isset( $array['force_confirm_pass'] ) && $array['force_confirm_pass'] == 1 ) {
|
218 |
if ( $args[ 'confirm_' . $key] == '' && !$ultimatemember->form->has_error($key) ) {
|
219 |
$ultimatemember->form->add_error( 'confirm_' . $key , __('Please confirm your password','ultimatemember') );
|
222 |
$ultimatemember->form->add_error( 'confirm_' . $key , __('Your passwords do not match','ultimatemember') );
|
223 |
}
|
224 |
}
|
225 |
+
|
226 |
if ( isset( $array['min_selections'] ) && $array['min_selections'] > 0 ) {
|
227 |
if ( ( !isset($args[$key]) ) || ( isset( $args[$key] ) && is_array($args[$key]) && count( $args[$key] ) < $array['min_selections'] ) ) {
|
228 |
$ultimatemember->form->add_error($key, sprintf(__('Please select at least %s choices','ultimatemember'), $array['min_selections'] ) );
|
229 |
}
|
230 |
}
|
231 |
+
|
232 |
if ( isset( $array['max_selections'] ) && $array['max_selections'] > 0 ) {
|
233 |
if ( isset( $args[$key] ) && is_array($args[$key]) && count( $args[$key] ) > $array['max_selections'] ) {
|
234 |
$ultimatemember->form->add_error($key, sprintf(__('You can only select up to %s choices','ultimatemember'), $array['max_selections'] ) );
|
235 |
}
|
236 |
}
|
237 |
+
|
238 |
if ( isset( $array['validate'] ) && !empty( $array['validate'] ) ) {
|
239 |
+
|
240 |
switch( $array['validate'] ) {
|
241 |
+
|
242 |
case 'custom':
|
243 |
$custom = $array['custom_validate'];
|
244 |
do_action("um_custom_field_validation_{$custom}", $key, $array, $args );
|
245 |
break;
|
246 |
+
|
247 |
case 'numeric':
|
248 |
if ( $args[$key] && !is_numeric( $args[$key] ) ) {
|
249 |
$ultimatemember->form->add_error($key, __('Please enter numbers only in this field','ultimatemember') );
|
250 |
}
|
251 |
break;
|
252 |
+
|
253 |
case 'phone_number':
|
254 |
if ( !$ultimatemember->validation->is_phone_number( $args[$key] ) ) {
|
255 |
$ultimatemember->form->add_error($key, __('Please enter a valid phone number','ultimatemember') );
|
256 |
}
|
257 |
break;
|
258 |
+
|
259 |
case 'youtube_url':
|
260 |
if ( !$ultimatemember->validation->is_url( $args[$key], 'youtube.com' ) ) {
|
261 |
$ultimatemember->form->add_error($key, sprintf(__('Please enter a valid %s username or profile URL','ultimatemember'), $array['label'] ) );
|
262 |
}
|
263 |
break;
|
264 |
+
|
265 |
case 'soundcloud_url':
|
266 |
if ( !$ultimatemember->validation->is_url( $args[$key], 'soundcloud.com' ) ) {
|
267 |
$ultimatemember->form->add_error($key, sprintf(__('Please enter a valid %s username or profile URL','ultimatemember'), $array['label'] ) );
|
268 |
}
|
269 |
break;
|
270 |
+
|
271 |
case 'facebook_url':
|
272 |
if ( !$ultimatemember->validation->is_url( $args[$key], 'facebook.com' ) ) {
|
273 |
$ultimatemember->form->add_error($key, sprintf(__('Please enter a valid %s username or profile URL','ultimatemember'), $array['label'] ) );
|
274 |
}
|
275 |
break;
|
276 |
+
|
277 |
case 'twitter_url':
|
278 |
if ( !$ultimatemember->validation->is_url( $args[$key], 'twitter.com' ) ) {
|
279 |
$ultimatemember->form->add_error($key, sprintf(__('Please enter a valid %s username or profile URL','ultimatemember'), $array['label'] ) );
|
285 |
$ultimatemember->form->add_error($key, sprintf(__('Please enter a valid %s username or profile URL','ultimatemember'), $array['label'] ) );
|
286 |
}
|
287 |
break;
|
288 |
+
|
289 |
case 'google_url':
|
290 |
if ( !$ultimatemember->validation->is_url( $args[$key], 'plus.google.com' ) ) {
|
291 |
$ultimatemember->form->add_error($key, sprintf(__('Please enter a valid %s username or profile URL','ultimatemember'), $array['label'] ) );
|
292 |
}
|
293 |
break;
|
294 |
+
|
295 |
case 'linkedin_url':
|
296 |
if ( !$ultimatemember->validation->is_url( $args[$key], 'linkedin.com' ) ) {
|
297 |
$ultimatemember->form->add_error($key, sprintf(__('Please enter a valid %s username or profile URL','ultimatemember'), $array['label'] ) );
|
298 |
}
|
299 |
break;
|
300 |
+
|
301 |
+
case 'vk_url':
|
302 |
+
if ( !$ultimatemember->validation->is_url( $args[$key], 'vk.com' ) ) {
|
303 |
+
$ultimatemember->form->add_error($key, sprintf(__('Please enter a valid %s username or profile URL','ultimatemember'), $array['label'] ) );
|
304 |
+
}
|
305 |
+
break;
|
306 |
+
|
307 |
case 'url':
|
308 |
if ( !$ultimatemember->validation->is_url( $args[$key] ) ) {
|
309 |
$ultimatemember->form->add_error($key, __('Please enter a valid URL','ultimatemember') );
|
310 |
}
|
311 |
break;
|
312 |
+
|
313 |
case 'skype':
|
314 |
if ( !$ultimatemember->validation->is_url( $args[$key], 'skype.com' ) ) {
|
315 |
$ultimatemember->form->add_error($key, sprintf(__('Please enter a valid %s username or profile URL','ultimatemember'), $array['label'] ) );
|
316 |
}
|
317 |
break;
|
318 |
+
|
319 |
case 'unique_username':
|
320 |
+
|
321 |
if ( $args[$key] == '' ) {
|
322 |
$ultimatemember->form->add_error($key, __('You must provide a username','ultimatemember') );
|
323 |
} else if ( $mode == 'register' && username_exists( sanitize_user( $args[$key] ) ) ) {
|
327 |
} else if ( !$ultimatemember->validation->safe_username( $args[$key] ) ) {
|
328 |
$ultimatemember->form->add_error($key, __('Your username contains invalid characters','ultimatemember') );
|
329 |
}
|
330 |
+
|
331 |
break;
|
332 |
+
|
333 |
case 'unique_username_or_email':
|
334 |
+
|
335 |
if ( $args[$key] == '' ) {
|
336 |
$ultimatemember->form->add_error($key, __('You must provide a username','ultimatemember') );
|
337 |
} else if ( $mode == 'register' && username_exists( sanitize_user( $args[$key] ) ) ) {
|
341 |
} else if ( !$ultimatemember->validation->safe_username( $args[$key] ) ) {
|
342 |
$ultimatemember->form->add_error($key, __('Your username contains invalid characters','ultimatemember') );
|
343 |
}
|
344 |
+
|
345 |
break;
|
346 |
+
|
347 |
case 'unique_email':
|
348 |
+
|
349 |
if ( in_array( $key, array('user_email') ) ) {
|
350 |
+
|
351 |
if ( $args[$key] == '' && in_array( $key, array('user_email') ) ) {
|
352 |
$ultimatemember->form->add_error($key, __('You must provide your email','ultimatemember') );
|
353 |
} else if ( $mode == 'register' && email_exists( $args[$key] ) ) {
|
357 |
} else if ( !$ultimatemember->validation->safe_username( $args[$key] ) ) {
|
358 |
$ultimatemember->form->add_error($key, __('Your email contains invalid characters','ultimatemember') );
|
359 |
}
|
360 |
+
|
361 |
} else {
|
362 |
+
|
363 |
if ( $args[$key] != '' && !is_email($args[$key]) ) {
|
364 |
$ultimatemember->form->add_error($key, __('This is not a valid email','ultimatemember') );
|
365 |
} else if ( $args[$key] != '' && email_exists( $args[$key] ) ) {
|
366 |
$ultimatemember->form->add_error($key, __('This email is already linked to an existing account','ultimatemember') );
|
367 |
}
|
368 |
+
|
369 |
}
|
370 |
+
|
371 |
break;
|
372 |
|
373 |
case 'unique_value':
|
374 |
|
375 |
if ( $args[$key] != '' ) {
|
376 |
+
|
377 |
$args_unique_meta = array(
|
378 |
'meta_key' => $key,
|
379 |
'meta_value' => $args[ $key ],
|
382 |
);
|
383 |
|
384 |
$meta_key_exists = get_users( $args_unique_meta );
|
385 |
+
|
386 |
if( $meta_key_exists ){
|
387 |
$ultimatemember->form->add_error( $key , __('You must provide a unique value','ultimatemember') );
|
388 |
}
|
389 |
}
|
390 |
break;
|
391 |
+
|
392 |
}
|
393 |
+
|
394 |
}
|
395 |
+
|
396 |
}
|
397 |
+
|
398 |
if ( isset( $args['description'] ) ) {
|
399 |
$max_chars = um_get_option('profile_bio_maxchars');
|
400 |
if ( strlen( utf8_decode( $args['description'] ) ) > $max_chars && $max_chars ) {
|
401 |
$ultimatemember->form->add_error('description', sprintf(__('Your user description must contain less than %s characters','ultimatemember'), $max_chars ) );
|
402 |
}
|
403 |
}
|
404 |
+
|
405 |
} // end if ( isset in args array )
|
406 |
}
|
407 |
+
}
|
core/um-actions-global.php
CHANGED
@@ -1,55 +1,56 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/***
|
4 |
*** @adds a form identifier to form
|
5 |
***/
|
6 |
add_action('um_after_form_fields', 'um_add_form_identifier');
|
7 |
function um_add_form_identifier($args){ ?>
|
8 |
-
|
9 |
<input type="hidden" name="form_id" id="form_id" value="<?php echo $args['form_id']; ?>" />
|
10 |
|
11 |
<?php
|
12 |
}
|
13 |
-
|
14 |
/***
|
15 |
*** @adds a spam timestamp
|
16 |
***/
|
17 |
add_action('um_after_form_fields', 'um_add_security_checks');
|
|
|
18 |
function um_add_security_checks($args){
|
19 |
global $ultimatemember;
|
20 |
-
|
21 |
if ( is_admin() ) return;
|
22 |
-
|
23 |
echo '<input type="hidden" name="timestamp" id="timestamp" value="'. current_time( 'timestamp' ) .'" />';
|
24 |
-
|
25 |
?>
|
26 |
-
|
27 |
<p class="<?php echo $ultimatemember->honeypot; ?>_name">
|
28 |
<label for="<?php echo $ultimatemember->honeypot; ?>"><?php _e( 'Only fill in if you are not human' ); ?></label>
|
29 |
<input type="text" name="<?php echo $ultimatemember->honeypot; ?>" id="<?php echo $ultimatemember->honeypot; ?>" class="input" value="" size="25" autocomplete="off" />
|
30 |
</p>
|
31 |
-
|
32 |
<?php
|
33 |
|
34 |
}
|
35 |
-
|
36 |
/***
|
37 |
*** @makes the honeypot invisible
|
38 |
***/
|
39 |
add_action('wp_head', 'um_add_form_honeypot_css');
|
40 |
function um_add_form_honeypot_css() { global $ultimatemember; ?>
|
41 |
-
|
42 |
<style type="text/css">.<?php echo $ultimatemember->honeypot; ?>_name { display: none !important; }</style>
|
43 |
-
|
44 |
<?php }
|
45 |
-
|
46 |
/***
|
47 |
*** @empty the honeypot value
|
48 |
***/
|
49 |
add_action('wp_footer', 'um_add_form_honeypot_js', 99999999999999999 );
|
50 |
function um_add_form_honeypot_js() { global $ultimatemember; ?>
|
51 |
-
|
52 |
<script type="text/javascript">jQuery( '#<?php echo $ultimatemember->honeypot; ?>' ).val( '' );</script>
|
53 |
-
|
54 |
<?php
|
55 |
-
}
|
1 |
<?php
|
2 |
+
|
3 |
/***
|
4 |
*** @adds a form identifier to form
|
5 |
***/
|
6 |
add_action('um_after_form_fields', 'um_add_form_identifier');
|
7 |
function um_add_form_identifier($args){ ?>
|
8 |
+
|
9 |
<input type="hidden" name="form_id" id="form_id" value="<?php echo $args['form_id']; ?>" />
|
10 |
|
11 |
<?php
|
12 |
}
|
13 |
+
|
14 |
/***
|
15 |
*** @adds a spam timestamp
|
16 |
***/
|
17 |
add_action('um_after_form_fields', 'um_add_security_checks');
|
18 |
+
add_action('um_account_page_hidden_fields', 'um_add_security_checks');
|
19 |
function um_add_security_checks($args){
|
20 |
global $ultimatemember;
|
21 |
+
|
22 |
if ( is_admin() ) return;
|
23 |
+
|
24 |
echo '<input type="hidden" name="timestamp" id="timestamp" value="'. current_time( 'timestamp' ) .'" />';
|
25 |
+
|
26 |
?>
|
27 |
+
|
28 |
<p class="<?php echo $ultimatemember->honeypot; ?>_name">
|
29 |
<label for="<?php echo $ultimatemember->honeypot; ?>"><?php _e( 'Only fill in if you are not human' ); ?></label>
|
30 |
<input type="text" name="<?php echo $ultimatemember->honeypot; ?>" id="<?php echo $ultimatemember->honeypot; ?>" class="input" value="" size="25" autocomplete="off" />
|
31 |
</p>
|
32 |
+
|
33 |
<?php
|
34 |
|
35 |
}
|
36 |
+
|
37 |
/***
|
38 |
*** @makes the honeypot invisible
|
39 |
***/
|
40 |
add_action('wp_head', 'um_add_form_honeypot_css');
|
41 |
function um_add_form_honeypot_css() { global $ultimatemember; ?>
|
42 |
+
|
43 |
<style type="text/css">.<?php echo $ultimatemember->honeypot; ?>_name { display: none !important; }</style>
|
44 |
+
|
45 |
<?php }
|
46 |
+
|
47 |
/***
|
48 |
*** @empty the honeypot value
|
49 |
***/
|
50 |
add_action('wp_footer', 'um_add_form_honeypot_js', 99999999999999999 );
|
51 |
function um_add_form_honeypot_js() { global $ultimatemember; ?>
|
52 |
+
|
53 |
<script type="text/javascript">jQuery( '#<?php echo $ultimatemember->honeypot; ?>' ).val( '' );</script>
|
54 |
+
|
55 |
<?php
|
56 |
+
}
|
core/um-actions-members.php
CHANGED
@@ -78,10 +78,10 @@
|
|
78 |
*** @pre-display members directory
|
79 |
***/
|
80 |
add_action('um_pre_directory_shortcode', 'um_pre_directory_shortcode');
|
81 |
-
function um_pre_directory_shortcode($args){
|
82 |
global $ultimatemember;
|
83 |
extract( $args );
|
84 |
-
|
85 |
$ultimatemember->members->results = $ultimatemember->members->get_members( $args );
|
86 |
|
87 |
}
|
@@ -204,138 +204,21 @@
|
|
204 |
|
205 |
?>
|
206 |
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
|
211 |
<?php
|
212 |
-
|
213 |
-
}
|
214 |
-
|
215 |
-
if ( um_members('users_per_page') ) {
|
216 |
|
217 |
-
|
218 |
-
|
219 |
-
<div class="um-members">
|
220 |
-
|
221 |
-
<div class="um-gutter-sizer"></div>
|
222 |
-
|
223 |
-
<?php $i = 0; foreach( um_members('users_per_page') as $member) { $i++; um_fetch_user( $member ); ?>
|
224 |
-
|
225 |
-
<div class="um-member um-role-<?php echo um_user('role'); ?> <?php echo um_user('account_status'); ?> <?php if ($cover_photos) { echo 'with-cover'; } ?>">
|
226 |
-
|
227 |
-
<span class="um-member-status <?php echo um_user('account_status'); ?>"><?php echo um_user('account_status_name'); ?></span>
|
228 |
-
|
229 |
-
<?php if ($cover_photos) {
|
230 |
-
|
231 |
-
$sizes = um_get_option('cover_thumb_sizes');
|
232 |
-
|
233 |
-
if ( $ultimatemember->mobile->isTablet() ) {
|
234 |
-
$cover_size = $sizes[1];
|
235 |
-
} else {
|
236 |
-
$cover_size = $sizes[0];
|
237 |
-
}
|
238 |
-
|
239 |
-
?>
|
240 |
-
|
241 |
-
<div class="um-member-cover" data-ratio="<?php echo um_get_option('profile_cover_ratio'); ?>">
|
242 |
-
<div class="um-member-cover-e"><a href="<?php echo um_user_profile_url(); ?>" title="<?php echo um_user('display_name'); ?>"><?php echo um_user('cover_photo', $cover_size); ?></a></div>
|
243 |
-
</div>
|
244 |
-
|
245 |
-
<?php } ?>
|
246 |
|
247 |
-
|
248 |
-
|
249 |
-
$corner = um_get_option('profile_photocorner');
|
250 |
-
?>
|
251 |
-
<div class="um-member-photo radius-<?php echo $corner; ?>"><a href="<?php echo um_user_profile_url(); ?>" title="<?php echo um_user('display_name'); ?>"><?php echo get_avatar( um_user('ID'), $default_size ); ?></a></div>
|
252 |
-
<?php } ?>
|
253 |
-
|
254 |
-
<div class="um-member-card <?php if (!$profile_photo) { echo 'no-photo'; } ?>">
|
255 |
-
|
256 |
-
<?php if ( $show_name ) { ?>
|
257 |
-
<div class="um-member-name"><a href="<?php echo um_user_profile_url(); ?>" title="<?php echo um_user('display_name'); ?>"><?php echo um_user('display_name', 'html'); ?></a></div>
|
258 |
-
<?php } ?>
|
259 |
-
|
260 |
-
<?php do_action('um_members_just_after_name', um_user('ID'), $args); ?>
|
261 |
-
|
262 |
-
<?php do_action('um_members_after_user_name', um_user('ID'), $args); ?>
|
263 |
-
|
264 |
-
<?php
|
265 |
-
if ( $show_tagline && is_array( $tagline_fields ) ) {
|
266 |
-
foreach( $tagline_fields as $key ) {
|
267 |
-
if ( $key && um_filtered_value( $key ) ) {
|
268 |
-
$value = um_filtered_value( $key );
|
269 |
-
|
270 |
-
?>
|
271 |
-
|
272 |
-
<div class="um-member-tagline"><?php echo $value; ?></div>
|
273 |
-
|
274 |
-
<?php
|
275 |
-
}
|
276 |
-
}
|
277 |
-
}
|
278 |
-
?>
|
279 |
-
|
280 |
-
<?php if ( $show_userinfo ) { ?>
|
281 |
-
|
282 |
-
<div class="um-member-meta-main">
|
283 |
-
|
284 |
-
<?php if ( $userinfo_animate ) { ?>
|
285 |
-
<div class="um-member-more"><a href="#"><i class="um-faicon-angle-down"></i></a></div>
|
286 |
-
<?php } ?>
|
287 |
-
|
288 |
-
<div class="um-member-meta <?php if ( !$userinfo_animate ) { echo 'no-animate'; } ?>">
|
289 |
-
|
290 |
-
<?php foreach( $reveal_fields as $key ) {
|
291 |
-
if ( $key && um_filtered_value( $key ) ) {
|
292 |
-
$value = um_filtered_value( $key );
|
293 |
-
|
294 |
-
?>
|
295 |
-
|
296 |
-
<div class="um-member-metaline um-member-metaline-<?php echo $key; ?>"><span><strong><?php echo $ultimatemember->fields->get_label( $key ); ?>:</strong> <?php echo $value; ?></span></div>
|
297 |
-
|
298 |
-
<?php
|
299 |
-
}
|
300 |
-
}
|
301 |
-
?>
|
302 |
-
|
303 |
-
<?php if ( $show_social ) { ?>
|
304 |
-
<div class="um-member-connect">
|
305 |
-
|
306 |
-
<?php $ultimatemember->fields->show_social_urls(); ?>
|
307 |
-
|
308 |
-
</div>
|
309 |
-
<?php } ?>
|
310 |
-
|
311 |
-
</div>
|
312 |
-
|
313 |
-
<div class="um-member-less"><a href="#"><i class="um-faicon-angle-up"></i></a></div>
|
314 |
-
|
315 |
-
</div>
|
316 |
-
|
317 |
-
<?php } ?>
|
318 |
-
|
319 |
-
</div>
|
320 |
-
|
321 |
-
</div>
|
322 |
-
|
323 |
-
<?php
|
324 |
-
|
325 |
-
um_reset_user_clean();
|
326 |
-
|
327 |
-
} // end foreach
|
328 |
-
|
329 |
-
um_reset_user();
|
330 |
-
|
331 |
-
?>
|
332 |
-
|
333 |
-
<div class="um-clear"></div>
|
334 |
-
|
335 |
-
</div>
|
336 |
-
|
337 |
-
<?php
|
338 |
|
|
|
|
|
339 |
}
|
340 |
|
|
|
|
|
341 |
}
|
78 |
*** @pre-display members directory
|
79 |
***/
|
80 |
add_action('um_pre_directory_shortcode', 'um_pre_directory_shortcode');
|
81 |
+
function um_pre_directory_shortcode($args) {
|
82 |
global $ultimatemember;
|
83 |
extract( $args );
|
84 |
+
|
85 |
$ultimatemember->members->results = $ultimatemember->members->get_members( $args );
|
86 |
|
87 |
}
|
204 |
|
205 |
?>
|
206 |
|
207 |
+
<div class="um-members-none">
|
208 |
+
<p><?php echo $args['no_users']; ?></p>
|
209 |
+
</div>
|
210 |
|
211 |
<?php
|
|
|
|
|
|
|
|
|
212 |
|
213 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
|
215 |
+
$file = um_path . 'templates/members-grid.php';
|
216 |
+
$theme_file = get_stylesheet_directory() . '/ultimate-member/templates/members-grid.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
|
218 |
+
if ( file_exists( $theme_file ) ){
|
219 |
+
$file = $theme_file;
|
220 |
}
|
221 |
|
222 |
+
include_once $file;
|
223 |
+
|
224 |
}
|
core/um-actions-password.php
CHANGED
@@ -34,14 +34,17 @@
|
|
34 |
add_action('um_change_password_process_hook','um_change_password_process_hook');
|
35 |
function um_change_password_process_hook( $args ) {
|
36 |
global $ultimatemember;
|
|
|
37 |
|
38 |
wp_set_password( $args['user_password'], $args['user_id'] );
|
39 |
|
40 |
delete_user_meta( $args['user_id'], 'reset_pass_hash');
|
41 |
delete_user_meta( $args['user_id'], 'reset_pass_hash_token');
|
42 |
-
|
|
|
43 |
do_action('um_after_changing_user_password', $args['user_id'] );
|
44 |
|
|
|
45 |
if ( is_user_logged_in() ) {
|
46 |
wp_logout();
|
47 |
}
|
@@ -50,17 +53,31 @@
|
|
50 |
|
51 |
}
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
/***
|
54 |
*** @This is executed after changing password
|
55 |
***/
|
56 |
add_action('um_after_changing_user_password','um_after_changing_user_password');
|
57 |
function um_after_changing_user_password( $user_id ) {
|
58 |
global $ultimatemember;
|
59 |
-
|
60 |
-
|
61 |
-
$ultimatemember->mail->send( um_user('user_email'), 'changedpw_email' );
|
62 |
-
|
63 |
-
um_reset_user();
|
64 |
}
|
65 |
|
66 |
/***
|
@@ -89,7 +106,19 @@
|
|
89 |
$user = $_POST['username_b'];
|
90 |
|
91 |
if ( ( !is_email( $user ) && !username_exists( $user ) ) || ( is_email( $user ) && !email_exists( $user ) ) ) {
|
92 |
-
$ultimatemember->form->add_error('username_b', __('
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
}
|
94 |
|
95 |
}
|
34 |
add_action('um_change_password_process_hook','um_change_password_process_hook');
|
35 |
function um_change_password_process_hook( $args ) {
|
36 |
global $ultimatemember;
|
37 |
+
extract( $args );
|
38 |
|
39 |
wp_set_password( $args['user_password'], $args['user_id'] );
|
40 |
|
41 |
delete_user_meta( $args['user_id'], 'reset_pass_hash');
|
42 |
delete_user_meta( $args['user_id'], 'reset_pass_hash_token');
|
43 |
+
delete_user_meta( $args['user_id'], 'password_rst_attempts');
|
44 |
+
|
45 |
do_action('um_after_changing_user_password', $args['user_id'] );
|
46 |
|
47 |
+
|
48 |
if ( is_user_logged_in() ) {
|
49 |
wp_logout();
|
50 |
}
|
53 |
|
54 |
}
|
55 |
|
56 |
+
/**
|
57 |
+
* Overrides password changed notification
|
58 |
+
*
|
59 |
+
*/
|
60 |
+
function um_send_password_change_email( $args ){
|
61 |
+
|
62 |
+
global $ultimatemember;
|
63 |
+
|
64 |
+
um_fetch_user( $user_id );
|
65 |
+
|
66 |
+
$ultimatemember->user->password_changed();
|
67 |
+
|
68 |
+
um_reset_user();
|
69 |
+
|
70 |
+
|
71 |
+
return false;
|
72 |
+
}
|
73 |
+
|
74 |
/***
|
75 |
*** @This is executed after changing password
|
76 |
***/
|
77 |
add_action('um_after_changing_user_password','um_after_changing_user_password');
|
78 |
function um_after_changing_user_password( $user_id ) {
|
79 |
global $ultimatemember;
|
80 |
+
|
|
|
|
|
|
|
|
|
81 |
}
|
82 |
|
83 |
/***
|
106 |
$user = $_POST['username_b'];
|
107 |
|
108 |
if ( ( !is_email( $user ) && !username_exists( $user ) ) || ( is_email( $user ) && !email_exists( $user ) ) ) {
|
109 |
+
$ultimatemember->form->add_error('username_b', __('We can\'t find an account registered with that address or username','ultimatemember') );
|
110 |
+
} else {
|
111 |
+
if ( is_email( $user ) ) {
|
112 |
+
$user_id = email_exists( $user );
|
113 |
+
} else {
|
114 |
+
$user_id = username_exists( $user );
|
115 |
+
}
|
116 |
+
$attempts = (int)get_user_meta( $user_id, 'password_rst_attempts', true );
|
117 |
+
if ( $attempts >= 3 ) {
|
118 |
+
$ultimatemember->form->add_error('username_b', __('You have reached the limit for requesting password change for this user already. Contact support if you cannot open the email','ultimatemember') );
|
119 |
+
} else {
|
120 |
+
update_user_meta( $user_id, 'password_rst_attempts', $attempts + 1 );
|
121 |
+
}
|
122 |
}
|
123 |
|
124 |
}
|
core/um-actions-profile.php
CHANGED
@@ -69,6 +69,8 @@
|
|
69 |
if ( isset( $fields ) && is_array( $fields ) ) {
|
70 |
foreach( $fields as $key => $array ) {
|
71 |
|
|
|
|
|
72 |
if ( $fields[$key]['type'] == 'multiselect' || $fields[$key]['type'] == 'checkbox' && !isset($args['submitted'][$key]) ) {
|
73 |
delete_user_meta( um_user('ID'), $key );
|
74 |
}
|
@@ -387,8 +389,8 @@
|
|
387 |
<?php } else if ( $ultimatemember->fields->editing == true && $args['show_bio'] ) { ?>
|
388 |
|
389 |
<div class="um-meta-text">
|
390 |
-
<textarea placeholder="<?php _e('Tell us a bit about yourself...','ultimatemember'); ?>" name="<?php echo 'description-' . $args['form_id']; ?>" id="<?php echo 'description-' . $args['form_id']; ?>"><?php if ( um_user('description') ) { echo um_user('description'); } ?></textarea>
|
391 |
-
|
392 |
<?php if ( $ultimatemember->fields->is_error('description') ) {
|
393 |
echo $ultimatemember->fields->field_error( $ultimatemember->fields->show_error('description'), true ); }
|
394 |
?>
|
69 |
if ( isset( $fields ) && is_array( $fields ) ) {
|
70 |
foreach( $fields as $key => $array ) {
|
71 |
|
72 |
+
if( !um_user_can( 'can_edit_everyone' ) && !$fields[$key]['editable'] ) continue;
|
73 |
+
|
74 |
if ( $fields[$key]['type'] == 'multiselect' || $fields[$key]['type'] == 'checkbox' && !isset($args['submitted'][$key]) ) {
|
75 |
delete_user_meta( um_user('ID'), $key );
|
76 |
}
|
389 |
<?php } else if ( $ultimatemember->fields->editing == true && $args['show_bio'] ) { ?>
|
390 |
|
391 |
<div class="um-meta-text">
|
392 |
+
<textarea id="um-meta-bio" data-character-limit="<?php echo um_get_option('profile_bio_maxchars'); ?>" placeholder="<?php _e('Tell us a bit about yourself...','ultimatemember'); ?>" name="<?php echo 'description-' . $args['form_id']; ?>" id="<?php echo 'description-' . $args['form_id']; ?>"><?php if ( um_user('description') ) { echo um_user('description'); } ?></textarea>
|
393 |
+
<span class="um-meta-bio-character um-right"><span class="um-bio-limit"><?php echo um_get_option('profile_bio_maxchars'); ?></span></span>
|
394 |
<?php if ( $ultimatemember->fields->is_error('description') ) {
|
395 |
echo $ultimatemember->fields->field_error( $ultimatemember->fields->show_error('description'), true ); }
|
396 |
?>
|
core/um-actions-register.php
CHANGED
@@ -34,32 +34,45 @@
|
|
34 |
function um_add_user_frontend($args){
|
35 |
global $ultimatemember;
|
36 |
extract($args);
|
37 |
-
|
38 |
-
if ( isset( $user_email ) && !isset($user_login) ) {
|
39 |
-
$user_login = $user_email;
|
40 |
-
}
|
41 |
|
|
|
42 |
if ( isset( $username ) && !isset($args['user_login']) ) {
|
43 |
$user_login = $username;
|
44 |
}
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
if ( isset( $username ) && is_email( $username ) ) {
|
47 |
$user_email = $username;
|
48 |
}
|
49 |
|
50 |
-
if (!isset($user_password)){
|
51 |
$user_password = $ultimatemember->validation->generate();
|
52 |
}
|
53 |
|
54 |
-
$unique_userID = $ultimatemember->query->count_users() + 1;
|
55 |
|
56 |
-
if( !isset($user_email) ) {
|
57 |
$user_email = 'nobody' . $unique_userID . '@' . get_bloginfo('name');
|
58 |
}
|
59 |
-
|
60 |
-
if ( !isset( $user_login ) ) {
|
61 |
-
$user_login = 'user' . $unique_userID;
|
62 |
-
}
|
63 |
|
64 |
$creds['user_login'] = $user_login;
|
65 |
$creds['user_password'] = $user_password;
|
@@ -67,7 +80,8 @@
|
|
67 |
|
68 |
$args['submitted'] = array_merge( $args['submitted'], $creds);
|
69 |
$args = array_merge($args, $creds);
|
70 |
-
|
|
|
71 |
do_action('um_before_new_user_register', $args);
|
72 |
|
73 |
$user_id = wp_create_user( $user_login, $user_password, $user_email );
|
@@ -91,7 +105,9 @@
|
|
91 |
$role = um_get_option('default_role');
|
92 |
}
|
93 |
|
94 |
-
$ultimatemember->
|
|
|
|
|
95 |
|
96 |
$ultimatemember->user->set_role( $role );
|
97 |
|
@@ -157,6 +173,11 @@
|
|
157 |
|
158 |
do_action("track_{$status}_user_registration");
|
159 |
|
|
|
|
|
|
|
|
|
|
|
160 |
if ( $status == 'approved' ) {
|
161 |
|
162 |
$ultimatemember->user->auto_login($user_id);
|
@@ -212,7 +233,7 @@
|
|
212 |
*** @Register user with predefined role in options
|
213 |
***/
|
214 |
add_action('um_after_register_fields', 'um_add_user_role');
|
215 |
-
function um_add_user_role($args){
|
216 |
|
217 |
global $ultimatemember;
|
218 |
|
34 |
function um_add_user_frontend($args){
|
35 |
global $ultimatemember;
|
36 |
extract($args);
|
|
|
|
|
|
|
|
|
37 |
|
38 |
+
|
39 |
if ( isset( $username ) && !isset($args['user_login']) ) {
|
40 |
$user_login = $username;
|
41 |
}
|
42 |
|
43 |
+
if ( ! empty( $first_name ) && ! empty( $last_name ) && ! isset( $user_login ) ) {
|
44 |
+
|
45 |
+
if ( um_get_option('permalink_base') == 'name' ) {
|
46 |
+
$user_login = rawurlencode( strtolower( str_replace(" ",".",$first_name." ".$last_name ) ) );
|
47 |
+
}else if ( um_get_option('permalink_base') == 'name_dash' ) {
|
48 |
+
$user_login = rawurlencode( strtolower( str_replace(" ","-",$first_name." ".$last_name ) ) );
|
49 |
+
}else if ( um_get_option('permalink_base') == 'name_plus' ) {
|
50 |
+
$user_login = strtolower( str_replace(" ","+",$first_name." ".$last_name ) );
|
51 |
+
}else{
|
52 |
+
$user_login = strtolower( str_replace(" ","",$first_name." ".$last_name ) );
|
53 |
+
}
|
54 |
+
|
55 |
+
}
|
56 |
+
|
57 |
+
$unique_userID = $ultimatemember->query->count_users() + 1;
|
58 |
+
|
59 |
+
if ( ! isset( $user_login ) ) {
|
60 |
+
$user_login = 'user' . $unique_userID;
|
61 |
+
}
|
62 |
+
|
63 |
if ( isset( $username ) && is_email( $username ) ) {
|
64 |
$user_email = $username;
|
65 |
}
|
66 |
|
67 |
+
if ( ! isset( $user_password ) ){
|
68 |
$user_password = $ultimatemember->validation->generate();
|
69 |
}
|
70 |
|
|
|
71 |
|
72 |
+
if( ! isset( $user_email ) ) {
|
73 |
$user_email = 'nobody' . $unique_userID . '@' . get_bloginfo('name');
|
74 |
}
|
75 |
+
|
|
|
|
|
|
|
76 |
|
77 |
$creds['user_login'] = $user_login;
|
78 |
$creds['user_password'] = $user_password;
|
80 |
|
81 |
$args['submitted'] = array_merge( $args['submitted'], $creds);
|
82 |
$args = array_merge($args, $creds);
|
83 |
+
|
84 |
+
|
85 |
do_action('um_before_new_user_register', $args);
|
86 |
|
87 |
$user_id = wp_create_user( $user_login, $user_password, $user_email );
|
105 |
$role = um_get_option('default_role');
|
106 |
}
|
107 |
|
108 |
+
if ( !in_array( $role, $ultimatemember->query->get_roles( false, array('admin') ) ) ) {
|
109 |
+
$role = um_get_option('default_role');
|
110 |
+
}
|
111 |
|
112 |
$ultimatemember->user->set_role( $role );
|
113 |
|
173 |
|
174 |
do_action("track_{$status}_user_registration");
|
175 |
|
176 |
+
// Priority redirect
|
177 |
+
if ( isset( $args['redirect_to'] ) ) {
|
178 |
+
exit( wp_redirect( $args['redirect_to'] ) );
|
179 |
+
}
|
180 |
+
|
181 |
if ( $status == 'approved' ) {
|
182 |
|
183 |
$ultimatemember->user->auto_login($user_id);
|
233 |
*** @Register user with predefined role in options
|
234 |
***/
|
235 |
add_action('um_after_register_fields', 'um_add_user_role');
|
236 |
+
function um_add_user_role( $args ){
|
237 |
|
238 |
global $ultimatemember;
|
239 |
|
core/um-builtin.php
CHANGED
@@ -843,6 +843,24 @@ class UM_Builtin {
|
|
843 |
'color' => '#f50',
|
844 |
'match' => 'https://soundcloud.com/',
|
845 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
846 |
|
847 |
'role_select' => array(
|
848 |
'title' => __('Roles (Dropdown)','ultimatemember'),
|
@@ -1050,6 +1068,7 @@ class UM_Builtin {
|
|
1050 |
global $ultimatemember;
|
1051 |
|
1052 |
$fields_without_metakey = array('block','shortcode','spacing','divider','group');
|
|
|
1053 |
$fields_without_metakey = apply_filters('um_fields_without_metakey', $fields_without_metakey );
|
1054 |
|
1055 |
if ( !$show_all ) {
|
@@ -1117,6 +1136,7 @@ class UM_Builtin {
|
|
1117 |
$array['google_url'] = __('Google+ URL','ultimatemember');
|
1118 |
$array['instagram_url'] = __('Instagram URL','ultimatemember');
|
1119 |
$array['linkedin_url'] = __('LinkedIn URL','ultimatemember');
|
|
|
1120 |
$array['lowercase'] = __('Lowercase only','ultimatemember');
|
1121 |
$array['numeric'] = __('Numeric value only','ultimatemember');
|
1122 |
$array['phone_number'] = __('Phone Number','ultimatemember');
|
843 |
'color' => '#f50',
|
844 |
'match' => 'https://soundcloud.com/',
|
845 |
),
|
846 |
+
|
847 |
+
'vk' => array(
|
848 |
+
'title' => __('VKontakte','ultimatemember'),
|
849 |
+
'metakey' => 'vkontakte',
|
850 |
+
'type' => 'url',
|
851 |
+
'label' => __('VKontakte','ultimatemember'),
|
852 |
+
'required' => 0,
|
853 |
+
'public' => 1,
|
854 |
+
'editable' => 1,
|
855 |
+
'url_target' => '_blank',
|
856 |
+
'url_rel' => 'nofollow',
|
857 |
+
'icon' => 'um-faicon-vk',
|
858 |
+
'validate' => 'vk_url',
|
859 |
+
'url_text' => 'VKontakte',
|
860 |
+
'advanced' => 'social',
|
861 |
+
'color' => '#2B587A',
|
862 |
+
'match' => 'https://vk.com/',
|
863 |
+
),
|
864 |
|
865 |
'role_select' => array(
|
866 |
'title' => __('Roles (Dropdown)','ultimatemember'),
|
1068 |
global $ultimatemember;
|
1069 |
|
1070 |
$fields_without_metakey = array('block','shortcode','spacing','divider','group');
|
1071 |
+
remove_filter('um_fields_without_metakey', 'um_user_tags_requires_no_metakey');
|
1072 |
$fields_without_metakey = apply_filters('um_fields_without_metakey', $fields_without_metakey );
|
1073 |
|
1074 |
if ( !$show_all ) {
|
1136 |
$array['google_url'] = __('Google+ URL','ultimatemember');
|
1137 |
$array['instagram_url'] = __('Instagram URL','ultimatemember');
|
1138 |
$array['linkedin_url'] = __('LinkedIn URL','ultimatemember');
|
1139 |
+
$array['vk_url'] = __('VKontakte URL','ultimatemember');
|
1140 |
$array['lowercase'] = __('Lowercase only','ultimatemember');
|
1141 |
$array['numeric'] = __('Numeric value only','ultimatemember');
|
1142 |
$array['phone_number'] = __('Phone Number','ultimatemember');
|
core/um-enqueue.php
CHANGED
@@ -3,14 +3,14 @@
|
|
3 |
class UM_Enqueue {
|
4 |
|
5 |
function __construct() {
|
6 |
-
|
7 |
add_action('wp_head', array(&$this, 'wp_head'), 999); // high-priority
|
8 |
-
|
9 |
-
$priority = apply_filters( 'um_core_enqueue_priority',
|
10 |
add_action('wp_enqueue_scripts', array(&$this, 'wp_enqueue_scripts'), $priority );
|
11 |
-
|
12 |
}
|
13 |
-
|
14 |
/***
|
15 |
*** @Enqueue inline css globally
|
16 |
***/
|
@@ -18,7 +18,7 @@ class UM_Enqueue {
|
|
18 |
$css = um_get_option('custom_css');
|
19 |
if ( !$css ) return; ?><!-- ULTIMATE MEMBER INLINE CSS BEGIN --><style type="text/css"><?php print $this->minify( $css ); ?></style><!-- ULTIMATE MEMBER INLINE CSS END --><?php
|
20 |
}
|
21 |
-
|
22 |
/***
|
23 |
*** @Minify css string
|
24 |
***/
|
@@ -31,34 +31,34 @@ class UM_Enqueue {
|
|
31 |
$css = str_replace(': ',':', $css );
|
32 |
return $css;
|
33 |
}
|
34 |
-
|
35 |
/***
|
36 |
*** @Enqueue scripts and styles
|
37 |
***/
|
38 |
function wp_enqueue_scripts() {
|
39 |
-
global $ultimatemember;
|
40 |
|
41 |
$exclude_home = um_get_option('js_css_exlcude_home');
|
42 |
if ( $exclude_home && ( is_home() || is_front_page() ) ) {
|
43 |
return;
|
44 |
}
|
45 |
-
|
46 |
$exclude = um_get_option('js_css_exclude');
|
47 |
if ( is_array( $exclude ) ) {
|
48 |
array_filter( $exclude );
|
49 |
}
|
50 |
if ( $exclude && !is_admin() && is_array( $exclude ) ) {
|
51 |
-
|
52 |
$c_url = $ultimatemember->permalinks->get_current_url( get_option('permalink_structure') );
|
53 |
-
|
54 |
foreach( $exclude as $match ) {
|
55 |
if ( strstr( $c_url, untrailingslashit( $match ) ) ) {
|
56 |
return;
|
57 |
}
|
58 |
}
|
59 |
-
|
60 |
}
|
61 |
-
|
62 |
$include = um_get_option('js_css_include');
|
63 |
if ( is_array( $include ) ) {
|
64 |
array_filter( $include );
|
@@ -80,88 +80,89 @@ class UM_Enqueue {
|
|
80 |
}
|
81 |
|
82 |
if ( isset($force_load) && $force_load == false ) return;
|
83 |
-
|
84 |
// enqueue styles
|
85 |
if ( um_get_option('disable_minify') ) {
|
86 |
-
|
87 |
$this->load_original();
|
88 |
-
|
89 |
wp_localize_script( 'um_scripts', 'um_scripts', array(
|
90 |
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
91 |
'fileupload' => um_url . 'core/lib/upload/um-file-upload.php',
|
92 |
'imageupload' => um_url . 'core/lib/upload/um-image-upload.php'
|
93 |
) );
|
94 |
-
|
95 |
} else {
|
96 |
|
97 |
-
wp_register_script('um_minified', um_url . 'assets/js/um.min.js', array('jquery'), ultimatemember_version, true );
|
98 |
wp_enqueue_script('um_minified');
|
99 |
-
|
100 |
wp_localize_script( 'um_minified', 'um_scripts', array(
|
101 |
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
102 |
'fileupload' => um_url . 'core/lib/upload/um-file-upload.php',
|
103 |
'imageupload' => um_url . 'core/lib/upload/um-image-upload.php'
|
104 |
) );
|
105 |
-
|
106 |
wp_register_style('um_minified', um_url . 'assets/css/um.min.css', '', ultimatemember_version, 'all' );
|
107 |
wp_enqueue_style('um_minified');
|
108 |
-
|
109 |
}
|
110 |
-
|
111 |
// rtl style
|
112 |
if ( is_rtl() ) {
|
113 |
wp_register_style('um_rtl', um_url . 'assets/css/um.rtl.css', '', ultimatemember_version, 'all' );
|
114 |
wp_enqueue_style('um_rtl');
|
115 |
}
|
116 |
-
|
117 |
// load a localized version for date/time
|
118 |
$locale = get_locale();
|
119 |
if ( $locale && file_exists( um_path . 'assets/js/pickadate/translations/' . $locale . '.js' ) ) {
|
120 |
wp_register_script('um_datetime_locale', um_url . 'assets/js/pickadate/translations/' . $locale . '.js', '', ultimatemember_version, true );
|
121 |
wp_enqueue_script('um_datetime_locale');
|
122 |
}
|
123 |
-
|
|
|
|
|
|
|
124 |
}
|
125 |
-
|
126 |
/***
|
127 |
*** @This will load original files (not minified)
|
128 |
***/
|
129 |
function load_original() {
|
130 |
-
|
131 |
$this->load_google_charts();
|
132 |
-
|
133 |
$this->load_fonticons();
|
134 |
-
|
135 |
$this->load_selectjs();
|
136 |
-
|
137 |
$this->load_modal();
|
138 |
-
|
139 |
$this->load_css();
|
140 |
-
|
141 |
$this->load_fileupload();
|
142 |
-
|
143 |
$this->load_datetimepicker();
|
144 |
-
|
145 |
$this->load_raty();
|
146 |
-
|
147 |
$this->load_scrollto();
|
148 |
-
|
149 |
$this->load_scrollbar();
|
150 |
|
151 |
$this->load_imagecrop();
|
152 |
-
|
153 |
-
$this->load_masonry();
|
154 |
-
|
155 |
$this->load_tipsy();
|
156 |
-
|
157 |
$this->load_functions();
|
158 |
-
|
159 |
$this->load_responsive();
|
160 |
-
|
161 |
$this->load_customjs();
|
162 |
-
|
163 |
}
|
164 |
-
|
165 |
/***
|
166 |
*** @Include Google charts
|
167 |
***/
|
@@ -169,205 +170,195 @@ class UM_Enqueue {
|
|
169 |
|
170 |
wp_register_script('um_gchart', 'https://www.google.com/jsapi' );
|
171 |
wp_enqueue_script('um_gchart');
|
172 |
-
|
173 |
}
|
174 |
-
|
175 |
/***
|
176 |
*** @Load plugin css
|
177 |
***/
|
178 |
function load_css(){
|
179 |
-
|
180 |
wp_register_style('um_styles', um_url . 'assets/css/um-styles.css' );
|
181 |
wp_enqueue_style('um_styles');
|
182 |
-
|
183 |
wp_register_style('um_members', um_url . 'assets/css/um-members.css' );
|
184 |
wp_enqueue_style('um_members');
|
185 |
-
|
186 |
wp_register_style('um_profile', um_url . 'assets/css/um-profile.css' );
|
187 |
wp_enqueue_style('um_profile');
|
188 |
-
|
189 |
wp_register_style('um_account', um_url . 'assets/css/um-account.css' );
|
190 |
wp_enqueue_style('um_account');
|
191 |
-
|
192 |
wp_register_style('um_misc', um_url . 'assets/css/um-misc.css' );
|
193 |
wp_enqueue_style('um_misc');
|
194 |
-
|
195 |
}
|
196 |
-
|
197 |
/***
|
198 |
*** @Load select-dropdowns JS
|
199 |
***/
|
200 |
function load_selectjs(){
|
201 |
-
|
202 |
-
wp_register_script('um_select', um_url . 'assets/js/um-select.js', array('jquery') );
|
203 |
wp_enqueue_script('um_select');
|
204 |
-
|
205 |
wp_register_style('um_select', um_url . 'assets/css/um-select.css' );
|
206 |
wp_enqueue_style('um_select');
|
207 |
-
|
208 |
}
|
209 |
-
|
210 |
/***
|
211 |
*** @Load Fonticons
|
212 |
***/
|
213 |
function load_fonticons(){
|
214 |
-
|
215 |
wp_register_style('um_fonticons_ii', um_url . 'assets/css/um-fonticons-ii.css' );
|
216 |
wp_enqueue_style('um_fonticons_ii');
|
217 |
-
|
218 |
wp_register_style('um_fonticons_fa', um_url . 'assets/css/um-fonticons-fa.css' );
|
219 |
wp_enqueue_style('um_fonticons_fa');
|
220 |
-
|
221 |
}
|
222 |
-
|
223 |
/***
|
224 |
*** @Load fileupload JS
|
225 |
***/
|
226 |
function load_fileupload() {
|
227 |
-
|
228 |
wp_register_script('um_jquery_form', um_url . 'assets/js/um-jquery-form.js' );
|
229 |
wp_enqueue_script('um_jquery_form');
|
230 |
-
|
231 |
wp_register_script('um_fileupload', um_url . 'assets/js/um-fileupload.js' );
|
232 |
wp_enqueue_script('um_fileupload');
|
233 |
-
|
234 |
wp_register_style('um_fileupload', um_url . 'assets/css/um-fileupload.css' );
|
235 |
wp_enqueue_style('um_fileupload');
|
236 |
-
|
237 |
}
|
238 |
-
|
239 |
/***
|
240 |
*** @Load JS functions
|
241 |
***/
|
242 |
function load_functions(){
|
243 |
-
|
244 |
wp_register_script('um_functions', um_url . 'assets/js/um-functions.js' );
|
245 |
wp_enqueue_script('um_functions');
|
246 |
-
|
247 |
}
|
248 |
-
|
249 |
/***
|
250 |
*** @Load custom JS
|
251 |
***/
|
252 |
function load_customjs(){
|
253 |
-
|
254 |
wp_register_script('um_conditional', um_url . 'assets/js/um-conditional.js' );
|
255 |
wp_enqueue_script('um_conditional');
|
256 |
-
|
257 |
wp_register_script('um_scripts', um_url . 'assets/js/um-scripts.js' );
|
258 |
wp_enqueue_script('um_scripts');
|
259 |
|
260 |
wp_register_script('um_members', um_url . 'assets/js/um-members.js' );
|
261 |
wp_enqueue_script('um_members');
|
262 |
-
|
263 |
wp_register_script('um_profile', um_url . 'assets/js/um-profile.js' );
|
264 |
wp_enqueue_script('um_profile');
|
265 |
-
|
266 |
wp_register_script('um_account', um_url . 'assets/js/um-account.js' );
|
267 |
wp_enqueue_script('um_account');
|
268 |
-
|
269 |
}
|
270 |
-
|
271 |
/***
|
272 |
*** @Load date & time picker
|
273 |
***/
|
274 |
function load_datetimepicker(){
|
275 |
-
|
276 |
wp_register_script('um_datetime', um_url . 'assets/js/pickadate/picker.js' );
|
277 |
wp_enqueue_script('um_datetime');
|
278 |
-
|
279 |
wp_register_script('um_datetime_date', um_url . 'assets/js/pickadate/picker.date.js' );
|
280 |
wp_enqueue_script('um_datetime_date');
|
281 |
-
|
282 |
wp_register_script('um_datetime_time', um_url . 'assets/js/pickadate/picker.time.js' );
|
283 |
wp_enqueue_script('um_datetime_time');
|
284 |
-
|
285 |
wp_register_script('um_datetime_legacy', um_url . 'assets/js/pickadate/legacy.js' );
|
286 |
wp_enqueue_script('um_datetime_legacy');
|
287 |
-
|
288 |
wp_register_style('um_datetime', um_url . 'assets/css/pickadate/default.css' );
|
289 |
wp_enqueue_style('um_datetime');
|
290 |
-
|
291 |
wp_register_style('um_datetime_date', um_url . 'assets/css/pickadate/default.date.css' );
|
292 |
wp_enqueue_style('um_datetime_date');
|
293 |
-
|
294 |
wp_register_style('um_datetime_time', um_url . 'assets/css/pickadate/default.time.css' );
|
295 |
wp_enqueue_style('um_datetime_time');
|
296 |
-
|
297 |
}
|
298 |
-
|
299 |
/***
|
300 |
*** @Load scrollto
|
301 |
***/
|
302 |
function load_scrollto(){
|
303 |
-
|
304 |
wp_register_script('um_scrollto', um_url . 'assets/js/um-scrollto.js' );
|
305 |
wp_enqueue_script('um_scrollto');
|
306 |
|
307 |
}
|
308 |
-
|
309 |
/***
|
310 |
*** @Load scrollbar
|
311 |
***/
|
312 |
function load_scrollbar(){
|
313 |
-
|
314 |
wp_register_script('um_scrollbar', um_url . 'assets/js/um-scrollbar.js' );
|
315 |
wp_enqueue_script('um_scrollbar');
|
316 |
-
|
317 |
wp_register_style('um_scrollbar', um_url . 'assets/css/um-scrollbar.css' );
|
318 |
wp_enqueue_style('um_scrollbar');
|
319 |
|
320 |
}
|
321 |
-
|
322 |
/***
|
323 |
*** @Load rating
|
324 |
***/
|
325 |
function load_raty(){
|
326 |
-
|
327 |
wp_register_script('um_raty', um_url . 'assets/js/um-raty.js' );
|
328 |
wp_enqueue_script('um_raty');
|
329 |
-
|
330 |
wp_register_style('um_raty', um_url . 'assets/css/um-raty.css' );
|
331 |
wp_enqueue_style('um_raty');
|
332 |
|
333 |
}
|
334 |
-
|
335 |
/***
|
336 |
*** @Load crop script
|
337 |
***/
|
338 |
function load_imagecrop(){
|
339 |
-
|
340 |
wp_register_script('um_crop', um_url . 'assets/js/um-crop.js' );
|
341 |
wp_enqueue_script('um_crop');
|
342 |
-
|
343 |
wp_register_style('um_crop', um_url . 'assets/css/um-crop.css' );
|
344 |
wp_enqueue_style('um_crop');
|
345 |
-
|
346 |
-
}
|
347 |
-
|
348 |
-
/***
|
349 |
-
*** @Load masonry
|
350 |
-
***/
|
351 |
-
function load_masonry(){
|
352 |
-
|
353 |
-
wp_register_script('um_masonry', um_url . 'assets/js/um-masonry.js' );
|
354 |
-
wp_enqueue_script('um_masonry');
|
355 |
|
356 |
}
|
357 |
-
|
358 |
/***
|
359 |
*** @Load tipsy
|
360 |
***/
|
361 |
function load_tipsy(){
|
362 |
-
|
363 |
wp_register_script('um_tipsy', um_url . 'assets/js/um-tipsy.js' );
|
364 |
wp_enqueue_script('um_tipsy');
|
365 |
-
|
366 |
wp_register_style('um_tipsy', um_url . 'assets/css/um-tipsy.css' );
|
367 |
wp_enqueue_style('um_tipsy');
|
368 |
|
369 |
}
|
370 |
-
|
371 |
/***
|
372 |
*** @Load modal
|
373 |
***/
|
@@ -375,23 +366,23 @@ class UM_Enqueue {
|
|
375 |
|
376 |
wp_register_style('um_modal', um_url . 'assets/css/um-modal.css' );
|
377 |
wp_enqueue_style('um_modal');
|
378 |
-
|
379 |
wp_register_script('um_modal', um_url . 'assets/js/um-modal.js' );
|
380 |
wp_enqueue_script('um_modal');
|
381 |
-
|
382 |
}
|
383 |
-
|
384 |
/***
|
385 |
*** @Load responsive styles
|
386 |
***/
|
387 |
function load_responsive(){
|
388 |
-
|
389 |
wp_register_script('um_responsive', um_url . 'assets/js/um-responsive.js' );
|
390 |
wp_enqueue_script('um_responsive');
|
391 |
-
|
392 |
wp_register_style('um_responsive', um_url . 'assets/css/um-responsive.css' );
|
393 |
wp_enqueue_style('um_responsive');
|
394 |
-
|
395 |
}
|
396 |
-
|
397 |
-
}
|
3 |
class UM_Enqueue {
|
4 |
|
5 |
function __construct() {
|
6 |
+
|
7 |
add_action('wp_head', array(&$this, 'wp_head'), 999); // high-priority
|
8 |
+
|
9 |
+
$priority = apply_filters( 'um_core_enqueue_priority', 100 );
|
10 |
add_action('wp_enqueue_scripts', array(&$this, 'wp_enqueue_scripts'), $priority );
|
11 |
+
|
12 |
}
|
13 |
+
|
14 |
/***
|
15 |
*** @Enqueue inline css globally
|
16 |
***/
|
18 |
$css = um_get_option('custom_css');
|
19 |
if ( !$css ) return; ?><!-- ULTIMATE MEMBER INLINE CSS BEGIN --><style type="text/css"><?php print $this->minify( $css ); ?></style><!-- ULTIMATE MEMBER INLINE CSS END --><?php
|
20 |
}
|
21 |
+
|
22 |
/***
|
23 |
*** @Minify css string
|
24 |
***/
|
31 |
$css = str_replace(': ',':', $css );
|
32 |
return $css;
|
33 |
}
|
34 |
+
|
35 |
/***
|
36 |
*** @Enqueue scripts and styles
|
37 |
***/
|
38 |
function wp_enqueue_scripts() {
|
39 |
+
global $ultimatemember, $post;
|
40 |
|
41 |
$exclude_home = um_get_option('js_css_exlcude_home');
|
42 |
if ( $exclude_home && ( is_home() || is_front_page() ) ) {
|
43 |
return;
|
44 |
}
|
45 |
+
|
46 |
$exclude = um_get_option('js_css_exclude');
|
47 |
if ( is_array( $exclude ) ) {
|
48 |
array_filter( $exclude );
|
49 |
}
|
50 |
if ( $exclude && !is_admin() && is_array( $exclude ) ) {
|
51 |
+
|
52 |
$c_url = $ultimatemember->permalinks->get_current_url( get_option('permalink_structure') );
|
53 |
+
|
54 |
foreach( $exclude as $match ) {
|
55 |
if ( strstr( $c_url, untrailingslashit( $match ) ) ) {
|
56 |
return;
|
57 |
}
|
58 |
}
|
59 |
+
|
60 |
}
|
61 |
+
|
62 |
$include = um_get_option('js_css_include');
|
63 |
if ( is_array( $include ) ) {
|
64 |
array_filter( $include );
|
80 |
}
|
81 |
|
82 |
if ( isset($force_load) && $force_load == false ) return;
|
83 |
+
|
84 |
// enqueue styles
|
85 |
if ( um_get_option('disable_minify') ) {
|
86 |
+
|
87 |
$this->load_original();
|
88 |
+
|
89 |
wp_localize_script( 'um_scripts', 'um_scripts', array(
|
90 |
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
91 |
'fileupload' => um_url . 'core/lib/upload/um-file-upload.php',
|
92 |
'imageupload' => um_url . 'core/lib/upload/um-image-upload.php'
|
93 |
) );
|
94 |
+
|
95 |
} else {
|
96 |
|
97 |
+
wp_register_script('um_minified', um_url . 'assets/js/um.min.js', array('jquery', 'jquery-masonry'), ultimatemember_version, true );
|
98 |
wp_enqueue_script('um_minified');
|
99 |
+
|
100 |
wp_localize_script( 'um_minified', 'um_scripts', array(
|
101 |
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
102 |
'fileupload' => um_url . 'core/lib/upload/um-file-upload.php',
|
103 |
'imageupload' => um_url . 'core/lib/upload/um-image-upload.php'
|
104 |
) );
|
105 |
+
|
106 |
wp_register_style('um_minified', um_url . 'assets/css/um.min.css', '', ultimatemember_version, 'all' );
|
107 |
wp_enqueue_style('um_minified');
|
108 |
+
|
109 |
}
|
110 |
+
|
111 |
// rtl style
|
112 |
if ( is_rtl() ) {
|
113 |
wp_register_style('um_rtl', um_url . 'assets/css/um.rtl.css', '', ultimatemember_version, 'all' );
|
114 |
wp_enqueue_style('um_rtl');
|
115 |
}
|
116 |
+
|
117 |
// load a localized version for date/time
|
118 |
$locale = get_locale();
|
119 |
if ( $locale && file_exists( um_path . 'assets/js/pickadate/translations/' . $locale . '.js' ) ) {
|
120 |
wp_register_script('um_datetime_locale', um_url . 'assets/js/pickadate/translations/' . $locale . '.js', '', ultimatemember_version, true );
|
121 |
wp_enqueue_script('um_datetime_locale');
|
122 |
}
|
123 |
+
|
124 |
+
if(is_object($post) && has_shortcode($post->post_content,'ultimatemember')) {
|
125 |
+
wp_dequeue_script('jquery-form');
|
126 |
+
}
|
127 |
}
|
128 |
+
|
129 |
/***
|
130 |
*** @This will load original files (not minified)
|
131 |
***/
|
132 |
function load_original() {
|
133 |
+
|
134 |
$this->load_google_charts();
|
135 |
+
|
136 |
$this->load_fonticons();
|
137 |
+
|
138 |
$this->load_selectjs();
|
139 |
+
|
140 |
$this->load_modal();
|
141 |
+
|
142 |
$this->load_css();
|
143 |
+
|
144 |
$this->load_fileupload();
|
145 |
+
|
146 |
$this->load_datetimepicker();
|
147 |
+
|
148 |
$this->load_raty();
|
149 |
+
|
150 |
$this->load_scrollto();
|
151 |
+
|
152 |
$this->load_scrollbar();
|
153 |
|
154 |
$this->load_imagecrop();
|
155 |
+
|
|
|
|
|
156 |
$this->load_tipsy();
|
157 |
+
|
158 |
$this->load_functions();
|
159 |
+
|
160 |
$this->load_responsive();
|
161 |
+
|
162 |
$this->load_customjs();
|
163 |
+
|
164 |
}
|
165 |
+
|
166 |
/***
|
167 |
*** @Include Google charts
|
168 |
***/
|
170 |
|
171 |
wp_register_script('um_gchart', 'https://www.google.com/jsapi' );
|
172 |
wp_enqueue_script('um_gchart');
|
173 |
+
|
174 |
}
|
175 |
+
|
176 |
/***
|
177 |
*** @Load plugin css
|
178 |
***/
|
179 |
function load_css(){
|
180 |
+
|
181 |
wp_register_style('um_styles', um_url . 'assets/css/um-styles.css' );
|
182 |
wp_enqueue_style('um_styles');
|
183 |
+
|
184 |
wp_register_style('um_members', um_url . 'assets/css/um-members.css' );
|
185 |
wp_enqueue_style('um_members');
|
186 |
+
|
187 |
wp_register_style('um_profile', um_url . 'assets/css/um-profile.css' );
|
188 |
wp_enqueue_style('um_profile');
|
189 |
+
|
190 |
wp_register_style('um_account', um_url . 'assets/css/um-account.css' );
|
191 |
wp_enqueue_style('um_account');
|
192 |
+
|
193 |
wp_register_style('um_misc', um_url . 'assets/css/um-misc.css' );
|
194 |
wp_enqueue_style('um_misc');
|
195 |
+
|
196 |
}
|
197 |
+
|
198 |
/***
|
199 |
*** @Load select-dropdowns JS
|
200 |
***/
|
201 |
function load_selectjs(){
|
202 |
+
|
203 |
+
wp_register_script('um_select', um_url . 'assets/js/um-select.js', array('jquery', 'jquery-masonry') );
|
204 |
wp_enqueue_script('um_select');
|
205 |
+
|
206 |
wp_register_style('um_select', um_url . 'assets/css/um-select.css' );
|
207 |
wp_enqueue_style('um_select');
|
208 |
+
|
209 |
}
|
210 |
+
|
211 |
/***
|
212 |
*** @Load Fonticons
|
213 |
***/
|
214 |
function load_fonticons(){
|
215 |
+
|
216 |
wp_register_style('um_fonticons_ii', um_url . 'assets/css/um-fonticons-ii.css' );
|
217 |
wp_enqueue_style('um_fonticons_ii');
|
218 |
+
|
219 |
wp_register_style('um_fonticons_fa', um_url . 'assets/css/um-fonticons-fa.css' );
|
220 |
wp_enqueue_style('um_fonticons_fa');
|
221 |
+
|
222 |
}
|
223 |
+
|
224 |
/***
|
225 |
*** @Load fileupload JS
|
226 |
***/
|
227 |
function load_fileupload() {
|
228 |
+
|
229 |
wp_register_script('um_jquery_form', um_url . 'assets/js/um-jquery-form.js' );
|
230 |
wp_enqueue_script('um_jquery_form');
|
231 |
+
|
232 |
wp_register_script('um_fileupload', um_url . 'assets/js/um-fileupload.js' );
|
233 |
wp_enqueue_script('um_fileupload');
|
234 |
+
|
235 |
wp_register_style('um_fileupload', um_url . 'assets/css/um-fileupload.css' );
|
236 |
wp_enqueue_style('um_fileupload');
|
237 |
+
|
238 |
}
|
239 |
+
|
240 |
/***
|
241 |
*** @Load JS functions
|
242 |
***/
|
243 |
function load_functions(){
|
244 |
+
|
245 |
wp_register_script('um_functions', um_url . 'assets/js/um-functions.js' );
|
246 |
wp_enqueue_script('um_functions');
|
247 |
+
|
248 |
}
|
249 |
+
|
250 |
/***
|
251 |
*** @Load custom JS
|
252 |
***/
|
253 |
function load_customjs(){
|
254 |
+
|
255 |
wp_register_script('um_conditional', um_url . 'assets/js/um-conditional.js' );
|
256 |
wp_enqueue_script('um_conditional');
|
257 |
+
|
258 |
wp_register_script('um_scripts', um_url . 'assets/js/um-scripts.js' );
|
259 |
wp_enqueue_script('um_scripts');
|
260 |
|
261 |
wp_register_script('um_members', um_url . 'assets/js/um-members.js' );
|
262 |
wp_enqueue_script('um_members');
|
263 |
+
|
264 |
wp_register_script('um_profile', um_url . 'assets/js/um-profile.js' );
|
265 |
wp_enqueue_script('um_profile');
|
266 |
+
|
267 |
wp_register_script('um_account', um_url . 'assets/js/um-account.js' );
|
268 |
wp_enqueue_script('um_account');
|
269 |
+
|
270 |
}
|
271 |
+
|
272 |
/***
|
273 |
*** @Load date & time picker
|
274 |
***/
|
275 |
function load_datetimepicker(){
|
276 |
+
|
277 |
wp_register_script('um_datetime', um_url . 'assets/js/pickadate/picker.js' );
|
278 |
wp_enqueue_script('um_datetime');
|
279 |
+
|
280 |
wp_register_script('um_datetime_date', um_url . 'assets/js/pickadate/picker.date.js' );
|
281 |
wp_enqueue_script('um_datetime_date');
|
282 |
+
|
283 |
wp_register_script('um_datetime_time', um_url . 'assets/js/pickadate/picker.time.js' );
|
284 |
wp_enqueue_script('um_datetime_time');
|
285 |
+
|
286 |
wp_register_script('um_datetime_legacy', um_url . 'assets/js/pickadate/legacy.js' );
|
287 |
wp_enqueue_script('um_datetime_legacy');
|
288 |
+
|
289 |
wp_register_style('um_datetime', um_url . 'assets/css/pickadate/default.css' );
|
290 |
wp_enqueue_style('um_datetime');
|
291 |
+
|
292 |
wp_register_style('um_datetime_date', um_url . 'assets/css/pickadate/default.date.css' );
|
293 |
wp_enqueue_style('um_datetime_date');
|
294 |
+
|
295 |
wp_register_style('um_datetime_time', um_url . 'assets/css/pickadate/default.time.css' );
|
296 |
wp_enqueue_style('um_datetime_time');
|
297 |
+
|
298 |
}
|
299 |
+
|
300 |
/***
|
301 |
*** @Load scrollto
|
302 |
***/
|
303 |
function load_scrollto(){
|
304 |
+
|
305 |
wp_register_script('um_scrollto', um_url . 'assets/js/um-scrollto.js' );
|
306 |
wp_enqueue_script('um_scrollto');
|
307 |
|
308 |
}
|
309 |
+
|
310 |
/***
|
311 |
*** @Load scrollbar
|
312 |
***/
|
313 |
function load_scrollbar(){
|
314 |
+
|
315 |
wp_register_script('um_scrollbar', um_url . 'assets/js/um-scrollbar.js' );
|
316 |
wp_enqueue_script('um_scrollbar');
|
317 |
+
|
318 |
wp_register_style('um_scrollbar', um_url . 'assets/css/um-scrollbar.css' );
|
319 |
wp_enqueue_style('um_scrollbar');
|
320 |
|
321 |
}
|
322 |
+
|
323 |
/***
|
324 |
*** @Load rating
|
325 |
***/
|
326 |
function load_raty(){
|
327 |
+
|
328 |
wp_register_script('um_raty', um_url . 'assets/js/um-raty.js' );
|
329 |
wp_enqueue_script('um_raty');
|
330 |
+
|
331 |
wp_register_style('um_raty', um_url . 'assets/css/um-raty.css' );
|
332 |
wp_enqueue_style('um_raty');
|
333 |
|
334 |
}
|
335 |
+
|
336 |
/***
|
337 |
*** @Load crop script
|
338 |
***/
|
339 |
function load_imagecrop(){
|
340 |
+
|
341 |
wp_register_script('um_crop', um_url . 'assets/js/um-crop.js' );
|
342 |
wp_enqueue_script('um_crop');
|
343 |
+
|
344 |
wp_register_style('um_crop', um_url . 'assets/css/um-crop.css' );
|
345 |
wp_enqueue_style('um_crop');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
346 |
|
347 |
}
|
348 |
+
|
349 |
/***
|
350 |
*** @Load tipsy
|
351 |
***/
|
352 |
function load_tipsy(){
|
353 |
+
|
354 |
wp_register_script('um_tipsy', um_url . 'assets/js/um-tipsy.js' );
|
355 |
wp_enqueue_script('um_tipsy');
|
356 |
+
|
357 |
wp_register_style('um_tipsy', um_url . 'assets/css/um-tipsy.css' );
|
358 |
wp_enqueue_style('um_tipsy');
|
359 |
|
360 |
}
|
361 |
+
|
362 |
/***
|
363 |
*** @Load modal
|
364 |
***/
|
366 |
|
367 |
wp_register_style('um_modal', um_url . 'assets/css/um-modal.css' );
|
368 |
wp_enqueue_style('um_modal');
|
369 |
+
|
370 |
wp_register_script('um_modal', um_url . 'assets/js/um-modal.js' );
|
371 |
wp_enqueue_script('um_modal');
|
372 |
+
|
373 |
}
|
374 |
+
|
375 |
/***
|
376 |
*** @Load responsive styles
|
377 |
***/
|
378 |
function load_responsive(){
|
379 |
+
|
380 |
wp_register_script('um_responsive', um_url . 'assets/js/um-responsive.js' );
|
381 |
wp_enqueue_script('um_responsive');
|
382 |
+
|
383 |
wp_register_style('um_responsive', um_url . 'assets/css/um-responsive.css' );
|
384 |
wp_enqueue_style('um_responsive');
|
385 |
+
|
386 |
}
|
387 |
+
|
388 |
+
}
|
core/um-fields.php
CHANGED
@@ -2110,6 +2110,8 @@ class UM_Fields {
|
|
2110 |
|
2111 |
$res = stripslashes( $this->field_value( $key, $default, $data ) );
|
2112 |
|
|
|
|
|
2113 |
$output .= '<div class="um-field-area">';
|
2114 |
$output .= '<div class="um-field-value">' . $res . '</div>';
|
2115 |
$output .= '</div>';
|
@@ -2267,7 +2269,14 @@ class UM_Fields {
|
|
2267 |
$output .= '<div class="um-col-1">';
|
2268 |
$col1_fields = $this->get_fields_in_column( $subrow_fields, 1 );
|
2269 |
if ( $col1_fields ) {
|
2270 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2271 |
}
|
2272 |
$output .= '</div>';
|
2273 |
|
@@ -2276,14 +2285,26 @@ class UM_Fields {
|
|
2276 |
$output .= '<div class="um-col-121">';
|
2277 |
$col1_fields = $this->get_fields_in_column( $subrow_fields, 1 );
|
2278 |
if ( $col1_fields ) {
|
2279 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2280 |
}
|
2281 |
$output .= '</div>';
|
2282 |
|
2283 |
$output .= '<div class="um-col-122">';
|
2284 |
$col2_fields = $this->get_fields_in_column( $subrow_fields, 2 );
|
2285 |
if ( $col2_fields ) {
|
2286 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2287 |
}
|
2288 |
$output .= '</div><div class="um-clear"></div>';
|
2289 |
|
@@ -2292,21 +2313,39 @@ class UM_Fields {
|
|
2292 |
$output .= '<div class="um-col-131">';
|
2293 |
$col1_fields = $this->get_fields_in_column( $subrow_fields, 1 );
|
2294 |
if ( $col1_fields ) {
|
2295 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2296 |
}
|
2297 |
$output .= '</div>';
|
2298 |
|
2299 |
$output .= '<div class="um-col-132">';
|
2300 |
$col2_fields = $this->get_fields_in_column( $subrow_fields, 2 );
|
2301 |
if ( $col2_fields ) {
|
2302 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2303 |
}
|
2304 |
$output .= '</div>';
|
2305 |
|
2306 |
$output .= '<div class="um-col-133">';
|
2307 |
$col3_fields = $this->get_fields_in_column( $subrow_fields, 3 );
|
2308 |
if ( $col3_fields ) {
|
2309 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2310 |
}
|
2311 |
$output .= '</div><div class="um-clear"></div>';
|
2312 |
|
2110 |
|
2111 |
$res = stripslashes( $this->field_value( $key, $default, $data ) );
|
2112 |
|
2113 |
+
$res = apply_filters("um_view_field_value_{$type}", $res, $data );
|
2114 |
+
|
2115 |
$output .= '<div class="um-field-area">';
|
2116 |
$output .= '<div class="um-field-value">' . $res . '</div>';
|
2117 |
$output .= '</div>';
|
2269 |
$output .= '<div class="um-col-1">';
|
2270 |
$col1_fields = $this->get_fields_in_column( $subrow_fields, 1 );
|
2271 |
if ( $col1_fields ) {
|
2272 |
+
foreach( $col1_fields as $key => $data ) {
|
2273 |
+
|
2274 |
+
$data = apply_filters("um_view_field_output_".$data['type'], $data);
|
2275 |
+
|
2276 |
+
$output .= $this->view_field( $key, $data );
|
2277 |
+
|
2278 |
+
|
2279 |
+
}
|
2280 |
}
|
2281 |
$output .= '</div>';
|
2282 |
|
2285 |
$output .= '<div class="um-col-121">';
|
2286 |
$col1_fields = $this->get_fields_in_column( $subrow_fields, 1 );
|
2287 |
if ( $col1_fields ) {
|
2288 |
+
foreach( $col1_fields as $key => $data ) {
|
2289 |
+
|
2290 |
+
$data = apply_filters("um_view_field_output_".$data['type'], $data);
|
2291 |
+
|
2292 |
+
$output .= $this->view_field( $key, $data );
|
2293 |
+
|
2294 |
+
}
|
2295 |
}
|
2296 |
$output .= '</div>';
|
2297 |
|
2298 |
$output .= '<div class="um-col-122">';
|
2299 |
$col2_fields = $this->get_fields_in_column( $subrow_fields, 2 );
|
2300 |
if ( $col2_fields ) {
|
2301 |
+
foreach( $col2_fields as $key => $data ) {
|
2302 |
+
|
2303 |
+
$data = apply_filters("um_view_field_output_".$data['type'], $data);
|
2304 |
+
|
2305 |
+
$output .= $this->view_field( $key, $data );
|
2306 |
+
|
2307 |
+
}
|
2308 |
}
|
2309 |
$output .= '</div><div class="um-clear"></div>';
|
2310 |
|
2313 |
$output .= '<div class="um-col-131">';
|
2314 |
$col1_fields = $this->get_fields_in_column( $subrow_fields, 1 );
|
2315 |
if ( $col1_fields ) {
|
2316 |
+
foreach( $col1_fields as $key => $data ) {
|
2317 |
+
|
2318 |
+
$data = apply_filters("um_view_field_output_".$data['type'], $data);
|
2319 |
+
|
2320 |
+
$output .= $this->view_field( $key, $data );
|
2321 |
+
|
2322 |
+
}
|
2323 |
}
|
2324 |
$output .= '</div>';
|
2325 |
|
2326 |
$output .= '<div class="um-col-132">';
|
2327 |
$col2_fields = $this->get_fields_in_column( $subrow_fields, 2 );
|
2328 |
if ( $col2_fields ) {
|
2329 |
+
foreach( $col2_fields as $key => $data ) {
|
2330 |
+
|
2331 |
+
$data = apply_filters("um_view_field_output_".$data['type'], $data);
|
2332 |
+
|
2333 |
+
$output .= $this->view_field( $key, $data );
|
2334 |
+
|
2335 |
+
}
|
2336 |
}
|
2337 |
$output .= '</div>';
|
2338 |
|
2339 |
$output .= '<div class="um-col-133">';
|
2340 |
$col3_fields = $this->get_fields_in_column( $subrow_fields, 3 );
|
2341 |
if ( $col3_fields ) {
|
2342 |
+
foreach( $col3_fields as $key => $data ) {
|
2343 |
+
|
2344 |
+
$data = apply_filters("um_view_field_output_".$data['type'], $data);
|
2345 |
+
|
2346 |
+
$output .= $this->view_field( $key, $data );
|
2347 |
+
|
2348 |
+
}
|
2349 |
}
|
2350 |
$output .= '</div><div class="um-clear"></div>';
|
2351 |
|
core/um-files.php
CHANGED
@@ -5,7 +5,7 @@ class UM_Files {
|
|
5 |
function __construct() {
|
6 |
|
7 |
add_action('init', array(&$this, 'setup_paths'), 1);
|
8 |
-
|
9 |
$this->fonticon = array(
|
10 |
'pdf' => array('icon' => 'um-faicon-file-pdf-o', 'color' => '#D24D4D' ),
|
11 |
'txt' => array('icon' => 'um-faicon-file-text-o' ),
|
@@ -19,48 +19,64 @@ class UM_Files {
|
|
19 |
'zip' => array('icon' => 'um-faicon-file-zip-o' ),
|
20 |
'rar' => array('icon' => 'um-faicon-file-zip-o' ),
|
21 |
'mp3' => array('icon' => 'um-faicon-file-audio-o' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
);
|
23 |
-
|
24 |
$this->default_file_fonticon = 'um-faicon-file-o';
|
25 |
-
|
26 |
}
|
27 |
-
|
28 |
/***
|
29 |
*** @allowed image types
|
30 |
***/
|
31 |
function allowed_image_types() {
|
32 |
-
|
33 |
$array['png'] = 'PNG';
|
34 |
$array['jpeg'] = 'JPEG';
|
35 |
$array['jpg'] = 'JPG';
|
36 |
$array['gif'] = 'GIF';
|
37 |
-
|
38 |
$array = apply_filters('um_allowed_image_types', $array);
|
39 |
return $array;
|
40 |
}
|
41 |
-
|
42 |
/***
|
43 |
*** @allowed file types
|
44 |
***/
|
45 |
function allowed_file_types() {
|
46 |
-
|
47 |
-
$array['pdf']
|
48 |
-
$array['txt']
|
49 |
-
$array['csv']
|
50 |
-
$array['doc']
|
51 |
$array['docx'] = 'DOCX';
|
52 |
-
$array['odt']
|
53 |
-
$array['ods']
|
54 |
-
$array['xls']
|
55 |
$array['xlsx'] = 'XLSX';
|
56 |
-
$array['zip']
|
57 |
-
$array['rar']
|
58 |
-
$array['mp3']
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
$array = apply_filters('um_allowed_file_types', $array);
|
61 |
return $array;
|
62 |
}
|
63 |
-
|
64 |
/***
|
65 |
*** @Get extension icon
|
66 |
***/
|
@@ -71,7 +87,7 @@ class UM_Files {
|
|
71 |
return $this->default_file_fonticon;
|
72 |
}
|
73 |
}
|
74 |
-
|
75 |
/***
|
76 |
*** @Get extension icon background
|
77 |
***/
|
@@ -82,20 +98,30 @@ class UM_Files {
|
|
82 |
return '#666';
|
83 |
}
|
84 |
}
|
85 |
-
|
86 |
/***
|
87 |
*** @Setup upload directory
|
88 |
***/
|
89 |
function setup_paths(){
|
90 |
-
|
91 |
$this->upload_dir = wp_upload_dir();
|
92 |
-
|
93 |
$this->upload_basedir = $this->upload_dir['basedir'] . '/ultimatemember/';
|
94 |
$this->upload_baseurl = $this->upload_dir['baseurl'] . '/ultimatemember/';
|
95 |
-
|
96 |
$this->upload_basedir = apply_filters('um_upload_basedir_filter', $this->upload_basedir );
|
97 |
$this->upload_baseurl = apply_filters('um_upload_baseurl_filter', $this->upload_baseurl );
|
98 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
$this->upload_temp = $this->upload_basedir . 'temp/';
|
100 |
$this->upload_temp_url = $this->upload_baseurl . 'temp/';
|
101 |
|
@@ -110,9 +136,9 @@ class UM_Files {
|
|
110 |
@mkdir( $this->upload_temp , 0755, true);
|
111 |
umask($old);
|
112 |
}
|
113 |
-
|
114 |
}
|
115 |
-
|
116 |
/***
|
117 |
*** @Generate unique temp directory
|
118 |
***/
|
@@ -123,14 +149,14 @@ class UM_Files {
|
|
123 |
$array['url'] = $this->upload_temp_url . $unique_number . '/';
|
124 |
return $array;
|
125 |
}
|
126 |
-
|
127 |
/***
|
128 |
*** @get path only without file name
|
129 |
***/
|
130 |
function path_only( $file ) {
|
131 |
return trailingslashit( dirname( $file ) );
|
132 |
}
|
133 |
-
|
134 |
/***
|
135 |
*** @fix image orientation
|
136 |
***/
|
@@ -156,103 +182,103 @@ class UM_Files {
|
|
156 |
}
|
157 |
return $rotate;
|
158 |
}
|
159 |
-
|
160 |
/***
|
161 |
*** @Process an image
|
162 |
***/
|
163 |
function create_and_copy_image($source, $destination, $quality = 100) {
|
164 |
-
|
165 |
$info = @getimagesize($source);
|
166 |
-
|
167 |
if ($info['mime'] == 'image/jpeg'){
|
168 |
-
|
169 |
$image = imagecreatefromjpeg($source);
|
170 |
-
|
171 |
} else if ($info['mime'] == 'image/gif'){
|
172 |
-
|
173 |
$image = imagecreatefromgif($source);
|
174 |
|
175 |
} else if ($info['mime'] == 'image/png'){
|
176 |
-
|
177 |
$image = imagecreatefrompng($source);
|
178 |
|
179 |
}
|
180 |
|
181 |
list($w, $h) = @getimagesize( $source );
|
182 |
if ( $w > um_get_option('image_max_width') ) {
|
183 |
-
|
184 |
$ratio = round( $w / $h, 2 );
|
185 |
$new_w = um_get_option('image_max_width');
|
186 |
$new_h = round( $new_w / $ratio, 2 );
|
187 |
-
|
188 |
$image_p = imagecreatetruecolor( $new_w, $new_h );
|
189 |
imagecopyresampled( $image_p, $image, 0, 0, 0, 0, $new_w, $new_h, $w, $h );
|
190 |
$image_p = $this->fix_image_orientation($image_p, $source);
|
191 |
imagejpeg( $image_p, $destination, $quality);
|
192 |
-
|
193 |
} else {
|
194 |
-
|
195 |
$image = $this->fix_image_orientation($image, $source);
|
196 |
imagejpeg( $image, $destination, $quality);
|
197 |
-
|
198 |
}
|
199 |
|
200 |
}
|
201 |
-
|
202 |
/***
|
203 |
*** @Process a file
|
204 |
***/
|
205 |
function upload_temp_file($source, $destination) {
|
206 |
-
|
207 |
move_uploaded_file($source, $destination);
|
208 |
-
|
209 |
}
|
210 |
|
211 |
/***
|
212 |
*** @Process a temp upload
|
213 |
***/
|
214 |
function new_image_upload_temp($source, $destination, $quality = 100){
|
215 |
-
|
216 |
$unique_dir = $this->unique_dir();
|
217 |
-
|
218 |
$this->make_dir( $unique_dir['dir'] );
|
219 |
|
220 |
$this->create_and_copy_image($source, $unique_dir['dir'] . $destination, $quality);
|
221 |
-
|
222 |
$url = $unique_dir['url'] . $destination;
|
223 |
|
224 |
return $url;
|
225 |
-
|
226 |
}
|
227 |
-
|
228 |
/***
|
229 |
*** @Process a temp upload for files
|
230 |
***/
|
231 |
function new_file_upload_temp($source, $destination ){
|
232 |
-
|
233 |
$unique_dir = $this->unique_dir();
|
234 |
-
|
235 |
$this->make_dir( $unique_dir['dir'] );
|
236 |
|
237 |
$this->upload_temp_file($source, $unique_dir['dir'] . $destination);
|
238 |
-
|
239 |
$url = $unique_dir['url'] . $destination;
|
240 |
|
241 |
return $url;
|
242 |
-
|
243 |
}
|
244 |
-
|
245 |
/***
|
246 |
*** @Make a Folder
|
247 |
***/
|
248 |
function make_dir( $dir ){
|
249 |
-
|
250 |
$old = umask(0);
|
251 |
@mkdir( $dir, 0755, true);
|
252 |
umask($old);
|
253 |
-
|
254 |
}
|
255 |
-
|
256 |
/***
|
257 |
*** @Get extension by mime type
|
258 |
***/
|
@@ -260,64 +286,64 @@ class UM_Files {
|
|
260 |
$split = explode('/',$mime);
|
261 |
return $split[1];
|
262 |
}
|
263 |
-
|
264 |
/***
|
265 |
*** @Get file data
|
266 |
***/
|
267 |
function get_file_data($file){
|
268 |
-
|
269 |
$array['size'] = filesize($file);
|
270 |
|
271 |
return $array;
|
272 |
}
|
273 |
-
|
274 |
/***
|
275 |
*** @Get image data
|
276 |
***/
|
277 |
function get_image_data($file){
|
278 |
-
|
279 |
$array['size'] = filesize($file);
|
280 |
-
|
281 |
$array['image'] = @getimagesize($file);
|
282 |
-
|
283 |
if ( $array['image'] > 0 ) {
|
284 |
-
|
285 |
$array['invalid_image'] = false;
|
286 |
-
|
287 |
list($width, $height, $type, $attr) = @getimagesize($file);
|
288 |
-
|
289 |
$array['width'] = $width;
|
290 |
$array['height'] = $height;
|
291 |
$array['ratio'] = $width / $height;
|
292 |
-
|
293 |
$array['extension'] = $this->get_extension_by_mime_type( $array['image']['mime'] );
|
294 |
-
|
295 |
} else {
|
296 |
-
|
297 |
$array['invalid_image'] = true;
|
298 |
-
|
299 |
}
|
300 |
-
|
301 |
return $array;
|
302 |
}
|
303 |
-
|
304 |
/***
|
305 |
*** @Check image upload and handle errors
|
306 |
***/
|
307 |
function check_image_upload($file, $field) {
|
308 |
global $ultimatemember;
|
309 |
$error = null;
|
310 |
-
|
311 |
$fileinfo = $this->get_image_data($file);
|
312 |
$data = $ultimatemember->fields->get_field($field);
|
313 |
-
|
314 |
if ( $data == null ) {
|
315 |
$data = apply_filters("um_custom_image_handle_{$field}", '' );
|
316 |
if ( !$data ) {
|
317 |
$error = __('This media type is not recognized.','ultimatemember');
|
318 |
}
|
319 |
}
|
320 |
-
|
321 |
if ( $fileinfo['invalid_image'] == true ) {
|
322 |
$error = sprintf(__('Your image is invalid or too large!','ultimatemember') );
|
323 |
} elseif ( isset( $data['allowed_types'] ) && !$this->in_array( $fileinfo['extension'], $data['allowed_types'] ) ) {
|
@@ -329,10 +355,10 @@ class UM_Files {
|
|
329 |
} elseif ( isset($data['min_height']) && ( $fileinfo['height'] < $data['min_height'] ) ) {
|
330 |
$error = sprintf(__('Your photo is too small. It must be at least %spx wide.','ultimatemember'), $data['min_height']);
|
331 |
}
|
332 |
-
|
333 |
return $error;
|
334 |
}
|
335 |
-
|
336 |
/***
|
337 |
*** @Check file upload and handle errors
|
338 |
***/
|
@@ -342,16 +368,16 @@ class UM_Files {
|
|
342 |
|
343 |
$fileinfo = $this->get_file_data($file);
|
344 |
$data = $ultimatemember->fields->get_field($field);
|
345 |
-
|
346 |
if ( !$this->in_array( $extension, $data['allowed_types'] ) ) {
|
347 |
$error = ( isset( $data['extension_error'] ) && !empty( $data['extension_error'] ) ) ? $data['extension_error'] : 'not allowed';
|
348 |
} elseif ( isset($data['min_size']) && ( $fileinfo['size'] < $data['min_size'] ) ) {
|
349 |
$error = $data['min_size_error'];
|
350 |
}
|
351 |
-
|
352 |
return $error;
|
353 |
}
|
354 |
-
|
355 |
/***
|
356 |
*** @If a value exists in comma seperated list
|
357 |
***/
|
@@ -360,17 +386,17 @@ class UM_Files {
|
|
360 |
return true;
|
361 |
return false;
|
362 |
}
|
363 |
-
|
364 |
/***
|
365 |
*** @This function will delete file upload from server
|
366 |
***/
|
367 |
function delete_file( $src ) {
|
368 |
-
|
369 |
if ( strstr( $src, '?' ) ){
|
370 |
$splitted = explode('?', $src );
|
371 |
$src = $splitted[0];
|
372 |
}
|
373 |
-
|
374 |
$is_temp = um_is_temp_upload( $src );
|
375 |
if ( $is_temp ) {
|
376 |
unlink( $is_temp );
|
@@ -379,38 +405,38 @@ class UM_Files {
|
|
379 |
die('Not a valid temp file');
|
380 |
}
|
381 |
}
|
382 |
-
|
383 |
/***
|
384 |
*** @delete a main user photo
|
385 |
***/
|
386 |
function delete_core_user_photo( $user_id, $type ) {
|
387 |
-
|
388 |
delete_user_meta( $user_id, $type );
|
389 |
-
|
390 |
do_action("um_after_remove_{$type}", $user_id);
|
391 |
-
|
392 |
$dir = $this->upload_basedir . $user_id . '/';
|
393 |
$prefix = $type;
|
394 |
chdir($dir);
|
395 |
$matches = glob($prefix.'*',GLOB_MARK);
|
396 |
-
|
397 |
if( is_array($matches) && !empty($matches)) {
|
398 |
foreach($matches as $match) {
|
399 |
if( is_file($dir.$match) ) unlink($dir.$match);
|
400 |
}
|
401 |
}
|
402 |
-
|
403 |
if ( count(glob("$dir/*")) === 0) {
|
404 |
rmdir( $dir );
|
405 |
}
|
406 |
-
|
407 |
}
|
408 |
|
409 |
/***
|
410 |
*** @resize a local image
|
411 |
***/
|
412 |
function resize_image( $file, $crop ) {
|
413 |
-
|
414 |
$targ_x1 = $crop[0];
|
415 |
$targ_y1 = $crop[1];
|
416 |
$targ_x2 = $crop[2];
|
@@ -421,12 +447,12 @@ class UM_Files {
|
|
421 |
|
422 |
imagecopy( $dst_r, $img_r, 0, 0, $targ_x1, $targ_y1, $targ_x2, $targ_y2 );
|
423 |
imagejpeg( $dst_r, $this->path_only( $file ) . basename( $file ), 100);
|
424 |
-
|
425 |
$split = explode('/ultimatemember/temp/', $file);
|
426 |
return $this->upload_temp_url . $split[1];
|
427 |
-
|
428 |
}
|
429 |
-
|
430 |
/***
|
431 |
*** @make a user folder for uploads
|
432 |
***/
|
@@ -437,34 +463,34 @@ class UM_Files {
|
|
437 |
umask($old);
|
438 |
}
|
439 |
}
|
440 |
-
|
441 |
/***
|
442 |
*** @new user upload
|
443 |
***/
|
444 |
function new_user_upload( $user_id, $source, $key ) {
|
445 |
-
|
446 |
// if he does not have uploads dir yet
|
447 |
$this->new_user( $user_id );
|
448 |
-
|
449 |
if ( is_user_logged_in() && ( get_current_user_id() != $user_id ) && !um_user_can('can_edit_everyone') ) {
|
450 |
wp_die( __('Unauthorized to do this attempt.','ultimatemember') );
|
451 |
}
|
452 |
-
|
453 |
if ( !is_user_logged_in() && ( $key == 'profile_photo' || $key == 'cover_photo' ) ) {
|
454 |
wp_die( __('Unauthorized to do this attempt.','ultimatemember') );
|
455 |
}
|
456 |
-
|
457 |
// name and extension stuff
|
458 |
$source_name = basename( $source );
|
459 |
-
|
460 |
if ( $key == 'profile_photo' ) {
|
461 |
$source_name = 'profile_photo.jpg';
|
462 |
}
|
463 |
-
|
464 |
if ( $key == 'cover_photo' ) {
|
465 |
$source_name = 'cover_photo.jpg';
|
466 |
}
|
467 |
-
|
468 |
$ext = '.' . pathinfo($source_name, PATHINFO_EXTENSION);
|
469 |
$name = str_replace( $ext, '', $source_name );
|
470 |
$filename = $name . $ext;
|
@@ -474,60 +500,60 @@ class UM_Files {
|
|
474 |
unlink( $this->upload_basedir . $user_id . '/' . $filename );
|
475 |
}
|
476 |
copy( $source, $this->upload_basedir . $user_id . '/' . $filename );
|
477 |
-
|
478 |
// thumbs
|
479 |
if ( $key == 'profile_photo' ) {
|
480 |
-
|
481 |
list($w, $h) = @getimagesize( $source );
|
482 |
-
|
483 |
$sizes = um_get_option('photo_thumb_sizes');
|
484 |
foreach( $sizes as $size ) {
|
485 |
-
|
486 |
if ( file_exists( $this->upload_basedir . $user_id . '/' . $name . '-' . $size . $ext ) ) {
|
487 |
unlink( $this->upload_basedir . $user_id . '/' . $name . '-' . $size . $ext );
|
488 |
}
|
489 |
-
|
490 |
if ( $size < $w ) {
|
491 |
|
492 |
$thumb_s = imagecreatefromjpeg( $source );
|
493 |
$thumb = imagecreatetruecolor( $size, $size );
|
494 |
imagecopyresampled( $thumb, $thumb_s, 0, 0, 0, 0, $size, $size, $w, $h );
|
495 |
imagejpeg( $thumb, $this->upload_basedir . $user_id . '/' . $name . '-' . $size . $ext, 100);
|
496 |
-
|
497 |
}
|
498 |
-
|
499 |
}
|
500 |
-
|
501 |
// removes a synced profile photo
|
502 |
delete_user_meta( $user_id, 'synced_profile_photo' );
|
503 |
-
|
504 |
}
|
505 |
-
|
506 |
if ( $key == 'cover_photo' ) {
|
507 |
-
|
508 |
list($w, $h) = @getimagesize( $source );
|
509 |
-
|
510 |
$sizes = um_get_option('cover_thumb_sizes');
|
511 |
foreach( $sizes as $size ) {
|
512 |
-
|
513 |
$ratio = round( $w / $h, 2 );
|
514 |
$height = round( $size / $ratio, 2 );
|
515 |
-
|
516 |
if ( file_exists( $this->upload_basedir . $user_id . '/' . $name . '-' . $size . $ext ) ) {
|
517 |
unlink( $this->upload_basedir . $user_id . '/' . $name . '-' . $size . $ext );
|
518 |
}
|
519 |
-
|
520 |
if ( $size < $w ) {
|
521 |
|
522 |
$thumb_s = imagecreatefromjpeg( $source );
|
523 |
$thumb = imagecreatetruecolor( $size, $height );
|
524 |
imagecopyresampled( $thumb, $thumb_s, 0, 0, 0, 0, $size, $height, $w, $h );
|
525 |
imagejpeg( $thumb, $this->upload_basedir . $user_id . '/' . $name . '-' . $size . $ext, 100);
|
526 |
-
|
527 |
}
|
528 |
-
|
529 |
}
|
530 |
-
|
531 |
}
|
532 |
|
533 |
// clean up temp
|
@@ -538,26 +564,40 @@ class UM_Files {
|
|
538 |
// update user's meta
|
539 |
do_action('um_before_upload_db_meta', $user_id, $key );
|
540 |
do_action("um_before_upload_db_meta_{$key}", $user_id );
|
541 |
-
|
542 |
update_user_meta( $user_id, $key, $filename );
|
543 |
-
|
544 |
do_action('um_after_upload_db_meta', $user_id, $key );
|
545 |
do_action("um_after_upload_db_meta_{$key}", $user_id );
|
546 |
-
|
547 |
// the url of upload
|
548 |
return $this->upload_baseurl . $user_id . '/' . $filename;
|
549 |
-
|
550 |
}
|
551 |
-
|
552 |
/***
|
553 |
*** @Remove a directory
|
554 |
***/
|
555 |
-
function remove_dir($dir) {
|
556 |
if ( file_exists( $dir ) ) {
|
557 |
-
foreach(glob($dir . '/*') as $file) {
|
558 |
-
if(is_dir($file)) $this->remove_dir($file); else unlink($file);
|
559 |
} rmdir($dir);
|
560 |
}
|
561 |
}
|
562 |
-
|
563 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
function __construct() {
|
6 |
|
7 |
add_action('init', array(&$this, 'setup_paths'), 1);
|
8 |
+
|
9 |
$this->fonticon = array(
|
10 |
'pdf' => array('icon' => 'um-faicon-file-pdf-o', 'color' => '#D24D4D' ),
|
11 |
'txt' => array('icon' => 'um-faicon-file-text-o' ),
|
19 |
'zip' => array('icon' => 'um-faicon-file-zip-o' ),
|
20 |
'rar' => array('icon' => 'um-faicon-file-zip-o' ),
|
21 |
'mp3' => array('icon' => 'um-faicon-file-audio-o' ),
|
22 |
+
'jpg' => array('icon' => 'um-faicon-picture-o' ),
|
23 |
+
'jpeg' => array('icon' => 'um-faicon-picture-o' ),
|
24 |
+
'png' => array('icon' => 'um-icon-image' ),
|
25 |
+
'gif' => array('icon' => 'um-icon-images' ),
|
26 |
+
'eps' => array('icon' => 'um-icon-images' ),
|
27 |
+
'psd' => array('icon' => 'um-icon-images' ),
|
28 |
+
'tif' => array('icon' => 'um-icon-image' ),
|
29 |
+
'tiff' => array('icon' => 'um-icon-image' ),
|
30 |
);
|
31 |
+
|
32 |
$this->default_file_fonticon = 'um-faicon-file-o';
|
33 |
+
|
34 |
}
|
35 |
+
|
36 |
/***
|
37 |
*** @allowed image types
|
38 |
***/
|
39 |
function allowed_image_types() {
|
40 |
+
|
41 |
$array['png'] = 'PNG';
|
42 |
$array['jpeg'] = 'JPEG';
|
43 |
$array['jpg'] = 'JPG';
|
44 |
$array['gif'] = 'GIF';
|
45 |
+
|
46 |
$array = apply_filters('um_allowed_image_types', $array);
|
47 |
return $array;
|
48 |
}
|
49 |
+
|
50 |
/***
|
51 |
*** @allowed file types
|
52 |
***/
|
53 |
function allowed_file_types() {
|
54 |
+
|
55 |
+
$array['pdf'] = 'PDF';
|
56 |
+
$array['txt'] = 'Text';
|
57 |
+
$array['csv'] = 'CSV';
|
58 |
+
$array['doc'] = 'DOC';
|
59 |
$array['docx'] = 'DOCX';
|
60 |
+
$array['odt'] = 'ODT';
|
61 |
+
$array['ods'] = 'ODS';
|
62 |
+
$array['xls'] = 'XLS';
|
63 |
$array['xlsx'] = 'XLSX';
|
64 |
+
$array['zip'] = 'ZIP';
|
65 |
+
$array['rar'] = 'RAR';
|
66 |
+
$array['mp3'] = 'MP3';
|
67 |
+
$array['jpg'] = 'JPG';
|
68 |
+
$array['jpeg'] = 'JPEG';
|
69 |
+
$array['png'] = 'PNG';
|
70 |
+
$array['gif'] = 'GIF';
|
71 |
+
$array['eps'] = 'EPS';
|
72 |
+
$array['psd'] = 'PSD';
|
73 |
+
$array['tif'] = 'TIF';
|
74 |
+
$array['tiff'] = 'TIFF';
|
75 |
+
|
76 |
$array = apply_filters('um_allowed_file_types', $array);
|
77 |
return $array;
|
78 |
}
|
79 |
+
|
80 |
/***
|
81 |
*** @Get extension icon
|
82 |
***/
|
87 |
return $this->default_file_fonticon;
|
88 |
}
|
89 |
}
|
90 |
+
|
91 |
/***
|
92 |
*** @Get extension icon background
|
93 |
***/
|
98 |
return '#666';
|
99 |
}
|
100 |
}
|
101 |
+
|
102 |
/***
|
103 |
*** @Setup upload directory
|
104 |
***/
|
105 |
function setup_paths(){
|
106 |
+
|
107 |
$this->upload_dir = wp_upload_dir();
|
108 |
+
|
109 |
$this->upload_basedir = $this->upload_dir['basedir'] . '/ultimatemember/';
|
110 |
$this->upload_baseurl = $this->upload_dir['baseurl'] . '/ultimatemember/';
|
111 |
+
|
112 |
$this->upload_basedir = apply_filters('um_upload_basedir_filter', $this->upload_basedir );
|
113 |
$this->upload_baseurl = apply_filters('um_upload_baseurl_filter', $this->upload_baseurl );
|
114 |
+
|
115 |
+
// @note : is_ssl() doesn't work properly for some sites running with load balancers
|
116 |
+
// Check the links for more info about this bug
|
117 |
+
// https://codex.wordpress.org/Function_Reference/is_ssl
|
118 |
+
// http://snippets.webaware.com.au/snippets/wordpress-is_ssl-doesnt-work-behind-some-load-balancers/
|
119 |
+
if( is_ssl() || stripos( get_option( 'siteurl' ), 'https://' ) !== false
|
120 |
+
|| ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] )
|
121 |
+
&& $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ) ) {
|
122 |
+
$this->upload_baseurl = str_replace("http://", "https://", $this->upload_baseurl);
|
123 |
+
}
|
124 |
+
|
125 |
$this->upload_temp = $this->upload_basedir . 'temp/';
|
126 |
$this->upload_temp_url = $this->upload_baseurl . 'temp/';
|
127 |
|
136 |
@mkdir( $this->upload_temp , 0755, true);
|
137 |
umask($old);
|
138 |
}
|
139 |
+
|
140 |
}
|
141 |
+
|
142 |
/***
|
143 |
*** @Generate unique temp directory
|
144 |
***/
|
149 |
$array['url'] = $this->upload_temp_url . $unique_number . '/';
|
150 |
return $array;
|
151 |
}
|
152 |
+
|
153 |
/***
|
154 |
*** @get path only without file name
|
155 |
***/
|
156 |
function path_only( $file ) {
|
157 |
return trailingslashit( dirname( $file ) );
|
158 |
}
|
159 |
+
|
160 |
/***
|
161 |
*** @fix image orientation
|
162 |
***/
|
182 |
}
|
183 |
return $rotate;
|
184 |
}
|
185 |
+
|
186 |
/***
|
187 |
*** @Process an image
|
188 |
***/
|
189 |
function create_and_copy_image($source, $destination, $quality = 100) {
|
190 |
+
|
191 |
$info = @getimagesize($source);
|
192 |
+
|
193 |
if ($info['mime'] == 'image/jpeg'){
|
194 |
+
|
195 |
$image = imagecreatefromjpeg($source);
|
196 |
+
|
197 |
} else if ($info['mime'] == 'image/gif'){
|
198 |
+
|
199 |
$image = imagecreatefromgif($source);
|
200 |
|
201 |
} else if ($info['mime'] == 'image/png'){
|
202 |
+
|
203 |
$image = imagecreatefrompng($source);
|
204 |
|
205 |
}
|
206 |
|
207 |
list($w, $h) = @getimagesize( $source );
|
208 |
if ( $w > um_get_option('image_max_width') ) {
|
209 |
+
|
210 |
$ratio = round( $w / $h, 2 );
|
211 |
$new_w = um_get_option('image_max_width');
|
212 |
$new_h = round( $new_w / $ratio, 2 );
|
213 |
+
|
214 |
$image_p = imagecreatetruecolor( $new_w, $new_h );
|
215 |
imagecopyresampled( $image_p, $image, 0, 0, 0, 0, $new_w, $new_h, $w, $h );
|
216 |
$image_p = $this->fix_image_orientation($image_p, $source);
|
217 |
imagejpeg( $image_p, $destination, $quality);
|
218 |
+
|
219 |
} else {
|
220 |
+
|
221 |
$image = $this->fix_image_orientation($image, $source);
|
222 |
imagejpeg( $image, $destination, $quality);
|
223 |
+
|
224 |
}
|
225 |
|
226 |
}
|
227 |
+
|
228 |
/***
|
229 |
*** @Process a file
|
230 |
***/
|
231 |
function upload_temp_file($source, $destination) {
|
232 |
+
|
233 |
move_uploaded_file($source, $destination);
|
234 |
+
|
235 |
}
|
236 |
|
237 |
/***
|
238 |
*** @Process a temp upload
|
239 |
***/
|
240 |
function new_image_upload_temp($source, $destination, $quality = 100){
|
241 |
+
|
242 |
$unique_dir = $this->unique_dir();
|
243 |
+
|
244 |
$this->make_dir( $unique_dir['dir'] );
|
245 |
|
246 |
$this->create_and_copy_image($source, $unique_dir['dir'] . $destination, $quality);
|
247 |
+
|
248 |
$url = $unique_dir['url'] . $destination;
|
249 |
|
250 |
return $url;
|
251 |
+
|
252 |
}
|
253 |
+
|
254 |
/***
|
255 |
*** @Process a temp upload for files
|
256 |
***/
|
257 |
function new_file_upload_temp($source, $destination ){
|
258 |
+
|
259 |
$unique_dir = $this->unique_dir();
|
260 |
+
|
261 |
$this->make_dir( $unique_dir['dir'] );
|
262 |
|
263 |
$this->upload_temp_file($source, $unique_dir['dir'] . $destination);
|
264 |
+
|
265 |
$url = $unique_dir['url'] . $destination;
|
266 |
|
267 |
return $url;
|
268 |
+
|
269 |
}
|
270 |
+
|
271 |
/***
|
272 |
*** @Make a Folder
|
273 |
***/
|
274 |
function make_dir( $dir ){
|
275 |
+
|
276 |
$old = umask(0);
|
277 |
@mkdir( $dir, 0755, true);
|
278 |
umask($old);
|
279 |
+
|
280 |
}
|
281 |
+
|
282 |
/***
|
283 |
*** @Get extension by mime type
|
284 |
***/
|
286 |
$split = explode('/',$mime);
|
287 |
return $split[1];
|
288 |
}
|
289 |
+
|
290 |
/***
|
291 |
*** @Get file data
|
292 |
***/
|
293 |
function get_file_data($file){
|
294 |
+
|
295 |
$array['size'] = filesize($file);
|
296 |
|
297 |
return $array;
|
298 |
}
|
299 |
+
|
300 |
/***
|
301 |
*** @Get image data
|
302 |
***/
|
303 |
function get_image_data($file){
|
304 |
+
|
305 |
$array['size'] = filesize($file);
|
306 |
+
|
307 |
$array['image'] = @getimagesize($file);
|
308 |
+
|
309 |
if ( $array['image'] > 0 ) {
|
310 |
+
|
311 |
$array['invalid_image'] = false;
|
312 |
+
|
313 |
list($width, $height, $type, $attr) = @getimagesize($file);
|
314 |
+
|
315 |
$array['width'] = $width;
|
316 |
$array['height'] = $height;
|
317 |
$array['ratio'] = $width / $height;
|
318 |
+
|
319 |
$array['extension'] = $this->get_extension_by_mime_type( $array['image']['mime'] );
|
320 |
+
|
321 |
} else {
|
322 |
+
|
323 |
$array['invalid_image'] = true;
|
324 |
+
|
325 |
}
|
326 |
+
|
327 |
return $array;
|
328 |
}
|
329 |
+
|
330 |
/***
|
331 |
*** @Check image upload and handle errors
|
332 |
***/
|
333 |
function check_image_upload($file, $field) {
|
334 |
global $ultimatemember;
|
335 |
$error = null;
|
336 |
+
|
337 |
$fileinfo = $this->get_image_data($file);
|
338 |
$data = $ultimatemember->fields->get_field($field);
|
339 |
+
|
340 |
if ( $data == null ) {
|
341 |
$data = apply_filters("um_custom_image_handle_{$field}", '' );
|
342 |
if ( !$data ) {
|
343 |
$error = __('This media type is not recognized.','ultimatemember');
|
344 |
}
|
345 |
}
|
346 |
+
|
347 |
if ( $fileinfo['invalid_image'] == true ) {
|
348 |
$error = sprintf(__('Your image is invalid or too large!','ultimatemember') );
|
349 |
} elseif ( isset( $data['allowed_types'] ) && !$this->in_array( $fileinfo['extension'], $data['allowed_types'] ) ) {
|
355 |
} elseif ( isset($data['min_height']) && ( $fileinfo['height'] < $data['min_height'] ) ) {
|
356 |
$error = sprintf(__('Your photo is too small. It must be at least %spx wide.','ultimatemember'), $data['min_height']);
|
357 |
}
|
358 |
+
|
359 |
return $error;
|
360 |
}
|
361 |
+
|
362 |
/***
|
363 |
*** @Check file upload and handle errors
|
364 |
***/
|
368 |
|
369 |
$fileinfo = $this->get_file_data($file);
|
370 |
$data = $ultimatemember->fields->get_field($field);
|
371 |
+
|
372 |
if ( !$this->in_array( $extension, $data['allowed_types'] ) ) {
|
373 |
$error = ( isset( $data['extension_error'] ) && !empty( $data['extension_error'] ) ) ? $data['extension_error'] : 'not allowed';
|
374 |
} elseif ( isset($data['min_size']) && ( $fileinfo['size'] < $data['min_size'] ) ) {
|
375 |
$error = $data['min_size_error'];
|
376 |
}
|
377 |
+
|
378 |
return $error;
|
379 |
}
|
380 |
+
|
381 |
/***
|
382 |
*** @If a value exists in comma seperated list
|
383 |
***/
|
386 |
return true;
|
387 |
return false;
|
388 |
}
|
389 |
+
|
390 |
/***
|
391 |
*** @This function will delete file upload from server
|
392 |
***/
|
393 |
function delete_file( $src ) {
|
394 |
+
|
395 |
if ( strstr( $src, '?' ) ){
|
396 |
$splitted = explode('?', $src );
|
397 |
$src = $splitted[0];
|
398 |
}
|
399 |
+
|
400 |
$is_temp = um_is_temp_upload( $src );
|
401 |
if ( $is_temp ) {
|
402 |
unlink( $is_temp );
|
405 |
die('Not a valid temp file');
|
406 |
}
|
407 |
}
|
408 |
+
|
409 |
/***
|
410 |
*** @delete a main user photo
|
411 |
***/
|
412 |
function delete_core_user_photo( $user_id, $type ) {
|
413 |
+
|
414 |
delete_user_meta( $user_id, $type );
|
415 |
+
|
416 |
do_action("um_after_remove_{$type}", $user_id);
|
417 |
+
|
418 |
$dir = $this->upload_basedir . $user_id . '/';
|
419 |
$prefix = $type;
|
420 |
chdir($dir);
|
421 |
$matches = glob($prefix.'*',GLOB_MARK);
|
422 |
+
|
423 |
if( is_array($matches) && !empty($matches)) {
|
424 |
foreach($matches as $match) {
|
425 |
if( is_file($dir.$match) ) unlink($dir.$match);
|
426 |
}
|
427 |
}
|
428 |
+
|
429 |
if ( count(glob("$dir/*")) === 0) {
|
430 |
rmdir( $dir );
|
431 |
}
|
432 |
+
|
433 |
}
|
434 |
|
435 |
/***
|
436 |
*** @resize a local image
|
437 |
***/
|
438 |
function resize_image( $file, $crop ) {
|
439 |
+
|
440 |
$targ_x1 = $crop[0];
|
441 |
$targ_y1 = $crop[1];
|
442 |
$targ_x2 = $crop[2];
|
447 |
|
448 |
imagecopy( $dst_r, $img_r, 0, 0, $targ_x1, $targ_y1, $targ_x2, $targ_y2 );
|
449 |
imagejpeg( $dst_r, $this->path_only( $file ) . basename( $file ), 100);
|
450 |
+
|
451 |
$split = explode('/ultimatemember/temp/', $file);
|
452 |
return $this->upload_temp_url . $split[1];
|
453 |
+
|
454 |
}
|
455 |
+
|
456 |
/***
|
457 |
*** @make a user folder for uploads
|
458 |
***/
|
463 |
umask($old);
|
464 |
}
|
465 |
}
|
466 |
+
|
467 |
/***
|
468 |
*** @new user upload
|
469 |
***/
|
470 |
function new_user_upload( $user_id, $source, $key ) {
|
471 |
+
|
472 |
// if he does not have uploads dir yet
|
473 |
$this->new_user( $user_id );
|
474 |
+
|
475 |
if ( is_user_logged_in() && ( get_current_user_id() != $user_id ) && !um_user_can('can_edit_everyone') ) {
|
476 |
wp_die( __('Unauthorized to do this attempt.','ultimatemember') );
|
477 |
}
|
478 |
+
|
479 |
if ( !is_user_logged_in() && ( $key == 'profile_photo' || $key == 'cover_photo' ) ) {
|
480 |
wp_die( __('Unauthorized to do this attempt.','ultimatemember') );
|
481 |
}
|
482 |
+
|
483 |
// name and extension stuff
|
484 |
$source_name = basename( $source );
|
485 |
+
|
486 |
if ( $key == 'profile_photo' ) {
|
487 |
$source_name = 'profile_photo.jpg';
|
488 |
}
|
489 |
+
|
490 |
if ( $key == 'cover_photo' ) {
|
491 |
$source_name = 'cover_photo.jpg';
|
492 |
}
|
493 |
+
|
494 |
$ext = '.' . pathinfo($source_name, PATHINFO_EXTENSION);
|
495 |
$name = str_replace( $ext, '', $source_name );
|
496 |
$filename = $name . $ext;
|
500 |
unlink( $this->upload_basedir . $user_id . '/' . $filename );
|
501 |
}
|
502 |
copy( $source, $this->upload_basedir . $user_id . '/' . $filename );
|
503 |
+
|
504 |
// thumbs
|
505 |
if ( $key == 'profile_photo' ) {
|
506 |
+
|
507 |
list($w, $h) = @getimagesize( $source );
|
508 |
+
|
509 |
$sizes = um_get_option('photo_thumb_sizes');
|
510 |
foreach( $sizes as $size ) {
|
511 |
+
|
512 |
if ( file_exists( $this->upload_basedir . $user_id . '/' . $name . '-' . $size . $ext ) ) {
|
513 |
unlink( $this->upload_basedir . $user_id . '/' . $name . '-' . $size . $ext );
|
514 |
}
|
515 |
+
|
516 |
if ( $size < $w ) {
|
517 |
|
518 |
$thumb_s = imagecreatefromjpeg( $source );
|
519 |
$thumb = imagecreatetruecolor( $size, $size );
|
520 |
imagecopyresampled( $thumb, $thumb_s, 0, 0, 0, 0, $size, $size, $w, $h );
|
521 |
imagejpeg( $thumb, $this->upload_basedir . $user_id . '/' . $name . '-' . $size . $ext, 100);
|
522 |
+
|
523 |
}
|
524 |
+
|
525 |
}
|
526 |
+
|
527 |
// removes a synced profile photo
|
528 |
delete_user_meta( $user_id, 'synced_profile_photo' );
|
529 |
+
|
530 |
}
|
531 |
+
|
532 |
if ( $key == 'cover_photo' ) {
|
533 |
+
|
534 |
list($w, $h) = @getimagesize( $source );
|
535 |
+
|
536 |
$sizes = um_get_option('cover_thumb_sizes');
|
537 |
foreach( $sizes as $size ) {
|
538 |
+
|
539 |
$ratio = round( $w / $h, 2 );
|
540 |
$height = round( $size / $ratio, 2 );
|
541 |
+
|
542 |
if ( file_exists( $this->upload_basedir . $user_id . '/' . $name . '-' . $size . $ext ) ) {
|
543 |
unlink( $this->upload_basedir . $user_id . '/' . $name . '-' . $size . $ext );
|
544 |
}
|
545 |
+
|
546 |
if ( $size < $w ) {
|
547 |
|
548 |
$thumb_s = imagecreatefromjpeg( $source );
|
549 |
$thumb = imagecreatetruecolor( $size, $height );
|
550 |
imagecopyresampled( $thumb, $thumb_s, 0, 0, 0, 0, $size, $height, $w, $h );
|
551 |
imagejpeg( $thumb, $this->upload_basedir . $user_id . '/' . $name . '-' . $size . $ext, 100);
|
552 |
+
|
553 |
}
|
554 |
+
|
555 |
}
|
556 |
+
|
557 |
}
|
558 |
|
559 |
// clean up temp
|
564 |
// update user's meta
|
565 |
do_action('um_before_upload_db_meta', $user_id, $key );
|
566 |
do_action("um_before_upload_db_meta_{$key}", $user_id );
|
567 |
+
|
568 |
update_user_meta( $user_id, $key, $filename );
|
569 |
+
|
570 |
do_action('um_after_upload_db_meta', $user_id, $key );
|
571 |
do_action("um_after_upload_db_meta_{$key}", $user_id );
|
572 |
+
|
573 |
// the url of upload
|
574 |
return $this->upload_baseurl . $user_id . '/' . $filename;
|
575 |
+
|
576 |
}
|
577 |
+
|
578 |
/***
|
579 |
*** @Remove a directory
|
580 |
***/
|
581 |
+
function remove_dir($dir) {
|
582 |
if ( file_exists( $dir ) ) {
|
583 |
+
foreach(glob($dir . '/*') as $file) {
|
584 |
+
if(is_dir($file)) $this->remove_dir($file); else unlink($file);
|
585 |
} rmdir($dir);
|
586 |
}
|
587 |
}
|
588 |
+
|
589 |
+
/***
|
590 |
+
*** @Format Bytes
|
591 |
+
****/
|
592 |
+
function format_bytes( $size , $precision = 1 ) {
|
593 |
+
|
594 |
+
$base = log($size, 1024);
|
595 |
+
$suffixes = array('', 'kb', 'MB', 'GB', 'TB');
|
596 |
+
$computed_size = round(pow(1024, $base - floor($base)), $precision);
|
597 |
+
$unit = $suffixes[ floor($base) ];
|
598 |
+
|
599 |
+
return $computed_size.' '.$unit;
|
600 |
+
|
601 |
+
}
|
602 |
+
|
603 |
+
}
|
core/um-filters-fields.php
CHANGED
@@ -281,12 +281,12 @@
|
|
281 |
|
282 |
foreach ($array['conditions'] as $key => $value) {
|
283 |
$metakey = $fields[ $value[1] ]['metakey'] ;
|
284 |
-
$arr_conditions[ $metakey ] = $_POST[ $metakey ];
|
285 |
}
|
286 |
|
287 |
foreach ($array['conditions'] as $key => $value) {
|
288 |
$metakey = $fields[ $value[1] ]['metakey'] ;
|
289 |
-
$arr_conditions[ $metakey ] = $_POST[ $metakey ];
|
290 |
if( isset( $_POST[ $metakey ] ) && isset( $array['conditional_value'] ) && $_POST[ $metakey ] !== $array['conditional_value'] ){
|
291 |
$array['required'] = 0;
|
292 |
}
|
281 |
|
282 |
foreach ($array['conditions'] as $key => $value) {
|
283 |
$metakey = $fields[ $value[1] ]['metakey'] ;
|
284 |
+
$arr_conditions[ $metakey ] = isset( $_POST[ $metakey ] )? $_POST[ $metakey ]: '';
|
285 |
}
|
286 |
|
287 |
foreach ($array['conditions'] as $key => $value) {
|
288 |
$metakey = $fields[ $value[1] ]['metakey'] ;
|
289 |
+
$arr_conditions[ $metakey ] = isset( $_POST[ $metakey ] )? $_POST[ $metakey ]: '';
|
290 |
if( isset( $_POST[ $metakey ] ) && isset( $array['conditional_value'] ) && $_POST[ $metakey ] !== $array['conditional_value'] ){
|
291 |
$array['required'] = 0;
|
292 |
}
|
core/um-filters-members.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/***
|
4 |
*** @Members Filter Hooks
|
5 |
***/
|
@@ -7,41 +7,41 @@
|
|
7 |
add_filter('um_prepare_user_query_args', 'um_add_search_to_query', 50, 2);
|
8 |
add_filter('um_prepare_user_query_args', 'um_search_usernames_emails', 51, 2);
|
9 |
add_filter('um_prepare_user_query_args', 'um_remove_special_users_from_list', 99, 2);
|
10 |
-
|
11 |
/***
|
12 |
*** @WP API user search
|
13 |
***/
|
14 |
function um_search_usernames_emails( $query_args, $args ) {
|
15 |
global $ultimatemember;
|
16 |
extract( $args );
|
17 |
-
|
18 |
$query = $ultimatemember->permalinks->get_query_array();
|
19 |
-
|
20 |
foreach( $ultimatemember->members->core_search_fields as $key ) {
|
21 |
if ( isset( $query[$key] ) ) {
|
22 |
-
$query_args['search'] = '*' . $query[$key] . '*';
|
23 |
}
|
24 |
}
|
25 |
return $query_args;
|
26 |
}
|
27 |
-
|
28 |
/***
|
29 |
*** @Remove users we do not need to show in directory
|
30 |
***/
|
31 |
function um_remove_special_users_from_list( $query_args, $args ) {
|
32 |
global $ultimatemember;
|
33 |
extract( $args );
|
34 |
-
|
35 |
if ( !um_user_can('can_edit_everyone') ) {
|
36 |
-
|
37 |
$query_args['meta_query'][] = array(
|
38 |
'key' => 'account_status',
|
39 |
'value' => 'approved',
|
40 |
'compare' => '='
|
41 |
);
|
42 |
-
|
43 |
}
|
44 |
-
|
45 |
$query_args['meta_query'][] = array(
|
46 |
'key' => 'hide_in_members',
|
47 |
'value' => '',
|
@@ -50,23 +50,23 @@
|
|
50 |
|
51 |
return $query_args;
|
52 |
}
|
53 |
-
|
54 |
/***
|
55 |
*** @adds search parameters
|
56 |
***/
|
57 |
function um_add_search_to_query( $query_args, $args ){
|
58 |
global $ultimatemember;
|
59 |
extract( $args );
|
60 |
-
|
61 |
if ( isset( $_REQUEST['um_search'] ) ) {
|
62 |
-
|
63 |
$query = $ultimatemember->permalinks->get_query_array();
|
64 |
|
65 |
if ( $query && is_array( $query ) ) {
|
66 |
foreach( $query as $field => $value ) {
|
67 |
|
68 |
if(in_array($field, array('members_page'))) continue;
|
69 |
-
|
70 |
if ( in_array( $field, array('gender') ) ) {
|
71 |
$operator = '=';
|
72 |
} else {
|
@@ -78,53 +78,53 @@
|
|
78 |
}
|
79 |
|
80 |
if ( $value && $field != 'um_search' && $field != 'page_id' ) {
|
81 |
-
|
82 |
if ( !in_array( $field, $ultimatemember->members->core_search_fields ) ) {
|
83 |
-
|
84 |
if ( strstr($field, 'role_' ) ) {
|
85 |
$field = 'role';
|
86 |
$operator = '=';
|
87 |
}
|
88 |
-
|
89 |
$query_args['meta_query'][] = array(
|
90 |
'key' => $field,
|
91 |
-
'value' => $value,
|
92 |
'compare' => $operator,
|
93 |
);
|
94 |
-
|
95 |
}
|
96 |
-
|
97 |
}
|
98 |
-
|
99 |
}
|
100 |
}
|
101 |
|
102 |
}
|
103 |
-
|
104 |
// allow filtering
|
105 |
$query_args = apply_filters('um_query_args_filter', $query_args );
|
106 |
-
|
107 |
if ( count ($query_args['meta_query']) == 1 ) {
|
108 |
unset( $query_args['meta_query'] );
|
109 |
}
|
110 |
|
111 |
return $query_args;
|
112 |
-
|
113 |
}
|
114 |
-
|
115 |
/***
|
116 |
*** @adds main parameters
|
117 |
***/
|
118 |
function um_prepare_user_query_args($query_args, $args){
|
119 |
global $ultimatemember;
|
120 |
extract( $args );
|
121 |
-
|
122 |
$query_args['fields'] = 'ID';
|
123 |
-
|
124 |
$query_args['number'] = 0;
|
125 |
-
|
126 |
$query_args['meta_query']['relation'] = 'AND';
|
127 |
-
|
128 |
// must have a profile photo
|
129 |
if ( $has_profile_photo == 1 ) {
|
130 |
$query_args['meta_query'][] = array(
|
@@ -133,7 +133,7 @@
|
|
133 |
'compare' => '!='
|
134 |
);
|
135 |
}
|
136 |
-
|
137 |
// must have a cover photo
|
138 |
if ( $has_cover_photo == 1 ) {
|
139 |
$query_args['meta_query'][] = array(
|
@@ -142,7 +142,7 @@
|
|
142 |
'compare' => '!='
|
143 |
);
|
144 |
}
|
145 |
-
|
146 |
// show specific usernames
|
147 |
if ( isset( $show_these_users ) && $show_these_users && is_array( $show_these_users ) ) {
|
148 |
foreach( $show_these_users as $username ) {
|
@@ -150,52 +150,52 @@
|
|
150 |
}
|
151 |
$query_args['include'] = $users_array;
|
152 |
}
|
153 |
-
|
154 |
-
// add roles to appear in directory
|
155 |
if ( !empty( $roles ) ) {
|
156 |
-
|
157 |
$query_args['meta_query'][] = array(
|
158 |
'key' => 'role',
|
159 |
'value' => $roles,
|
160 |
'compare' => 'IN'
|
161 |
);
|
162 |
-
|
163 |
}
|
164 |
-
|
165 |
// sort members by
|
166 |
$query_args['order'] = 'ASC';
|
167 |
-
|
168 |
if ( isset( $sortby ) ) {
|
169 |
-
|
170 |
if ( $sortby == 'other' && $sortby_custom ) {
|
171 |
-
|
172 |
$query_args['meta_key'] = $sortby_custom;
|
173 |
$query_args['orderby'] = 'meta_value, display_name';
|
174 |
-
|
175 |
} else if ( in_array( $sortby, array( 'last_name', 'first_name' ) ) ) {
|
176 |
-
|
177 |
$query_args['meta_key'] = $sortby;
|
178 |
$query_args['orderby'] = 'meta_value';
|
179 |
-
|
180 |
} else {
|
181 |
-
|
182 |
if ( strstr( $sortby, '_desc' ) ) {$sortby = str_replace('_desc','',$sortby);$order = 'DESC';}
|
183 |
if ( strstr( $sortby, '_asc' ) ) {$sortby = str_replace('_asc','',$sortby);$order = 'ASC';}
|
184 |
$query_args['orderby'] = $sortby;
|
185 |
-
|
186 |
}
|
187 |
-
|
188 |
if ( isset( $order ) ) {
|
189 |
$query_args['order'] = $order;
|
190 |
}
|
191 |
-
|
192 |
$query_args = apply_filters('um_modify_sortby_parameter', $query_args, $sortby);
|
193 |
|
194 |
}
|
195 |
-
|
196 |
return $query_args;
|
197 |
}
|
198 |
-
|
199 |
/***
|
200 |
*** @sorting by last login date
|
201 |
***/
|
@@ -208,7 +208,7 @@
|
|
208 |
}
|
209 |
return $query_args;
|
210 |
}
|
211 |
-
|
212 |
/***
|
213 |
*** @hook in the member results array
|
214 |
***/
|
@@ -220,6 +220,6 @@
|
|
220 |
} else {
|
221 |
$result['no_users'] = 0;
|
222 |
}
|
223 |
-
|
224 |
return $result;
|
225 |
-
}
|
1 |
<?php
|
2 |
+
|
3 |
/***
|
4 |
*** @Members Filter Hooks
|
5 |
***/
|
7 |
add_filter('um_prepare_user_query_args', 'um_add_search_to_query', 50, 2);
|
8 |
add_filter('um_prepare_user_query_args', 'um_search_usernames_emails', 51, 2);
|
9 |
add_filter('um_prepare_user_query_args', 'um_remove_special_users_from_list', 99, 2);
|
10 |
+
|
11 |
/***
|
12 |
*** @WP API user search
|
13 |
***/
|
14 |
function um_search_usernames_emails( $query_args, $args ) {
|
15 |
global $ultimatemember;
|
16 |
extract( $args );
|
17 |
+
|
18 |
$query = $ultimatemember->permalinks->get_query_array();
|
19 |
+
|
20 |
foreach( $ultimatemember->members->core_search_fields as $key ) {
|
21 |
if ( isset( $query[$key] ) ) {
|
22 |
+
$query_args['search'] = '*' . trim($query[$key]) . '*';
|
23 |
}
|
24 |
}
|
25 |
return $query_args;
|
26 |
}
|
27 |
+
|
28 |
/***
|
29 |
*** @Remove users we do not need to show in directory
|
30 |
***/
|
31 |
function um_remove_special_users_from_list( $query_args, $args ) {
|
32 |
global $ultimatemember;
|
33 |
extract( $args );
|
34 |
+
|
35 |
if ( !um_user_can('can_edit_everyone') ) {
|
36 |
+
|
37 |
$query_args['meta_query'][] = array(
|
38 |
'key' => 'account_status',
|
39 |
'value' => 'approved',
|
40 |
'compare' => '='
|
41 |
);
|
42 |
+
|
43 |
}
|
44 |
+
|
45 |
$query_args['meta_query'][] = array(
|
46 |
'key' => 'hide_in_members',
|
47 |
'value' => '',
|
50 |
|
51 |
return $query_args;
|
52 |
}
|
53 |
+
|
54 |
/***
|
55 |
*** @adds search parameters
|
56 |
***/
|
57 |
function um_add_search_to_query( $query_args, $args ){
|
58 |
global $ultimatemember;
|
59 |
extract( $args );
|
60 |
+
|
61 |
if ( isset( $_REQUEST['um_search'] ) ) {
|
62 |
+
|
63 |
$query = $ultimatemember->permalinks->get_query_array();
|
64 |
|
65 |
if ( $query && is_array( $query ) ) {
|
66 |
foreach( $query as $field => $value ) {
|
67 |
|
68 |
if(in_array($field, array('members_page'))) continue;
|
69 |
+
|
70 |
if ( in_array( $field, array('gender') ) ) {
|
71 |
$operator = '=';
|
72 |
} else {
|
78 |
}
|
79 |
|
80 |
if ( $value && $field != 'um_search' && $field != 'page_id' ) {
|
81 |
+
|
82 |
if ( !in_array( $field, $ultimatemember->members->core_search_fields ) ) {
|
83 |
+
|
84 |
if ( strstr($field, 'role_' ) ) {
|
85 |
$field = 'role';
|
86 |
$operator = '=';
|
87 |
}
|
88 |
+
|
89 |
$query_args['meta_query'][] = array(
|
90 |
'key' => $field,
|
91 |
+
'value' => trim($value),
|
92 |
'compare' => $operator,
|
93 |
);
|
94 |
+
|
95 |
}
|
96 |
+
|
97 |
}
|
98 |
+
|
99 |
}
|
100 |
}
|
101 |
|
102 |
}
|
103 |
+
|
104 |
// allow filtering
|
105 |
$query_args = apply_filters('um_query_args_filter', $query_args );
|
106 |
+
|
107 |
if ( count ($query_args['meta_query']) == 1 ) {
|
108 |
unset( $query_args['meta_query'] );
|
109 |
}
|
110 |
|
111 |
return $query_args;
|
112 |
+
|
113 |
}
|
114 |
+
|
115 |
/***
|
116 |
*** @adds main parameters
|
117 |
***/
|
118 |
function um_prepare_user_query_args($query_args, $args){
|
119 |
global $ultimatemember;
|
120 |
extract( $args );
|
121 |
+
|
122 |
$query_args['fields'] = 'ID';
|
123 |
+
|
124 |
$query_args['number'] = 0;
|
125 |
+
|
126 |
$query_args['meta_query']['relation'] = 'AND';
|
127 |
+
|
128 |
// must have a profile photo
|
129 |
if ( $has_profile_photo == 1 ) {
|
130 |
$query_args['meta_query'][] = array(
|
133 |
'compare' => '!='
|
134 |
);
|
135 |
}
|
136 |
+
|
137 |
// must have a cover photo
|
138 |
if ( $has_cover_photo == 1 ) {
|
139 |
$query_args['meta_query'][] = array(
|
142 |
'compare' => '!='
|
143 |
);
|
144 |
}
|
145 |
+
|
146 |
// show specific usernames
|
147 |
if ( isset( $show_these_users ) && $show_these_users && is_array( $show_these_users ) ) {
|
148 |
foreach( $show_these_users as $username ) {
|
150 |
}
|
151 |
$query_args['include'] = $users_array;
|
152 |
}
|
153 |
+
|
154 |
+
// add roles to appear in directory
|
155 |
if ( !empty( $roles ) ) {
|
156 |
+
|
157 |
$query_args['meta_query'][] = array(
|
158 |
'key' => 'role',
|
159 |
'value' => $roles,
|
160 |
'compare' => 'IN'
|
161 |
);
|
162 |
+
|
163 |
}
|
164 |
+
|
165 |
// sort members by
|
166 |
$query_args['order'] = 'ASC';
|
167 |
+
|
168 |
if ( isset( $sortby ) ) {
|
169 |
+
|
170 |
if ( $sortby == 'other' && $sortby_custom ) {
|
171 |
+
|
172 |
$query_args['meta_key'] = $sortby_custom;
|
173 |
$query_args['orderby'] = 'meta_value, display_name';
|
174 |
+
|
175 |
} else if ( in_array( $sortby, array( 'last_name', 'first_name' ) ) ) {
|
176 |
+
|
177 |
$query_args['meta_key'] = $sortby;
|
178 |
$query_args['orderby'] = 'meta_value';
|
179 |
+
|
180 |
} else {
|
181 |
+
|
182 |
if ( strstr( $sortby, '_desc' ) ) {$sortby = str_replace('_desc','',$sortby);$order = 'DESC';}
|
183 |
if ( strstr( $sortby, '_asc' ) ) {$sortby = str_replace('_asc','',$sortby);$order = 'ASC';}
|
184 |
$query_args['orderby'] = $sortby;
|
185 |
+
|
186 |
}
|
187 |
+
|
188 |
if ( isset( $order ) ) {
|
189 |
$query_args['order'] = $order;
|
190 |
}
|
191 |
+
|
192 |
$query_args = apply_filters('um_modify_sortby_parameter', $query_args, $sortby);
|
193 |
|
194 |
}
|
195 |
+
|
196 |
return $query_args;
|
197 |
}
|
198 |
+
|
199 |
/***
|
200 |
*** @sorting by last login date
|
201 |
***/
|
208 |
}
|
209 |
return $query_args;
|
210 |
}
|
211 |
+
|
212 |
/***
|
213 |
*** @hook in the member results array
|
214 |
***/
|
220 |
} else {
|
221 |
$result['no_users'] = 0;
|
222 |
}
|
223 |
+
|
224 |
return $result;
|
225 |
+
}
|
core/um-filters-profile.php
CHANGED
@@ -5,18 +5,19 @@
|
|
5 |
***/
|
6 |
add_filter('um_profile_tabs', 'um_profile_tabs', 1 );
|
7 |
function um_profile_tabs( $tabs ) {
|
8 |
-
|
9 |
$tabs['main'] = array(
|
10 |
'name' => __('About','ultimatemember'),
|
11 |
'icon' => 'um-faicon-user'
|
12 |
);
|
13 |
-
|
14 |
return $tabs;
|
15 |
}
|
16 |
-
|
17 |
/***
|
18 |
*** @dynamic profile page title
|
19 |
***/
|
|
|
20 |
add_filter('pre_get_document_title', 'um_dynamic_user_profile_pagetitle', 100000, 2 );
|
21 |
function um_dynamic_user_profile_pagetitle( $title, $sep = '' ) {
|
22 |
global $paged, $page, $ultimatemember;
|
@@ -24,27 +25,27 @@
|
|
24 |
$profile_title = um_get_option('profile_title');
|
25 |
|
26 |
if ( um_is_core_page('user') && um_get_requested_user() ) {
|
27 |
-
|
28 |
um_fetch_user( um_get_requested_user() );
|
29 |
-
|
30 |
$profile_title = um_convert_tags( $profile_title );
|
31 |
-
|
32 |
$title = $profile_title;
|
33 |
-
|
34 |
um_reset_user();
|
35 |
-
|
36 |
}
|
37 |
-
|
38 |
return $title;
|
39 |
}
|
40 |
-
|
41 |
/***
|
42 |
*** @try and modify the page title in page
|
43 |
***/
|
44 |
add_filter('the_title', 'um_dynamic_user_profile_title', 100000, 2 );
|
45 |
function um_dynamic_user_profile_title( $title, $id = '' ) {
|
46 |
global $ultimatemember;
|
47 |
-
|
48 |
if( is_admin() )
|
49 |
return $title;
|
50 |
|
@@ -55,6 +56,43 @@
|
|
55 |
$title = um_get_display_name( get_current_user_id() );
|
56 |
}
|
57 |
}
|
58 |
-
|
59 |
return (strlen($title)!==strlen(utf8_decode($title))) ? $title : utf8_encode($title);
|
60 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
***/
|
6 |
add_filter('um_profile_tabs', 'um_profile_tabs', 1 );
|
7 |
function um_profile_tabs( $tabs ) {
|
8 |
+
|
9 |
$tabs['main'] = array(
|
10 |
'name' => __('About','ultimatemember'),
|
11 |
'icon' => 'um-faicon-user'
|
12 |
);
|
13 |
+
|
14 |
return $tabs;
|
15 |
}
|
16 |
+
|
17 |
/***
|
18 |
*** @dynamic profile page title
|
19 |
***/
|
20 |
+
add_filter('wp_title', 'um_dynamic_user_profile_pagetitle', 10, 2 );
|
21 |
add_filter('pre_get_document_title', 'um_dynamic_user_profile_pagetitle', 100000, 2 );
|
22 |
function um_dynamic_user_profile_pagetitle( $title, $sep = '' ) {
|
23 |
global $paged, $page, $ultimatemember;
|
25 |
$profile_title = um_get_option('profile_title');
|
26 |
|
27 |
if ( um_is_core_page('user') && um_get_requested_user() ) {
|
28 |
+
|
29 |
um_fetch_user( um_get_requested_user() );
|
30 |
+
|
31 |
$profile_title = um_convert_tags( $profile_title );
|
32 |
+
|
33 |
$title = $profile_title;
|
34 |
+
|
35 |
um_reset_user();
|
36 |
+
|
37 |
}
|
38 |
+
|
39 |
return $title;
|
40 |
}
|
41 |
+
|
42 |
/***
|
43 |
*** @try and modify the page title in page
|
44 |
***/
|
45 |
add_filter('the_title', 'um_dynamic_user_profile_title', 100000, 2 );
|
46 |
function um_dynamic_user_profile_title( $title, $id = '' ) {
|
47 |
global $ultimatemember;
|
48 |
+
|
49 |
if( is_admin() )
|
50 |
return $title;
|
51 |
|
56 |
$title = um_get_display_name( get_current_user_id() );
|
57 |
}
|
58 |
}
|
59 |
+
|
60 |
return (strlen($title)!==strlen(utf8_decode($title))) ? $title : utf8_encode($title);
|
61 |
+
}
|
62 |
+
|
63 |
+
|
64 |
+
|
65 |
+
/***
|
66 |
+
*** @Add cover photo label of file size limit
|
67 |
+
***/
|
68 |
+
add_filter('um_predefined_fields_hook','um_change_profile_cover_photo_label',10,1);
|
69 |
+
function um_change_profile_cover_photo_label( $args ){
|
70 |
+
global $ultimatemember;
|
71 |
+
$max_size = $ultimatemember->files->format_bytes( $args['cover_photo']['max_size'] );
|
72 |
+
list( $file_size, $unit ) = explode(' ', $max_size );
|
73 |
+
|
74 |
+
if( $file_size >= 999999999 ){
|
75 |
+
|
76 |
+
}else{
|
77 |
+
$args['cover_photo']['upload_text'] .= '<small class=\'um-max-filesize\'>( '.__('max','ultimatemember').': <span>'.$file_size.$unit.'</span> )</small>';
|
78 |
+
}
|
79 |
+
return $args;
|
80 |
+
}
|
81 |
+
|
82 |
+
|
83 |
+
/***
|
84 |
+
*** @Add profile photo label of file size limit
|
85 |
+
***/
|
86 |
+
add_filter('um_predefined_fields_hook','um_change_profile_photo_label',10,1);
|
87 |
+
function um_change_profile_photo_label( $args ){
|
88 |
+
global $ultimatemember;
|
89 |
+
$max_size = $ultimatemember->files->format_bytes( $args['profile_photo']['max_size'] );
|
90 |
+
list( $file_size, $unit ) = explode(' ', $max_size );
|
91 |
+
|
92 |
+
if( $file_size >= 999999999 ){
|
93 |
+
|
94 |
+
}else{
|
95 |
+
$args['profile_photo']['upload_text'] .= '<small class=\'um-max-filesize\'>( '.__('max','ultimatemember').': <span>'.$file_size.$unit.'</span> )</small>';
|
96 |
+
}
|
97 |
+
return $args;
|
98 |
+
}
|
core/um-form.php
CHANGED
@@ -3,23 +3,23 @@
|
|
3 |
class UM_Form {
|
4 |
|
5 |
public $form_suffix;
|
6 |
-
|
7 |
function __construct() {
|
8 |
-
|
9 |
$this->post_form = null;
|
10 |
|
11 |
$this->form_suffix = null;
|
12 |
-
|
13 |
$this->errors = null;
|
14 |
-
|
15 |
$this->processing = null;
|
16 |
-
|
17 |
add_action('init', array(&$this, 'form_init'), 2);
|
18 |
-
|
19 |
add_action('init', array(&$this, 'field_declare'), 10);
|
20 |
-
|
21 |
}
|
22 |
-
|
23 |
/***
|
24 |
*** @add errors
|
25 |
***/
|
@@ -28,7 +28,7 @@ class UM_Form {
|
|
28 |
$this->errors[$key] = $error;
|
29 |
}
|
30 |
}
|
31 |
-
|
32 |
/***
|
33 |
*** @has error
|
34 |
***/
|
@@ -37,7 +37,7 @@ class UM_Form {
|
|
37 |
return true;
|
38 |
return false;
|
39 |
}
|
40 |
-
|
41 |
/***
|
42 |
*** @declare all fields
|
43 |
***/
|
@@ -49,45 +49,60 @@ class UM_Form {
|
|
49 |
$this->all_fields = null;
|
50 |
}
|
51 |
}
|
52 |
-
|
53 |
/***
|
54 |
*** @Checks that we've a form
|
55 |
***/
|
56 |
function form_init(){
|
57 |
global $ultimatemember;
|
58 |
-
|
59 |
if ( isset( $_SERVER['REQUEST_METHOD'] ) ) {
|
60 |
$http_post = ('POST' == $_SERVER['REQUEST_METHOD']);
|
61 |
} else {
|
62 |
$http_post = 'POST';
|
63 |
}
|
64 |
-
|
65 |
if ( $http_post && !is_admin() && isset( $_POST['form_id'] ) && is_numeric($_POST['form_id']) ) {
|
66 |
|
67 |
$this->form_id = $_POST['form_id'];
|
68 |
$this->form_status = get_post_status( $this->form_id );
|
69 |
-
|
70 |
if ( $this->form_status == 'publish' ) {
|
71 |
|
72 |
/* save entire form as global */
|
73 |
$this->post_form = $_POST;
|
74 |
-
|
75 |
$this->post_form = $this->beautify( $this->post_form );
|
76 |
-
|
77 |
$this->form_data = $ultimatemember->query->post_data( $this->form_id );
|
78 |
-
|
79 |
$this->post_form['submitted'] = $this->post_form;
|
80 |
-
|
81 |
$this->post_form = array_merge( $this->form_data, $this->post_form );
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
if ( isset( $_POST[ $ultimatemember->honeypot ] ) && $_POST[ $ultimatemember->honeypot ] != '' )
|
84 |
wp_die('Hello, spam bot!');
|
85 |
|
86 |
if ( !in_array( $this->form_data['mode'], array('login') ) ) {
|
87 |
-
|
88 |
$form_timestamp = trim($_POST['timestamp']);
|
89 |
$live_timestamp = current_time( 'timestamp' );
|
90 |
-
|
91 |
if ( $form_timestamp == '' && um_get_option('enable_timebot') == 1 )
|
92 |
wp_die( __('Hello, spam bot!') );
|
93 |
|
@@ -95,30 +110,30 @@ class UM_Form {
|
|
95 |
wp_die( __('Whoa, slow down! You\'re seeing this message because you tried to submit a form too fast and we think you might be a spam bot. If you are a real human being please wait a few seconds before submitting the form. Thanks!') );
|
96 |
|
97 |
}
|
98 |
-
|
99 |
/* Continue based on form mode - pre-validation */
|
100 |
-
|
101 |
do_action('um_submit_form_errors_hook', $this->post_form );
|
102 |
|
103 |
do_action("um_submit_form_{$this->post_form['mode']}", $this->post_form );
|
104 |
|
105 |
}
|
106 |
-
|
107 |
}
|
108 |
|
109 |
}
|
110 |
-
|
111 |
/***
|
112 |
*** @Beautify form data
|
113 |
***/
|
114 |
function beautify( $form ){
|
115 |
-
|
116 |
if (isset($form['form_id'])){
|
117 |
-
|
118 |
$this->form_suffix = '-' . $form['form_id'];
|
119 |
-
|
120 |
$this->processing = $form['form_id'];
|
121 |
-
|
122 |
foreach($form as $key => $value){
|
123 |
if (strstr($key, $this->form_suffix) ) {
|
124 |
$a_key = str_replace( $this->form_suffix, '', $key);
|
@@ -126,12 +141,12 @@ class UM_Form {
|
|
126 |
unset($form[$key]);
|
127 |
}
|
128 |
}
|
129 |
-
|
130 |
}
|
131 |
-
|
132 |
return $form;
|
133 |
}
|
134 |
-
|
135 |
/***
|
136 |
*** @Display Form Type as Text
|
137 |
***/
|
@@ -150,5 +165,5 @@ class UM_Form {
|
|
150 |
}
|
151 |
return $output;
|
152 |
}
|
153 |
-
|
154 |
-
}
|
3 |
class UM_Form {
|
4 |
|
5 |
public $form_suffix;
|
6 |
+
|
7 |
function __construct() {
|
8 |
+
|
9 |
$this->post_form = null;
|
10 |
|
11 |
$this->form_suffix = null;
|
12 |
+
|
13 |
$this->errors = null;
|
14 |
+
|
15 |
$this->processing = null;
|
16 |
+
|
17 |
add_action('init', array(&$this, 'form_init'), 2);
|
18 |
+
|
19 |
add_action('init', array(&$this, 'field_declare'), 10);
|
20 |
+
|
21 |
}
|
22 |
+
|
23 |
/***
|
24 |
*** @add errors
|
25 |
***/
|
28 |
$this->errors[$key] = $error;
|
29 |
}
|
30 |
}
|
31 |
+
|
32 |
/***
|
33 |
*** @has error
|
34 |
***/
|
37 |
return true;
|
38 |
return false;
|
39 |
}
|
40 |
+
|
41 |
/***
|
42 |
*** @declare all fields
|
43 |
***/
|
49 |
$this->all_fields = null;
|
50 |
}
|
51 |
}
|
52 |
+
|
53 |
/***
|
54 |
*** @Checks that we've a form
|
55 |
***/
|
56 |
function form_init(){
|
57 |
global $ultimatemember;
|
58 |
+
|
59 |
if ( isset( $_SERVER['REQUEST_METHOD'] ) ) {
|
60 |
$http_post = ('POST' == $_SERVER['REQUEST_METHOD']);
|
61 |
} else {
|
62 |
$http_post = 'POST';
|
63 |
}
|
64 |
+
|
65 |
if ( $http_post && !is_admin() && isset( $_POST['form_id'] ) && is_numeric($_POST['form_id']) ) {
|
66 |
|
67 |
$this->form_id = $_POST['form_id'];
|
68 |
$this->form_status = get_post_status( $this->form_id );
|
69 |
+
|
70 |
if ( $this->form_status == 'publish' ) {
|
71 |
|
72 |
/* save entire form as global */
|
73 |
$this->post_form = $_POST;
|
74 |
+
|
75 |
$this->post_form = $this->beautify( $this->post_form );
|
76 |
+
|
77 |
$this->form_data = $ultimatemember->query->post_data( $this->form_id );
|
78 |
+
|
79 |
$this->post_form['submitted'] = $this->post_form;
|
80 |
+
|
81 |
$this->post_form = array_merge( $this->form_data, $this->post_form );
|
82 |
|
83 |
+
if ( isset( $this->form_data['role'] ) && ( (boolean) $this->form_data['role'] ) && isset( $_POST['role'] ) && $_POST['role'] != $this->form_data['role'] ) {
|
84 |
+
wp_die( __( 'This is not possible for security reasons.','ultimatemember') );
|
85 |
+
} else {
|
86 |
+
if ( isset( $this->form_data['custom_fields'] ) && strstr( $this->form_data['custom_fields'], 'role_' ) ) {
|
87 |
+
// In this case, admin allowed users to choose a role during registration
|
88 |
+
} else {
|
89 |
+
if ( isset( $_POST['role'] ) ) {
|
90 |
+
$role = um_get_option('default_role');
|
91 |
+
if ( $role != $_POST['role'] ) {
|
92 |
+
wp_die( __( 'This is not possible for security reasons.','ultimatemember') );
|
93 |
+
}
|
94 |
+
}
|
95 |
+
}
|
96 |
+
}
|
97 |
+
|
98 |
if ( isset( $_POST[ $ultimatemember->honeypot ] ) && $_POST[ $ultimatemember->honeypot ] != '' )
|
99 |
wp_die('Hello, spam bot!');
|
100 |
|
101 |
if ( !in_array( $this->form_data['mode'], array('login') ) ) {
|
102 |
+
|
103 |
$form_timestamp = trim($_POST['timestamp']);
|
104 |
$live_timestamp = current_time( 'timestamp' );
|
105 |
+
|
106 |
if ( $form_timestamp == '' && um_get_option('enable_timebot') == 1 )
|
107 |
wp_die( __('Hello, spam bot!') );
|
108 |
|
110 |
wp_die( __('Whoa, slow down! You\'re seeing this message because you tried to submit a form too fast and we think you might be a spam bot. If you are a real human being please wait a few seconds before submitting the form. Thanks!') );
|
111 |
|
112 |
}
|
113 |
+
|
114 |
/* Continue based on form mode - pre-validation */
|
115 |
+
|
116 |
do_action('um_submit_form_errors_hook', $this->post_form );
|
117 |
|
118 |
do_action("um_submit_form_{$this->post_form['mode']}", $this->post_form );
|
119 |
|
120 |
}
|
121 |
+
|
122 |
}
|
123 |
|
124 |
}
|
125 |
+
|
126 |
/***
|
127 |
*** @Beautify form data
|
128 |
***/
|
129 |
function beautify( $form ){
|
130 |
+
|
131 |
if (isset($form['form_id'])){
|
132 |
+
|
133 |
$this->form_suffix = '-' . $form['form_id'];
|
134 |
+
|
135 |
$this->processing = $form['form_id'];
|
136 |
+
|
137 |
foreach($form as $key => $value){
|
138 |
if (strstr($key, $this->form_suffix) ) {
|
139 |
$a_key = str_replace( $this->form_suffix, '', $key);
|
141 |
unset($form[$key]);
|
142 |
}
|
143 |
}
|
144 |
+
|
145 |
}
|
146 |
+
|
147 |
return $form;
|
148 |
}
|
149 |
+
|
150 |
/***
|
151 |
*** @Display Form Type as Text
|
152 |
***/
|
165 |
}
|
166 |
return $output;
|
167 |
}
|
168 |
+
|
169 |
+
}
|
core/um-mail.php
CHANGED
@@ -5,39 +5,42 @@ class UM_Mail {
|
|
5 |
function __construct() {
|
6 |
|
7 |
add_filter('mandrill_nl2br', array(&$this, 'mandrill_nl2br') );
|
8 |
-
|
9 |
$this->force_plain_text = '';
|
10 |
-
|
11 |
}
|
12 |
-
|
13 |
/***
|
14 |
*** @mandrill compatibility
|
15 |
***/
|
16 |
function mandrill_nl2br($nl2br, $message = '') {
|
17 |
-
|
18 |
// text emails
|
19 |
if ( !um_get_option('email_html') ) {
|
20 |
$nl2br = true;
|
21 |
}
|
22 |
-
|
23 |
return $nl2br;
|
24 |
|
25 |
}
|
26 |
-
|
27 |
/***
|
28 |
*** @check If template exists
|
29 |
***/
|
30 |
function email_template( $template, $args = array() ) {
|
31 |
$lang = '';
|
32 |
-
|
|
|
33 |
if ( function_exists('icl_get_current_language') ) {
|
34 |
if ( icl_get_current_language() != 'en' ) {
|
35 |
$lang = icl_get_current_language() . '/';
|
36 |
}
|
|
|
|
|
37 |
}
|
38 |
-
|
39 |
if ( file_exists( get_stylesheet_directory() . '/ultimate-member/templates/email/' . $lang . $template . '.html' ) ) {
|
40 |
-
|
41 |
}
|
42 |
|
43 |
if ( isset( $args['path'] ) ) {
|
@@ -45,30 +48,30 @@ class UM_Mail {
|
|
45 |
} else {
|
46 |
$path = um_path . 'templates/email/' . $lang;
|
47 |
}
|
48 |
-
|
49 |
if ( file_exists( $path . $template . '.html' ) ) {
|
50 |
-
|
51 |
}
|
52 |
-
|
53 |
-
return
|
54 |
-
|
55 |
}
|
56 |
-
|
57 |
/***
|
58 |
*** @sends an email to any user
|
59 |
***/
|
60 |
function send( $email, $template=null, $args = array() ) {
|
61 |
-
|
62 |
if ( !$template ) return;
|
63 |
if ( um_get_option( $template . '_on' ) != 1 ) return;
|
64 |
if ( !is_email( $email ) ) return;
|
65 |
-
|
66 |
$this->attachments = null;
|
67 |
$this->headers = 'From: '. um_get_option('mail_from') .' <'. um_get_option('mail_from_addr') .'>' . "\r\n";
|
68 |
|
69 |
$this->subject = um_get_option( $template . '_sub' );
|
70 |
$this->subject = um_convert_tags( $this->subject, $args );
|
71 |
-
|
72 |
if ( isset( $args['admin'] ) || isset( $args['plain_text'] ) ) {
|
73 |
$this->force_plain_text = 'forced';
|
74 |
}
|
@@ -80,31 +83,31 @@ class UM_Mail {
|
|
80 |
} else {
|
81 |
$this->message = um_get_option( $template );
|
82 |
}
|
83 |
-
|
84 |
// Convert tags in body
|
85 |
$this->message = um_convert_tags( $this->message, $args );
|
86 |
|
87 |
// Send mail
|
88 |
wp_mail( $email, $this->subject, $this->message, $this->headers, $this->attachments );
|
89 |
remove_filter( 'wp_mail_content_type', array(&$this, 'set_content_type') );
|
90 |
-
|
91 |
// reset globals
|
92 |
$this->force_plain_text = '';
|
93 |
-
|
94 |
}
|
95 |
-
|
96 |
/***
|
97 |
*** @maybe sending HTML emails
|
98 |
***/
|
99 |
function set_content_type( $content_type ) {
|
100 |
if ( $this->force_plain_text == 'forced' )
|
101 |
return 'text/plain';
|
102 |
-
|
103 |
if ( um_get_option('email_html') )
|
104 |
return 'text/html';
|
105 |
-
|
106 |
return 'text/plain';
|
107 |
}
|
108 |
-
|
109 |
|
110 |
-
|
|
5 |
function __construct() {
|
6 |
|
7 |
add_filter('mandrill_nl2br', array(&$this, 'mandrill_nl2br') );
|
8 |
+
|
9 |
$this->force_plain_text = '';
|
10 |
+
|
11 |
}
|
12 |
+
|
13 |
/***
|
14 |
*** @mandrill compatibility
|
15 |
***/
|
16 |
function mandrill_nl2br($nl2br, $message = '') {
|
17 |
+
|
18 |
// text emails
|
19 |
if ( !um_get_option('email_html') ) {
|
20 |
$nl2br = true;
|
21 |
}
|
22 |
+
|
23 |
return $nl2br;
|
24 |
|
25 |
}
|
26 |
+
|
27 |
/***
|
28 |
*** @check If template exists
|
29 |
***/
|
30 |
function email_template( $template, $args = array() ) {
|
31 |
$lang = '';
|
32 |
+
$template_path = false;
|
33 |
+
|
34 |
if ( function_exists('icl_get_current_language') ) {
|
35 |
if ( icl_get_current_language() != 'en' ) {
|
36 |
$lang = icl_get_current_language() . '/';
|
37 |
}
|
38 |
+
} else {
|
39 |
+
$lang = get_locale();
|
40 |
}
|
41 |
+
|
42 |
if ( file_exists( get_stylesheet_directory() . '/ultimate-member/templates/email/' . $lang . $template . '.html' ) ) {
|
43 |
+
$template_path = get_stylesheet_directory() . '/ultimate-member/templates/email/' . $lang . $template . '.html';
|
44 |
}
|
45 |
|
46 |
if ( isset( $args['path'] ) ) {
|
48 |
} else {
|
49 |
$path = um_path . 'templates/email/' . $lang;
|
50 |
}
|
51 |
+
|
52 |
if ( file_exists( $path . $template . '.html' ) ) {
|
53 |
+
$template_path = $path . $template . '.html';
|
54 |
}
|
55 |
+
|
56 |
+
return apply_filters( 'um_email_template_path', $template_path, $template, $args );
|
57 |
+
|
58 |
}
|
59 |
+
|
60 |
/***
|
61 |
*** @sends an email to any user
|
62 |
***/
|
63 |
function send( $email, $template=null, $args = array() ) {
|
64 |
+
|
65 |
if ( !$template ) return;
|
66 |
if ( um_get_option( $template . '_on' ) != 1 ) return;
|
67 |
if ( !is_email( $email ) ) return;
|
68 |
+
|
69 |
$this->attachments = null;
|
70 |
$this->headers = 'From: '. um_get_option('mail_from') .' <'. um_get_option('mail_from_addr') .'>' . "\r\n";
|
71 |
|
72 |
$this->subject = um_get_option( $template . '_sub' );
|
73 |
$this->subject = um_convert_tags( $this->subject, $args );
|
74 |
+
|
75 |
if ( isset( $args['admin'] ) || isset( $args['plain_text'] ) ) {
|
76 |
$this->force_plain_text = 'forced';
|
77 |
}
|
83 |
} else {
|
84 |
$this->message = um_get_option( $template );
|
85 |
}
|
86 |
+
|
87 |
// Convert tags in body
|
88 |
$this->message = um_convert_tags( $this->message, $args );
|
89 |
|
90 |
// Send mail
|
91 |
wp_mail( $email, $this->subject, $this->message, $this->headers, $this->attachments );
|
92 |
remove_filter( 'wp_mail_content_type', array(&$this, 'set_content_type') );
|
93 |
+
|
94 |
// reset globals
|
95 |
$this->force_plain_text = '';
|
96 |
+
|
97 |
}
|
98 |
+
|
99 |
/***
|
100 |
*** @maybe sending HTML emails
|
101 |
***/
|
102 |
function set_content_type( $content_type ) {
|
103 |
if ( $this->force_plain_text == 'forced' )
|
104 |
return 'text/plain';
|
105 |
+
|
106 |
if ( um_get_option('email_html') )
|
107 |
return 'text/html';
|
108 |
+
|
109 |
return 'text/plain';
|
110 |
}
|
|
|
111 |
|
112 |
+
|
113 |
+
}
|
core/um-members.php
CHANGED
@@ -76,6 +76,9 @@ class UM_Members {
|
|
76 |
|
77 |
if ( $ultimatemember->builtin->is_dropdown_field( $filter, $attrs ) ) {
|
78 |
$type = 'select';
|
|
|
|
|
|
|
79 |
} else {
|
80 |
$type = 'text';
|
81 |
}
|
@@ -118,7 +121,7 @@ class UM_Members {
|
|
118 |
|
119 |
?>
|
120 |
|
121 |
-
<input type="text" name="<?php echo $filter; ?>" id="<?php echo $filter; ?>" placeholder="<?php echo $attrs['label']; ?>" value="<?php um_queried_search_value( $filter ); ?>" />
|
122 |
|
123 |
<?php
|
124 |
|
76 |
|
77 |
if ( $ultimatemember->builtin->is_dropdown_field( $filter, $attrs ) ) {
|
78 |
$type = 'select';
|
79 |
+
} else if ( 'user_tags' == $attrs['type'] ) {
|
80 |
+
$attrs['options'] = apply_filters('um_multiselect_options_user_tags', array(), $attrs);
|
81 |
+
$type = 'select';
|
82 |
} else {
|
83 |
$type = 'text';
|
84 |
}
|
121 |
|
122 |
?>
|
123 |
|
124 |
+
<input type="text" name="<?php echo $filter; ?>" id="<?php echo $filter; ?>" placeholder="<?php echo isset( $attrs['label'] ) ? $attrs['label'] : ''; ?>" value="<?php um_queried_search_value( $filter ); ?>" />
|
125 |
|
126 |
<?php
|
127 |
|
core/um-permalinks.php
CHANGED
@@ -12,10 +12,37 @@ class UM_Permalinks {
|
|
12 |
|
13 |
add_action('init', array(&$this, 'activate_account_via_email_link'), 1);
|
14 |
|
|
|
|
|
|
|
15 |
$this->current_url = $this->get_current_url();
|
16 |
|
17 |
}
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
/***
|
20 |
*** @Get query as array
|
21 |
***/
|
@@ -33,7 +60,9 @@ class UM_Permalinks {
|
|
33 |
function get_current_url( $no_query_params = false ) {
|
34 |
global $post;
|
35 |
|
36 |
-
|
|
|
|
|
37 |
|
38 |
if ( !isset( $_SERVER['SERVER_NAME'] ) )
|
39 |
return '';
|
@@ -52,17 +81,20 @@ class UM_Permalinks {
|
|
52 |
}
|
53 |
$page_url .= "://";
|
54 |
|
55 |
-
if (
|
56 |
$page_url .= $_SERVER[ $server_name_method ].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
|
|
57 |
} else {
|
58 |
$page_url .= $_SERVER[ $server_name_method ].$_SERVER["REQUEST_URI"];
|
59 |
}
|
|
|
60 |
}
|
61 |
|
62 |
if ( $no_query_params == true ) {
|
63 |
$page_url = strtok($page_url, '?');
|
64 |
}
|
65 |
|
|
|
66 |
return apply_filters( 'um_get_current_page_url', $page_url );
|
67 |
}
|
68 |
|
@@ -72,7 +104,7 @@ class UM_Permalinks {
|
|
72 |
function activate_account_via_email_link(){
|
73 |
global $ultimatemember;
|
74 |
|
75 |
-
if ( isset($_REQUEST['act']) && $_REQUEST['act'] == 'activate_via_email' && isset($_REQUEST['hash']) && strlen($_REQUEST['hash']) == 40 &&
|
76 |
isset($_REQUEST['user_id']) && is_numeric($_REQUEST['user_id']) ) { // valid token
|
77 |
|
78 |
$user_id = absint( $_REQUEST['user_id'] );
|
@@ -80,12 +112,26 @@ class UM_Permalinks {
|
|
80 |
|
81 |
um_fetch_user( $user_id );
|
82 |
|
83 |
-
if (
|
84 |
-
|
85 |
-
if ( strtolower($_REQUEST['hash']) !== strtolower( um_user('account_secret_hash') ) ) wp_die('The secret key provided does not match this one for the user.');
|
86 |
|
87 |
$ultimatemember->user->approve();
|
88 |
$redirect = ( um_user('url_email_activate') ) ? um_user('url_email_activate') : um_get_core_page('login', 'account_active');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
|
90 |
um_reset_user();
|
91 |
|
@@ -151,6 +197,24 @@ class UM_Permalinks {
|
|
151 |
}
|
152 |
}
|
153 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
if ( um_get_option('permalink_base') == 'user_login' ) {
|
155 |
$user_in_url = um_user('user_login');
|
156 |
|
@@ -173,7 +237,15 @@ class UM_Permalinks {
|
|
173 |
}
|
174 |
|
175 |
if ( um_get_option('permalink_base') == 'name' ) {
|
176 |
-
$user_in_url = rawurlencode( strtolower( um_user('full_name') ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
}
|
178 |
|
179 |
if ( get_option('permalink_structure') ) {
|
12 |
|
13 |
add_action('init', array(&$this, 'activate_account_via_email_link'), 1);
|
14 |
|
15 |
+
remove_action( 'wp_head', 'rel_canonical' );
|
16 |
+
add_action('wp_head', array(&$this, 'um_rel_canonical_'), 9 );
|
17 |
+
|
18 |
$this->current_url = $this->get_current_url();
|
19 |
|
20 |
}
|
21 |
|
22 |
+
/***
|
23 |
+
*** @SEO canonical href bugfix
|
24 |
+
***/
|
25 |
+
function um_rel_canonical_() {
|
26 |
+
if ( !is_singular() )
|
27 |
+
return;
|
28 |
+
|
29 |
+
global $ultimatemember, $wp_the_query;
|
30 |
+
if ( !$id = $wp_the_query->get_queried_object_id() )
|
31 |
+
return;
|
32 |
+
|
33 |
+
if( $this->core['user'] == $id ) {
|
34 |
+
$link = $this->get_current_url();
|
35 |
+
echo "<link rel='canonical' href='$link' />\n";
|
36 |
+
return;
|
37 |
+
}
|
38 |
+
|
39 |
+
$link = get_permalink( $id );
|
40 |
+
if ( $page = get_query_var('cpage') )
|
41 |
+
$link = get_comments_pagenum_link( $page );
|
42 |
+
echo "<link rel='canonical' href='$link' />\n";
|
43 |
+
|
44 |
+
}
|
45 |
+
|
46 |
/***
|
47 |
*** @Get query as array
|
48 |
***/
|
60 |
function get_current_url( $no_query_params = false ) {
|
61 |
global $post;
|
62 |
|
63 |
+
$um_get_option = get_option('um_options');
|
64 |
+
$server_name_method = ( $um_get_option['current_url_method'] ) ? $um_get_option['current_url_method'] : 'SERVER_NAME';
|
65 |
+
$um_port_forwarding_url = ( isset( $um_get_option['um_port_forwarding_url'] ) ) ? $um_get_option['um_port_forwarding_url']: '';
|
66 |
|
67 |
if ( !isset( $_SERVER['SERVER_NAME'] ) )
|
68 |
return '';
|
81 |
}
|
82 |
$page_url .= "://";
|
83 |
|
84 |
+
if ( $um_port_forwarding_url == 1 && isset( $_SERVER["SERVER_PORT"] ) ) {
|
85 |
$page_url .= $_SERVER[ $server_name_method ].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
86 |
+
|
87 |
} else {
|
88 |
$page_url .= $_SERVER[ $server_name_method ].$_SERVER["REQUEST_URI"];
|
89 |
}
|
90 |
+
|
91 |
}
|
92 |
|
93 |
if ( $no_query_params == true ) {
|
94 |
$page_url = strtok($page_url, '?');
|
95 |
}
|
96 |
|
97 |
+
|
98 |
return apply_filters( 'um_get_current_page_url', $page_url );
|
99 |
}
|
100 |
|
104 |
function activate_account_via_email_link(){
|
105 |
global $ultimatemember;
|
106 |
|
107 |
+
if ( isset($_REQUEST['act']) && $_REQUEST['act'] == 'activate_via_email' && isset($_REQUEST['hash']) && is_string($_REQUEST['hash']) && strlen($_REQUEST['hash']) == 40 &&
|
108 |
isset($_REQUEST['user_id']) && is_numeric($_REQUEST['user_id']) ) { // valid token
|
109 |
|
110 |
$user_id = absint( $_REQUEST['user_id'] );
|
112 |
|
113 |
um_fetch_user( $user_id );
|
114 |
|
115 |
+
if ( strtolower($_REQUEST['hash']) !== strtolower( um_user('account_secret_hash') ) )
|
116 |
+
wp_die( __( 'This activation link is expired or have already been used.','ultimatemember' ) );
|
|
|
117 |
|
118 |
$ultimatemember->user->approve();
|
119 |
$redirect = ( um_user('url_email_activate') ) ? um_user('url_email_activate') : um_get_core_page('login', 'account_active');
|
120 |
+
$login = (bool) um_user('login_email_activate');
|
121 |
+
|
122 |
+
// log in automatically
|
123 |
+
if ( !is_user_logged_in() && $login ) {
|
124 |
+
$user = get_userdata($user_id);
|
125 |
+
$user_id = $user->ID;
|
126 |
+
|
127 |
+
// update wp user
|
128 |
+
wp_set_current_user( $user_id, $user_login );
|
129 |
+
wp_set_auth_cookie( $user_id );
|
130 |
+
|
131 |
+
ob_start();
|
132 |
+
do_action( 'wp_login', $user_login );
|
133 |
+
ob_end_clean();
|
134 |
+
}
|
135 |
|
136 |
um_reset_user();
|
137 |
|
197 |
}
|
198 |
}
|
199 |
|
200 |
+
// WPML compatibility
|
201 |
+
if ( function_exists('icl_object_id') ) {
|
202 |
+
|
203 |
+
|
204 |
+
$language_code = ICL_LANGUAGE_CODE;
|
205 |
+
$lang_post_id = icl_object_id( $page_id , 'page', true, $language_code );
|
206 |
+
|
207 |
+
if($lang_post_id != 0) {
|
208 |
+
$profile_url = get_permalink( $lang_post_id );
|
209 |
+
}else {
|
210 |
+
// No page found, it's most likely the homepage
|
211 |
+
global $sitepress;
|
212 |
+
$profile_url = $sitepress->language_url( $language );
|
213 |
+
}
|
214 |
+
|
215 |
+
|
216 |
+
}
|
217 |
+
|
218 |
if ( um_get_option('permalink_base') == 'user_login' ) {
|
219 |
$user_in_url = um_user('user_login');
|
220 |
|
237 |
}
|
238 |
|
239 |
if ( um_get_option('permalink_base') == 'name' ) {
|
240 |
+
$user_in_url = rawurlencode( strtolower( str_replace(" ",".",um_user('full_name') ) ) );
|
241 |
+
}
|
242 |
+
|
243 |
+
if ( um_get_option('permalink_base') == 'name_dash' ) {
|
244 |
+
$user_in_url = rawurlencode( strtolower( str_replace(" ","-",um_user('full_name') ) ) );
|
245 |
+
}
|
246 |
+
|
247 |
+
if ( um_get_option('permalink_base') == 'name_plus' ) {
|
248 |
+
$user_in_url = strtolower( str_replace(" ","+",um_user('full_name') ) );
|
249 |
}
|
250 |
|
251 |
if ( get_option('permalink_structure') ) {
|
core/um-rewrite.php
CHANGED
@@ -43,18 +43,47 @@ class UM_Rewrite {
|
|
43 |
$user_slug = $user->post_name;
|
44 |
$account = get_post($account_page_id);
|
45 |
$account_slug = $account->post_name;
|
|
|
|
|
|
|
|
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
);
|
|
|
58 |
|
59 |
flush_rewrite_rules( true );
|
60 |
|
@@ -104,7 +133,7 @@ class UM_Rewrite {
|
|
104 |
|
105 |
}
|
106 |
|
107 |
-
if ( um_get_option('permalink_base')
|
108 |
$user_id = $ultimatemember->user->user_exists_by_name( um_queried_user() );
|
109 |
|
110 |
}
|
43 |
$user_slug = $user->post_name;
|
44 |
$account = get_post($account_page_id);
|
45 |
$account_slug = $account->post_name;
|
46 |
+
|
47 |
+
$add_lang_code = '';
|
48 |
+
|
49 |
+
if ( function_exists('icl_object_id') || function_exists('icl_get_current_language') ) {
|
50 |
|
51 |
+
if( function_exists('icl_get_current_language') ){
|
52 |
+
$language_code = icl_get_current_language();
|
53 |
+
}else if( function_exists('icl_object_id') ){
|
54 |
+
$language_code = ICL_LANGUAGE_CODE;
|
55 |
+
}
|
56 |
+
|
57 |
+
// User page translated slug
|
58 |
+
$lang_post_id = icl_object_id( $user->ID, 'post', FALSE, $language_code );
|
59 |
+
$lang_post_obj = get_post( $lang_post_id );
|
60 |
+
if( isset( $lang_post_obj->post_name ) ){
|
61 |
+
$user_slug = $lang_post_obj->post_name;
|
62 |
+
}
|
63 |
+
|
64 |
+
// Account page translated slug
|
65 |
+
$lang_post_id = icl_object_id( $account->ID, 'post', FALSE, $language_code );
|
66 |
+
$lang_post_obj = get_post( $lang_post_id );
|
67 |
+
if( isset( $lang_post_obj->post_name ) ){
|
68 |
+
$account_slug = $lang_post_obj->post_name;
|
69 |
+
}
|
70 |
+
|
71 |
+
if( $language_code != icl_get_default_language() ){
|
72 |
+
$add_lang_code = $language_code;
|
73 |
+
}
|
74 |
|
75 |
+
}
|
76 |
+
|
77 |
+
add_rewrite_rule( $user_slug.'/([^/]+)/?$',
|
78 |
+
'index.php?page_id='.$user_page_id.'&um_user=$matches[1]&lang='.$add_lang_code,
|
79 |
+
'top'
|
80 |
+
);
|
81 |
+
|
82 |
+
add_rewrite_rule( $account_slug.'/([^/]+)?$',
|
83 |
+
'index.php?page_id='.$account_page_id.'&um_tab=$matches[1]&lang='.$add_lang_code,
|
84 |
+
'top'
|
85 |
);
|
86 |
+
|
87 |
|
88 |
flush_rewrite_rules( true );
|
89 |
|
133 |
|
134 |
}
|
135 |
|
136 |
+
if ( in_array( um_get_option('permalink_base'), array('name','name_dash','name_dot','name_plus') ) ) {
|
137 |
$user_id = $ultimatemember->user->user_exists_by_name( um_queried_user() );
|
138 |
|
139 |
}
|
core/um-short-functions.php
CHANGED
@@ -3,19 +3,19 @@
|
|
3 |
function um_mail_content_type( $content_type ) {
|
4 |
return 'text/html';
|
5 |
}
|
6 |
-
|
7 |
function UM_Mail( $user_id_or_email = 1, $subject_line = 'Email Subject', $template, $path = null, $args = array() ) {
|
8 |
-
|
9 |
if ( absint( $user_id_or_email ) ) {
|
10 |
$user = get_userdata( $user_id_or_email );
|
11 |
$email = $user->user_email;
|
12 |
} else {
|
13 |
$email = $user_id_or_email;
|
14 |
}
|
15 |
-
|
16 |
$headers = 'From: '. um_get_option('mail_from') .' <'. um_get_option('mail_from_addr') .'>' . "\r\n";
|
17 |
$attachments = null;
|
18 |
-
|
19 |
if ( file_exists( get_stylesheet_directory() . '/ultimate-member/templates/email/' . get_locale() . '/' . $template . '.html' ) ) {
|
20 |
$path_to_email = get_stylesheet_directory() . '/ultimate-member/templates/email/' . get_locale() . '/' . $template . '.html';
|
21 |
} else if ( file_exists( get_stylesheet_directory() . '/ultimate-member/templates/email/' . $template . '.html' ) ) {
|
@@ -30,7 +30,7 @@
|
|
30 |
} else {
|
31 |
$message = ( um_get_option('email-' . $template ) ) ? um_get_option('email-' . $template ) : 'Untitled';
|
32 |
}
|
33 |
-
|
34 |
$message = um_convert_tags( $message, $args );
|
35 |
wp_mail( $email, $subject_line, $message, $headers, $attachments );
|
36 |
}
|
@@ -49,7 +49,7 @@
|
|
49 |
function um_clickable_links($s) {
|
50 |
return preg_replace('@(https?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-]*(\?\S+)?[^\.\s])?)?)@', '<a href="$1" class="um-link" target="_blank">$1</a>', $s);
|
51 |
}
|
52 |
-
|
53 |
/***
|
54 |
*** @Get where user should be headed after logging
|
55 |
***/
|
@@ -63,11 +63,22 @@
|
|
63 |
return $uri;
|
64 |
}
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
/***
|
67 |
*** @convert template tags
|
68 |
***/
|
69 |
function um_convert_tags( $content, $args = array() ) {
|
70 |
-
|
71 |
$search = array(
|
72 |
'{display_name}',
|
73 |
'{first_name}',
|
@@ -88,9 +99,9 @@
|
|
88 |
'{submitted_registration}',
|
89 |
'{user_avatar_url}',
|
90 |
);
|
91 |
-
|
92 |
$search = apply_filters('um_template_tags_patterns_hook', $search);
|
93 |
-
|
94 |
$replace = array(
|
95 |
um_user('display_name'),
|
96 |
um_user('first_name'),
|
@@ -111,16 +122,16 @@
|
|
111 |
um_user_submitted_registration(),
|
112 |
um_get_user_avatar_url(),
|
113 |
);
|
114 |
-
|
115 |
$replace = apply_filters('um_template_tags_replaces_hook', $replace);
|
116 |
-
|
117 |
$content = str_replace($search, $replace, $content);
|
118 |
-
|
119 |
if ( isset( $args['tags'] ) && isset( $args['tags_replace'] ) ) {
|
120 |
$content = str_replace($args['tags'], $args['tags_replace'], $content);
|
121 |
}
|
122 |
-
|
123 |
-
$regex = '~\{([^}]*)\}~';
|
124 |
preg_match_all($regex, $content, $matches);
|
125 |
|
126 |
// Support for all usermeta keys
|
@@ -132,7 +143,7 @@
|
|
132 |
}
|
133 |
|
134 |
return $content;
|
135 |
-
|
136 |
}
|
137 |
|
138 |
/**
|
@@ -147,10 +158,10 @@
|
|
147 |
* @example The example below can retrieve the user's IP address
|
148 |
|
149 |
<?php
|
150 |
-
|
151 |
$user_ip = um_user_ip();
|
152 |
echo 'User IP address is: ' . $user_ip; // prints the user IP address e.g. 127.0.0.1
|
153 |
-
|
154 |
?>
|
155 |
|
156 |
*
|
@@ -176,17 +187,17 @@ function um_user_ip() {
|
|
176 |
***/
|
177 |
function um_field_conditions_are_met( $data ) {
|
178 |
if ( !isset( $data['conditions'] ) ) return true;
|
179 |
-
|
180 |
$state = 1;
|
181 |
-
|
182 |
foreach( $data['conditions'] as $k => $arr ) {
|
183 |
if ( $arr[0] == 'show' ) {
|
184 |
-
|
185 |
$state = 1;
|
186 |
$val = $arr[3];
|
187 |
$op = $arr[2];
|
188 |
$field = um_profile($arr[1]);
|
189 |
-
|
190 |
switch( $op ) {
|
191 |
case 'equals to': if ( $field != $val ) $state = 0; break;
|
192 |
case 'not equals': if ( $field == $val ) $state = 0; break;
|
@@ -197,14 +208,14 @@ function um_user_ip() {
|
|
197 |
case 'contains': if ( !strstr( $field, $val ) ) $state = 0; break;
|
198 |
}
|
199 |
}
|
200 |
-
|
201 |
if ( $arr[0] == 'hide' ) {
|
202 |
-
|
203 |
$state = 0;
|
204 |
$val = $arr[3];
|
205 |
$op = $arr[2];
|
206 |
$field = um_profile($arr[1]);
|
207 |
-
|
208 |
switch( $op ) {
|
209 |
case 'equals to': if ( $field != $val ) $state = 1; break;
|
210 |
case 'not equals': if ( $field == $val ) $state = 1; break;
|
@@ -215,9 +226,9 @@ function um_user_ip() {
|
|
215 |
case 'contains': if ( !strstr( $field, $val ) ) $state = 1; break;
|
216 |
}
|
217 |
}
|
218 |
-
|
219 |
}
|
220 |
-
|
221 |
if ( $state )
|
222 |
return true;
|
223 |
return false;
|
@@ -229,19 +240,19 @@ function um_user_ip() {
|
|
229 |
function um_redirect_home() {
|
230 |
exit( wp_redirect( home_url() ) );
|
231 |
}
|
232 |
-
|
233 |
/***
|
234 |
*** @Get limit of words from sentence
|
235 |
***/
|
236 |
function um_get_snippet( $str, $wordCount = 10 ) {
|
237 |
if ( str_word_count( $str ) > $wordCount ) {
|
238 |
-
$str = implode(
|
239 |
-
'',
|
240 |
-
array_slice(
|
241 |
preg_split(
|
242 |
-
'/([\s,\.;\?\!]+)/',
|
243 |
-
$str,
|
244 |
-
$wordCount*2+1,
|
245 |
PREG_SPLIT_DELIM_CAPTURE
|
246 |
),
|
247 |
0,
|
@@ -257,51 +268,52 @@ function um_user_ip() {
|
|
257 |
***/
|
258 |
function um_user_submitted_registration( $style = false ) {
|
259 |
$output = null;
|
260 |
-
|
261 |
$data = um_user('submitted');
|
262 |
$udata = get_userdata( um_user('ID') );
|
263 |
-
|
264 |
if ( $style ) $output .= '<div class="um-admin-infobox">';
|
265 |
-
|
266 |
if ( isset( $data ) && is_array( $data ) ) {
|
267 |
-
|
268 |
$data = apply_filters('um_email_registration_data', $data );
|
269 |
-
|
270 |
foreach( $data as $k => $v ) {
|
271 |
-
|
272 |
if ( !is_array( $v ) && strstr( $v, 'ultimatemember/temp' ) ) {
|
273 |
$file = basename( $v );
|
274 |
$v = um_user_uploads_uri() . $file;
|
275 |
}
|
276 |
-
|
277 |
if ( !strstr( $k, 'user_pass' ) && $k != 'g-recaptcha-response' && $k != 'request' ) {
|
278 |
-
|
279 |
if ( is_array($v) ) {
|
280 |
$v = implode(',', $v );
|
281 |
}
|
282 |
-
|
283 |
if ( $k == 'timestamp' ) {
|
284 |
$k = __('date submitted','ultimatemember');
|
285 |
$v = date("d M Y H:i", $v);
|
286 |
}
|
287 |
-
|
|
|
288 |
if ( $style ) {
|
289 |
if ( !$v ) $v = __('(empty)','ultimatemember');
|
290 |
$output .= "<p><label>$k</label><span>$v</span></p>";
|
291 |
} else {
|
292 |
$output .= "$k: $v" . "\r\n";
|
293 |
}
|
294 |
-
|
295 |
}
|
296 |
-
|
297 |
}
|
298 |
}
|
299 |
-
|
300 |
if ( $style ) $output .= '</div>';
|
301 |
-
|
302 |
return $output;
|
303 |
}
|
304 |
-
|
305 |
/***
|
306 |
*** @Show filtered social link
|
307 |
***/
|
@@ -319,31 +331,31 @@ function um_user_ip() {
|
|
319 |
$value = str_replace('https://http://','https://',$value);
|
320 |
return $value;
|
321 |
}
|
322 |
-
|
323 |
/***
|
324 |
*** @Get filtered meta value after applying hooks
|
325 |
***/
|
326 |
function um_filtered_value( $key, $data = false ) {
|
327 |
global $ultimatemember;
|
328 |
-
|
329 |
$value = um_user( $key );
|
330 |
-
|
331 |
if ( !$data ) {
|
332 |
$data = $ultimatemember->builtin->get_specific_field( $key );
|
333 |
}
|
334 |
-
|
335 |
$type = ( isset($data['type']) ) ? $data['type'] : '';
|
336 |
|
337 |
$value = apply_filters("um_profile_field_filter_hook__", $value, $data );
|
338 |
$value = apply_filters("um_profile_field_filter_hook__{$key}", $value, $data );
|
339 |
$value = apply_filters("um_profile_field_filter_hook__{$type}", $value, $data );
|
340 |
-
|
341 |
return $value;
|
342 |
}
|
343 |
-
|
344 |
|
345 |
function um_profile_id() {
|
346 |
-
|
347 |
if ( um_get_requested_user() ) {
|
348 |
return um_get_requested_user();
|
349 |
} else if ( is_user_logged_in() && get_current_user_id() ) {
|
@@ -361,7 +373,7 @@ function um_profile_id() {
|
|
361 |
|
362 |
$url = explode('/ultimatemember/temp/', $url);
|
363 |
if ( isset( $url[1] ) ) {
|
364 |
-
|
365 |
if ( strstr( $url[1], '../' ) || strstr( $url[1], '%' ) ) {
|
366 |
return false;
|
367 |
}
|
@@ -374,7 +386,7 @@ function um_profile_id() {
|
|
374 |
}
|
375 |
return false;
|
376 |
}
|
377 |
-
|
378 |
/***
|
379 |
*** @Check that temp image is valid
|
380 |
***/
|
@@ -391,14 +403,14 @@ function um_profile_id() {
|
|
391 |
}
|
392 |
return false;
|
393 |
}
|
394 |
-
|
395 |
/***
|
396 |
*** @Get a translated core page URL
|
397 |
***/
|
398 |
function um_get_url_for_language( $post_id, $language )
|
399 |
{
|
400 |
$lang_post_id = icl_object_id( $post_id , 'page', true, $language );
|
401 |
-
|
402 |
$url = "";
|
403 |
if($lang_post_id != 0) {
|
404 |
$url = get_permalink( $lang_post_id );
|
@@ -407,10 +419,10 @@ function um_profile_id() {
|
|
407 |
global $sitepress;
|
408 |
$url = $sitepress->language_url( $language );
|
409 |
}
|
410 |
-
|
411 |
return $url;
|
412 |
}
|
413 |
-
|
414 |
/***
|
415 |
*** @Get core page url
|
416 |
***/
|
@@ -418,7 +430,7 @@ function um_profile_id() {
|
|
418 |
global $ultimatemember;
|
419 |
return $ultimatemember->datetime->time_diff( $time1, $time2 );
|
420 |
}
|
421 |
-
|
422 |
/***
|
423 |
*** @Get user's last login timestamp
|
424 |
***/
|
@@ -428,7 +440,7 @@ function um_profile_id() {
|
|
428 |
return $value;
|
429 |
return '';
|
430 |
}
|
431 |
-
|
432 |
/***
|
433 |
*** @Get user's last login time
|
434 |
***/
|
@@ -438,7 +450,7 @@ function um_profile_id() {
|
|
438 |
return date_i18n('F d, Y', $value );
|
439 |
return '';
|
440 |
}
|
441 |
-
|
442 |
/***
|
443 |
*** @Get user's last login (time diff)
|
444 |
***/
|
@@ -451,24 +463,24 @@ function um_profile_id() {
|
|
451 |
}
|
452 |
return $value;
|
453 |
}
|
454 |
-
|
455 |
/***
|
456 |
*** @Get core page url
|
457 |
***/
|
458 |
function um_get_core_page( $slug, $updated = false) {
|
459 |
global $ultimatemember;
|
460 |
$url = '';
|
461 |
-
|
462 |
if ( isset( $ultimatemember->permalinks->core[ $slug ] ) ) {
|
463 |
$url = get_permalink( $ultimatemember->permalinks->core[ $slug ] );
|
464 |
if ( $updated )
|
465 |
-
$url = add_query_arg( 'updated', esc_attr( $updated ), $url );
|
466 |
}
|
467 |
-
|
468 |
if ( function_exists('icl_get_current_language') && icl_get_current_language() != icl_get_default_language() ) {
|
469 |
-
|
470 |
$url = um_get_url_for_language( $ultimatemember->permalinks->core[ $slug ], icl_get_current_language() );
|
471 |
-
|
472 |
if ( get_post_meta( get_the_ID() , '_um_wpml_account', true ) == 1 ) {
|
473 |
$url = get_permalink( get_the_ID() );
|
474 |
}
|
@@ -476,15 +488,15 @@ function um_profile_id() {
|
|
476 |
$url = um_get_url_for_language( $ultimatemember->permalinks->core[ $slug ], icl_get_current_language() );
|
477 |
}
|
478 |
}
|
479 |
-
|
480 |
if ( $url ) {
|
481 |
$url = apply_filters('um_get_core_page_filter', $url, $slug, $updated);
|
482 |
return $url;
|
483 |
}
|
484 |
-
|
485 |
return '';
|
486 |
}
|
487 |
-
|
488 |
/***
|
489 |
*** @boolean check if we are on UM page
|
490 |
***/
|
@@ -494,7 +506,7 @@ function um_profile_id() {
|
|
494 |
return true;
|
495 |
return false;
|
496 |
}
|
497 |
-
|
498 |
/***
|
499 |
*** @boolean check if we are on a core page or not
|
500 |
***/
|
@@ -504,9 +516,17 @@ function um_profile_id() {
|
|
504 |
return true;
|
505 |
if ( isset($post->ID) && get_post_meta( $post->ID, '_um_wpml_' . $page, true ) == 1 )
|
506 |
return true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
507 |
return false;
|
508 |
}
|
509 |
-
|
510 |
/***
|
511 |
*** @Is core URL
|
512 |
***/
|
@@ -516,7 +536,7 @@ function um_profile_id() {
|
|
516 |
$current_url = $ultimatemember->permalinks->get_current_url( get_option('permalink_structure') );
|
517 |
|
518 |
if ( !isset( $array ) || !is_array( $array ) ) return false;
|
519 |
-
|
520 |
foreach( $array as $k => $id ) {
|
521 |
$page_url = get_permalink( $id );
|
522 |
if ( strstr( $current_url, $page_url ) )
|
@@ -524,7 +544,7 @@ function um_profile_id() {
|
|
524 |
}
|
525 |
return false;
|
526 |
}
|
527 |
-
|
528 |
/***
|
529 |
*** @Check value of queried search in text input
|
530 |
***/
|
@@ -538,7 +558,7 @@ function um_profile_id() {
|
|
538 |
}
|
539 |
echo '';
|
540 |
}
|
541 |
-
|
542 |
/***
|
543 |
*** @Check whether item in dropdown is selected in query-url
|
544 |
***/
|
@@ -551,7 +571,7 @@ function um_profile_id() {
|
|
551 |
}
|
552 |
echo '';
|
553 |
}
|
554 |
-
|
555 |
/***
|
556 |
*** @get styling defaults
|
557 |
***/
|
@@ -572,7 +592,7 @@ function um_profile_id() {
|
|
572 |
|
573 |
return $new_arr;
|
574 |
}
|
575 |
-
|
576 |
/***
|
577 |
*** @get meta option default
|
578 |
***/
|
@@ -582,7 +602,7 @@ function um_profile_id() {
|
|
582 |
return $ultimatemember->setup->core_form_meta_all[ '_um_' . $id ];
|
583 |
return '';
|
584 |
}
|
585 |
-
|
586 |
/***
|
587 |
*** @check if a legitimate password reset request is in action
|
588 |
***/
|
@@ -592,17 +612,20 @@ function um_profile_id() {
|
|
592 |
return true;
|
593 |
return false;
|
594 |
}
|
595 |
-
|
596 |
/***
|
597 |
*** @check if a legitimate password change request is in action
|
598 |
***/
|
599 |
function um_requesting_password_change() {
|
600 |
global $post, $ultimatemember;
|
601 |
-
|
|
|
|
|
|
|
602 |
return true;
|
603 |
return false;
|
604 |
}
|
605 |
-
|
606 |
/***
|
607 |
*** @boolean for account page editing
|
608 |
***/
|
@@ -611,7 +634,7 @@ function um_profile_id() {
|
|
611 |
return true;
|
612 |
return false;
|
613 |
}
|
614 |
-
|
615 |
/***
|
616 |
*** @get a user's display name
|
617 |
***/
|
@@ -629,7 +652,7 @@ function um_profile_id() {
|
|
629 |
global $ultimatemember;
|
630 |
return $ultimatemember->members->results[ $argument ];
|
631 |
}
|
632 |
-
|
633 |
/**
|
634 |
* @function um_reset_user_clean()
|
635 |
*
|
@@ -651,7 +674,7 @@ function um_reset_user_clean() {
|
|
651 |
global $ultimatemember;
|
652 |
$ultimatemember->user->reset( true );
|
653 |
}
|
654 |
-
|
655 |
/**
|
656 |
* @function um_reset_user()
|
657 |
*
|
@@ -673,14 +696,14 @@ function um_reset_user() {
|
|
673 |
global $ultimatemember;
|
674 |
$ultimatemember->user->reset();
|
675 |
}
|
676 |
-
|
677 |
/***
|
678 |
*** @gets the queried user
|
679 |
***/
|
680 |
function um_queried_user() {
|
681 |
return get_query_var('um_user');
|
682 |
}
|
683 |
-
|
684 |
/***
|
685 |
*** @Sets the requested user
|
686 |
***/
|
@@ -688,7 +711,7 @@ function um_reset_user() {
|
|
688 |
global $ultimatemember;
|
689 |
$ultimatemember->user->target_id = $user_id;
|
690 |
}
|
691 |
-
|
692 |
/***
|
693 |
*** @Gets the requested user
|
694 |
***/
|
@@ -698,7 +721,7 @@ function um_reset_user() {
|
|
698 |
return $ultimatemember->user->target_id;
|
699 |
return false;
|
700 |
}
|
701 |
-
|
702 |
/***
|
703 |
*** @remove edit profile args from url
|
704 |
***/
|
@@ -708,7 +731,7 @@ function um_reset_user() {
|
|
708 |
$url = add_query_arg('profiletab', 'main', $url );
|
709 |
return $url;
|
710 |
}
|
711 |
-
|
712 |
/***
|
713 |
*** @boolean for profile edit page
|
714 |
***/
|
@@ -720,50 +743,50 @@ function um_reset_user() {
|
|
720 |
}
|
721 |
return false;
|
722 |
}
|
723 |
-
|
724 |
/***
|
725 |
*** @can view field
|
726 |
***/
|
727 |
function um_can_view_field( $data ) {
|
728 |
global $ultimatemember;
|
729 |
-
|
730 |
if ( !isset( $ultimatemember->fields->set_mode ) )
|
731 |
$ultimatemember->fields->set_mode = '';
|
732 |
|
733 |
if ( isset( $data['public'] ) && $ultimatemember->fields->set_mode != 'register' ) {
|
734 |
-
|
735 |
if ( !is_user_logged_in() && $data['public'] != '1' ) return false;
|
736 |
-
|
737 |
if ( is_user_logged_in() ) {
|
738 |
-
|
739 |
if ( $data['public'] == '-3' && !um_is_user_himself() && !in_array( $ultimatemember->query->get_role_by_userid( get_current_user_id() ), $data['roles'] ) )
|
740 |
return false;
|
741 |
-
|
742 |
if ( !um_is_user_himself() && $data['public'] == '-1' && !um_user_can('can_edit_everyone') )
|
743 |
return false;
|
744 |
-
|
745 |
if ( $data['public'] == '-2' && $data['roles'] )
|
746 |
if ( !in_array( $ultimatemember->query->get_role_by_userid( get_current_user_id() ), $data['roles'] ) )
|
747 |
return false;
|
748 |
}
|
749 |
-
|
750 |
}
|
751 |
-
|
752 |
return true;
|
753 |
}
|
754 |
-
|
755 |
/***
|
756 |
*** @checks if user can view profile
|
757 |
***/
|
758 |
function um_can_view_profile( $user_id ){
|
759 |
global $ultimatemember;
|
760 |
-
|
761 |
if ( !um_user('can_view_all') && $user_id != get_current_user_id() && is_user_logged_in() ) return false;
|
762 |
-
|
763 |
if ( um_current_user_can('edit', $user_id ) ) {
|
764 |
return true;
|
765 |
}
|
766 |
-
|
767 |
if ( !is_user_logged_in() ) {
|
768 |
if ( $ultimatemember->user->is_private_profile( $user_id ) ) {
|
769 |
return false;
|
@@ -771,7 +794,7 @@ function um_reset_user() {
|
|
771 |
return true;
|
772 |
}
|
773 |
}
|
774 |
-
|
775 |
if ( !um_user('can_access_private_profile') && $ultimatemember->user->is_private_profile( $user_id ) ) return false;
|
776 |
|
777 |
if ( um_user_can('can_view_roles') && $user_id != get_current_user_id() ) {
|
@@ -779,11 +802,11 @@ function um_reset_user() {
|
|
779 |
return false;
|
780 |
}
|
781 |
}
|
782 |
-
|
783 |
return true;
|
784 |
-
|
785 |
}
|
786 |
-
|
787 |
/***
|
788 |
*** @boolean check for not same user
|
789 |
***/
|
@@ -792,32 +815,32 @@ function um_reset_user() {
|
|
792 |
return false;
|
793 |
return true;
|
794 |
}
|
795 |
-
|
796 |
/***
|
797 |
*** @can edit field
|
798 |
***/
|
799 |
function um_can_edit_field( $data ) {
|
800 |
global $ultimatemember;
|
801 |
-
|
802 |
-
if ( isset( $ultimatemember->fields->editing ) && $ultimatemember->fields->editing == true &&
|
803 |
isset( $ultimatemember->fields->set_mode ) && $ultimatemember->fields->set_mode == 'profile' ) {
|
804 |
-
|
805 |
if ( is_user_logged_in() && isset( $data['editable'] ) && $data['editable'] == 0 ) {
|
806 |
-
|
807 |
if ( um_is_user_himself() && !um_user('can_edit_everyone') )
|
808 |
return false;
|
809 |
-
|
810 |
if ( !um_is_user_himself() && !um_user_can('can_edit_everyone') )
|
811 |
return false;
|
812 |
-
|
813 |
}
|
814 |
-
|
815 |
}
|
816 |
-
|
817 |
return true;
|
818 |
-
|
819 |
}
|
820 |
-
|
821 |
/***
|
822 |
*** @User can (role settings )
|
823 |
***/
|
@@ -835,7 +858,7 @@ function um_reset_user() {
|
|
835 |
return true;
|
836 |
return false;
|
837 |
}
|
838 |
-
|
839 |
/***
|
840 |
*** @Check if user is in his profile
|
841 |
***/
|
@@ -845,40 +868,40 @@ function um_reset_user() {
|
|
845 |
if ( !um_get_requested_user() && um_is_core_page('user') && get_current_user_id() ) return true;
|
846 |
return false;
|
847 |
}
|
848 |
-
|
849 |
/***
|
850 |
*** @Current user can
|
851 |
***/
|
852 |
function um_current_user_can( $cap, $user_id ){
|
853 |
global $ultimatemember;
|
854 |
-
|
855 |
if ( !is_user_logged_in() ) return false;
|
856 |
-
|
857 |
$return = 1;
|
858 |
-
|
859 |
um_fetch_user( get_current_user_id() );
|
860 |
|
861 |
switch($cap) {
|
862 |
-
|
863 |
case 'edit':
|
864 |
if ( get_current_user_id() == $user_id && um_user('can_edit_profile') ) $return = 1;
|
865 |
elseif ( !um_user('can_edit_everyone') ) $return = 0;
|
866 |
elseif ( get_current_user_id() == $user_id && !um_user('can_edit_profile') ) $return = 0;
|
867 |
elseif ( um_user('can_edit_roles') && !in_array( $ultimatemember->query->get_role_by_userid( $user_id ), um_user('can_edit_roles') ) ) $return = 0;
|
868 |
break;
|
869 |
-
|
870 |
case 'delete':
|
871 |
if ( !um_user('can_delete_everyone') ) $return = 0;
|
872 |
elseif ( um_user('can_delete_roles') && !in_array( $ultimatemember->query->get_role_by_userid( $user_id ), um_user('can_delete_roles') ) ) $return = 0;
|
873 |
break;
|
874 |
-
|
875 |
}
|
876 |
|
877 |
um_fetch_user( $user_id );
|
878 |
|
879 |
return $return;
|
880 |
}
|
881 |
-
|
882 |
/***
|
883 |
*** @Returns the edit profile link
|
884 |
***/
|
@@ -891,7 +914,7 @@ function um_reset_user() {
|
|
891 |
$url = add_query_arg( 'um_action', 'edit', $url );
|
892 |
return $url;
|
893 |
}
|
894 |
-
|
895 |
/***
|
896 |
*** @checks if user can edit his profile
|
897 |
***/
|
@@ -901,14 +924,14 @@ function um_reset_user() {
|
|
901 |
if ( !um_user('can_edit_profile') ) return false;
|
902 |
return true;
|
903 |
}
|
904 |
-
|
905 |
/***
|
906 |
*** @short for admin e-mail
|
907 |
***/
|
908 |
function um_admin_email(){
|
909 |
return um_get_option('admin_email');
|
910 |
}
|
911 |
-
|
912 |
/**
|
913 |
* @function um_get_option()
|
914 |
*
|
@@ -927,9 +950,9 @@ function um_reset_user() {
|
|
927 |
|
928 |
*
|
929 |
* @example Get blocked IP addresses set in backend
|
930 |
-
|
931 |
<?php $blocked_ips = um_get_option('blocked_ips'); ?>
|
932 |
-
|
933 |
*
|
934 |
*/
|
935 |
function um_get_option($option_id) {
|
@@ -939,21 +962,21 @@ function um_get_option($option_id) {
|
|
939 |
if ( isset($um_options[$option_id]) && !empty( $um_options[$option_id] ) ) {
|
940 |
return $um_options[$option_id];
|
941 |
}
|
942 |
-
|
943 |
switch($option_id){
|
944 |
-
|
945 |
case 'site_name':
|
946 |
return get_bloginfo('name');
|
947 |
break;
|
948 |
-
|
949 |
case 'admin_email':
|
950 |
return get_bloginfo('admin_email');
|
951 |
break;
|
952 |
-
|
953 |
}
|
954 |
-
|
955 |
}
|
956 |
-
|
957 |
/***
|
958 |
*** @Display a link to profile page
|
959 |
***/
|
@@ -969,7 +992,7 @@ function um_get_option($option_id) {
|
|
969 |
global $ultimatemember;
|
970 |
return $ultimatemember->query->get_roles();
|
971 |
}
|
972 |
-
|
973 |
/**
|
974 |
* @function um_fetch_user()
|
975 |
*
|
@@ -984,29 +1007,29 @@ function um_get_option($option_id) {
|
|
984 |
* @example The example below will set user ID 5 prior to retrieving his profile information.
|
985 |
|
986 |
<?php
|
987 |
-
|
988 |
um_fetch_user(5);
|
989 |
echo um_user('display_name'); // returns the display name of user ID 5
|
990 |
-
|
991 |
?>
|
992 |
|
993 |
*
|
994 |
* @example In the following example you can fetch the profile of a logged-in user dynamically.
|
995 |
-
|
996 |
<?php
|
997 |
-
|
998 |
um_fetch_user( get_current_user_id() );
|
999 |
echo um_user('display_name'); // returns the display name of logged-in user
|
1000 |
-
|
1001 |
?>
|
1002 |
-
|
1003 |
*
|
1004 |
*/
|
1005 |
function um_fetch_user( $user_id ) {
|
1006 |
global $ultimatemember;
|
1007 |
$ultimatemember->user->set( $user_id );
|
1008 |
}
|
1009 |
-
|
1010 |
/***
|
1011 |
*** @Load profile key
|
1012 |
***/
|
@@ -1018,12 +1041,12 @@ function um_fetch_user( $user_id ) {
|
|
1018 |
return false;
|
1019 |
}
|
1020 |
}
|
1021 |
-
|
1022 |
/***
|
1023 |
*** @Get youtube video ID from url
|
1024 |
***/
|
1025 |
function um_youtube_id_from_url($url) {
|
1026 |
-
$pattern =
|
1027 |
'%^# Match any youtube URL
|
1028 |
(?:https?://)? # Optional scheme. Either http or https
|
1029 |
(?:www\.)? # Optional www subdomain
|
@@ -1045,16 +1068,21 @@ function um_fetch_user( $user_id ) {
|
|
1045 |
}
|
1046 |
return false;
|
1047 |
}
|
1048 |
-
|
1049 |
/***
|
1050 |
*** @user uploads uri
|
1051 |
***/
|
1052 |
function um_user_uploads_uri() {
|
1053 |
global $ultimatemember;
|
|
|
|
|
|
|
|
|
|
|
1054 |
$uri = $ultimatemember->files->upload_baseurl . um_user('ID') . '/';
|
1055 |
return $uri;
|
1056 |
}
|
1057 |
-
|
1058 |
/***
|
1059 |
*** @user uploads directory
|
1060 |
***/
|
@@ -1063,7 +1091,7 @@ function um_fetch_user( $user_id ) {
|
|
1063 |
$uri = $ultimatemember->files->upload_basedir . um_user('ID') . '/';
|
1064 |
return $uri;
|
1065 |
}
|
1066 |
-
|
1067 |
/***
|
1068 |
*** @find closest number in an array
|
1069 |
***/
|
@@ -1089,7 +1117,7 @@ function um_fetch_user( $user_id ) {
|
|
1089 |
}
|
1090 |
return $uri;
|
1091 |
}
|
1092 |
-
|
1093 |
/***
|
1094 |
*** @get avatar URL instead of image
|
1095 |
***/
|
@@ -1097,7 +1125,7 @@ function um_fetch_user( $user_id ) {
|
|
1097 |
preg_match('/src="(.*?)"/i', $get_avatar, $matches);
|
1098 |
return $matches[1];
|
1099 |
}
|
1100 |
-
|
1101 |
/***
|
1102 |
*** @get avatar uri
|
1103 |
***/
|
@@ -1107,32 +1135,32 @@ function um_fetch_user( $user_id ) {
|
|
1107 |
$find = false;
|
1108 |
|
1109 |
if ( file_exists( $ultimatemember->files->upload_basedir . um_user('ID') . '/profile_photo-' . $attrs. '.jpg' ) ) {
|
1110 |
-
|
1111 |
$uri = um_user_uploads_uri() . 'profile_photo-'.$attrs.'.jpg?' . current_time( 'timestamp' );
|
1112 |
-
|
1113 |
} else {
|
1114 |
-
|
1115 |
$sizes = um_get_option('photo_thumb_sizes');
|
1116 |
if ( is_array( $sizes ) ) $find = um_closest_num( $sizes, $attrs );
|
1117 |
-
|
1118 |
if ( file_exists( $ultimatemember->files->upload_basedir . um_user('ID') . '/profile_photo-' . $find. '.jpg' ) ) {
|
1119 |
-
|
1120 |
$uri = um_user_uploads_uri() . 'profile_photo-'.$find.'.jpg?' . current_time( 'timestamp' );
|
1121 |
-
|
1122 |
} else if ( file_exists( $ultimatemember->files->upload_basedir . um_user('ID') . '/profile_photo.jpg' ) ) {
|
1123 |
-
|
1124 |
$uri = um_user_uploads_uri() . 'profile_photo.jpg?' . current_time( 'timestamp' );
|
1125 |
-
|
1126 |
}
|
1127 |
-
|
1128 |
if ( $attrs == 'original' ) {
|
1129 |
$uri = um_user_uploads_uri() . 'profile_photo.jpg?' . current_time( 'timestamp' );
|
1130 |
}
|
1131 |
-
|
1132 |
}
|
1133 |
return $uri;
|
1134 |
}
|
1135 |
-
|
1136 |
/***
|
1137 |
*** @default avatar
|
1138 |
***/
|
@@ -1143,7 +1171,7 @@ function um_fetch_user( $user_id ) {
|
|
1143 |
$uri = um_url . 'assets/img/default_avatar.jpg';
|
1144 |
return $uri;
|
1145 |
}
|
1146 |
-
|
1147 |
/***
|
1148 |
*** @get user avatar url
|
1149 |
***/
|
@@ -1155,7 +1183,7 @@ function um_fetch_user( $user_id ) {
|
|
1155 |
}
|
1156 |
return $avatar_uri;
|
1157 |
}
|
1158 |
-
|
1159 |
/***
|
1160 |
*** @default cover
|
1161 |
***/
|
@@ -1168,59 +1196,57 @@ function um_fetch_user( $user_id ) {
|
|
1168 |
}
|
1169 |
|
1170 |
function um_user( $data, $attrs = null ) {
|
1171 |
-
|
1172 |
global $ultimatemember;
|
1173 |
-
|
1174 |
switch($data){
|
1175 |
-
|
1176 |
default:
|
1177 |
-
|
1178 |
$value = um_profile($data);
|
1179 |
-
|
1180 |
if ( $ultimatemember->validation->is_serialized( $value ) ) {
|
1181 |
$value = unserialize( $value );
|
1182 |
}
|
1183 |
-
|
1184 |
return $value;
|
1185 |
break;
|
1186 |
-
|
1187 |
case 'full_name':
|
1188 |
-
|
1189 |
-
if (
|
1190 |
-
|
1191 |
-
if ( um_user('first_name') && um_user('last_name') ) {
|
1192 |
-
$full_name = um_user('first_name') . '.' . um_user('last_name');
|
1193 |
-
} else {
|
1194 |
-
$full_name = um_user('display_name');
|
1195 |
-
}
|
1196 |
-
|
1197 |
-
$full_name = $ultimatemember->validation->safe_name_in_url( $full_name );
|
1198 |
-
update_user_meta( um_user('ID'), 'full_name', $full_name );
|
1199 |
-
|
1200 |
-
return $full_name;
|
1201 |
-
|
1202 |
} else {
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1206 |
}
|
|
|
|
|
|
|
1207 |
break;
|
1208 |
-
|
1209 |
case 'display_name':
|
1210 |
-
|
1211 |
$op = um_get_option('display_name');
|
1212 |
|
1213 |
$name = '';
|
1214 |
-
|
1215 |
|
1216 |
if ( $op == 'default' ) {
|
1217 |
$name = um_profile('display_name');
|
1218 |
}
|
1219 |
-
|
1220 |
if ( $op == 'nickname' ) {
|
1221 |
$name = um_profile('nickname');
|
1222 |
}
|
1223 |
-
|
1224 |
if ( $op == 'full_name' ) {
|
1225 |
if ( um_user('first_name') && um_user('last_name') ) {
|
1226 |
$name = um_user('first_name') . ' ' . um_user('last_name');
|
@@ -1231,7 +1257,7 @@ function um_user( $data, $attrs = null ) {
|
|
1231 |
$name = um_user('user_login');
|
1232 |
}
|
1233 |
}
|
1234 |
-
|
1235 |
if ( $op == 'sur_name' ) {
|
1236 |
if ( um_user('first_name') && um_user('last_name') ) {
|
1237 |
$name = um_user('last_name') . ' ' . um_user('first_name');
|
@@ -1239,7 +1265,7 @@ function um_user( $data, $attrs = null ) {
|
|
1239 |
$name = um_profile( $data );
|
1240 |
}
|
1241 |
}
|
1242 |
-
|
1243 |
if ( $op == 'first_name' ) {
|
1244 |
if ( um_user('first_name') ) {
|
1245 |
$name = um_user('first_name');
|
@@ -1247,11 +1273,11 @@ function um_user( $data, $attrs = null ) {
|
|
1247 |
$name = um_profile( $data );
|
1248 |
}
|
1249 |
}
|
1250 |
-
|
1251 |
if ( $op == 'username' ) {
|
1252 |
$name = um_user('user_login');
|
1253 |
}
|
1254 |
-
|
1255 |
if ( $op == 'initial_name' ) {
|
1256 |
if ( um_user('first_name') && um_user('last_name') ) {
|
1257 |
$initial = um_user('last_name');
|
@@ -1260,7 +1286,7 @@ function um_user( $data, $attrs = null ) {
|
|
1260 |
$name = um_profile( $data );
|
1261 |
}
|
1262 |
}
|
1263 |
-
|
1264 |
if ( $op == 'initial_name_f' ) {
|
1265 |
if ( um_user('first_name') && um_user('last_name') ) {
|
1266 |
$initial = um_user('first_name');
|
@@ -1271,39 +1297,39 @@ function um_user( $data, $attrs = null ) {
|
|
1271 |
}
|
1272 |
|
1273 |
if ( $op == 'field' && um_get_option('display_name_field') != '' ) {
|
1274 |
-
$fields = array_filter(preg_split('/[,\s]+/', um_get_option('display_name_field') ));
|
1275 |
$name = '';
|
1276 |
foreach( $fields as $field ) {
|
1277 |
$name .= um_profile( $field ) . ' ';
|
1278 |
}
|
1279 |
}
|
1280 |
-
|
1281 |
return apply_filters('um_user_display_name_filter', $name, um_user('ID'), ( $attrs == 'html' ) ? 1 : 0 );
|
1282 |
-
|
1283 |
break;
|
1284 |
-
|
1285 |
case 'role_select':
|
1286 |
case 'role_radio':
|
1287 |
return $ultimatemember->user->get_role_name( um_user('role') );
|
1288 |
break;
|
1289 |
-
|
1290 |
case 'submitted':
|
1291 |
$array = um_profile($data);
|
1292 |
if ( empty( $array ) ) return '';
|
1293 |
$array = unserialize( $array );
|
1294 |
-
return $array;
|
1295 |
break;
|
1296 |
|
1297 |
case 'password_reset_link':
|
1298 |
return $ultimatemember->password->reset_url();
|
1299 |
break;
|
1300 |
-
|
1301 |
case 'account_activation_link':
|
1302 |
return $ultimatemember->permalinks->activate_url();
|
1303 |
break;
|
1304 |
|
1305 |
case 'profile_photo':
|
1306 |
-
|
1307 |
if ( um_profile('profile_photo') ) {
|
1308 |
$avatar_uri = um_get_avatar_uri( um_profile('profile_photo'), $attrs );
|
1309 |
} else {
|
@@ -1314,10 +1340,10 @@ function um_user( $data, $attrs = null ) {
|
|
1314 |
|
1315 |
if ( $avatar_uri )
|
1316 |
return '<img src="' . $avatar_uri . '" class="gravatar avatar avatar-'.$attrs.' um-avatar" width="'.$attrs.'" height="'.$attrs.'" alt="" />';
|
1317 |
-
|
1318 |
if ( !$avatar_uri )
|
1319 |
return '';
|
1320 |
-
|
1321 |
break;
|
1322 |
|
1323 |
case 'cover_photo':
|
@@ -1326,15 +1352,16 @@ function um_user( $data, $attrs = null ) {
|
|
1326 |
} else {
|
1327 |
$cover_uri = um_get_default_cover_uri();
|
1328 |
}
|
1329 |
-
|
1330 |
if ( $cover_uri )
|
1331 |
return '<img src="'. $cover_uri .'" alt="" />';
|
1332 |
-
|
1333 |
if ( !$cover_uri )
|
1334 |
return '';
|
1335 |
-
|
1336 |
break;
|
1337 |
|
1338 |
}
|
1339 |
-
|
1340 |
-
}
|
|
3 |
function um_mail_content_type( $content_type ) {
|
4 |
return 'text/html';
|
5 |
}
|
6 |
+
|
7 |
function UM_Mail( $user_id_or_email = 1, $subject_line = 'Email Subject', $template, $path = null, $args = array() ) {
|
8 |
+
|
9 |
if ( absint( $user_id_or_email ) ) {
|
10 |
$user = get_userdata( $user_id_or_email );
|
11 |
$email = $user->user_email;
|
12 |
} else {
|
13 |
$email = $user_id_or_email;
|
14 |
}
|
15 |
+
|
16 |
$headers = 'From: '. um_get_option('mail_from') .' <'. um_get_option('mail_from_addr') .'>' . "\r\n";
|
17 |
$attachments = null;
|
18 |
+
|
19 |
if ( file_exists( get_stylesheet_directory() . '/ultimate-member/templates/email/' . get_locale() . '/' . $template . '.html' ) ) {
|
20 |
$path_to_email = get_stylesheet_directory() . '/ultimate-member/templates/email/' . get_locale() . '/' . $template . '.html';
|
21 |
} else if ( file_exists( get_stylesheet_directory() . '/ultimate-member/templates/email/' . $template . '.html' ) ) {
|
30 |
} else {
|
31 |
$message = ( um_get_option('email-' . $template ) ) ? um_get_option('email-' . $template ) : 'Untitled';
|
32 |
}
|
33 |
+
|
34 |
$message = um_convert_tags( $message, $args );
|
35 |
wp_mail( $email, $subject_line, $message, $headers, $attachments );
|
36 |
}
|
49 |
function um_clickable_links($s) {
|
50 |
return preg_replace('@(https?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-]*(\?\S+)?[^\.\s])?)?)@', '<a href="$1" class="um-link" target="_blank">$1</a>', $s);
|
51 |
}
|
52 |
+
|
53 |
/***
|
54 |
*** @Get where user should be headed after logging
|
55 |
***/
|
63 |
return $uri;
|
64 |
}
|
65 |
|
66 |
+
/***
|
67 |
+
*** @user clean basename
|
68 |
+
***/
|
69 |
+
function um_clean_user_basename( $value ){
|
70 |
+
|
71 |
+
$value = str_replace('.', ' ', $value);
|
72 |
+
$value = str_replace('-', ' ', $value);
|
73 |
+
$value = str_replace('+', ' ', $value);
|
74 |
+
|
75 |
+
return $value;
|
76 |
+
}
|
77 |
/***
|
78 |
*** @convert template tags
|
79 |
***/
|
80 |
function um_convert_tags( $content, $args = array() ) {
|
81 |
+
|
82 |
$search = array(
|
83 |
'{display_name}',
|
84 |
'{first_name}',
|
99 |
'{submitted_registration}',
|
100 |
'{user_avatar_url}',
|
101 |
);
|
102 |
+
|
103 |
$search = apply_filters('um_template_tags_patterns_hook', $search);
|
104 |
+
|
105 |
$replace = array(
|
106 |
um_user('display_name'),
|
107 |
um_user('first_name'),
|
122 |
um_user_submitted_registration(),
|
123 |
um_get_user_avatar_url(),
|
124 |
);
|
125 |
+
|
126 |
$replace = apply_filters('um_template_tags_replaces_hook', $replace);
|
127 |
+
|
128 |
$content = str_replace($search, $replace, $content);
|
129 |
+
|
130 |
if ( isset( $args['tags'] ) && isset( $args['tags_replace'] ) ) {
|
131 |
$content = str_replace($args['tags'], $args['tags_replace'], $content);
|
132 |
}
|
133 |
+
|
134 |
+
$regex = '~\{([^}]*)\}~';
|
135 |
preg_match_all($regex, $content, $matches);
|
136 |
|
137 |
// Support for all usermeta keys
|
143 |
}
|
144 |
|
145 |
return $content;
|
146 |
+
|
147 |
}
|
148 |
|
149 |
/**
|
158 |
* @example The example below can retrieve the user's IP address
|
159 |
|
160 |
<?php
|
161 |
+
|
162 |
$user_ip = um_user_ip();
|
163 |
echo 'User IP address is: ' . $user_ip; // prints the user IP address e.g. 127.0.0.1
|
164 |
+
|
165 |
?>
|
166 |
|
167 |
*
|
187 |
***/
|
188 |
function um_field_conditions_are_met( $data ) {
|
189 |
if ( !isset( $data['conditions'] ) ) return true;
|
190 |
+
|
191 |
$state = 1;
|
192 |
+
|
193 |
foreach( $data['conditions'] as $k => $arr ) {
|
194 |
if ( $arr[0] == 'show' ) {
|
195 |
+
|
196 |
$state = 1;
|
197 |
$val = $arr[3];
|
198 |
$op = $arr[2];
|
199 |
$field = um_profile($arr[1]);
|
200 |
+
|
201 |
switch( $op ) {
|
202 |
case 'equals to': if ( $field != $val ) $state = 0; break;
|
203 |
case 'not equals': if ( $field == $val ) $state = 0; break;
|
208 |
case 'contains': if ( !strstr( $field, $val ) ) $state = 0; break;
|
209 |
}
|
210 |
}
|
211 |
+
|
212 |
if ( $arr[0] == 'hide' ) {
|
213 |
+
|
214 |
$state = 0;
|
215 |
$val = $arr[3];
|
216 |
$op = $arr[2];
|
217 |
$field = um_profile($arr[1]);
|
218 |
+
|
219 |
switch( $op ) {
|
220 |
case 'equals to': if ( $field != $val ) $state = 1; break;
|
221 |
case 'not equals': if ( $field == $val ) $state = 1; break;
|
226 |
case 'contains': if ( !strstr( $field, $val ) ) $state = 1; break;
|
227 |
}
|
228 |
}
|
229 |
+
|
230 |
}
|
231 |
+
|
232 |
if ( $state )
|
233 |
return true;
|
234 |
return false;
|
240 |
function um_redirect_home() {
|
241 |
exit( wp_redirect( home_url() ) );
|
242 |
}
|
243 |
+
|
244 |
/***
|
245 |
*** @Get limit of words from sentence
|
246 |
***/
|
247 |
function um_get_snippet( $str, $wordCount = 10 ) {
|
248 |
if ( str_word_count( $str ) > $wordCount ) {
|
249 |
+
$str = implode(
|
250 |
+
'',
|
251 |
+
array_slice(
|
252 |
preg_split(
|
253 |
+
'/([\s,\.;\?\!]+)/',
|
254 |
+
$str,
|
255 |
+
$wordCount*2+1,
|
256 |
PREG_SPLIT_DELIM_CAPTURE
|
257 |
),
|
258 |
0,
|
268 |
***/
|
269 |
function um_user_submitted_registration( $style = false ) {
|
270 |
$output = null;
|
271 |
+
|
272 |
$data = um_user('submitted');
|
273 |
$udata = get_userdata( um_user('ID') );
|
274 |
+
|
275 |
if ( $style ) $output .= '<div class="um-admin-infobox">';
|
276 |
+
|
277 |
if ( isset( $data ) && is_array( $data ) ) {
|
278 |
+
|
279 |
$data = apply_filters('um_email_registration_data', $data );
|
280 |
+
|
281 |
foreach( $data as $k => $v ) {
|
282 |
+
|
283 |
if ( !is_array( $v ) && strstr( $v, 'ultimatemember/temp' ) ) {
|
284 |
$file = basename( $v );
|
285 |
$v = um_user_uploads_uri() . $file;
|
286 |
}
|
287 |
+
|
288 |
if ( !strstr( $k, 'user_pass' ) && $k != 'g-recaptcha-response' && $k != 'request' ) {
|
289 |
+
|
290 |
if ( is_array($v) ) {
|
291 |
$v = implode(',', $v );
|
292 |
}
|
293 |
+
|
294 |
if ( $k == 'timestamp' ) {
|
295 |
$k = __('date submitted','ultimatemember');
|
296 |
$v = date("d M Y H:i", $v);
|
297 |
}
|
298 |
+
$v = urlencode( $v );
|
299 |
+
|
300 |
if ( $style ) {
|
301 |
if ( !$v ) $v = __('(empty)','ultimatemember');
|
302 |
$output .= "<p><label>$k</label><span>$v</span></p>";
|
303 |
} else {
|
304 |
$output .= "$k: $v" . "\r\n";
|
305 |
}
|
306 |
+
|
307 |
}
|
308 |
+
|
309 |
}
|
310 |
}
|
311 |
+
|
312 |
if ( $style ) $output .= '</div>';
|
313 |
+
|
314 |
return $output;
|
315 |
}
|
316 |
+
|
317 |
/***
|
318 |
*** @Show filtered social link
|
319 |
***/
|
331 |
$value = str_replace('https://http://','https://',$value);
|
332 |
return $value;
|
333 |
}
|
334 |
+
|
335 |
/***
|
336 |
*** @Get filtered meta value after applying hooks
|
337 |
***/
|
338 |
function um_filtered_value( $key, $data = false ) {
|
339 |
global $ultimatemember;
|
340 |
+
|
341 |
$value = um_user( $key );
|
342 |
+
|
343 |
if ( !$data ) {
|
344 |
$data = $ultimatemember->builtin->get_specific_field( $key );
|
345 |
}
|
346 |
+
|
347 |
$type = ( isset($data['type']) ) ? $data['type'] : '';
|
348 |
|
349 |
$value = apply_filters("um_profile_field_filter_hook__", $value, $data );
|
350 |
$value = apply_filters("um_profile_field_filter_hook__{$key}", $value, $data );
|
351 |
$value = apply_filters("um_profile_field_filter_hook__{$type}", $value, $data );
|
352 |
+
|
353 |
return $value;
|
354 |
}
|
355 |
+
|
356 |
|
357 |
function um_profile_id() {
|
358 |
+
|
359 |
if ( um_get_requested_user() ) {
|
360 |
return um_get_requested_user();
|
361 |
} else if ( is_user_logged_in() && get_current_user_id() ) {
|
373 |
|
374 |
$url = explode('/ultimatemember/temp/', $url);
|
375 |
if ( isset( $url[1] ) ) {
|
376 |
+
|
377 |
if ( strstr( $url[1], '../' ) || strstr( $url[1], '%' ) ) {
|
378 |
return false;
|
379 |
}
|
386 |
}
|
387 |
return false;
|
388 |
}
|
389 |
+
|
390 |
/***
|
391 |
*** @Check that temp image is valid
|
392 |
***/
|
403 |
}
|
404 |
return false;
|
405 |
}
|
406 |
+
|
407 |
/***
|
408 |
*** @Get a translated core page URL
|
409 |
***/
|
410 |
function um_get_url_for_language( $post_id, $language )
|
411 |
{
|
412 |
$lang_post_id = icl_object_id( $post_id , 'page', true, $language );
|
413 |
+
|
414 |
$url = "";
|
415 |
if($lang_post_id != 0) {
|
416 |
$url = get_permalink( $lang_post_id );
|
419 |
global $sitepress;
|
420 |
$url = $sitepress->language_url( $language );
|
421 |
}
|
422 |
+
|
423 |
return $url;
|
424 |
}
|
425 |
+
|
426 |
/***
|
427 |
*** @Get core page url
|
428 |
***/
|
430 |
global $ultimatemember;
|
431 |
return $ultimatemember->datetime->time_diff( $time1, $time2 );
|
432 |
}
|
433 |
+
|
434 |
/***
|
435 |
*** @Get user's last login timestamp
|
436 |
***/
|
440 |
return $value;
|
441 |
return '';
|
442 |
}
|
443 |
+
|
444 |
/***
|
445 |
*** @Get user's last login time
|
446 |
***/
|
450 |
return date_i18n('F d, Y', $value );
|
451 |
return '';
|
452 |
}
|
453 |
+
|
454 |
/***
|
455 |
*** @Get user's last login (time diff)
|
456 |
***/
|
463 |
}
|
464 |
return $value;
|
465 |
}
|
466 |
+
|
467 |
/***
|
468 |
*** @Get core page url
|
469 |
***/
|
470 |
function um_get_core_page( $slug, $updated = false) {
|
471 |
global $ultimatemember;
|
472 |
$url = '';
|
473 |
+
|
474 |
if ( isset( $ultimatemember->permalinks->core[ $slug ] ) ) {
|
475 |
$url = get_permalink( $ultimatemember->permalinks->core[ $slug ] );
|
476 |
if ( $updated )
|
477 |
+
$url = add_query_arg( 'updated', esc_attr( $updated ), $url );
|
478 |
}
|
479 |
+
|
480 |
if ( function_exists('icl_get_current_language') && icl_get_current_language() != icl_get_default_language() ) {
|
481 |
+
|
482 |
$url = um_get_url_for_language( $ultimatemember->permalinks->core[ $slug ], icl_get_current_language() );
|
483 |
+
|
484 |
if ( get_post_meta( get_the_ID() , '_um_wpml_account', true ) == 1 ) {
|
485 |
$url = get_permalink( get_the_ID() );
|
486 |
}
|
488 |
$url = um_get_url_for_language( $ultimatemember->permalinks->core[ $slug ], icl_get_current_language() );
|
489 |
}
|
490 |
}
|
491 |
+
|
492 |
if ( $url ) {
|
493 |
$url = apply_filters('um_get_core_page_filter', $url, $slug, $updated);
|
494 |
return $url;
|
495 |
}
|
496 |
+
|
497 |
return '';
|
498 |
}
|
499 |
+
|
500 |
/***
|
501 |
*** @boolean check if we are on UM page
|
502 |
***/
|
506 |
return true;
|
507 |
return false;
|
508 |
}
|
509 |
+
|
510 |
/***
|
511 |
*** @boolean check if we are on a core page or not
|
512 |
***/
|
516 |
return true;
|
517 |
if ( isset($post->ID) && get_post_meta( $post->ID, '_um_wpml_' . $page, true ) == 1 )
|
518 |
return true;
|
519 |
+
|
520 |
+
if( isset($post->ID) ){
|
521 |
+
$_icl_lang_duplicate_of = get_post_meta( $post->ID, '_icl_lang_duplicate_of', true );
|
522 |
+
|
523 |
+
if ( isset( $ultimatemember->permalinks->core[ $page ] ) && ( ( $_icl_lang_duplicate_of == $ultimatemember->permalinks->core[ $page ] && ! empty( $_icl_lang_duplicate_of ) ) || $ultimatemember->permalinks->core[ $page ] == $post->ID ) )
|
524 |
+
return true;
|
525 |
+
}
|
526 |
+
|
527 |
return false;
|
528 |
}
|
529 |
+
|
530 |
/***
|
531 |
*** @Is core URL
|
532 |
***/
|
536 |
$current_url = $ultimatemember->permalinks->get_current_url( get_option('permalink_structure') );
|
537 |
|
538 |
if ( !isset( $array ) || !is_array( $array ) ) return false;
|
539 |
+
|
540 |
foreach( $array as $k => $id ) {
|
541 |
$page_url = get_permalink( $id );
|
542 |
if ( strstr( $current_url, $page_url ) )
|
544 |
}
|
545 |
return false;
|
546 |
}
|
547 |
+
|
548 |
/***
|
549 |
*** @Check value of queried search in text input
|
550 |
***/
|
558 |
}
|
559 |
echo '';
|
560 |
}
|
561 |
+
|
562 |
/***
|
563 |
*** @Check whether item in dropdown is selected in query-url
|
564 |
***/
|
571 |
}
|
572 |
echo '';
|
573 |
}
|
574 |
+
|
575 |
/***
|
576 |
*** @get styling defaults
|
577 |
***/
|
592 |
|
593 |
return $new_arr;
|
594 |
}
|
595 |
+
|
596 |
/***
|
597 |
*** @get meta option default
|
598 |
***/
|
602 |
return $ultimatemember->setup->core_form_meta_all[ '_um_' . $id ];
|
603 |
return '';
|
604 |
}
|
605 |
+
|
606 |
/***
|
607 |
*** @check if a legitimate password reset request is in action
|
608 |
***/
|
612 |
return true;
|
613 |
return false;
|
614 |
}
|
615 |
+
|
616 |
/***
|
617 |
*** @check if a legitimate password change request is in action
|
618 |
***/
|
619 |
function um_requesting_password_change() {
|
620 |
global $post, $ultimatemember;
|
621 |
+
|
622 |
+
if ( um_is_core_page('account') && isset( $_POST['_um_account'] ) == 1 )
|
623 |
+
return true;
|
624 |
+
elseif ( isset( $_POST['_um_password_change'] ) && $_POST['_um_password_change'] == 1)
|
625 |
return true;
|
626 |
return false;
|
627 |
}
|
628 |
+
|
629 |
/***
|
630 |
*** @boolean for account page editing
|
631 |
***/
|
634 |
return true;
|
635 |
return false;
|
636 |
}
|
637 |
+
|
638 |
/***
|
639 |
*** @get a user's display name
|
640 |
***/
|
652 |
global $ultimatemember;
|
653 |
return $ultimatemember->members->results[ $argument ];
|
654 |
}
|
655 |
+
|
656 |
/**
|
657 |
* @function um_reset_user_clean()
|
658 |
*
|
674 |
global $ultimatemember;
|
675 |
$ultimatemember->user->reset( true );
|
676 |
}
|
677 |
+
|
678 |
/**
|
679 |
* @function um_reset_user()
|
680 |
*
|
696 |
global $ultimatemember;
|
697 |
$ultimatemember->user->reset();
|
698 |
}
|
699 |
+
|
700 |
/***
|
701 |
*** @gets the queried user
|
702 |
***/
|
703 |
function um_queried_user() {
|
704 |
return get_query_var('um_user');
|
705 |
}
|
706 |
+
|
707 |
/***
|
708 |
*** @Sets the requested user
|
709 |
***/
|
711 |
global $ultimatemember;
|
712 |
$ultimatemember->user->target_id = $user_id;
|
713 |
}
|
714 |
+
|
715 |
/***
|
716 |
*** @Gets the requested user
|
717 |
***/
|
721 |
return $ultimatemember->user->target_id;
|
722 |
return false;
|
723 |
}
|
724 |
+
|
725 |
/***
|
726 |
*** @remove edit profile args from url
|
727 |
***/
|
731 |
$url = add_query_arg('profiletab', 'main', $url );
|
732 |
return $url;
|
733 |
}
|
734 |
+
|
735 |
/***
|
736 |
*** @boolean for profile edit page
|
737 |
***/
|
743 |
}
|
744 |
return false;
|
745 |
}
|
746 |
+
|
747 |
/***
|
748 |
*** @can view field
|
749 |
***/
|
750 |
function um_can_view_field( $data ) {
|
751 |
global $ultimatemember;
|
752 |
+
|
753 |
if ( !isset( $ultimatemember->fields->set_mode ) )
|
754 |
$ultimatemember->fields->set_mode = '';
|
755 |
|
756 |
if ( isset( $data['public'] ) && $ultimatemember->fields->set_mode != 'register' ) {
|
757 |
+
|
758 |
if ( !is_user_logged_in() && $data['public'] != '1' ) return false;
|
759 |
+
|
760 |
if ( is_user_logged_in() ) {
|
761 |
+
|
762 |
if ( $data['public'] == '-3' && !um_is_user_himself() && !in_array( $ultimatemember->query->get_role_by_userid( get_current_user_id() ), $data['roles'] ) )
|
763 |
return false;
|
764 |
+
|
765 |
if ( !um_is_user_himself() && $data['public'] == '-1' && !um_user_can('can_edit_everyone') )
|
766 |
return false;
|
767 |
+
|
768 |
if ( $data['public'] == '-2' && $data['roles'] )
|
769 |
if ( !in_array( $ultimatemember->query->get_role_by_userid( get_current_user_id() ), $data['roles'] ) )
|
770 |
return false;
|
771 |
}
|
772 |
+
|
773 |
}
|
774 |
+
|
775 |
return true;
|
776 |
}
|
777 |
+
|
778 |
/***
|
779 |
*** @checks if user can view profile
|
780 |
***/
|
781 |
function um_can_view_profile( $user_id ){
|
782 |
global $ultimatemember;
|
783 |
+
|
784 |
if ( !um_user('can_view_all') && $user_id != get_current_user_id() && is_user_logged_in() ) return false;
|
785 |
+
|
786 |
if ( um_current_user_can('edit', $user_id ) ) {
|
787 |
return true;
|
788 |
}
|
789 |
+
|
790 |
if ( !is_user_logged_in() ) {
|
791 |
if ( $ultimatemember->user->is_private_profile( $user_id ) ) {
|
792 |
return false;
|
794 |
return true;
|
795 |
}
|
796 |
}
|
797 |
+
|
798 |
if ( !um_user('can_access_private_profile') && $ultimatemember->user->is_private_profile( $user_id ) ) return false;
|
799 |
|
800 |
if ( um_user_can('can_view_roles') && $user_id != get_current_user_id() ) {
|
802 |
return false;
|
803 |
}
|
804 |
}
|
805 |
+
|
806 |
return true;
|
807 |
+
|
808 |
}
|
809 |
+
|
810 |
/***
|
811 |
*** @boolean check for not same user
|
812 |
***/
|
815 |
return false;
|
816 |
return true;
|
817 |
}
|
818 |
+
|
819 |
/***
|
820 |
*** @can edit field
|
821 |
***/
|
822 |
function um_can_edit_field( $data ) {
|
823 |
global $ultimatemember;
|
824 |
+
|
825 |
+
if ( isset( $ultimatemember->fields->editing ) && $ultimatemember->fields->editing == true &&
|
826 |
isset( $ultimatemember->fields->set_mode ) && $ultimatemember->fields->set_mode == 'profile' ) {
|
827 |
+
|
828 |
if ( is_user_logged_in() && isset( $data['editable'] ) && $data['editable'] == 0 ) {
|
829 |
+
|
830 |
if ( um_is_user_himself() && !um_user('can_edit_everyone') )
|
831 |
return false;
|
832 |
+
|
833 |
if ( !um_is_user_himself() && !um_user_can('can_edit_everyone') )
|
834 |
return false;
|
835 |
+
|
836 |
}
|
837 |
+
|
838 |
}
|
839 |
+
|
840 |
return true;
|
841 |
+
|
842 |
}
|
843 |
+
|
844 |
/***
|
845 |
*** @User can (role settings )
|
846 |
***/
|
858 |
return true;
|
859 |
return false;
|
860 |
}
|
861 |
+
|
862 |
/***
|
863 |
*** @Check if user is in his profile
|
864 |
***/
|
868 |
if ( !um_get_requested_user() && um_is_core_page('user') && get_current_user_id() ) return true;
|
869 |
return false;
|
870 |
}
|
871 |
+
|
872 |
/***
|
873 |
*** @Current user can
|
874 |
***/
|
875 |
function um_current_user_can( $cap, $user_id ){
|
876 |
global $ultimatemember;
|
877 |
+
|
878 |
if ( !is_user_logged_in() ) return false;
|
879 |
+
|
880 |
$return = 1;
|
881 |
+
|
882 |
um_fetch_user( get_current_user_id() );
|
883 |
|
884 |
switch($cap) {
|
885 |
+
|
886 |
case 'edit':
|
887 |
if ( get_current_user_id() == $user_id && um_user('can_edit_profile') ) $return = 1;
|
888 |
elseif ( !um_user('can_edit_everyone') ) $return = 0;
|
889 |
elseif ( get_current_user_id() == $user_id && !um_user('can_edit_profile') ) $return = 0;
|
890 |
elseif ( um_user('can_edit_roles') && !in_array( $ultimatemember->query->get_role_by_userid( $user_id ), um_user('can_edit_roles') ) ) $return = 0;
|
891 |
break;
|
892 |
+
|
893 |
case 'delete':
|
894 |
if ( !um_user('can_delete_everyone') ) $return = 0;
|
895 |
elseif ( um_user('can_delete_roles') && !in_array( $ultimatemember->query->get_role_by_userid( $user_id ), um_user('can_delete_roles') ) ) $return = 0;
|
896 |
break;
|
897 |
+
|
898 |
}
|
899 |
|
900 |
um_fetch_user( $user_id );
|
901 |
|
902 |
return $return;
|
903 |
}
|
904 |
+
|
905 |
/***
|
906 |
*** @Returns the edit profile link
|
907 |
***/
|
914 |
$url = add_query_arg( 'um_action', 'edit', $url );
|
915 |
return $url;
|
916 |
}
|
917 |
+
|
918 |
/***
|
919 |
*** @checks if user can edit his profile
|
920 |
***/
|
924 |
if ( !um_user('can_edit_profile') ) return false;
|
925 |
return true;
|
926 |
}
|
927 |
+
|
928 |
/***
|
929 |
*** @short for admin e-mail
|
930 |
***/
|
931 |
function um_admin_email(){
|
932 |
return um_get_option('admin_email');
|
933 |
}
|
934 |
+
|
935 |
/**
|
936 |
* @function um_get_option()
|
937 |
*
|
950 |
|
951 |
*
|
952 |
* @example Get blocked IP addresses set in backend
|
953 |
+
|
954 |
<?php $blocked_ips = um_get_option('blocked_ips'); ?>
|
955 |
+
|
956 |
*
|
957 |
*/
|
958 |
function um_get_option($option_id) {
|
962 |
if ( isset($um_options[$option_id]) && !empty( $um_options[$option_id] ) ) {
|
963 |
return $um_options[$option_id];
|
964 |
}
|
965 |
+
|
966 |
switch($option_id){
|
967 |
+
|
968 |
case 'site_name':
|
969 |
return get_bloginfo('name');
|
970 |
break;
|
971 |
+
|
972 |
case 'admin_email':
|
973 |
return get_bloginfo('admin_email');
|
974 |
break;
|
975 |
+
|
976 |
}
|
977 |
+
|
978 |
}
|
979 |
+
|
980 |
/***
|
981 |
*** @Display a link to profile page
|
982 |
***/
|
992 |
global $ultimatemember;
|
993 |
return $ultimatemember->query->get_roles();
|
994 |
}
|
995 |
+
|
996 |
/**
|
997 |
* @function um_fetch_user()
|
998 |
*
|
1007 |
* @example The example below will set user ID 5 prior to retrieving his profile information.
|
1008 |
|
1009 |
<?php
|
1010 |
+
|
1011 |
um_fetch_user(5);
|
1012 |
echo um_user('display_name'); // returns the display name of user ID 5
|
1013 |
+
|
1014 |
?>
|
1015 |
|
1016 |
*
|
1017 |
* @example In the following example you can fetch the profile of a logged-in user dynamically.
|
1018 |
+
|
1019 |
<?php
|
1020 |
+
|
1021 |
um_fetch_user( get_current_user_id() );
|
1022 |
echo um_user('display_name'); // returns the display name of logged-in user
|
1023 |
+
|
1024 |
?>
|
1025 |
+
|
1026 |
*
|
1027 |
*/
|
1028 |
function um_fetch_user( $user_id ) {
|
1029 |
global $ultimatemember;
|
1030 |
$ultimatemember->user->set( $user_id );
|
1031 |
}
|
1032 |
+
|
1033 |
/***
|
1034 |
*** @Load profile key
|
1035 |
***/
|
1041 |
return false;
|
1042 |
}
|
1043 |
}
|
1044 |
+
|
1045 |
/***
|
1046 |
*** @Get youtube video ID from url
|
1047 |
***/
|
1048 |
function um_youtube_id_from_url($url) {
|
1049 |
+
$pattern =
|
1050 |
'%^# Match any youtube URL
|
1051 |
(?:https?://)? # Optional scheme. Either http or https
|
1052 |
(?:www\.)? # Optional www subdomain
|
1068 |
}
|
1069 |
return false;
|
1070 |
}
|
1071 |
+
|
1072 |
/***
|
1073 |
*** @user uploads uri
|
1074 |
***/
|
1075 |
function um_user_uploads_uri() {
|
1076 |
global $ultimatemember;
|
1077 |
+
|
1078 |
+
if( is_ssl() ){
|
1079 |
+
$ultimatemember->files->upload_baseurl = str_replace("http://", "https://", $ultimatemember->files->upload_baseurl );
|
1080 |
+
}
|
1081 |
+
|
1082 |
$uri = $ultimatemember->files->upload_baseurl . um_user('ID') . '/';
|
1083 |
return $uri;
|
1084 |
}
|
1085 |
+
|
1086 |
/***
|
1087 |
*** @user uploads directory
|
1088 |
***/
|
1091 |
$uri = $ultimatemember->files->upload_basedir . um_user('ID') . '/';
|
1092 |
return $uri;
|
1093 |
}
|
1094 |
+
|
1095 |
/***
|
1096 |
*** @find closest number in an array
|
1097 |
***/
|
1117 |
}
|
1118 |
return $uri;
|
1119 |
}
|
1120 |
+
|
1121 |
/***
|
1122 |
*** @get avatar URL instead of image
|
1123 |
***/
|
1125 |
preg_match('/src="(.*?)"/i', $get_avatar, $matches);
|
1126 |
return $matches[1];
|
1127 |
}
|
1128 |
+
|
1129 |
/***
|
1130 |
*** @get avatar uri
|
1131 |
***/
|
1135 |
$find = false;
|
1136 |
|
1137 |
if ( file_exists( $ultimatemember->files->upload_basedir . um_user('ID') . '/profile_photo-' . $attrs. '.jpg' ) ) {
|
1138 |
+
|
1139 |
$uri = um_user_uploads_uri() . 'profile_photo-'.$attrs.'.jpg?' . current_time( 'timestamp' );
|
1140 |
+
|
1141 |
} else {
|
1142 |
+
|
1143 |
$sizes = um_get_option('photo_thumb_sizes');
|
1144 |
if ( is_array( $sizes ) ) $find = um_closest_num( $sizes, $attrs );
|
1145 |
+
|
1146 |
if ( file_exists( $ultimatemember->files->upload_basedir . um_user('ID') . '/profile_photo-' . $find. '.jpg' ) ) {
|
1147 |
+
|
1148 |
$uri = um_user_uploads_uri() . 'profile_photo-'.$find.'.jpg?' . current_time( 'timestamp' );
|
1149 |
+
|
1150 |
} else if ( file_exists( $ultimatemember->files->upload_basedir . um_user('ID') . '/profile_photo.jpg' ) ) {
|
1151 |
+
|
1152 |
$uri = um_user_uploads_uri() . 'profile_photo.jpg?' . current_time( 'timestamp' );
|
1153 |
+
|
1154 |
}
|
1155 |
+
|
1156 |
if ( $attrs == 'original' ) {
|
1157 |
$uri = um_user_uploads_uri() . 'profile_photo.jpg?' . current_time( 'timestamp' );
|
1158 |
}
|
1159 |
+
|
1160 |
}
|
1161 |
return $uri;
|
1162 |
}
|
1163 |
+
|
1164 |
/***
|
1165 |
*** @default avatar
|
1166 |
***/
|
1171 |
$uri = um_url . 'assets/img/default_avatar.jpg';
|
1172 |
return $uri;
|
1173 |
}
|
1174 |
+
|
1175 |
/***
|
1176 |
*** @get user avatar url
|
1177 |
***/
|
1183 |
}
|
1184 |
return $avatar_uri;
|
1185 |
}
|
1186 |
+
|
1187 |
/***
|
1188 |
*** @default cover
|
1189 |
***/
|
1196 |
}
|
1197 |
|
1198 |
function um_user( $data, $attrs = null ) {
|
1199 |
+
|
1200 |
global $ultimatemember;
|
1201 |
+
|
1202 |
switch($data){
|
1203 |
+
|
1204 |
default:
|
1205 |
+
|
1206 |
$value = um_profile($data);
|
1207 |
+
|
1208 |
if ( $ultimatemember->validation->is_serialized( $value ) ) {
|
1209 |
$value = unserialize( $value );
|
1210 |
}
|
1211 |
+
|
1212 |
return $value;
|
1213 |
break;
|
1214 |
+
|
1215 |
case 'full_name':
|
1216 |
+
|
1217 |
+
if ( um_user('first_name') && um_user('last_name') ) {
|
1218 |
+
$full_name = um_user('first_name') . ' ' . um_user('last_name');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1219 |
} else {
|
1220 |
+
$full_name = um_user('display_name');
|
1221 |
+
}
|
1222 |
+
|
1223 |
+
$full_name = $ultimatemember->validation->safe_name_in_url( $full_name );
|
1224 |
+
|
1225 |
+
// update full_name changed
|
1226 |
+
if( um_profile( $data ) !== $full_name )
|
1227 |
+
{
|
1228 |
+
update_user_meta( um_user('ID'), 'full_name', $full_name );
|
1229 |
}
|
1230 |
+
|
1231 |
+
return $full_name;
|
1232 |
+
|
1233 |
break;
|
1234 |
+
|
1235 |
case 'display_name':
|
1236 |
+
|
1237 |
$op = um_get_option('display_name');
|
1238 |
|
1239 |
$name = '';
|
1240 |
+
|
1241 |
|
1242 |
if ( $op == 'default' ) {
|
1243 |
$name = um_profile('display_name');
|
1244 |
}
|
1245 |
+
|
1246 |
if ( $op == 'nickname' ) {
|
1247 |
$name = um_profile('nickname');
|
1248 |
}
|
1249 |
+
|
1250 |
if ( $op == 'full_name' ) {
|
1251 |
if ( um_user('first_name') && um_user('last_name') ) {
|
1252 |
$name = um_user('first_name') . ' ' . um_user('last_name');
|
1257 |
$name = um_user('user_login');
|
1258 |
}
|
1259 |
}
|
1260 |
+
|
1261 |
if ( $op == 'sur_name' ) {
|
1262 |
if ( um_user('first_name') && um_user('last_name') ) {
|
1263 |
$name = um_user('last_name') . ' ' . um_user('first_name');
|
1265 |
$name = um_profile( $data );
|
1266 |
}
|
1267 |
}
|
1268 |
+
|
1269 |
if ( $op == 'first_name' ) {
|
1270 |
if ( um_user('first_name') ) {
|
1271 |
$name = um_user('first_name');
|
1273 |
$name = um_profile( $data );
|
1274 |
}
|
1275 |
}
|
1276 |
+
|
1277 |
if ( $op == 'username' ) {
|
1278 |
$name = um_user('user_login');
|
1279 |
}
|
1280 |
+
|
1281 |
if ( $op == 'initial_name' ) {
|
1282 |
if ( um_user('first_name') && um_user('last_name') ) {
|
1283 |
$initial = um_user('last_name');
|
1286 |
$name = um_profile( $data );
|
1287 |
}
|
1288 |
}
|
1289 |
+
|
1290 |
if ( $op == 'initial_name_f' ) {
|
1291 |
if ( um_user('first_name') && um_user('last_name') ) {
|
1292 |
$initial = um_user('first_name');
|
1297 |
}
|
1298 |
|
1299 |
if ( $op == 'field' && um_get_option('display_name_field') != '' ) {
|
1300 |
+
$fields = array_filter(preg_split('/[,\s]+/', um_get_option('display_name_field') ));
|
1301 |
$name = '';
|
1302 |
foreach( $fields as $field ) {
|
1303 |
$name .= um_profile( $field ) . ' ';
|
1304 |
}
|
1305 |
}
|
1306 |
+
|
1307 |
return apply_filters('um_user_display_name_filter', $name, um_user('ID'), ( $attrs == 'html' ) ? 1 : 0 );
|
1308 |
+
|
1309 |
break;
|
1310 |
+
|
1311 |
case 'role_select':
|
1312 |
case 'role_radio':
|
1313 |
return $ultimatemember->user->get_role_name( um_user('role') );
|
1314 |
break;
|
1315 |
+
|
1316 |
case 'submitted':
|
1317 |
$array = um_profile($data);
|
1318 |
if ( empty( $array ) ) return '';
|
1319 |
$array = unserialize( $array );
|
1320 |
+
return $array;
|
1321 |
break;
|
1322 |
|
1323 |
case 'password_reset_link':
|
1324 |
return $ultimatemember->password->reset_url();
|
1325 |
break;
|
1326 |
+
|
1327 |
case 'account_activation_link':
|
1328 |
return $ultimatemember->permalinks->activate_url();
|
1329 |
break;
|
1330 |
|
1331 |
case 'profile_photo':
|
1332 |
+
|
1333 |
if ( um_profile('profile_photo') ) {
|
1334 |
$avatar_uri = um_get_avatar_uri( um_profile('profile_photo'), $attrs );
|
1335 |
} else {
|
1340 |
|
1341 |
if ( $avatar_uri )
|
1342 |
return '<img src="' . $avatar_uri . '" class="gravatar avatar avatar-'.$attrs.' um-avatar" width="'.$attrs.'" height="'.$attrs.'" alt="" />';
|
1343 |
+
|
1344 |
if ( !$avatar_uri )
|
1345 |
return '';
|
1346 |
+
|
1347 |
break;
|
1348 |
|
1349 |
case 'cover_photo':
|
1352 |
} else {
|
1353 |
$cover_uri = um_get_default_cover_uri();
|
1354 |
}
|
1355 |
+
|
1356 |
if ( $cover_uri )
|
1357 |
return '<img src="'. $cover_uri .'" alt="" />';
|
1358 |
+
|
1359 |
if ( !$cover_uri )
|
1360 |
return '';
|
1361 |
+
|
1362 |
break;
|
1363 |
|
1364 |
}
|
1365 |
+
|
1366 |
+
}
|
1367 |
+
|
core/um-shortcodes.php
CHANGED
@@ -9,100 +9,104 @@ class UM_Shortcodes {
|
|
9 |
$this->loop = '';
|
10 |
|
11 |
add_shortcode('ultimatemember', array(&$this, 'ultimatemember'), 1);
|
12 |
-
|
13 |
-
add_shortcode('um_loggedin', array(&$this, 'um_loggedin')
|
14 |
-
add_shortcode('um_loggedout', array(&$this, 'um_loggedout')
|
15 |
-
|
16 |
-
add_filter(
|
17 |
-
|
18 |
-
$
|
19 |
-
|
20 |
-
$this->emoji[':
|
21 |
-
$this->emoji['
|
22 |
-
$this->emoji[':
|
23 |
-
$this->emoji['
|
24 |
-
$this->emoji[':
|
25 |
-
$this->emoji['
|
26 |
-
$this->emoji[':
|
27 |
-
$this->emoji[':
|
28 |
-
$this->emoji[':
|
29 |
-
$this->emoji['
|
30 |
-
$this->emoji[':
|
31 |
-
$this->emoji['
|
32 |
-
$this->emoji[':
|
33 |
-
$this->emoji[':
|
34 |
-
$this->emoji[':
|
35 |
-
$this->emoji[':
|
36 |
-
$this->emoji[':
|
37 |
-
$this->emoji[':
|
38 |
-
$this->emoji[':
|
39 |
-
$this->emoji[
|
40 |
-
$this->emoji[':
|
41 |
-
$this->emoji[
|
42 |
-
$this->emoji[':
|
43 |
-
$this->emoji[':
|
44 |
-
$this->emoji[':
|
45 |
-
$this->emoji[':
|
46 |
-
$this->emoji[':
|
47 |
-
$this->emoji[':
|
48 |
-
$this->emoji[':
|
49 |
-
$this->emoji[':
|
50 |
-
$this->emoji[':
|
51 |
-
$this->emoji[':
|
52 |
-
$this->emoji[':
|
53 |
-
$this->emoji[':
|
54 |
-
$this->emoji[':
|
55 |
-
$this->emoji[':
|
56 |
-
$this->emoji[':
|
57 |
-
$this->emoji[':
|
58 |
-
$this->emoji[':
|
59 |
-
$this->emoji[':
|
60 |
-
$this->emoji[':
|
61 |
-
$this->emoji[':
|
62 |
-
$this->emoji[':
|
63 |
-
$this->emoji[':
|
64 |
-
$this->emoji[':
|
65 |
-
$this->emoji[':
|
66 |
-
$this->emoji[':
|
67 |
-
$this->emoji[':
|
68 |
-
$this->emoji[':
|
69 |
-
$this->emoji[':
|
70 |
-
$this->emoji[':
|
71 |
-
$this->emoji[':
|
72 |
-
$this->emoji[':
|
73 |
-
$this->emoji[':
|
74 |
-
$this->emoji[':
|
75 |
-
$this->emoji[':
|
|
|
|
|
76 |
|
77 |
}
|
78 |
|
79 |
/***
|
80 |
-
|
81 |
-
|
82 |
-
function emotize(
|
83 |
-
$content = stripslashes(
|
84 |
-
foreach(
|
85 |
-
$regex
|
86 |
-
$content = preg_replace(
|
87 |
}
|
88 |
return $content;
|
89 |
}
|
90 |
|
91 |
/***
|
92 |
-
|
93 |
-
|
94 |
-
function body_class(
|
95 |
global $ultimatemember;
|
96 |
|
97 |
$array = $ultimatemember->permalinks->core;
|
98 |
-
if (
|
|
|
|
|
99 |
|
100 |
-
foreach(
|
101 |
-
if (
|
102 |
|
103 |
$classes[] = 'um-page-' . $slug;
|
104 |
|
105 |
-
if (
|
106 |
$classes[] = 'um-page-loggedin';
|
107 |
} else {
|
108 |
$classes[] = 'um-page-loggedout';
|
@@ -115,62 +119,65 @@ class UM_Shortcodes {
|
|
115 |
}
|
116 |
|
117 |
/***
|
118 |
-
|
119 |
-
|
120 |
function core_login_form() {
|
121 |
-
$forms = get_posts(
|
122 |
return $forms[0]->ID;
|
123 |
}
|
124 |
|
125 |
/***
|
126 |
-
|
127 |
-
|
128 |
-
function load_template(
|
129 |
global $ultimatemember;
|
130 |
|
131 |
-
$loop = (
|
132 |
|
133 |
-
if (
|
134 |
$args = $this->set_args;
|
135 |
-
extract(
|
136 |
}
|
137 |
|
138 |
$file = um_path . 'templates/' . $tpl . '.php';
|
139 |
$theme_file = get_stylesheet_directory() . '/ultimate-member/templates/' . $tpl . '.php';
|
140 |
|
141 |
-
if (
|
142 |
$file = $theme_file;
|
|
|
143 |
|
144 |
-
if (
|
145 |
include $file;
|
|
|
|
|
146 |
}
|
147 |
|
148 |
/***
|
149 |
-
|
150 |
-
|
151 |
-
function get_class(
|
152 |
|
153 |
global $ultimatemember;
|
154 |
|
155 |
-
$classes = 'um-'
|
156 |
|
157 |
-
if (
|
158 |
$classes .= ' um-in-admin';
|
159 |
}
|
160 |
|
161 |
-
if (
|
162 |
$classes .= ' um-err';
|
163 |
}
|
164 |
|
165 |
-
if (
|
166 |
$classes .= ' um-editing';
|
167 |
}
|
168 |
|
169 |
-
if (
|
170 |
$classes .= ' um-viewing';
|
171 |
}
|
172 |
|
173 |
-
if (
|
174 |
$classes .= ' um-' . $args['template'];
|
175 |
}
|
176 |
|
@@ -179,105 +186,123 @@ class UM_Shortcodes {
|
|
179 |
}
|
180 |
|
181 |
/***
|
182 |
-
|
183 |
-
|
184 |
-
function um_loggedin(
|
185 |
global $ultimatemember;
|
186 |
ob_start();
|
187 |
|
188 |
$defaults = array(
|
189 |
-
'lock_text' => __('This content has been restricted to logged in users only. Please <a href="{login_referrer}">login</a> to view this content.','ultimatemember'
|
190 |
-
'show_lock' => 'yes'
|
191 |
);
|
192 |
-
|
193 |
-
$args = wp_parse_args( $args, $defaults );
|
194 |
-
|
195 |
-
//$args['lock_text'] = $this->convert_locker_tags( $args['lock_text'] );
|
196 |
|
197 |
-
|
198 |
-
|
|
|
|
|
|
|
|
|
199 |
echo '';
|
200 |
} else {
|
201 |
$ultimatemember->shortcodes->set_args = $args;
|
202 |
-
$ultimatemember->shortcodes->load_template(
|
203 |
}
|
204 |
} else {
|
205 |
-
echo do_shortcode(
|
206 |
}
|
207 |
-
|
208 |
$output = ob_get_contents();
|
209 |
ob_end_clean();
|
210 |
return $output;
|
211 |
}
|
212 |
-
|
213 |
/***
|
214 |
-
|
215 |
-
|
216 |
-
function um_loggedout(
|
217 |
global $ultimatemember;
|
218 |
ob_start();
|
219 |
|
220 |
// Hide for logged in users
|
221 |
-
if (
|
222 |
echo '';
|
223 |
} else {
|
224 |
-
echo do_shortcode(
|
225 |
}
|
226 |
-
|
227 |
$output = ob_get_contents();
|
228 |
ob_end_clean();
|
229 |
return $output;
|
230 |
}
|
231 |
-
|
232 |
/***
|
233 |
-
|
234 |
-
|
235 |
-
function ultimatemember(
|
236 |
-
return $this->load(
|
237 |
}
|
238 |
|
239 |
/***
|
240 |
-
|
241 |
-
|
242 |
-
function load(
|
243 |
global $ultimatemember;
|
244 |
ob_start();
|
245 |
|
246 |
$defaults = array();
|
247 |
-
$args = wp_parse_args(
|
248 |
|
249 |
// when to not continue
|
250 |
$this->form_id = (isset($args['form_id'])) ? $args['form_id'] : null;
|
251 |
-
if (!$this->form_id)
|
252 |
-
|
253 |
-
|
|
|
|
|
|
|
|
|
|
|
254 |
|
255 |
// get data into one global array
|
256 |
-
$post_data = $ultimatemember->query->post_data(
|
257 |
|
258 |
-
$args = apply_filters('um_pre_args_setup', $post_data
|
259 |
|
260 |
-
if (
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
|
266 |
-
if (
|
267 |
-
$args = array_merge(
|
268 |
} else {
|
269 |
-
$args = array_merge(
|
270 |
}
|
271 |
|
272 |
// filter for arguments
|
273 |
-
$args = apply_filters('um_shortcode_args_filter', $args
|
274 |
|
275 |
-
extract(
|
276 |
|
277 |
// for profiles only
|
278 |
-
if (
|
279 |
-
|
280 |
return;
|
|
|
281 |
|
282 |
// start loading the template here
|
283 |
do_action("um_pre_{$mode}_shortcode", $args);
|
@@ -286,11 +311,11 @@ class UM_Shortcodes {
|
|
286 |
|
287 |
do_action("um_before_{$mode}_form_is_loaded", $args);
|
288 |
|
289 |
-
$this->template_load(
|
290 |
|
291 |
-
$this->dynamic_css(
|
292 |
|
293 |
-
if (
|
294 |
um_reset_user();
|
295 |
}
|
296 |
|
@@ -302,107 +327,110 @@ class UM_Shortcodes {
|
|
302 |
}
|
303 |
|
304 |
/***
|
305 |
-
|
306 |
-
|
307 |
-
function get_css_args(
|
308 |
-
$arr = um_styling_defaults(
|
309 |
-
$arr = array_merge(
|
310 |
return $arr;
|
311 |
}
|
312 |
|
313 |
/***
|
314 |
-
|
315 |
-
|
316 |
-
function dynamic_css(
|
317 |
global $ultimatemember;
|
318 |
extract($args);
|
319 |
|
320 |
$global = um_path . 'assets/dynamic_css/dynamic_global.php';
|
321 |
|
322 |
-
if (
|
323 |
-
$file = um_path . 'assets/dynamic_css/dynamic_'
|
324 |
}
|
325 |
|
326 |
include $global;
|
327 |
|
328 |
-
if (
|
329 |
include $file;
|
|
|
330 |
|
331 |
-
if (
|
332 |
$css = $args['custom_css'];
|
333 |
-
?><!-- ULTIMATE MEMBER FORM INLINE CSS BEGIN --><style type="text/css"><?php print $ultimatemember->styles->minify(
|
334 |
-
|
335 |
|
336 |
}
|
337 |
|
338 |
/***
|
339 |
-
|
340 |
-
|
341 |
-
function template_load(
|
342 |
global $ultimatemember;
|
343 |
-
if (
|
344 |
$ultimatemember->shortcodes->set_args = $args;
|
345 |
}
|
346 |
-
$ultimatemember->shortcodes->load_template(
|
347 |
}
|
348 |
|
349 |
/***
|
350 |
-
|
351 |
-
|
352 |
-
function template_exists(
|
353 |
|
354 |
-
$file = um_path . 'templates/'. $template . '.php';
|
355 |
$theme_file = get_stylesheet_directory() . '/ultimate-member/templates/' . $template . '.php';
|
356 |
|
357 |
-
if (
|
358 |
return true;
|
|
|
|
|
359 |
return false;
|
360 |
}
|
361 |
|
362 |
/***
|
363 |
-
|
364 |
-
|
365 |
-
function get_template_name($file){
|
366 |
$file = basename($file);
|
367 |
$file = preg_replace('/\\.[^.\\s]{3,4}$/', '', $file);
|
368 |
return $file;
|
369 |
}
|
370 |
|
371 |
/***
|
372 |
-
|
373 |
-
|
374 |
-
function get_templates(
|
375 |
|
376 |
if ($excluded) {
|
377 |
-
$array[$excluded] = __('Default Template','ultimatemember');
|
378 |
}
|
379 |
|
380 |
-
$paths[] = glob(
|
381 |
|
382 |
-
if (
|
383 |
-
$paths[] = glob(
|
384 |
}
|
385 |
|
386 |
-
foreach($paths as $k => $files){
|
387 |
|
388 |
-
foreach(
|
389 |
|
390 |
$clean_filename = $this->get_template_name($file);
|
391 |
|
392 |
if (0 === strpos($clean_filename, $excluded)) {
|
393 |
|
394 |
-
$source = file_get_contents(
|
395 |
-
$tokens = token_get_all(
|
396 |
$comment = array(
|
397 |
-
T_COMMENT,
|
398 |
-
T_DOC_COMMENT
|
399 |
);
|
400 |
-
foreach(
|
401 |
-
if(
|
402 |
$txt = $token[1];
|
403 |
-
$txt = str_replace('/* Template: ',''
|
404 |
-
$txt = str_replace(' */',''
|
405 |
-
$array[
|
406 |
}
|
407 |
}
|
408 |
|
@@ -417,25 +445,25 @@ class UM_Shortcodes {
|
|
417 |
}
|
418 |
|
419 |
/***
|
420 |
-
|
421 |
-
|
422 |
-
function get_shortcode($post_id){
|
423 |
-
$shortcode = '[ultimatemember form_id='
|
424 |
return $shortcode;
|
425 |
}
|
426 |
-
|
427 |
/***
|
428 |
-
|
429 |
-
|
430 |
-
function convert_locker_tags(
|
431 |
-
$str = um_convert_tags(
|
432 |
return $str;
|
433 |
}
|
434 |
|
435 |
/***
|
436 |
-
|
437 |
-
|
438 |
-
function convert_user_tags(
|
439 |
|
440 |
$value = '';
|
441 |
|
@@ -450,27 +478,27 @@ class UM_Shortcodes {
|
|
450 |
$pattern_array = apply_filters('um_allowed_user_tags_patterns', $pattern_array);
|
451 |
|
452 |
$matches = false;
|
453 |
-
foreach (
|
454 |
|
455 |
if (preg_match($pattern, $str)) {
|
456 |
|
457 |
-
$usermeta = str_replace('{',''
|
458 |
-
$usermeta = str_replace('}',''
|
459 |
|
460 |
-
if (
|
461 |
-
$value = get_avatar(
|
462 |
-
} elseif (
|
463 |
-
$value = um_user(
|
464 |
}
|
465 |
|
466 |
-
if (
|
467 |
$value = um_user('user_login');
|
468 |
}
|
469 |
|
470 |
-
$value = apply_filters("um_profile_tag_hook__{$usermeta}", $value, um_user('ID')
|
471 |
|
472 |
-
if (
|
473 |
-
$str = preg_replace('/'
|
474 |
}
|
475 |
|
476 |
}
|
9 |
$this->loop = '';
|
10 |
|
11 |
add_shortcode('ultimatemember', array(&$this, 'ultimatemember'), 1);
|
12 |
+
|
13 |
+
add_shortcode('um_loggedin', array(&$this, 'um_loggedin'));
|
14 |
+
add_shortcode('um_loggedout', array(&$this, 'um_loggedout'));
|
15 |
+
|
16 |
+
add_filter('body_class', array(&$this, 'body_class'), 0);
|
17 |
+
|
18 |
+
$base_uri = apply_filters('um_emoji_base_uri', 'https://s.w.org/images/core/emoji/');
|
19 |
+
|
20 |
+
$this->emoji[':)'] = $base_uri . '72x72/1f604.png';
|
21 |
+
$this->emoji[':smiley:'] = $base_uri . '72x72/1f603.png';
|
22 |
+
$this->emoji[':D'] = $base_uri . '72x72/1f600.png';
|
23 |
+
$this->emoji[':$'] = $base_uri . '72x72/1f60a.png';
|
24 |
+
$this->emoji[':relaxed:'] = $base_uri . '72x72/263a.png';
|
25 |
+
$this->emoji[';)'] = $base_uri . '72x72/1f609.png';
|
26 |
+
$this->emoji[':heart_eyes:'] = $base_uri . '72x72/1f60d.png';
|
27 |
+
$this->emoji[':kissing_heart:'] = $base_uri . '72x72/1f618.png';
|
28 |
+
$this->emoji[':kissing_closed_eyes:'] = $base_uri . '72x72/1f61a.png';
|
29 |
+
$this->emoji[':kissing:'] = $base_uri . '72x72/1f617.png';
|
30 |
+
$this->emoji[':kissing_smiling_eyes:'] = $base_uri . '72x72/1f619.png';
|
31 |
+
$this->emoji[';P'] = $base_uri . '72x72/1f61c.png';
|
32 |
+
$this->emoji[':P'] = $base_uri . '72x72/1f61b.png';
|
33 |
+
$this->emoji[':stuck_out_tongue_closed_eyes:'] = $base_uri . '72x72/1f61d.png';
|
34 |
+
$this->emoji[':flushed:'] = $base_uri . '72x72/1f633.png';
|
35 |
+
$this->emoji[':grin:'] = $base_uri . '72x72/1f601.png';
|
36 |
+
$this->emoji[':pensive:'] = $base_uri . '72x72/1f614.png';
|
37 |
+
$this->emoji[':relieved:'] = $base_uri . '72x72/1f60c.png';
|
38 |
+
$this->emoji[':unamused'] = $base_uri . '72x72/1f612.png';
|
39 |
+
$this->emoji[':('] = $base_uri . '72x72/1f61e.png';
|
40 |
+
$this->emoji[':persevere:'] = $base_uri . '72x72/1f623.png';
|
41 |
+
$this->emoji[":'("] = $base_uri . '72x72/1f622.png';
|
42 |
+
$this->emoji[':joy:'] = $base_uri . '72x72/1f602.png';
|
43 |
+
$this->emoji[':sob:'] = $base_uri . '72x72/1f62d.png';
|
44 |
+
$this->emoji[':sleepy:'] = $base_uri . '72x72/1f62a.png';
|
45 |
+
$this->emoji[':disappointed_relieved:'] = $base_uri . '72x72/1f625.png';
|
46 |
+
$this->emoji[':cold_sweat:'] = $base_uri . '72x72/1f630.png';
|
47 |
+
$this->emoji[':sweat_smile:'] = $base_uri . '72x72/1f605.png';
|
48 |
+
$this->emoji[':sweat:'] = $base_uri . '72x72/1f613.png';
|
49 |
+
$this->emoji[':weary:'] = $base_uri . '72x72/1f629.png';
|
50 |
+
$this->emoji[':tired_face:'] = $base_uri . '72x72/1f62b.png';
|
51 |
+
$this->emoji[':fearful:'] = $base_uri . '72x72/1f628.png';
|
52 |
+
$this->emoji[':scream:'] = $base_uri . '72x72/1f631.png';
|
53 |
+
$this->emoji[':angry:'] = $base_uri . '72x72/1f620.png';
|
54 |
+
$this->emoji[':rage:'] = $base_uri . '72x72/1f621.png';
|
55 |
+
$this->emoji[':triumph'] = $base_uri . '72x72/1f624.png';
|
56 |
+
$this->emoji[':confounded:'] = $base_uri . '72x72/1f616.png';
|
57 |
+
$this->emoji[':laughing:'] = $base_uri . '72x72/1f606.png';
|
58 |
+
$this->emoji[':yum:'] = $base_uri . '72x72/1f60b.png';
|
59 |
+
$this->emoji[':mask:'] = $base_uri . '72x72/1f637.png';
|
60 |
+
$this->emoji[':cool:'] = $base_uri . '72x72/1f60e.png';
|
61 |
+
$this->emoji[':sleeping:'] = $base_uri . '72x72/1f634.png';
|
62 |
+
$this->emoji[':dizzy_face:'] = $base_uri . '72x72/1f635.png';
|
63 |
+
$this->emoji[':astonished:'] = $base_uri . '72x72/1f632.png';
|
64 |
+
$this->emoji[':worried:'] = $base_uri . '72x72/1f61f.png';
|
65 |
+
$this->emoji[':frowning:'] = $base_uri . '72x72/1f626.png';
|
66 |
+
$this->emoji[':anguished:'] = $base_uri . '72x72/1f627.png';
|
67 |
+
$this->emoji[':smiling_imp:'] = $base_uri . '72x72/1f608.png';
|
68 |
+
$this->emoji[':imp:'] = $base_uri . '72x72/1f47f.png';
|
69 |
+
$this->emoji[':open_mouth:'] = $base_uri . '72x72/1f62e.png';
|
70 |
+
$this->emoji[':grimacing:'] = $base_uri . '72x72/1f62c.png';
|
71 |
+
$this->emoji[':neutral_face:'] = $base_uri . '72x72/1f610.png';
|
72 |
+
$this->emoji[':confused:'] = $base_uri . '72x72/1f615.png';
|
73 |
+
$this->emoji[':hushed:'] = $base_uri . '72x72/1f62f.png';
|
74 |
+
$this->emoji[':no_mouth:'] = $base_uri . '72x72/1f636.png';
|
75 |
+
$this->emoji[':innocent:'] = $base_uri . '72x72/1f607.png';
|
76 |
+
$this->emoji[':smirk:'] = $base_uri . '72x72/1f60f.png';
|
77 |
+
$this->emoji[':expressionless:'] = $base_uri . '72x72/1f611.png';
|
78 |
|
79 |
}
|
80 |
|
81 |
/***
|
82 |
+
*** @emoji support
|
83 |
+
*/
|
84 |
+
function emotize($content) {
|
85 |
+
$content = stripslashes($content);
|
86 |
+
foreach ($this->emoji as $code => $val) {
|
87 |
+
$regex = str_replace(array('(', ')'), array("\\" . '(', "\\" . ')'), $code);
|
88 |
+
$content = preg_replace('/(' . $regex . ')(\s|$)/', '<img src="' . $val . '" alt="' . $code . '" title="' . $code . '" class="emoji" />$2', $content);
|
89 |
}
|
90 |
return $content;
|
91 |
}
|
92 |
|
93 |
/***
|
94 |
+
*** @extend body classes
|
95 |
+
*/
|
96 |
+
function body_class($classes) {
|
97 |
global $ultimatemember;
|
98 |
|
99 |
$array = $ultimatemember->permalinks->core;
|
100 |
+
if (!$array) {
|
101 |
+
return $classes;
|
102 |
+
}
|
103 |
|
104 |
+
foreach ($array as $slug => $info) {
|
105 |
+
if (um_is_core_page($slug)) {
|
106 |
|
107 |
$classes[] = 'um-page-' . $slug;
|
108 |
|
109 |
+
if (is_user_logged_in()) {
|
110 |
$classes[] = 'um-page-loggedin';
|
111 |
} else {
|
112 |
$classes[] = 'um-page-loggedout';
|
119 |
}
|
120 |
|
121 |
/***
|
122 |
+
*** @Retrieve core login form
|
123 |
+
*/
|
124 |
function core_login_form() {
|
125 |
+
$forms = get_posts(array('post_type' => 'um_form', 'posts_per_page' => 1, 'meta_key' => '_um_core', 'meta_value' => 'login'));
|
126 |
return $forms[0]->ID;
|
127 |
}
|
128 |
|
129 |
/***
|
130 |
+
*** @load a compatible template
|
131 |
+
*/
|
132 |
+
function load_template($tpl) {
|
133 |
global $ultimatemember;
|
134 |
|
135 |
+
$loop = ($this->loop) ? $this->loop : '';
|
136 |
|
137 |
+
if (isset($this->set_args) && is_array($this->set_args)) {
|
138 |
$args = $this->set_args;
|
139 |
+
extract($args);
|
140 |
}
|
141 |
|
142 |
$file = um_path . 'templates/' . $tpl . '.php';
|
143 |
$theme_file = get_stylesheet_directory() . '/ultimate-member/templates/' . $tpl . '.php';
|
144 |
|
145 |
+
if (file_exists($theme_file)) {
|
146 |
$file = $theme_file;
|
147 |
+
}
|
148 |
|
149 |
+
if (file_exists($file)) {
|
150 |
include $file;
|
151 |
+
}
|
152 |
+
|
153 |
}
|
154 |
|
155 |
/***
|
156 |
+
*** @Add class based on shortcode
|
157 |
+
*/
|
158 |
+
function get_class($mode, $args = array()) {
|
159 |
|
160 |
global $ultimatemember;
|
161 |
|
162 |
+
$classes = 'um-' . $mode;
|
163 |
|
164 |
+
if (is_admin()) {
|
165 |
$classes .= ' um-in-admin';
|
166 |
}
|
167 |
|
168 |
+
if (isset($ultimatemember->form->errors) && $ultimatemember->form->errors) {
|
169 |
$classes .= ' um-err';
|
170 |
}
|
171 |
|
172 |
+
if ($ultimatemember->fields->editing == true) {
|
173 |
$classes .= ' um-editing';
|
174 |
}
|
175 |
|
176 |
+
if ($ultimatemember->fields->viewing == true) {
|
177 |
$classes .= ' um-viewing';
|
178 |
}
|
179 |
|
180 |
+
if (isset($args['template']) && $args['template'] != $args['mode']) {
|
181 |
$classes .= ' um-' . $args['template'];
|
182 |
}
|
183 |
|
186 |
}
|
187 |
|
188 |
/***
|
189 |
+
*** @Logged-in only content
|
190 |
+
*/
|
191 |
+
function um_loggedin($args = array(), $content = "") {
|
192 |
global $ultimatemember;
|
193 |
ob_start();
|
194 |
|
195 |
$defaults = array(
|
196 |
+
'lock_text' => __('This content has been restricted to logged in users only. Please <a href="{login_referrer}">login</a> to view this content.', 'ultimatemember'),
|
197 |
+
'show_lock' => 'yes',
|
198 |
);
|
|
|
|
|
|
|
|
|
199 |
|
200 |
+
$args = wp_parse_args($args, $defaults);
|
201 |
+
|
202 |
+
$args['lock_text'] = $this->convert_locker_tags($args['lock_text']);
|
203 |
+
|
204 |
+
if (!is_user_logged_in()) {
|
205 |
+
if ($args['show_lock'] == 'no') {
|
206 |
echo '';
|
207 |
} else {
|
208 |
$ultimatemember->shortcodes->set_args = $args;
|
209 |
+
$ultimatemember->shortcodes->load_template('login-to-view');
|
210 |
}
|
211 |
} else {
|
212 |
+
echo do_shortcode($this->convert_locker_tags(wpautop($content)));
|
213 |
}
|
214 |
+
|
215 |
$output = ob_get_contents();
|
216 |
ob_end_clean();
|
217 |
return $output;
|
218 |
}
|
219 |
+
|
220 |
/***
|
221 |
+
*** @Logged-out only content
|
222 |
+
*/
|
223 |
+
function um_loggedout($args = array(), $content = "") {
|
224 |
global $ultimatemember;
|
225 |
ob_start();
|
226 |
|
227 |
// Hide for logged in users
|
228 |
+
if (is_user_logged_in()) {
|
229 |
echo '';
|
230 |
} else {
|
231 |
+
echo do_shortcode(wpautop($content));
|
232 |
}
|
233 |
+
|
234 |
$output = ob_get_contents();
|
235 |
ob_end_clean();
|
236 |
return $output;
|
237 |
}
|
238 |
+
|
239 |
/***
|
240 |
+
*** @Shortcode
|
241 |
+
*/
|
242 |
+
function ultimatemember($args = array()) {
|
243 |
+
return $this->load($args);
|
244 |
}
|
245 |
|
246 |
/***
|
247 |
+
*** @Load a module with global function
|
248 |
+
*/
|
249 |
+
function load($args) {
|
250 |
global $ultimatemember;
|
251 |
ob_start();
|
252 |
|
253 |
$defaults = array();
|
254 |
+
$args = wp_parse_args($args, $defaults);
|
255 |
|
256 |
// when to not continue
|
257 |
$this->form_id = (isset($args['form_id'])) ? $args['form_id'] : null;
|
258 |
+
if (!$this->form_id) {
|
259 |
+
return;
|
260 |
+
}
|
261 |
+
|
262 |
+
$this->form_status = get_post_status($this->form_id);
|
263 |
+
if ($this->form_status != 'publish') {
|
264 |
+
return;
|
265 |
+
}
|
266 |
|
267 |
// get data into one global array
|
268 |
+
$post_data = $ultimatemember->query->post_data($this->form_id);
|
269 |
|
270 |
+
$args = apply_filters('um_pre_args_setup', $post_data);
|
271 |
|
272 |
+
if (!isset($args['template'])) {
|
273 |
+
$args['template'] = '';
|
274 |
+
}
|
275 |
+
|
276 |
+
if (isset($post_data['template']) && $post_data['template'] != $args['template']) {
|
277 |
+
$args['template'] = $post_data['template'];
|
278 |
+
}
|
279 |
+
|
280 |
+
if (!$this->template_exists($args['template'])) {
|
281 |
+
$args['template'] = $post_data['mode'];
|
282 |
+
}
|
283 |
+
|
284 |
+
if (!isset($post_data['template'])) {
|
285 |
+
$post_data['template'] = $post_data['mode'];
|
286 |
+
}
|
287 |
+
|
288 |
+
$args = array_merge($post_data, $args);
|
289 |
|
290 |
+
if (isset($args['use_globals']) && $args['use_globals'] == 1) {
|
291 |
+
$args = array_merge($args, $this->get_css_args($args));
|
292 |
} else {
|
293 |
+
$args = array_merge($this->get_css_args($args), $args);
|
294 |
}
|
295 |
|
296 |
// filter for arguments
|
297 |
+
$args = apply_filters('um_shortcode_args_filter', $args);
|
298 |
|
299 |
+
extract($args, EXTR_SKIP);
|
300 |
|
301 |
// for profiles only
|
302 |
+
if ($mode == 'profile' && um_profile_id() && isset($args['role']) && $args['role'] &&
|
303 |
+
$args['role'] != $ultimatemember->query->get_role_by_userid(um_profile_id())) {
|
304 |
return;
|
305 |
+
}
|
306 |
|
307 |
// start loading the template here
|
308 |
do_action("um_pre_{$mode}_shortcode", $args);
|
311 |
|
312 |
do_action("um_before_{$mode}_form_is_loaded", $args);
|
313 |
|
314 |
+
$this->template_load($template, $args);
|
315 |
|
316 |
+
$this->dynamic_css($args);
|
317 |
|
318 |
+
if (um_get_requested_user() || $mode == 'logout') {
|
319 |
um_reset_user();
|
320 |
}
|
321 |
|
327 |
}
|
328 |
|
329 |
/***
|
330 |
+
*** @Get dynamic css args
|
331 |
+
*/
|
332 |
+
function get_css_args($args) {
|
333 |
+
$arr = um_styling_defaults($args['mode']);
|
334 |
+
$arr = array_merge($arr, array('form_id' => $args['form_id'], 'mode' => $args['mode']));
|
335 |
return $arr;
|
336 |
}
|
337 |
|
338 |
/***
|
339 |
+
*** @Load dynamic css
|
340 |
+
*/
|
341 |
+
function dynamic_css($args = array()) {
|
342 |
global $ultimatemember;
|
343 |
extract($args);
|
344 |
|
345 |
$global = um_path . 'assets/dynamic_css/dynamic_global.php';
|
346 |
|
347 |
+
if (isset($mode)) {
|
348 |
+
$file = um_path . 'assets/dynamic_css/dynamic_' . $mode . '.php';
|
349 |
}
|
350 |
|
351 |
include $global;
|
352 |
|
353 |
+
if (isset($file) && file_exists($file)) {
|
354 |
include $file;
|
355 |
+
}
|
356 |
|
357 |
+
if (isset($args['custom_css'])) {
|
358 |
$css = $args['custom_css'];
|
359 |
+
?><!-- ULTIMATE MEMBER FORM INLINE CSS BEGIN --><style type="text/css"><?php print $ultimatemember->styles->minify($css);?></style><!-- ULTIMATE MEMBER FORM INLINE CSS END --><?php
|
360 |
+
}
|
361 |
|
362 |
}
|
363 |
|
364 |
/***
|
365 |
+
*** @Loads a template file
|
366 |
+
*/
|
367 |
+
function template_load($template, $args = array()) {
|
368 |
global $ultimatemember;
|
369 |
+
if (is_array($args)) {
|
370 |
$ultimatemember->shortcodes->set_args = $args;
|
371 |
}
|
372 |
+
$ultimatemember->shortcodes->load_template($template);
|
373 |
}
|
374 |
|
375 |
/***
|
376 |
+
*** @Checks if a template file exists
|
377 |
+
*/
|
378 |
+
function template_exists($template) {
|
379 |
|
380 |
+
$file = um_path . 'templates/' . $template . '.php';
|
381 |
$theme_file = get_stylesheet_directory() . '/ultimate-member/templates/' . $template . '.php';
|
382 |
|
383 |
+
if (file_exists($theme_file) || file_exists($file)) {
|
384 |
return true;
|
385 |
+
}
|
386 |
+
|
387 |
return false;
|
388 |
}
|
389 |
|
390 |
/***
|
391 |
+
*** @Get File Name without path and extension
|
392 |
+
*/
|
393 |
+
function get_template_name($file) {
|
394 |
$file = basename($file);
|
395 |
$file = preg_replace('/\\.[^.\\s]{3,4}$/', '', $file);
|
396 |
return $file;
|
397 |
}
|
398 |
|
399 |
/***
|
400 |
+
*** @Get Templates
|
401 |
+
*/
|
402 |
+
function get_templates($excluded = null) {
|
403 |
|
404 |
if ($excluded) {
|
405 |
+
$array[$excluded] = __('Default Template', 'ultimatemember');
|
406 |
}
|
407 |
|
408 |
+
$paths[] = glob(um_path . 'templates/' . '*.php');
|
409 |
|
410 |
+
if (file_exists(get_stylesheet_directory() . '/ultimate-member/templates/')) {
|
411 |
+
$paths[] = glob(get_stylesheet_directory() . '/ultimate-member/templates/' . '*.php');
|
412 |
}
|
413 |
|
414 |
+
foreach ($paths as $k => $files) {
|
415 |
|
416 |
+
foreach ($files as $file) {
|
417 |
|
418 |
$clean_filename = $this->get_template_name($file);
|
419 |
|
420 |
if (0 === strpos($clean_filename, $excluded)) {
|
421 |
|
422 |
+
$source = file_get_contents($file);
|
423 |
+
$tokens = token_get_all($source);
|
424 |
$comment = array(
|
425 |
+
T_COMMENT, // All comments since PHP5
|
426 |
+
T_DOC_COMMENT, // PHPDoc comments
|
427 |
);
|
428 |
+
foreach ($tokens as $token) {
|
429 |
+
if (in_array($token[0], $comment) && strstr($token[1], '/* Template:') && $clean_filename != $excluded) {
|
430 |
$txt = $token[1];
|
431 |
+
$txt = str_replace('/* Template: ', '', $txt);
|
432 |
+
$txt = str_replace(' */', '', $txt);
|
433 |
+
$array[$clean_filename] = $txt;
|
434 |
}
|
435 |
}
|
436 |
|
445 |
}
|
446 |
|
447 |
/***
|
448 |
+
*** @Get Shortcode for given form ID
|
449 |
+
*/
|
450 |
+
function get_shortcode($post_id) {
|
451 |
+
$shortcode = '[ultimatemember form_id=' . $post_id . ']';
|
452 |
return $shortcode;
|
453 |
}
|
454 |
+
|
455 |
/***
|
456 |
+
*** @convert access lock tags
|
457 |
+
*/
|
458 |
+
function convert_locker_tags($str) {
|
459 |
+
$str = um_convert_tags($str);
|
460 |
return $str;
|
461 |
}
|
462 |
|
463 |
/***
|
464 |
+
*** @convert user tags in a string
|
465 |
+
*/
|
466 |
+
function convert_user_tags($str) {
|
467 |
|
468 |
$value = '';
|
469 |
|
478 |
$pattern_array = apply_filters('um_allowed_user_tags_patterns', $pattern_array);
|
479 |
|
480 |
$matches = false;
|
481 |
+
foreach ($pattern_array as $pattern) {
|
482 |
|
483 |
if (preg_match($pattern, $str)) {
|
484 |
|
485 |
+
$usermeta = str_replace('{', '', $pattern);
|
486 |
+
$usermeta = str_replace('}', '', $usermeta);
|
487 |
|
488 |
+
if ($usermeta == 'user_avatar_small') {
|
489 |
+
$value = get_avatar(um_user('ID'), 40);
|
490 |
+
} elseif (um_user($usermeta)) {
|
491 |
+
$value = um_user($usermeta);
|
492 |
}
|
493 |
|
494 |
+
if ($usermeta == 'username') {
|
495 |
$value = um_user('user_login');
|
496 |
}
|
497 |
|
498 |
+
$value = apply_filters("um_profile_tag_hook__{$usermeta}", $value, um_user('ID'));
|
499 |
|
500 |
+
if ($value) {
|
501 |
+
$str = preg_replace('/' . $pattern . '/', $value, $str);
|
502 |
}
|
503 |
|
504 |
}
|
core/um-user.php
CHANGED
@@ -273,25 +273,6 @@ class UM_User {
|
|
273 |
$this->set(0, $clean);
|
274 |
}
|
275 |
|
276 |
-
/***
|
277 |
-
*** @Security check for roles
|
278 |
-
***/
|
279 |
-
function is_secure_role( $user_id, $role ) {
|
280 |
-
|
281 |
-
if ( is_admin() ) return;
|
282 |
-
|
283 |
-
if ( $role == 'admin' ) {
|
284 |
-
$this->delete( false );
|
285 |
-
wp_die( __('This is not allowed for security reasons.','ultimatemember') );
|
286 |
-
}
|
287 |
-
|
288 |
-
if ( um_get_option('advanced_denied_roles') && strstr( um_get_option('advanced_denied_roles'), $role ) ) {
|
289 |
-
$this->delete( false );
|
290 |
-
wp_die( __('This is not allowed for security reasons.','ultimatemember') );
|
291 |
-
}
|
292 |
-
|
293 |
-
}
|
294 |
-
|
295 |
/***
|
296 |
*** @Clean user profile
|
297 |
***/
|
@@ -434,6 +415,15 @@ class UM_User {
|
|
434 |
$this->password_reset_hash();
|
435 |
$ultimatemember->mail->send( um_user('user_email'), 'resetpw_email' );
|
436 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
437 |
|
438 |
/**
|
439 |
* @function approve()
|
@@ -481,7 +471,7 @@ class UM_User {
|
|
481 |
/***
|
482 |
*** @pending email
|
483 |
***/
|
484 |
-
function email_pending(){
|
485 |
global $ultimatemember;
|
486 |
$this->assign_secretkey();
|
487 |
$this->set_status('awaiting_email_confirmation');
|
@@ -877,6 +867,7 @@ class UM_User {
|
|
877 |
return count( $duplicates );
|
878 |
return false;
|
879 |
}
|
|
|
880 |
|
881 |
/***
|
882 |
*** @user exists by name
|
@@ -885,12 +876,14 @@ class UM_User {
|
|
885 |
|
886 |
global $ultimatemember;
|
887 |
$value = $ultimatemember->validation->safe_name_in_url( $value );
|
888 |
-
|
|
|
889 |
$ids = get_users(array( 'fields' => 'ID', 'meta_key' => 'full_name','meta_value' => $value ,'meta_compare' => '=') );
|
890 |
if ( isset( $ids[0] ) )
|
891 |
return $ids[0];
|
892 |
return false;
|
893 |
}
|
|
|
894 |
|
895 |
/**
|
896 |
* @function user_exists_by_id()
|
273 |
$this->set(0, $clean);
|
274 |
}
|
275 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
/***
|
277 |
*** @Clean user profile
|
278 |
***/
|
415 |
$this->password_reset_hash();
|
416 |
$ultimatemember->mail->send( um_user('user_email'), 'resetpw_email' );
|
417 |
}
|
418 |
+
|
419 |
+
|
420 |
+
/***
|
421 |
+
*** @password changed email
|
422 |
+
***/
|
423 |
+
function password_changed(){
|
424 |
+
global $ultimatemember;
|
425 |
+
$ultimatemember->mail->send( um_user('user_email'), 'changedpw_email' );
|
426 |
+
}
|
427 |
|
428 |
/**
|
429 |
* @function approve()
|
471 |
/***
|
472 |
*** @pending email
|
473 |
***/
|
474 |
+
function email_pending() {
|
475 |
global $ultimatemember;
|
476 |
$this->assign_secretkey();
|
477 |
$this->set_status('awaiting_email_confirmation');
|
867 |
return count( $duplicates );
|
868 |
return false;
|
869 |
}
|
870 |
+
|
871 |
|
872 |
/***
|
873 |
*** @user exists by name
|
876 |
|
877 |
global $ultimatemember;
|
878 |
$value = $ultimatemember->validation->safe_name_in_url( $value );
|
879 |
+
$value = um_clean_user_basename( $value );
|
880 |
+
|
881 |
$ids = get_users(array( 'fields' => 'ID', 'meta_key' => 'full_name','meta_value' => $value ,'meta_compare' => '=') );
|
882 |
if ( isset( $ids[0] ) )
|
883 |
return $ids[0];
|
884 |
return false;
|
885 |
}
|
886 |
+
|
887 |
|
888 |
/**
|
889 |
* @function user_exists_by_id()
|
index.php
CHANGED
@@ -3,11 +3,11 @@
|
|
3 |
Plugin Name: Ultimate Member
|
4 |
Plugin URI: http://ultimatemember.com/
|
5 |
Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress
|
6 |
-
Version: 1.3.
|
7 |
Author: Ultimate Member
|
8 |
Author URI: http://ultimatemember.com/
|
9 |
*/
|
10 |
-
|
11 |
require_once(ABSPATH.'wp-admin/includes/plugin.php');
|
12 |
|
13 |
$plugin_data = get_plugin_data( __FILE__ );
|
3 |
Plugin Name: Ultimate Member
|
4 |
Plugin URI: http://ultimatemember.com/
|
5 |
Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress
|
6 |
+
Version: 1.3.37
|
7 |
Author: Ultimate Member
|
8 |
Author URI: http://ultimatemember.com/
|
9 |
*/
|
10 |
+
defined('ABSPATH') || exit;
|
11 |
require_once(ABSPATH.'wp-admin/includes/plugin.php');
|
12 |
|
13 |
$plugin_data = get_plugin_data( __FILE__ );
|
readme.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
|
2 |
Author URI: https://ultimatemember.com/
|
3 |
Plugin URI: https://ultimatemember.com/
|
4 |
Contributors: ultimatemember, champsupertramp
|
@@ -7,7 +7,7 @@ Tags: access control, author, authors, author profile, comments, community, comm
|
|
7 |
Requires at least: 4.1
|
8 |
Tested up to: 4.4
|
9 |
|
10 |
-
Stable Tag: 1.3.
|
11 |
|
12 |
License: GNU Version 2 or Any Later Version
|
13 |
|
@@ -44,6 +44,7 @@ Read about all of the plugin's features at [Ultimate Member](https://ultimatemem
|
|
44 |
|
45 |
Ultimate Member has a range of extensions that allow you to extend the power of the plugin
|
46 |
|
|
|
47 |
* [User Tags](https://ultimatemember.com/extensions/user-tags/) - Lets you add a user tag system to your website
|
48 |
* [Social Activity](https://ultimatemember.com/extensions/social-activity/) - Let users create public wall posts & see the activity of other users
|
49 |
* [WooCommerce](https://ultimatemember.com/extensions/woocommerce/) - Allow you to integrate WooCommerce with Ultimate Member
|
@@ -70,7 +71,7 @@ If you're a developer and would like to contribute to the source code of the plu
|
|
70 |
|
71 |
= Documentation & Support =
|
72 |
|
73 |
-
Got a problem or need help with Ultimate Member? Head over to our [documentation](http://docs.ultimatemember.com/) and perform a search of the knowledge base. If you can’t find a solution to your issue then you can create a [support ticket](https://ultimatemember.com/support/).
|
74 |
|
75 |
= Languages =
|
76 |
|
@@ -91,6 +92,7 @@ Ultimate Member has been translated into the following languages:
|
|
91 |
* Polish - Polski
|
92 |
* Czech
|
93 |
* Greek
|
|
|
94 |
* Simplified Chinese
|
95 |
* Russian - Русский
|
96 |
* Turkish - Türkçe
|
@@ -147,6 +149,56 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
|
|
147 |
|
148 |
== Changelog ==
|
149 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
= 1.3.36: January 6, 2016 =
|
151 |
|
152 |
* New: added in-page content restriction to protect content for logged-in or logged out users
|
1 |
+
=== Ultimate Member ===
|
2 |
Author URI: https://ultimatemember.com/
|
3 |
Plugin URI: https://ultimatemember.com/
|
4 |
Contributors: ultimatemember, champsupertramp
|
7 |
Requires at least: 4.1
|
8 |
Tested up to: 4.4
|
9 |
|
10 |
+
Stable Tag: 1.3.37
|
11 |
|
12 |
License: GNU Version 2 or Any Later Version
|
13 |
|
44 |
|
45 |
Ultimate Member has a range of extensions that allow you to extend the power of the plugin
|
46 |
|
47 |
+
* [Instagram](https://ultimatemember.com/extensions/instagram/) - Allow users to show their Instagram photos on their profile
|
48 |
* [User Tags](https://ultimatemember.com/extensions/user-tags/) - Lets you add a user tag system to your website
|
49 |
* [Social Activity](https://ultimatemember.com/extensions/social-activity/) - Let users create public wall posts & see the activity of other users
|
50 |
* [WooCommerce](https://ultimatemember.com/extensions/woocommerce/) - Allow you to integrate WooCommerce with Ultimate Member
|
71 |
|
72 |
= Documentation & Support =
|
73 |
|
74 |
+
Got a problem or need help with Ultimate Member? Head over to our [documentation](http://docs.ultimatemember.com/) and perform a search of the knowledge base. If you can’t find a solution to your issue then you can create a [support ticket](https://ultimatemember.com/support-contact/).
|
75 |
|
76 |
= Languages =
|
77 |
|
92 |
* Polish - Polski
|
93 |
* Czech
|
94 |
* Greek
|
95 |
+
* Indonesian
|
96 |
* Simplified Chinese
|
97 |
* Russian - Русский
|
98 |
* Turkish - Türkçe
|
149 |
|
150 |
== Changelog ==
|
151 |
|
152 |
+
= 1.3.37: February 17, 2016 =
|
153 |
+
|
154 |
+
* New: Add password confirmation validation
|
155 |
+
* New: Add VK url validation
|
156 |
+
* New: Add Vkontakte as predefined url field
|
157 |
+
* New: Add additional file types
|
158 |
+
* New: Add file size limit label in image field
|
159 |
+
* New: Added password reset limit
|
160 |
+
* New: Allow redirect_to param after registration
|
161 |
+
* New: Indonesian language support added
|
162 |
+
* New: Add bio characters limit
|
163 |
+
* Tweak: Use native WP masonry script instead of duplicating it
|
164 |
+
* Tweak: Add image upload notice
|
165 |
+
* Tweak: Add option to allow users to hide profiles from member page
|
166 |
+
* Tweak: Add filters to modify output field
|
167 |
+
* Tweak: Add filter hook for email template path
|
168 |
+
* Tweak: Tweak upload form styles
|
169 |
+
* Tweak: Remove masonry from core and gulp
|
170 |
+
* Tweak: Add admin assets and apply minification
|
171 |
+
* Tweak: Update pickadate assets
|
172 |
+
* Tweak: Allowing usertags in search filters
|
173 |
+
* Tweak: Allow members template to be customized/overridden
|
174 |
+
* Tweak: Option to login user after clicking the activation link
|
175 |
+
* Tweak: Remove bio count strings
|
176 |
+
* Fixed: bio limit javascript error
|
177 |
+
* Fixed: ssl checker for load balancers
|
178 |
+
* Fixed: redirect loop with wpml permalink
|
179 |
+
* Fixed: WPML permalink and form compatibility
|
180 |
+
* Fixed: blocked words
|
181 |
+
* Fixed: searching with space
|
182 |
+
* Fixed: change password
|
183 |
+
* Fixed: members grid override
|
184 |
+
* Fixed: tipsy.js error
|
185 |
+
* Fixed: Plugin conflict causing account page displaying wrong info
|
186 |
+
* Fixed: email locale tempalte path
|
187 |
+
* Fixed: invalid role
|
188 |
+
* Fixed: validation for change password
|
189 |
+
* Fixed: unchecked access roles
|
190 |
+
* Fixed: telno input styles
|
191 |
+
* Fixed: escape display name in title attributes
|
192 |
+
* Fixed: datepicker css issue with some themes
|
193 |
+
* Fixed: make sure the hash parameter is a string
|
194 |
+
* Fixed: loading core assets
|
195 |
+
* Fixed: title tags not updated
|
196 |
+
* Fixed: empty uneditable fields
|
197 |
+
* Fixed: account deletion on one submission
|
198 |
+
* Fixed: Fixed indentation
|
199 |
+
* Fixed: user_login fallbacks and remove email address
|
200 |
+
* Fixed: password changed email template
|
201 |
+
|
202 |
= 1.3.36: January 6, 2016 =
|
203 |
|
204 |
* New: added in-page content restriction to protect content for logged-in or logged out users
|
templates/members-grid.php
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="um-members">
|
2 |
+
|
3 |
+
<div class="um-gutter-sizer"></div>
|
4 |
+
|
5 |
+
<?php $i = 0; foreach( um_members('users_per_page') as $member) { $i++; um_fetch_user( $member ); ?>
|
6 |
+
|
7 |
+
<div class="um-member um-role-<?php echo um_user('role'); ?> <?php echo um_user('account_status'); ?> <?php if ($cover_photos) { echo 'with-cover'; } ?>">
|
8 |
+
|
9 |
+
<span class="um-member-status <?php echo um_user('account_status'); ?>"><?php echo um_user('account_status_name'); ?></span>
|
10 |
+
|
11 |
+
<?php
|
12 |
+
if ($cover_photos) {
|
13 |
+
$sizes = um_get_option('cover_thumb_sizes');
|
14 |
+
if ( $ultimatemember->mobile->isTablet() ) {
|
15 |
+
$cover_size = $sizes[1];
|
16 |
+
} else {
|
17 |
+
$cover_size = $sizes[0];
|
18 |
+
}
|
19 |
+
?>
|
20 |
+
|
21 |
+
<div class="um-member-cover" data-ratio="<?php echo um_get_option('profile_cover_ratio'); ?>">
|
22 |
+
<div class="um-member-cover-e"><a href="<?php echo um_user_profile_url(); ?>" title="<?php echo esc_attr(um_user('display_name')); ?>"><?php echo um_user('cover_photo', $cover_size); ?></a></div>
|
23 |
+
</div>
|
24 |
+
|
25 |
+
<?php } ?>
|
26 |
+
|
27 |
+
<?php if ($profile_photo) {
|
28 |
+
$default_size = str_replace( 'px', '', um_get_option('profile_photosize') );
|
29 |
+
$corner = um_get_option('profile_photocorner');
|
30 |
+
?>
|
31 |
+
<div class="um-member-photo radius-<?php echo $corner; ?>"><a href="<?php echo um_user_profile_url(); ?>" title="<?php echo esc_attr(um_user('display_name')); ?>"><?php echo get_avatar( um_user('ID'), $default_size ); ?></a></div>
|
32 |
+
<?php } ?>
|
33 |
+
|
34 |
+
<div class="um-member-card <?php if (!$profile_photo) { echo 'no-photo'; } ?>">
|
35 |
+
|
36 |
+
<?php if ( $show_name ) { ?>
|
37 |
+
<div class="um-member-name"><a href="<?php echo um_user_profile_url(); ?>" title="<?php echo esc_attr(um_user('display_name')); ?>"><?php echo um_user('display_name', 'html'); ?></a></div>
|
38 |
+
<?php } ?>
|
39 |
+
|
40 |
+
<?php do_action('um_members_just_after_name', um_user('ID'), $args); ?>
|
41 |
+
|
42 |
+
<?php do_action('um_members_after_user_name', um_user('ID'), $args); ?>
|
43 |
+
|
44 |
+
<?php
|
45 |
+
if ( $show_tagline && is_array( $tagline_fields ) ) {
|
46 |
+
foreach( $tagline_fields as $key ) {
|
47 |
+
if ( $key && um_filtered_value( $key ) ) {
|
48 |
+
$value = um_filtered_value( $key );
|
49 |
+
|
50 |
+
?>
|
51 |
+
|
52 |
+
<div class="um-member-tagline"><?php echo $value; ?></div>
|
53 |
+
|
54 |
+
<?php
|
55 |
+
}
|
56 |
+
}
|
57 |
+
}
|
58 |
+
?>
|
59 |
+
|
60 |
+
<?php if ( $show_userinfo ) { ?>
|
61 |
+
|
62 |
+
<div class="um-member-meta-main">
|
63 |
+
|
64 |
+
<?php if ( $userinfo_animate ) { ?>
|
65 |
+
<div class="um-member-more"><a href="#"><i class="um-faicon-angle-down"></i></a></div>
|
66 |
+
<?php } ?>
|
67 |
+
|
68 |
+
<div class="um-member-meta <?php if ( !$userinfo_animate ) { echo 'no-animate'; } ?>">
|
69 |
+
|
70 |
+
<?php foreach( $reveal_fields as $key ) {
|
71 |
+
if ( $key && um_filtered_value( $key ) ) {
|
72 |
+
$value = um_filtered_value( $key );
|
73 |
+
|
74 |
+
?>
|
75 |
+
|
76 |
+
<div class="um-member-metaline um-member-metaline-<?php echo $key; ?>"><span><strong><?php echo $ultimatemember->fields->get_label( $key ); ?>:</strong> <?php echo $value; ?></span></div>
|
77 |
+
|
78 |
+
<?php
|
79 |
+
}
|
80 |
+
}
|
81 |
+
?>
|
82 |
+
|
83 |
+
<?php if ( $show_social ) { ?>
|
84 |
+
<div class="um-member-connect">
|
85 |
+
|
86 |
+
<?php $ultimatemember->fields->show_social_urls(); ?>
|
87 |
+
|
88 |
+
</div>
|
89 |
+
<?php } ?>
|
90 |
+
|
91 |
+
</div>
|
92 |
+
|
93 |
+
<div class="um-member-less"><a href="#"><i class="um-faicon-angle-up"></i></a></div>
|
94 |
+
|
95 |
+
</div>
|
96 |
+
|
97 |
+
<?php } ?>
|
98 |
+
|
99 |
+
</div>
|
100 |
+
|
101 |
+
</div>
|
102 |
+
|
103 |
+
<?php
|
104 |
+
um_reset_user_clean();
|
105 |
+
} // end foreach
|
106 |
+
|
107 |
+
um_reset_user();
|
108 |
+
?>
|
109 |
+
|
110 |
+
<div class="um-clear"></div>
|
111 |
+
|
112 |
+
</div>
|
um-config.php
CHANGED
@@ -110,7 +110,9 @@ $this->sections[] = array(
|
|
110 |
'desc' => 'e.g. ' . trailingslashit( um_get_core_page('user') ) .'<strong>username</strong>/',
|
111 |
'options' => array(
|
112 |
'user_login' => __('Username','ultimatemember'),
|
113 |
-
'name' => __('First and Last Name','ultimatemember'),
|
|
|
|
|
114 |
'user_id' => __('User ID','ultimatemember'),
|
115 |
),
|
116 |
'placeholder' => __('Select...','ultimatemember')
|
@@ -272,6 +274,16 @@ $this->sections[] = array(
|
|
272 |
'off' => __('Off','ultimatemember'),
|
273 |
),
|
274 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
array(
|
276 |
'id' => 'account_require_strongpass',
|
277 |
'type' => 'switch',
|
@@ -1877,11 +1889,13 @@ $this->sections[] = array(
|
|
1877 |
),
|
1878 |
|
1879 |
array(
|
1880 |
-
'id' => '
|
1881 |
-
'type' => '
|
1882 |
-
'title' => __( '
|
1883 |
-
'default' =>
|
1884 |
-
'desc' => __('
|
|
|
|
|
1885 |
),
|
1886 |
|
1887 |
array(
|
110 |
'desc' => 'e.g. ' . trailingslashit( um_get_core_page('user') ) .'<strong>username</strong>/',
|
111 |
'options' => array(
|
112 |
'user_login' => __('Username','ultimatemember'),
|
113 |
+
'name' => __('First and Last Name with \'.\'','ultimatemember'),
|
114 |
+
'name_dash' => __('First and Last Name with \'-\'','ultimatemember'),
|
115 |
+
'name_plus' => __('First and Last Name with \'+\'','ultimatemember'),
|
116 |
'user_id' => __('User ID','ultimatemember'),
|
117 |
),
|
118 |
'placeholder' => __('Select...','ultimatemember')
|
274 |
'off' => __('Off','ultimatemember'),
|
275 |
),
|
276 |
|
277 |
+
array(
|
278 |
+
'id' => 'account_hide_in_directory',
|
279 |
+
'type' => 'switch',
|
280 |
+
'title' => __( 'Allow users to hide their profiles from directory','ultimatemember' ),
|
281 |
+
'default' => 1,
|
282 |
+
'desc' => __('Whether to allow users changing their profile visibility from member directory in account page.','ultimatemember'),
|
283 |
+
'on' => __('On','ultimatemember'),
|
284 |
+
'off' => __('Off','ultimatemember'),
|
285 |
+
),
|
286 |
+
|
287 |
array(
|
288 |
'id' => 'account_require_strongpass',
|
289 |
'type' => 'switch',
|
1889 |
),
|
1890 |
|
1891 |
array(
|
1892 |
+
'id' => 'um_port_forwarding_url',
|
1893 |
+
'type' => 'switch',
|
1894 |
+
'title' => __( 'Allow Port forwarding in URL','ultimatemember' ),
|
1895 |
+
'default' => 0,
|
1896 |
+
'desc' => __('Turn on If you want to include port number in URLs','ultimatemember'),
|
1897 |
+
'on' => __('On','ultimatemember'),
|
1898 |
+
'off' => __('Off','ultimatemember'),
|
1899 |
),
|
1900 |
|
1901 |
array(
|
um-init.php
CHANGED
@@ -3,32 +3,32 @@
|
|
3 |
class UM_API {
|
4 |
|
5 |
public $is_filtering;
|
6 |
-
|
7 |
public $addons = null;
|
8 |
-
|
9 |
function __construct() {
|
10 |
-
|
11 |
$this->is_filtering = 0;
|
12 |
|
13 |
require_once um_path . 'core/um-short-functions.php';
|
14 |
-
|
15 |
-
if (is_admin()){
|
16 |
require_once um_path . 'admin/um-admin-init.php';
|
17 |
}
|
18 |
|
19 |
-
add_action('init',
|
20 |
|
21 |
-
add_action('init',
|
22 |
|
23 |
$this->honeypot = 'request';
|
24 |
-
|
25 |
$this->available_languages = array(
|
26 |
'en_US' => 'English (US)',
|
27 |
'es_ES' => 'Español',
|
28 |
'es_MX' => 'Español (México)',
|
29 |
'fr_FR' => 'Français',
|
30 |
'it_IT' => 'Italiano',
|
31 |
-
'de_DE'
|
32 |
'nl_NL' => 'Nederlands',
|
33 |
'pt_BR' => 'Português do Brasil',
|
34 |
'fi_FI' => 'Suomi',
|
@@ -37,43 +37,44 @@ class UM_API {
|
|
37 |
'sv_SE' => 'Svenska',
|
38 |
'pl_PL' => 'Polski',
|
39 |
'cs_CZ' => 'Czech',
|
40 |
-
'el'
|
41 |
-
'
|
|
|
42 |
'ru_RU' => 'Русский',
|
43 |
'tr_TR' => 'Türkçe',
|
44 |
'fa_IR' => 'Farsi',
|
45 |
'he_IL' => 'Hebrew',
|
46 |
-
'ar'
|
47 |
);
|
48 |
-
|
49 |
$this->addons['bp_avatar_transfer'] = array(
|
50 |
-
|
51 |
-
|
52 |
);
|
53 |
-
|
54 |
}
|
55 |
-
|
56 |
/***
|
57 |
-
|
58 |
-
|
59 |
function load_addons() {
|
60 |
global $ultimatemember;
|
61 |
-
if (
|
62 |
-
foreach(
|
63 |
-
if (
|
64 |
-
include_once um_path . 'addons/'
|
65 |
}
|
66 |
}
|
67 |
}
|
68 |
}
|
69 |
-
|
70 |
/***
|
71 |
-
|
72 |
-
|
73 |
-
function init(){
|
74 |
|
75 |
ob_start();
|
76 |
-
|
77 |
require_once um_path . 'core/um-api.php';
|
78 |
require_once um_path . 'core/um-rewrite.php';
|
79 |
require_once um_path . 'core/um-setup.php';
|
@@ -107,11 +108,11 @@ class UM_API {
|
|
107 |
require_once um_path . 'core/um-modal.php';
|
108 |
require_once um_path . 'core/um-cron.php';
|
109 |
require_once um_path . 'core/um-tracking.php';
|
110 |
-
|
111 |
-
if (
|
112 |
require_once um_path . 'core/lib/mobiledetect/Mobile_Detect.php';
|
113 |
}
|
114 |
-
|
115 |
require_once um_path . 'core/um-actions-form.php';
|
116 |
require_once um_path . 'core/um-actions-access.php';
|
117 |
require_once um_path . 'core/um-actions-wpadmin.php';
|
@@ -142,7 +143,7 @@ class UM_API {
|
|
142 |
require_once um_path . 'core/um-filters-misc.php';
|
143 |
require_once um_path . 'core/um-filters-addons.php';
|
144 |
require_once um_path . 'core/um-filters-commenting.php';
|
145 |
-
|
146 |
/* initialize UM */
|
147 |
$this->api = new UM_REST_API();
|
148 |
$this->rewrite = new UM_Rewrite();
|
@@ -176,20 +177,21 @@ class UM_API {
|
|
176 |
$this->modal = new UM_Modal();
|
177 |
$this->cron = new UM_Cron();
|
178 |
$this->tracking = new UM_Tracking();
|
179 |
-
|
180 |
$this->mobile = new Mobile_Detect;
|
181 |
|
182 |
$this->options = get_option('um_options');
|
183 |
-
|
184 |
$domain = 'ultimatemember';
|
185 |
-
$locale = (
|
186 |
-
load_textdomain($domain, WP_LANG_DIR . '/plugins/'
|
187 |
-
|
188 |
-
if (
|
189 |
-
update_option('show_avatars', 1
|
|
|
190 |
|
191 |
}
|
192 |
-
|
193 |
}
|
194 |
|
195 |
$ultimatemember = new UM_API();
|
3 |
class UM_API {
|
4 |
|
5 |
public $is_filtering;
|
6 |
+
|
7 |
public $addons = null;
|
8 |
+
|
9 |
function __construct() {
|
10 |
+
|
11 |
$this->is_filtering = 0;
|
12 |
|
13 |
require_once um_path . 'core/um-short-functions.php';
|
14 |
+
|
15 |
+
if (is_admin()) {
|
16 |
require_once um_path . 'admin/um-admin-init.php';
|
17 |
}
|
18 |
|
19 |
+
add_action('init', array(&$this, 'init'), 0);
|
20 |
|
21 |
+
add_action('init', array(&$this, 'load_addons'));
|
22 |
|
23 |
$this->honeypot = 'request';
|
24 |
+
|
25 |
$this->available_languages = array(
|
26 |
'en_US' => 'English (US)',
|
27 |
'es_ES' => 'Español',
|
28 |
'es_MX' => 'Español (México)',
|
29 |
'fr_FR' => 'Français',
|
30 |
'it_IT' => 'Italiano',
|
31 |
+
'de_DE' => 'Deutsch',
|
32 |
'nl_NL' => 'Nederlands',
|
33 |
'pt_BR' => 'Português do Brasil',
|
34 |
'fi_FI' => 'Suomi',
|
37 |
'sv_SE' => 'Svenska',
|
38 |
'pl_PL' => 'Polski',
|
39 |
'cs_CZ' => 'Czech',
|
40 |
+
'el' => 'Greek',
|
41 |
+
'id_ID' => 'Indonesian',
|
42 |
+
'zh_CN' => '简体中文',
|
43 |
'ru_RU' => 'Русский',
|
44 |
'tr_TR' => 'Türkçe',
|
45 |
'fa_IR' => 'Farsi',
|
46 |
'he_IL' => 'Hebrew',
|
47 |
+
'ar' => 'العربية',
|
48 |
);
|
49 |
+
|
50 |
$this->addons['bp_avatar_transfer'] = array(
|
51 |
+
__('BuddyPress Avatar Transfer', 'ultimatemember'),
|
52 |
+
__('This add-on enables you to migrate your custom user photos from BuddyPress to use with Ultimate Member.', 'ultimatemember'),
|
53 |
);
|
54 |
+
|
55 |
}
|
56 |
+
|
57 |
/***
|
58 |
+
*** @Load add-ons
|
59 |
+
*/
|
60 |
function load_addons() {
|
61 |
global $ultimatemember;
|
62 |
+
if (isset($ultimatemember->addons) && is_array($ultimatemember->addons)) {
|
63 |
+
foreach ($ultimatemember->addons as $addon => $name) {
|
64 |
+
if (um_get_option('addon_' . $addon) == 1) {
|
65 |
+
include_once um_path . 'addons/' . $addon . '.php';
|
66 |
}
|
67 |
}
|
68 |
}
|
69 |
}
|
70 |
+
|
71 |
/***
|
72 |
+
*** @Init
|
73 |
+
*/
|
74 |
+
function init() {
|
75 |
|
76 |
ob_start();
|
77 |
+
|
78 |
require_once um_path . 'core/um-api.php';
|
79 |
require_once um_path . 'core/um-rewrite.php';
|
80 |
require_once um_path . 'core/um-setup.php';
|
108 |
require_once um_path . 'core/um-modal.php';
|
109 |
require_once um_path . 'core/um-cron.php';
|
110 |
require_once um_path . 'core/um-tracking.php';
|
111 |
+
|
112 |
+
if (!class_exists('Mobile_Detect')) {
|
113 |
require_once um_path . 'core/lib/mobiledetect/Mobile_Detect.php';
|
114 |
}
|
115 |
+
|
116 |
require_once um_path . 'core/um-actions-form.php';
|
117 |
require_once um_path . 'core/um-actions-access.php';
|
118 |
require_once um_path . 'core/um-actions-wpadmin.php';
|
143 |
require_once um_path . 'core/um-filters-misc.php';
|
144 |
require_once um_path . 'core/um-filters-addons.php';
|
145 |
require_once um_path . 'core/um-filters-commenting.php';
|
146 |
+
|
147 |
/* initialize UM */
|
148 |
$this->api = new UM_REST_API();
|
149 |
$this->rewrite = new UM_Rewrite();
|
177 |
$this->modal = new UM_Modal();
|
178 |
$this->cron = new UM_Cron();
|
179 |
$this->tracking = new UM_Tracking();
|
180 |
+
|
181 |
$this->mobile = new Mobile_Detect;
|
182 |
|
183 |
$this->options = get_option('um_options');
|
184 |
+
|
185 |
$domain = 'ultimatemember';
|
186 |
+
$locale = (get_locale() != '') ? get_locale() : 'en_US';
|
187 |
+
load_textdomain($domain, WP_LANG_DIR . '/plugins/' . $domain . '-' . $locale . '.mo');
|
188 |
+
|
189 |
+
if (!get_option('show_avatars')) {
|
190 |
+
update_option('show_avatars', 1);
|
191 |
+
}
|
192 |
|
193 |
}
|
194 |
+
|
195 |
}
|
196 |
|
197 |
$ultimatemember = new UM_API();
|