Version Description
Download this release
Release Info
Developer | nsinelnikov |
Plugin | Ultimate Member – User Profile & Membership Plugin |
Version | 2.0.30 |
Comparing to | |
See all releases |
Code changes from version 2.0.29 to 2.0.30
- assets/js/um-conditional.js +567 -568
- assets/js/um-conditional.min.js +1 -1
- assets/js/um-scripts.js +2 -2
- assets/js/um-scripts.min.js +1 -1
- assets/js/um-scrollto.js +0 -210
- assets/js/um-scrollto.min.js +0 -1
- assets/js/um-select.js +0 -22
- assets/js/um-select.min.js +0 -1
- includes/admin/assets/css/um-admin-columns.css +2 -0
- includes/admin/assets/js/um-admin-forms.js +18 -11
- includes/admin/class-admin.php +18 -8
- includes/admin/core/class-admin-ajax-hooks.php +33 -0
- includes/admin/core/class-admin-columns.php +32 -8
- includes/admin/core/class-admin-enqueue.php +0 -17
- includes/admin/core/class-admin-forms.php +1 -1
- includes/admin/core/class-admin-metabox.php +33 -2
- includes/admin/core/class-admin-notices.php +3 -3
- includes/admin/core/class-admin-settings.php +1 -1
- includes/admin/templates/directory/shortcode.php +21 -0
- includes/admin/templates/form/shortcode.php +21 -0
- includes/class-dependencies.php +1 -0
- includes/class-init.php +26 -0
- includes/core/class-ajax-common.php +1 -0
- includes/core/class-date-time.php +18 -20
- includes/core/class-enqueue.php +162 -239
- includes/core/class-external-integrations.php +2 -2
- includes/core/class-fields.php +38 -9
- includes/core/class-files.php +17 -2
- includes/core/class-gdpr.php +2 -3
- includes/core/class-permalinks.php +2 -2
- includes/core/class-roles-capabilities.php +5 -2
- includes/core/class-shortcodes.php +164 -5
- includes/core/class-templates.php +41 -0
- includes/core/class-uploader.php +85 -54
- includes/core/um-actions-profile.php +7 -9
- includes/core/um-filters-avatars.php +29 -2
- includes/core/um-filters-fields.php +2 -1
- includes/um-deprecated-functions.php +18 -0
- includes/um-short-functions.php +14 -31
- languages/ultimate-member-en_US.mo +0 -0
- languages/ultimate-member-en_US.po +237 -237
- readme.txt +17 -1
- templates/message.php +1 -1
- templates/profile.php +4 -1
- templates/searchform.php +5 -5
- ultimate-member.php +1 -1
assets/js/um-conditional.js
CHANGED
@@ -1,506 +1,571 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
-
|
4 |
-
var um_field_conditions = {}; // filtered
|
5 |
-
var um_field_default_values = {};
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Get field default value
|
9 |
-
* @param object $dom
|
10 |
-
* @return string
|
11 |
-
*/
|
12 |
-
function um_get_field_default_value( $dom ) {
|
13 |
-
var default_value = '';
|
14 |
-
var type = um_get_field_type($dom);
|
15 |
-
switch ( type ) {
|
16 |
-
|
17 |
-
case 'text':
|
18 |
-
case 'number':
|
19 |
-
case 'date':
|
20 |
-
case 'textarea':
|
21 |
-
case 'select':
|
22 |
-
default_value = $dom.find('input:text,input[type=number],textarea,select').val();
|
23 |
-
break;
|
24 |
-
|
25 |
-
case 'multiselect':
|
26 |
-
default_value = $dom.find('select').val();
|
27 |
-
break;
|
28 |
-
|
29 |
-
case 'radio':
|
30 |
-
if ($dom.find('input[type=radio]:checked').length >= 1) {
|
31 |
-
default_value = $dom.find('input[type=radio]:checked').val();
|
32 |
-
}
|
33 |
-
|
34 |
-
break;
|
35 |
-
case 'checkbox':
|
36 |
-
|
37 |
-
if ($dom.find('input[type=checkbox]:checked').length >= 1) {
|
38 |
-
|
39 |
-
if ($dom.find('input[type=checkbox]:checked').length > 1) {
|
40 |
-
$dom.find('input[type=checkbox]:checked').each(function () {
|
41 |
-
default_value = default_value + jQuery(this).val() + ' ';
|
42 |
-
});
|
43 |
-
} else {
|
44 |
-
default_value = $dom.find('input[type=checkbox]:checked').val();
|
45 |
-
}
|
46 |
-
|
47 |
-
}
|
48 |
-
break;
|
49 |
-
}
|
50 |
-
|
51 |
-
return {type: type, value: default_value};
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Get field element by field wrapper
|
56 |
-
* @param object $dom
|
57 |
-
* @return object
|
58 |
-
*/
|
59 |
-
function um_get_field_element( $dom ) {
|
60 |
-
var default_value = '';
|
61 |
-
var type = um_get_field_type($dom);
|
62 |
-
|
63 |
-
switch ( type ) {
|
64 |
-
|
65 |
-
case 'text':
|
66 |
-
case 'number':
|
67 |
-
case 'date':
|
68 |
-
case 'textarea':
|
69 |
-
case 'select':
|
70 |
-
case 'multiselect':
|
71 |
-
case 'radio':
|
72 |
-
case 'checkbox':
|
73 |
-
return $dom.find('input,textarea,select');
|
74 |
-
break;
|
75 |
-
|
76 |
-
|
77 |
-
}
|
78 |
-
|
79 |
-
return '';
|
80 |
-
}
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Get field type
|
84 |
-
* @param object $dom
|
85 |
-
* @return string
|
86 |
-
*/
|
87 |
-
function um_get_field_type($dom) {
|
88 |
-
var type = '';
|
89 |
-
var classes = $dom.attr( 'class' );
|
90 |
-
jQuery.each( classes.split(' '), function (i, d) {
|
91 |
-
if (d.indexOf('um-field-type') != -1) {
|
92 |
-
type = d.split('_')[1];
|
93 |
-
}
|
94 |
-
});
|
95 |
-
|
96 |
-
return type;
|
97 |
-
|
98 |
-
}
|
99 |
-
|
100 |
-
/**
|
101 |
-
* Get field siblings/chidren conditions
|
102 |
-
* @param string field_key
|
103 |
-
* @return array
|
104 |
-
*/
|
105 |
-
function um_get_field_children(field_key) {
|
106 |
-
var arr_conditions = [];
|
107 |
-
jQuery.each(arr_all_conditions, function (ii, condition) {
|
108 |
-
if (condition.field.parent == field_key) {
|
109 |
-
arr_conditions.push(condition.field.condition);
|
110 |
-
}
|
111 |
-
});
|
112 |
-
|
113 |
-
return arr_conditions;
|
114 |
-
|
115 |
-
}
|
116 |
-
|
117 |
-
/**
|
118 |
-
* Split single array to multi-dimensional array
|
119 |
-
* @param array arr
|
120 |
-
* @param integer n
|
121 |
-
* @return array
|
122 |
-
*/
|
123 |
-
function um_splitup_array(arr, n) {
|
124 |
-
var rest = arr.length % n,
|
125 |
-
restUsed = rest,
|
126 |
-
partLength = Math.floor(arr.length / n),
|
127 |
-
result = [];
|
128 |
-
|
129 |
-
for (var i = 0; i < arr.length; i += partLength) {
|
130 |
-
var end = partLength + i,
|
131 |
-
add = false;
|
132 |
-
|
133 |
-
if (rest !== 0 && restUsed) {
|
134 |
-
end++;
|
135 |
-
restUsed--;
|
136 |
-
add = true;
|
137 |
-
}
|
138 |
-
|
139 |
-
result.push(arr.slice(i, end));
|
140 |
-
|
141 |
-
if (add) {
|
142 |
-
i++;
|
143 |
-
}
|
144 |
-
}
|
145 |
-
|
146 |
-
var obj_result = [];
|
147 |
-
jQuery.each(result, function (ii, dd) {
|
148 |
-
obj_result.push({
|
149 |
-
action: dd[0],
|
150 |
-
if_field: dd[1],
|
151 |
-
operator: dd[2],
|
152 |
-
value: dd[3]
|
153 |
-
})
|
154 |
-
});
|
155 |
-
|
156 |
-
return obj_result;
|
157 |
-
}
|
158 |
-
|
159 |
-
/**
|
160 |
-
* Get field live value
|
161 |
-
* @param object $dom
|
162 |
-
* @return mixed
|
163 |
-
*/
|
164 |
-
function um_get_field_data($dom) {
|
165 |
-
um_live_field = $dom.parents('.um-field').data('key');
|
166 |
-
um_live_value = $dom.val();
|
167 |
-
|
168 |
-
if ($dom.is(':checkbox')) {
|
169 |
-
|
170 |
-
um_live_value = '';
|
171 |
-
|
172 |
-
if ($dom.parents('.um-field').find('input:checked').length > 1) {
|
173 |
-
$dom.parents('.um-field').find('input:checked').each(function () {
|
174 |
-
um_live_value = um_live_value + jQuery(this).val() + ' ';
|
175 |
-
});
|
176 |
-
} else {
|
177 |
-
if ($dom.parents('.um-field').find('input:checked').length >= 1) {
|
178 |
-
um_live_value = $dom.parents('.um-field').find('input:checked').val();
|
179 |
-
}
|
180 |
-
}
|
181 |
-
|
182 |
-
}
|
183 |
-
|
184 |
-
if ($dom.is(':radio')) {
|
185 |
-
um_live_value = $dom.parents('.um-field').find('input[type=radio]:checked').val();
|
186 |
-
}
|
187 |
-
|
188 |
-
return um_live_value;
|
189 |
-
|
190 |
-
}
|
191 |
-
|
192 |
-
function um_in_array(needle, haystack, strict){
|
193 |
-
var found = false, key, strict = !!strict;
|
194 |
-
for (key in haystack) {
|
195 |
-
if ((strict && haystack[key] === needle) || (!strict && haystack[key] == needle)) {
|
196 |
-
found = true;
|
197 |
-
break;
|
198 |
-
}
|
199 |
-
}
|
200 |
-
|
201 |
-
return found;
|
202 |
-
}
|
203 |
-
|
204 |
-
/**
|
205 |
-
* Apply field conditions
|
206 |
-
* @param object $dom
|
207 |
-
* @param boolean is_single_update
|
208 |
-
*/
|
209 |
-
function um_apply_conditions($dom, is_single_update) {
|
210 |
-
var operators = ['empty', 'not empty', 'equals to', 'not equals', 'greater than', 'less than', 'contains'];
|
211 |
-
var key = $dom.parents('.um-field[data-key]').data('key');
|
212 |
-
var conditions = um_field_conditions[key];
|
213 |
-
|
214 |
-
var live_field_value = um_get_field_data($dom);
|
215 |
-
|
216 |
-
var $owners = {};
|
217 |
-
var $owners_values = {};
|
218 |
-
var $owner_conditions = {};
|
219 |
-
|
220 |
-
jQuery.each(conditions, function (index, condition) {
|
221 |
-
if (typeof $owners_values[condition.owner] == 'undefined') {
|
222 |
-
$owners_values[condition.owner] = [];
|
223 |
-
$owner_conditions[condition.owner] = {}
|
224 |
-
}
|
225 |
-
$owners_values[condition.owner].push(condition.value);
|
226 |
-
$owner_conditions[condition.owner] = condition;
|
227 |
-
});
|
228 |
-
|
229 |
-
jQuery.each(conditions, function (index, condition) {
|
230 |
-
if (typeof $owners[condition.owner] == 'undefined') {
|
231 |
-
$owners[condition.owner] = {};
|
232 |
-
}
|
233 |
-
if (condition.operator == 'empty') {
|
234 |
-
if (!live_field_value || live_field_value == '' && um_in_array(live_field_value, $owners_values[condition.owner])) {
|
235 |
-
$owners[condition.owner][index] = true;
|
236 |
-
} else {
|
237 |
-
$owners[condition.owner][index] = false;
|
238 |
-
}
|
239 |
-
}
|
240 |
-
|
241 |
-
if (condition.operator == 'not empty') {
|
242 |
-
if (live_field_value && live_field_value != '' && !um_in_array(live_field_value, $owners_values[condition.owner])) {
|
243 |
-
$owners[condition.owner][index] = true;
|
244 |
-
} else {
|
245 |
-
$owners[condition.owner][index] = false;
|
246 |
-
}
|
247 |
-
}
|
248 |
-
|
249 |
-
if (condition.operator == 'equals to') {
|
250 |
-
if (condition.value == live_field_value && um_in_array(live_field_value, $owners_values[condition.owner])) {
|
251 |
-
$owners[condition.owner][index] = true;
|
252 |
-
} else {
|
253 |
-
$owners[condition.owner][index] = false;
|
254 |
-
}
|
255 |
-
}
|
256 |
-
|
257 |
-
if (condition.operator == 'not equals') {
|
258 |
-
if (jQuery.isNumeric(condition.value) && parseInt(live_field_value) != parseInt(condition.value) && live_field_value && !um_in_array(live_field_value, $owners_values[condition.owner])) {
|
259 |
-
$owners[condition.owner][index] = true;
|
260 |
-
} else if (condition.value != live_field_value && !um_in_array(live_field_value, $owners_values[condition.owner])) {
|
261 |
-
$owners[condition.owner][index] = true;
|
262 |
-
} else {
|
263 |
-
$owners[condition.owner][index] = false;
|
264 |
-
}
|
265 |
-
}
|
266 |
-
|
267 |
-
if (condition.operator == 'greater than') {
|
268 |
-
if (jQuery.isNumeric(condition.value) && parseInt(live_field_value) > parseInt(condition.value)) {
|
269 |
-
$owners[condition.owner][index] = true;
|
270 |
-
} else {
|
271 |
-
$owners[condition.owner][index] = false;
|
272 |
-
}
|
273 |
-
}
|
274 |
-
|
275 |
-
if (condition.operator == 'less than') {
|
276 |
-
if (jQuery.isNumeric(condition.value) && parseInt(live_field_value) < parseInt(condition.value)) {
|
277 |
-
$owners[condition.owner][index] = true;
|
278 |
-
} else {
|
279 |
-
$owners[condition.owner][index] = false;
|
280 |
-
}
|
281 |
-
}
|
282 |
-
|
283 |
-
if ( condition.operator == 'contains' ) {
|
284 |
-
if ( 'multiselect' == um_get_field_type( $dom.parents('.um-field[data-key]') ) ) {
|
285 |
-
if ( live_field_value && live_field_value.indexOf( condition.value ) >= 0 && um_in_array( condition.value, live_field_value ) ) {
|
286 |
-
$owners[condition.owner][index] = true;
|
287 |
-
} else {
|
288 |
-
$owners[condition.owner][index] = false;
|
289 |
-
}
|
290 |
-
} else if ( 'checkbox' == um_get_field_type( $dom.parents('.um-field[data-key]') ) ) {
|
291 |
-
if ( live_field_value && live_field_value.indexOf( condition.value ) >= 0 ) {
|
292 |
-
$owners[condition.owner][index] = true;
|
293 |
-
} else {
|
294 |
-
$owners[condition.owner][index] = false;
|
295 |
-
}
|
296 |
-
} else {
|
297 |
-
if ( live_field_value && live_field_value.indexOf( condition.value ) >= 0 && um_in_array( live_field_value, $owners_values[ condition.owner ] ) ) {
|
298 |
-
$owners[condition.owner][index] = true;
|
299 |
-
} else {
|
300 |
-
$owners[condition.owner][index] = false;
|
301 |
-
}
|
302 |
-
}
|
303 |
-
}
|
304 |
-
|
305 |
-
}); // end foreach `conditions`
|
306 |
-
jQuery.each($owners, function (index, field) {
|
307 |
-
if (um_in_array(true, field)) {
|
308 |
-
um_field_apply_action($dom, $owner_conditions[index], true);
|
309 |
-
} else {
|
310 |
-
um_field_apply_action($dom, $owner_conditions[index], false);
|
311 |
-
}
|
312 |
-
});
|
313 |
-
$dom.trigger('um_fields_change');
|
314 |
-
|
315 |
-
}
|
316 |
-
|
317 |
-
/**
|
318 |
-
* Apply condition's action
|
319 |
-
* @param object $dom
|
320 |
-
* @param string condition
|
321 |
-
* @param boolean is_true
|
322 |
-
*/
|
323 |
-
function um_field_apply_action($dom, condition, is_true) {
|
324 |
-
var child_dom = jQuery('div.um-field[data-key="' + condition.owner + '"]');
|
325 |
-
|
326 |
-
if (condition.action == 'show' && is_true /*&& child_dom.is(':hidden')*/) {
|
327 |
-
child_dom.show();
|
328 |
-
_show_in_ie( child_dom );
|
329 |
-
um_field_restore_default_value(child_dom);
|
330 |
-
}
|
331 |
-
|
332 |
-
if (condition.action == 'show' && !is_true /*&& child_dom.is(':visible') */) {
|
333 |
-
child_dom.hide();
|
334 |
-
_hide_in_ie( child_dom );
|
335 |
-
}
|
336 |
-
|
337 |
-
if (condition.action == 'hide' && is_true /*&& child_dom.is(':visible')*/) {
|
338 |
-
child_dom.hide();
|
339 |
-
_hide_in_ie( child_dom );
|
340 |
-
}
|
341 |
-
|
342 |
-
if (condition.action == 'hide' && !is_true /*&& child_dom.is(':hidden')*/) {
|
343 |
-
child_dom.show();
|
344 |
-
_show_in_ie( child_dom );
|
345 |
-
um_field_restore_default_value( child_dom );
|
346 |
-
|
347 |
-
}
|
348 |
-
$dom.removeClass('um-field-has-changed');
|
349 |
-
}
|
350 |
-
|
351 |
-
/**
|
352 |
-
* Restores default field value
|
353 |
-
* @param object $dom
|
354 |
-
*/
|
355 |
-
function um_field_restore_default_value( $dom ) {
|
356 |
-
//um_field_default_values
|
357 |
-
|
358 |
-
var type = um_get_field_type( $dom );
|
359 |
-
var key = $dom.data('key');
|
360 |
-
var field = um_field_default_values[key];
|
361 |
-
switch ( type ) {
|
362 |
-
|
363 |
-
case 'text':
|
364 |
-
case 'number':
|
365 |
-
case 'date':
|
366 |
-
case 'textarea':
|
367 |
-
$dom.find('input:text,input[type=number],textareas').val(field.value);
|
368 |
-
break;
|
369 |
-
|
370 |
-
case 'select':
|
371 |
-
$dom.find('select').find('option').prop('selected', false);
|
372 |
-
$dom.find('select').val(field.value);
|
373 |
-
$dom.find('select').trigger('change');
|
374 |
-
break;
|
375 |
-
|
376 |
-
case 'multiselect':
|
377 |
-
$dom.find('select').find('option').prop('selected', false);
|
378 |
-
jQuery.each(field.value, function (i, value) {
|
379 |
-
$dom.find('select').find('option[value="' + value + '"]').attr('selected', true);
|
380 |
-
});
|
381 |
-
$dom.find('select').trigger('change');
|
382 |
-
break;
|
383 |
-
|
384 |
-
case 'checkbox':
|
385 |
-
|
386 |
-
if ( $dom.find('input[type=checkbox]:checked').length >= 1 ) {
|
387 |
-
|
388 |
-
$dom.find('input[type=checkbox]:checked').removeAttr('checked');
|
389 |
-
$dom.find('span.um-field-checkbox-state i').removeClass('um-icon-android-checkbox-outline');
|
390 |
-
$dom.find('span.um-field-checkbox-state i').addClass('um-icon-android-checkbox-outline-blank');
|
391 |
-
$dom.find('.um-field-checkbox.active').removeClass('active');
|
392 |
-
|
393 |
-
if (jQuery.isArray(field.value)) {
|
394 |
-
jQuery.each(field.value, function (i, value) {
|
395 |
-
var cbox_elem = $dom.find('input[type=checkbox][value="' + value + '"]');
|
396 |
-
cbox_elem.attr('checked', true);
|
397 |
-
cbox_elem.closest('.um-field-checkbox').find('i').removeClass('um-icon-android-checkbox-outline-blank');
|
398 |
-
cbox_elem.closest('.um-field-checkbox').find('i').addClass('um-icon-android-checkbox-outline');
|
399 |
-
cbox_elem.closest('.um-field-checkbox').addClass('active');
|
400 |
-
});
|
401 |
-
} else {
|
402 |
-
var cbox_elem = $dom.find('input[type=checkbox][value="' + field.value + '"]');
|
403 |
-
cbox_elem.attr('checked', true);
|
404 |
-
cbox_elem.closest('.um-field-checkbox').find('i').removeClass('um-icon-android-checkbox-outline-blank');
|
405 |
-
cbox_elem.closest('.um-field-checkbox').find('i').addClass('um-icon-android-checkbox-outline');
|
406 |
-
cbox_elem.closest('.um-field-checkbox').addClass('active');
|
407 |
-
}
|
408 |
-
|
409 |
-
}
|
410 |
-
|
411 |
-
break;
|
412 |
-
case 'radio':
|
413 |
-
|
414 |
-
if ( $dom.find('input[type=radio]:checked').length >= 1 ) {
|
415 |
-
|
416 |
-
setTimeout(function () {
|
417 |
-
|
418 |
-
$dom.find('input[type=radio]:checked').removeAttr('checked');
|
419 |
-
|
420 |
-
$dom.find('span.um-field-radio-state i').removeClass('um-icon-android-radio-button-on');
|
421 |
-
$dom.find('span.um-field-radio-state i').addClass('um-icon-android-radio-button-off');
|
422 |
-
$dom.find('.um-field-radio.active').removeClass('active');
|
423 |
-
|
424 |
-
var radio_elem = $dom.find("input[type=radio][value='" + field.value + "']");
|
425 |
-
radio_elem.attr('checked', true);
|
426 |
-
radio_elem.closest('.um-field-radio').find('i').removeClass('um-icon-android-radio-button-off');
|
427 |
-
radio_elem.closest('.um-field-radio').find('i').addClass('um-icon-android-radio-button-on');
|
428 |
-
radio_elem.closest('.um-field-radio').addClass('active');
|
429 |
-
|
430 |
-
}, 100);
|
431 |
-
}
|
432 |
-
|
433 |
-
break;
|
434 |
-
|
435 |
-
|
436 |
-
} // end switch type
|
437 |
-
|
438 |
-
|
439 |
-
if ( ! $dom.hasClass( 'um-field-has-changed' ) ) {
|
440 |
-
var me = um_get_field_element( $dom );
|
441 |
-
|
442 |
-
if ( type == 'radio' || type == 'checkbox' ) {
|
443 |
-
me = me.find( ':checked' );
|
444 |
-
}
|
445 |
-
|
446 |
-
if ( me ) {
|
447 |
-
me.trigger( 'change' );
|
448 |
-
$dom.addClass( 'um-field-has-changed' );
|
449 |
-
}
|
450 |
-
|
451 |
-
/*
|
452 |
-
maybe future fix
|
453 |
-
if ( me ) {
|
454 |
-
if ( type == 'radio' || type == 'checkbox' ) {
|
455 |
-
me.each( function() {
|
456 |
-
if ( jQuery(this).is(':checked') ) {
|
457 |
-
jQuery(this).trigger('change');
|
458 |
-
}
|
459 |
-
});
|
460 |
-
} else {
|
461 |
-
me.trigger( 'change' );
|
462 |
-
}
|
463 |
-
|
464 |
-
$dom.addClass( 'um-field-has-changed' );
|
465 |
-
}*/
|
466 |
-
}
|
467 |
-
}
|
468 |
-
|
469 |
-
/**
|
470 |
-
* Hides sibling/child field when parent field is hidden
|
471 |
-
*/
|
472 |
-
function um_field_hide_siblings() {
|
473 |
-
|
474 |
-
jQuery.each(um_field_conditions, function (index, conditions) {
|
475 |
-
if (jQuery('.um-field[data-key="' + index + '"]:hidden').length >= 1 || jQuery('.um-field[data-key="' + index + '"]').css('display') == 'none') {
|
476 |
-
jQuery.each(conditions, function (key, condition) {
|
477 |
-
jQuery('.um-field[data-key="' + condition.owner + '"]').hide();
|
478 |
-
});
|
479 |
-
}
|
480 |
-
|
481 |
-
});
|
482 |
-
|
483 |
-
}
|
484 |
-
|
485 |
-
/**
|
486 |
-
* Hides div for IE browser
|
487 |
-
* @param object $dom
|
488 |
-
*/
|
489 |
-
function _hide_in_ie( $dom ){
|
490 |
-
if ( typeof( jQuery.browser ) != 'undefined' && jQuery.browser.msie ) {
|
491 |
-
$dom.css({"visibility":"hidden"});
|
492 |
-
}
|
493 |
-
}
|
494 |
-
|
495 |
-
/**
|
496 |
-
* Shows div for IE browser
|
497 |
-
* @param object $dom
|
498 |
-
*/
|
499 |
-
function _show_in_ie( $dom ){
|
500 |
-
if ( typeof( jQuery.browser ) != 'undefined' && jQuery.browser.msie ) {
|
501 |
-
$dom.css({"visibility":"visible"});
|
502 |
-
}
|
503 |
-
}
|
504 |
|
505 |
jQuery(document).on('change', '.um-field select, .um-field input[type="radio"], .um-field input[type="checkbox"]', function () {
|
506 |
var me = jQuery(this);
|
@@ -527,71 +592,5 @@ jQuery(document).ready( function (){
|
|
527 |
um_field_hide_siblings(); // dupes, issue with false field wrapper's visiblity validations. requires optimization.
|
528 |
});
|
529 |
|
530 |
-
|
531 |
-
/**
|
532 |
-
* UM Conditional fields Init
|
533 |
-
*/
|
534 |
-
function um_init_field_conditions() {
|
535 |
-
var arr_field_keys = [];
|
536 |
-
|
537 |
-
jQuery( '.um-field[data-key]' ).each( function() {
|
538 |
-
|
539 |
-
var key = jQuery(this).data( 'key' );
|
540 |
-
|
541 |
-
arr_field_keys.push( key );
|
542 |
-
|
543 |
-
var parse_attrs = {};
|
544 |
-
jQuery.each( jQuery(this)[0].attributes, function ( index, attribute ) {
|
545 |
-
if ( attribute.name.indexOf( 'data-cond' ) != -1 ) {
|
546 |
-
// replace "data-cond-"
|
547 |
-
var cond_field_id_and_attr = attribute.name.slice( 10 );
|
548 |
-
// return "n"
|
549 |
-
var cond_field_id = cond_field_id_and_attr.substring( 1, 0 );
|
550 |
-
//replace "n-"
|
551 |
-
var cond_field_attr = cond_field_id_and_attr.slice( 2 );
|
552 |
-
|
553 |
-
if ( typeof parse_attrs[cond_field_id] == 'undefined' )
|
554 |
-
parse_attrs[cond_field_id] = {};
|
555 |
-
|
556 |
-
parse_attrs[cond_field_id][cond_field_attr] = attribute.value;
|
557 |
-
}
|
558 |
-
});
|
559 |
-
|
560 |
-
jQuery.each( parse_attrs, function ( ii, dd ) {
|
561 |
-
var obj = {'field' :{
|
562 |
-
owner: key,
|
563 |
-
action: dd.action,
|
564 |
-
parent: dd.field,
|
565 |
-
operator: dd.operator,
|
566 |
-
value: dd.value,
|
567 |
-
condition: {
|
568 |
-
owner: key,
|
569 |
-
action: dd.action,
|
570 |
-
operator: dd.operator,
|
571 |
-
value: dd.value
|
572 |
-
}
|
573 |
-
}};
|
574 |
-
|
575 |
-
arr_all_conditions.push(obj);
|
576 |
-
});
|
577 |
-
|
578 |
-
um_field_default_values[jQuery(this).data('key')] = um_get_field_default_value( jQuery(this) );
|
579 |
-
});
|
580 |
-
|
581 |
-
jQuery.each( arr_field_keys, function ( i, field_key ) {
|
582 |
-
um_field_conditions[field_key] = um_get_field_children( field_key );
|
583 |
-
});
|
584 |
-
|
585 |
-
jQuery( '.um-field[data-key]:visible' ).each( function() {
|
586 |
-
var $wrap_dom = jQuery(this);
|
587 |
-
var me = um_get_field_element( $wrap_dom );
|
588 |
-
if ( typeof me.trigger !== 'undefined' ) {
|
589 |
-
me.trigger( 'change' );
|
590 |
-
}
|
591 |
-
});
|
592 |
-
|
593 |
-
}
|
594 |
-
|
595 |
-
|
596 |
um_init_field_conditions();
|
597 |
});
|
1 |
+
var arr_all_conditions = []; //raw
|
2 |
+
var um_field_conditions = {}; // filtered
|
3 |
+
var um_field_default_values = {};
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Get field default value
|
7 |
+
* @param object $dom
|
8 |
+
* @return string
|
9 |
+
*/
|
10 |
+
function um_get_field_default_value( $dom ) {
|
11 |
+
var default_value = '';
|
12 |
+
var type = um_get_field_type($dom);
|
13 |
+
switch ( type ) {
|
14 |
+
|
15 |
+
case 'text':
|
16 |
+
case 'number':
|
17 |
+
case 'date':
|
18 |
+
case 'textarea':
|
19 |
+
case 'select':
|
20 |
+
default_value = $dom.find('input:text,input[type=number],textarea,select').val();
|
21 |
+
break;
|
22 |
+
|
23 |
+
case 'multiselect':
|
24 |
+
default_value = $dom.find('select').val();
|
25 |
+
break;
|
26 |
+
|
27 |
+
case 'radio':
|
28 |
+
if ($dom.find('input[type=radio]:checked').length >= 1) {
|
29 |
+
default_value = $dom.find('input[type=radio]:checked').val();
|
30 |
+
}
|
31 |
+
|
32 |
+
break;
|
33 |
+
case 'checkbox':
|
34 |
+
|
35 |
+
if ($dom.find('input[type=checkbox]:checked').length >= 1) {
|
36 |
+
|
37 |
+
if ($dom.find('input[type=checkbox]:checked').length > 1) {
|
38 |
+
$dom.find('input[type=checkbox]:checked').each(function () {
|
39 |
+
default_value = default_value + jQuery(this).val() + ' ';
|
40 |
+
});
|
41 |
+
} else {
|
42 |
+
default_value = $dom.find('input[type=checkbox]:checked').val();
|
43 |
+
}
|
44 |
+
|
45 |
+
}
|
46 |
+
break;
|
47 |
+
}
|
48 |
+
|
49 |
+
return {type: type, value: default_value};
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Get field element by field wrapper
|
54 |
+
* @param object $dom
|
55 |
+
* @return object
|
56 |
+
*/
|
57 |
+
function um_get_field_element( $dom ) {
|
58 |
+
var default_value = '';
|
59 |
+
var type = um_get_field_type($dom);
|
60 |
+
|
61 |
+
switch ( type ) {
|
62 |
+
|
63 |
+
case 'text':
|
64 |
+
case 'number':
|
65 |
+
case 'date':
|
66 |
+
case 'textarea':
|
67 |
+
case 'select':
|
68 |
+
case 'multiselect':
|
69 |
+
case 'radio':
|
70 |
+
case 'checkbox':
|
71 |
+
return $dom.find('input,textarea,select');
|
72 |
+
break;
|
73 |
+
|
74 |
+
|
75 |
+
}
|
76 |
+
|
77 |
+
return '';
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Get field type
|
82 |
+
* @param object $dom
|
83 |
+
* @return string
|
84 |
+
*/
|
85 |
+
function um_get_field_type($dom) {
|
86 |
+
var type = '';
|
87 |
+
var classes = $dom.attr( 'class' );
|
88 |
+
jQuery.each( classes.split(' '), function (i, d) {
|
89 |
+
if (d.indexOf('um-field-type') != -1) {
|
90 |
+
type = d.split('_')[1];
|
91 |
+
}
|
92 |
+
});
|
93 |
+
|
94 |
+
return type;
|
95 |
+
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Get field siblings/chidren conditions
|
100 |
+
* @param string field_key
|
101 |
+
* @return array
|
102 |
+
*/
|
103 |
+
function um_get_field_children(field_key) {
|
104 |
+
var arr_conditions = [];
|
105 |
+
jQuery.each(arr_all_conditions, function (ii, condition) {
|
106 |
+
if (condition.field.parent == field_key) {
|
107 |
+
arr_conditions.push(condition.field.condition);
|
108 |
+
}
|
109 |
+
});
|
110 |
+
|
111 |
+
return arr_conditions;
|
112 |
+
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Split single array to multi-dimensional array
|
117 |
+
* @param array arr
|
118 |
+
* @param integer n
|
119 |
+
* @return array
|
120 |
+
*/
|
121 |
+
function um_splitup_array(arr, n) {
|
122 |
+
var rest = arr.length % n,
|
123 |
+
restUsed = rest,
|
124 |
+
partLength = Math.floor(arr.length / n),
|
125 |
+
result = [];
|
126 |
+
|
127 |
+
for (var i = 0; i < arr.length; i += partLength) {
|
128 |
+
var end = partLength + i,
|
129 |
+
add = false;
|
130 |
+
|
131 |
+
if (rest !== 0 && restUsed) {
|
132 |
+
end++;
|
133 |
+
restUsed--;
|
134 |
+
add = true;
|
135 |
+
}
|
136 |
+
|
137 |
+
result.push(arr.slice(i, end));
|
138 |
+
|
139 |
+
if (add) {
|
140 |
+
i++;
|
141 |
+
}
|
142 |
+
}
|
143 |
+
|
144 |
+
var obj_result = [];
|
145 |
+
jQuery.each(result, function (ii, dd) {
|
146 |
+
obj_result.push({
|
147 |
+
action: dd[0],
|
148 |
+
if_field: dd[1],
|
149 |
+
operator: dd[2],
|
150 |
+
value: dd[3]
|
151 |
+
})
|
152 |
+
});
|
153 |
+
|
154 |
+
return obj_result;
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Get field live value
|
159 |
+
* @param object $dom
|
160 |
+
* @return mixed
|
161 |
+
*/
|
162 |
+
function um_get_field_data($dom) {
|
163 |
+
um_live_field = $dom.parents('.um-field').data('key');
|
164 |
+
um_live_value = $dom.val();
|
165 |
+
|
166 |
+
if ($dom.is(':checkbox')) {
|
167 |
+
|
168 |
+
um_live_value = '';
|
169 |
+
|
170 |
+
if ($dom.parents('.um-field').find('input:checked').length > 1) {
|
171 |
+
$dom.parents('.um-field').find('input:checked').each(function () {
|
172 |
+
um_live_value = um_live_value + jQuery(this).val() + ' ';
|
173 |
+
});
|
174 |
+
} else {
|
175 |
+
if ($dom.parents('.um-field').find('input:checked').length >= 1) {
|
176 |
+
um_live_value = $dom.parents('.um-field').find('input:checked').val();
|
177 |
+
}
|
178 |
+
}
|
179 |
+
|
180 |
+
}
|
181 |
+
|
182 |
+
if ($dom.is(':radio')) {
|
183 |
+
um_live_value = $dom.parents('.um-field').find('input[type=radio]:checked').val();
|
184 |
+
}
|
185 |
+
|
186 |
+
return um_live_value;
|
187 |
+
|
188 |
+
}
|
189 |
+
|
190 |
+
function um_in_array(needle, haystack, strict){
|
191 |
+
var found = false, key, strict = !!strict;
|
192 |
+
for (key in haystack) {
|
193 |
+
if ((strict && haystack[key] === needle) || (!strict && haystack[key] == needle)) {
|
194 |
+
found = true;
|
195 |
+
break;
|
196 |
+
}
|
197 |
+
}
|
198 |
+
|
199 |
+
return found;
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Apply field conditions
|
204 |
+
* @param object $dom
|
205 |
+
* @param boolean is_single_update
|
206 |
+
*/
|
207 |
+
function um_apply_conditions($dom, is_single_update) {
|
208 |
+
var operators = ['empty', 'not empty', 'equals to', 'not equals', 'greater than', 'less than', 'contains'];
|
209 |
+
var key = $dom.parents('.um-field[data-key]').data('key');
|
210 |
+
var conditions = um_field_conditions[key];
|
211 |
+
|
212 |
+
var live_field_value = um_get_field_data($dom);
|
213 |
+
|
214 |
+
var $owners = {};
|
215 |
+
var $owners_values = {};
|
216 |
+
var $owner_conditions = {};
|
217 |
+
|
218 |
+
jQuery.each(conditions, function (index, condition) {
|
219 |
+
if (typeof $owners_values[condition.owner] == 'undefined') {
|
220 |
+
$owners_values[condition.owner] = [];
|
221 |
+
$owner_conditions[condition.owner] = {}
|
222 |
+
}
|
223 |
+
$owners_values[condition.owner].push(condition.value);
|
224 |
+
$owner_conditions[condition.owner] = condition;
|
225 |
+
});
|
226 |
+
|
227 |
+
jQuery.each(conditions, function (index, condition) {
|
228 |
+
if (typeof $owners[condition.owner] == 'undefined') {
|
229 |
+
$owners[condition.owner] = {};
|
230 |
+
}
|
231 |
+
if (condition.operator == 'empty') {
|
232 |
+
if (!live_field_value || live_field_value == '' && um_in_array(live_field_value, $owners_values[condition.owner])) {
|
233 |
+
$owners[condition.owner][index] = true;
|
234 |
+
} else {
|
235 |
+
$owners[condition.owner][index] = false;
|
236 |
+
}
|
237 |
+
}
|
238 |
+
|
239 |
+
if (condition.operator == 'not empty') {
|
240 |
+
if (live_field_value && live_field_value != '' && !um_in_array(live_field_value, $owners_values[condition.owner])) {
|
241 |
+
$owners[condition.owner][index] = true;
|
242 |
+
} else {
|
243 |
+
$owners[condition.owner][index] = false;
|
244 |
+
}
|
245 |
+
}
|
246 |
+
|
247 |
+
if (condition.operator == 'equals to') {
|
248 |
+
if (condition.value == live_field_value && um_in_array(live_field_value, $owners_values[condition.owner])) {
|
249 |
+
$owners[condition.owner][index] = true;
|
250 |
+
} else {
|
251 |
+
$owners[condition.owner][index] = false;
|
252 |
+
}
|
253 |
+
}
|
254 |
+
|
255 |
+
if (condition.operator == 'not equals') {
|
256 |
+
if (jQuery.isNumeric(condition.value) && parseInt(live_field_value) != parseInt(condition.value) && live_field_value && !um_in_array(live_field_value, $owners_values[condition.owner])) {
|
257 |
+
$owners[condition.owner][index] = true;
|
258 |
+
} else if (condition.value != live_field_value && !um_in_array(live_field_value, $owners_values[condition.owner])) {
|
259 |
+
$owners[condition.owner][index] = true;
|
260 |
+
} else {
|
261 |
+
$owners[condition.owner][index] = false;
|
262 |
+
}
|
263 |
+
}
|
264 |
+
|
265 |
+
if (condition.operator == 'greater than') {
|
266 |
+
if (jQuery.isNumeric(condition.value) && parseInt(live_field_value) > parseInt(condition.value)) {
|
267 |
+
$owners[condition.owner][index] = true;
|
268 |
+
} else {
|
269 |
+
$owners[condition.owner][index] = false;
|
270 |
+
}
|
271 |
+
}
|
272 |
+
|
273 |
+
if (condition.operator == 'less than') {
|
274 |
+
if (jQuery.isNumeric(condition.value) && parseInt(live_field_value) < parseInt(condition.value)) {
|
275 |
+
$owners[condition.owner][index] = true;
|
276 |
+
} else {
|
277 |
+
$owners[condition.owner][index] = false;
|
278 |
+
}
|
279 |
+
}
|
280 |
+
|
281 |
+
if ( condition.operator == 'contains' ) {
|
282 |
+
if ( 'multiselect' == um_get_field_type( $dom.parents('.um-field[data-key]') ) ) {
|
283 |
+
if ( live_field_value && live_field_value.indexOf( condition.value ) >= 0 && um_in_array( condition.value, live_field_value ) ) {
|
284 |
+
$owners[condition.owner][index] = true;
|
285 |
+
} else {
|
286 |
+
$owners[condition.owner][index] = false;
|
287 |
+
}
|
288 |
+
} else if ( 'checkbox' == um_get_field_type( $dom.parents('.um-field[data-key]') ) ) {
|
289 |
+
if ( live_field_value && live_field_value.indexOf( condition.value ) >= 0 ) {
|
290 |
+
$owners[condition.owner][index] = true;
|
291 |
+
} else {
|
292 |
+
$owners[condition.owner][index] = false;
|
293 |
+
}
|
294 |
+
} else {
|
295 |
+
if ( live_field_value && live_field_value.indexOf( condition.value ) >= 0 && um_in_array( live_field_value, $owners_values[ condition.owner ] ) ) {
|
296 |
+
$owners[condition.owner][index] = true;
|
297 |
+
} else {
|
298 |
+
$owners[condition.owner][index] = false;
|
299 |
+
}
|
300 |
+
}
|
301 |
+
}
|
302 |
+
|
303 |
+
}); // end foreach `conditions`
|
304 |
+
jQuery.each($owners, function (index, field) {
|
305 |
+
if (um_in_array(true, field)) {
|
306 |
+
um_field_apply_action($dom, $owner_conditions[index], true);
|
307 |
+
} else {
|
308 |
+
um_field_apply_action($dom, $owner_conditions[index], false);
|
309 |
+
}
|
310 |
+
});
|
311 |
+
$dom.trigger('um_fields_change');
|
312 |
+
|
313 |
+
}
|
314 |
+
|
315 |
+
/**
|
316 |
+
* Apply condition's action
|
317 |
+
* @param object $dom
|
318 |
+
* @param string condition
|
319 |
+
* @param boolean is_true
|
320 |
+
*/
|
321 |
+
function um_field_apply_action($dom, condition, is_true) {
|
322 |
+
var child_dom = jQuery('div.um-field[data-key="' + condition.owner + '"]');
|
323 |
+
|
324 |
+
if (condition.action == 'show' && is_true /*&& child_dom.is(':hidden')*/) {
|
325 |
+
child_dom.show();
|
326 |
+
_show_in_ie( child_dom );
|
327 |
+
um_field_restore_default_value(child_dom);
|
328 |
+
}
|
329 |
+
|
330 |
+
if (condition.action == 'show' && !is_true /*&& child_dom.is(':visible') */) {
|
331 |
+
child_dom.hide();
|
332 |
+
_hide_in_ie( child_dom );
|
333 |
+
}
|
334 |
+
|
335 |
+
if (condition.action == 'hide' && is_true /*&& child_dom.is(':visible')*/) {
|
336 |
+
child_dom.hide();
|
337 |
+
_hide_in_ie( child_dom );
|
338 |
+
}
|
339 |
+
|
340 |
+
if (condition.action == 'hide' && !is_true /*&& child_dom.is(':hidden')*/) {
|
341 |
+
child_dom.show();
|
342 |
+
_show_in_ie( child_dom );
|
343 |
+
um_field_restore_default_value( child_dom );
|
344 |
+
|
345 |
+
}
|
346 |
+
$dom.removeClass('um-field-has-changed');
|
347 |
+
}
|
348 |
+
|
349 |
+
/**
|
350 |
+
* Restores default field value
|
351 |
+
* @param object $dom
|
352 |
+
*/
|
353 |
+
function um_field_restore_default_value( $dom ) {
|
354 |
+
//um_field_default_values
|
355 |
+
|
356 |
+
var type = um_get_field_type( $dom );
|
357 |
+
var key = $dom.data('key');
|
358 |
+
var field = um_field_default_values[key];
|
359 |
+
switch ( type ) {
|
360 |
+
|
361 |
+
case 'text':
|
362 |
+
case 'number':
|
363 |
+
case 'date':
|
364 |
+
case 'textarea':
|
365 |
+
$dom.find('input:text,input[type=number],textareas').val(field.value);
|
366 |
+
break;
|
367 |
+
|
368 |
+
case 'select':
|
369 |
+
$dom.find('select').find('option').prop('selected', false);
|
370 |
+
$dom.find('select').val(field.value);
|
371 |
+
$dom.find('select').trigger('change');
|
372 |
+
break;
|
373 |
+
|
374 |
+
case 'multiselect':
|
375 |
+
$dom.find('select').find('option').prop('selected', false);
|
376 |
+
jQuery.each(field.value, function (i, value) {
|
377 |
+
$dom.find('select').find('option[value="' + value + '"]').attr('selected', true);
|
378 |
+
});
|
379 |
+
$dom.find('select').trigger('change');
|
380 |
+
break;
|
381 |
+
|
382 |
+
case 'checkbox':
|
383 |
+
|
384 |
+
if ( $dom.find('input[type=checkbox]:checked').length >= 1 ) {
|
385 |
+
|
386 |
+
$dom.find('input[type=checkbox]:checked').removeAttr('checked');
|
387 |
+
$dom.find('span.um-field-checkbox-state i').removeClass('um-icon-android-checkbox-outline');
|
388 |
+
$dom.find('span.um-field-checkbox-state i').addClass('um-icon-android-checkbox-outline-blank');
|
389 |
+
$dom.find('.um-field-checkbox.active').removeClass('active');
|
390 |
+
|
391 |
+
if (jQuery.isArray(field.value)) {
|
392 |
+
jQuery.each(field.value, function (i, value) {
|
393 |
+
var cbox_elem = $dom.find('input[type=checkbox][value="' + value + '"]');
|
394 |
+
cbox_elem.attr('checked', true);
|
395 |
+
cbox_elem.closest('.um-field-checkbox').find('i').removeClass('um-icon-android-checkbox-outline-blank');
|
396 |
+
cbox_elem.closest('.um-field-checkbox').find('i').addClass('um-icon-android-checkbox-outline');
|
397 |
+
cbox_elem.closest('.um-field-checkbox').addClass('active');
|
398 |
+
});
|
399 |
+
} else {
|
400 |
+
var cbox_elem = $dom.find('input[type=checkbox][value="' + field.value + '"]');
|
401 |
+
cbox_elem.attr('checked', true);
|
402 |
+
cbox_elem.closest('.um-field-checkbox').find('i').removeClass('um-icon-android-checkbox-outline-blank');
|
403 |
+
cbox_elem.closest('.um-field-checkbox').find('i').addClass('um-icon-android-checkbox-outline');
|
404 |
+
cbox_elem.closest('.um-field-checkbox').addClass('active');
|
405 |
+
}
|
406 |
+
|
407 |
+
}
|
408 |
+
|
409 |
+
break;
|
410 |
+
case 'radio':
|
411 |
+
|
412 |
+
if ( $dom.find('input[type=radio]:checked').length >= 1 ) {
|
413 |
+
|
414 |
+
setTimeout(function () {
|
415 |
+
|
416 |
+
$dom.find('input[type=radio]:checked').removeAttr('checked');
|
417 |
+
|
418 |
+
$dom.find('span.um-field-radio-state i').removeClass('um-icon-android-radio-button-on');
|
419 |
+
$dom.find('span.um-field-radio-state i').addClass('um-icon-android-radio-button-off');
|
420 |
+
$dom.find('.um-field-radio.active').removeClass('active');
|
421 |
+
|
422 |
+
var radio_elem = $dom.find("input[type=radio][value='" + field.value + "']");
|
423 |
+
radio_elem.attr('checked', true);
|
424 |
+
radio_elem.closest('.um-field-radio').find('i').removeClass('um-icon-android-radio-button-off');
|
425 |
+
radio_elem.closest('.um-field-radio').find('i').addClass('um-icon-android-radio-button-on');
|
426 |
+
radio_elem.closest('.um-field-radio').addClass('active');
|
427 |
+
|
428 |
+
}, 100);
|
429 |
+
}
|
430 |
+
|
431 |
+
break;
|
432 |
+
|
433 |
+
|
434 |
+
} // end switch type
|
435 |
+
|
436 |
+
|
437 |
+
if ( ! $dom.hasClass( 'um-field-has-changed' ) ) {
|
438 |
+
var me = um_get_field_element( $dom );
|
439 |
+
|
440 |
+
if ( type == 'radio' || type == 'checkbox' ) {
|
441 |
+
me = me.find( ':checked' );
|
442 |
+
}
|
443 |
+
|
444 |
+
if ( me ) {
|
445 |
+
me.trigger( 'change' );
|
446 |
+
$dom.addClass( 'um-field-has-changed' );
|
447 |
+
}
|
448 |
+
|
449 |
+
/*
|
450 |
+
maybe future fix
|
451 |
+
if ( me ) {
|
452 |
+
if ( type == 'radio' || type == 'checkbox' ) {
|
453 |
+
me.each( function() {
|
454 |
+
if ( jQuery(this).is(':checked') ) {
|
455 |
+
jQuery(this).trigger('change');
|
456 |
+
}
|
457 |
+
});
|
458 |
+
} else {
|
459 |
+
me.trigger( 'change' );
|
460 |
+
}
|
461 |
+
|
462 |
+
$dom.addClass( 'um-field-has-changed' );
|
463 |
+
}*/
|
464 |
+
}
|
465 |
+
}
|
466 |
+
|
467 |
+
/**
|
468 |
+
* Hides sibling/child field when parent field is hidden
|
469 |
+
*/
|
470 |
+
function um_field_hide_siblings() {
|
471 |
+
|
472 |
+
jQuery.each(um_field_conditions, function (index, conditions) {
|
473 |
+
if (jQuery('.um-field[data-key="' + index + '"]:hidden').length >= 1 || jQuery('.um-field[data-key="' + index + '"]').css('display') == 'none') {
|
474 |
+
jQuery.each(conditions, function (key, condition) {
|
475 |
+
jQuery('.um-field[data-key="' + condition.owner + '"]').hide();
|
476 |
+
});
|
477 |
+
}
|
478 |
+
|
479 |
+
});
|
480 |
+
|
481 |
+
}
|
482 |
+
|
483 |
+
/**
|
484 |
+
* Hides div for IE browser
|
485 |
+
* @param object $dom
|
486 |
+
*/
|
487 |
+
function _hide_in_ie( $dom ){
|
488 |
+
if ( typeof( jQuery.browser ) != 'undefined' && jQuery.browser.msie ) {
|
489 |
+
$dom.css({"visibility":"hidden"});
|
490 |
+
}
|
491 |
+
}
|
492 |
+
|
493 |
+
/**
|
494 |
+
* Shows div for IE browser
|
495 |
+
* @param object $dom
|
496 |
+
*/
|
497 |
+
function _show_in_ie( $dom ){
|
498 |
+
if ( typeof( jQuery.browser ) != 'undefined' && jQuery.browser.msie ) {
|
499 |
+
$dom.css({"visibility":"visible"});
|
500 |
+
}
|
501 |
+
}
|
502 |
+
|
503 |
+
/**
|
504 |
+
* UM Conditional fields Init
|
505 |
+
*/
|
506 |
+
function um_init_field_conditions() {
|
507 |
+
var arr_field_keys = [];
|
508 |
+
|
509 |
+
jQuery( '.um-field[data-key]' ).each( function() {
|
510 |
+
|
511 |
+
var key = jQuery(this).data( 'key' );
|
512 |
+
|
513 |
+
arr_field_keys.push( key );
|
514 |
+
|
515 |
+
var parse_attrs = {};
|
516 |
+
jQuery.each( jQuery(this)[0].attributes, function ( index, attribute ) {
|
517 |
+
if ( attribute.name.indexOf( 'data-cond' ) != -1 ) {
|
518 |
+
// replace "data-cond-"
|
519 |
+
var cond_field_id_and_attr = attribute.name.slice( 10 );
|
520 |
+
// return "n"
|
521 |
+
var cond_field_id = cond_field_id_and_attr.substring( 1, 0 );
|
522 |
+
//replace "n-"
|
523 |
+
var cond_field_attr = cond_field_id_and_attr.slice( 2 );
|
524 |
+
|
525 |
+
if ( typeof parse_attrs[cond_field_id] == 'undefined' )
|
526 |
+
parse_attrs[cond_field_id] = {};
|
527 |
+
|
528 |
+
parse_attrs[cond_field_id][cond_field_attr] = attribute.value;
|
529 |
+
}
|
530 |
+
});
|
531 |
+
|
532 |
+
jQuery.each( parse_attrs, function ( ii, dd ) {
|
533 |
+
var obj = {'field' :{
|
534 |
+
owner: key,
|
535 |
+
action: dd.action,
|
536 |
+
parent: dd.field,
|
537 |
+
operator: dd.operator,
|
538 |
+
value: dd.value,
|
539 |
+
condition: {
|
540 |
+
owner: key,
|
541 |
+
action: dd.action,
|
542 |
+
operator: dd.operator,
|
543 |
+
value: dd.value
|
544 |
+
}
|
545 |
+
}};
|
546 |
+
|
547 |
+
arr_all_conditions.push(obj);
|
548 |
+
});
|
549 |
+
|
550 |
+
um_field_default_values[jQuery(this).data('key')] = um_get_field_default_value( jQuery(this) );
|
551 |
+
});
|
552 |
+
|
553 |
+
jQuery.each( arr_field_keys, function ( i, field_key ) {
|
554 |
+
um_field_conditions[field_key] = um_get_field_children( field_key );
|
555 |
+
});
|
556 |
+
|
557 |
+
jQuery( '.um-field[data-key]:visible' ).each( function() {
|
558 |
+
var $wrap_dom = jQuery(this);
|
559 |
+
var me = um_get_field_element( $wrap_dom );
|
560 |
+
if ( typeof me.trigger !== 'undefined' ) {
|
561 |
+
me.trigger( 'change' );
|
562 |
+
}
|
563 |
+
});
|
564 |
+
|
565 |
+
}
|
566 |
+
|
567 |
|
568 |
+
jQuery(document).ready( function (){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
569 |
|
570 |
jQuery(document).on('change', '.um-field select, .um-field input[type="radio"], .um-field input[type="checkbox"]', function () {
|
571 |
var me = jQuery(this);
|
592 |
um_field_hide_siblings(); // dupes, issue with false field wrapper's visiblity validations. requires optimization.
|
593 |
});
|
594 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
595 |
um_init_field_conditions();
|
596 |
});
|
assets/js/um-conditional.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
|
1 |
+
var arr_all_conditions=[],um_field_conditions={},um_field_default_values={};function um_get_field_default_value(e){var i="",n=um_get_field_type(e);switch(n){case"text":case"number":case"date":case"textarea":case"select":i=e.find("input:text,input[type=number],textarea,select").val();break;case"multiselect":i=e.find("select").val();break;case"radio":1<=e.find("input[type=radio]:checked").length&&(i=e.find("input[type=radio]:checked").val());break;case"checkbox":1<=e.find("input[type=checkbox]:checked").length&&(1<e.find("input[type=checkbox]:checked").length?e.find("input[type=checkbox]:checked").each(function(){i=i+jQuery(this).val()+" "}):i=e.find("input[type=checkbox]:checked").val())}return{type:n,value:i}}function um_get_field_element(e){switch(um_get_field_type(e)){case"text":case"number":case"date":case"textarea":case"select":case"multiselect":case"radio":case"checkbox":return e.find("input,textarea,select")}return""}function um_get_field_type(e){var n="",i=e.attr("class");return jQuery.each(i.split(" "),function(e,i){-1!=i.indexOf("um-field-type")&&(n=i.split("_")[1])}),n}function um_get_field_children(n){var t=[];return jQuery.each(arr_all_conditions,function(e,i){i.field.parent==n&&t.push(i.field.condition)}),t}function um_splitup_array(e,i){for(var n=e.length%i,t=n,a=Math.floor(e.length/i),u=[],o=0;o<e.length;o+=a){var r=a+o,d=!1;0!==n&&t&&(r++,t--,d=!0),u.push(e.slice(o,r)),d&&o++}var c=[];return jQuery.each(u,function(e,i){c.push({action:i[0],if_field:i[1],operator:i[2],value:i[3]})}),c}function um_get_field_data(e){return um_live_field=e.parents(".um-field").data("key"),um_live_value=e.val(),e.is(":checkbox")&&(um_live_value="",1<e.parents(".um-field").find("input:checked").length?e.parents(".um-field").find("input:checked").each(function(){um_live_value=um_live_value+jQuery(this).val()+" "}):1<=e.parents(".um-field").find("input:checked").length&&(um_live_value=e.parents(".um-field").find("input:checked").val())),e.is(":radio")&&(um_live_value=e.parents(".um-field").find("input[type=radio]:checked").val()),um_live_value}function um_in_array(e,i,n){var t,a=!1;n=!!n;for(t in i)if(n&&i[t]===e||!n&&i[t]==e){a=!0;break}return a}function um_apply_conditions(n,e){var i=n.parents(".um-field[data-key]").data("key"),t=um_field_conditions[i],a=um_get_field_data(n),u={},o={},r={};jQuery.each(t,function(e,i){void 0===o[i.owner]&&(o[i.owner]=[],r[i.owner]={}),o[i.owner].push(i.value),r[i.owner]=i}),jQuery.each(t,function(e,i){void 0===u[i.owner]&&(u[i.owner]={}),"empty"==i.operator&&(!a||""==a&&um_in_array(a,o[i.owner])?u[i.owner][e]=!0:u[i.owner][e]=!1),"not empty"==i.operator&&(a&&""!=a&&!um_in_array(a,o[i.owner])?u[i.owner][e]=!0:u[i.owner][e]=!1),"equals to"==i.operator&&(i.value==a&&um_in_array(a,o[i.owner])?u[i.owner][e]=!0:u[i.owner][e]=!1),"not equals"==i.operator&&(jQuery.isNumeric(i.value)&&parseInt(a)!=parseInt(i.value)&&a&&!um_in_array(a,o[i.owner])?u[i.owner][e]=!0:i.value==a||um_in_array(a,o[i.owner])?u[i.owner][e]=!1:u[i.owner][e]=!0),"greater than"==i.operator&&(jQuery.isNumeric(i.value)&&parseInt(a)>parseInt(i.value)?u[i.owner][e]=!0:u[i.owner][e]=!1),"less than"==i.operator&&(jQuery.isNumeric(i.value)&&parseInt(a)<parseInt(i.value)?u[i.owner][e]=!0:u[i.owner][e]=!1),"contains"==i.operator&&("multiselect"==um_get_field_type(n.parents(".um-field[data-key]"))?a&&0<=a.indexOf(i.value)&&um_in_array(i.value,a)?u[i.owner][e]=!0:u[i.owner][e]=!1:"checkbox"==um_get_field_type(n.parents(".um-field[data-key]"))?a&&0<=a.indexOf(i.value)?u[i.owner][e]=!0:u[i.owner][e]=!1:a&&0<=a.indexOf(i.value)&&um_in_array(a,o[i.owner])?u[i.owner][e]=!0:u[i.owner][e]=!1)}),jQuery.each(u,function(e,i){um_in_array(!0,i)?um_field_apply_action(n,r[e],!0):um_field_apply_action(n,r[e],!1)}),n.trigger("um_fields_change")}function um_field_apply_action(e,i,n){var t=jQuery('div.um-field[data-key="'+i.owner+'"]');"show"==i.action&&n&&(t.show(),_show_in_ie(t),um_field_restore_default_value(t)),"show"!=i.action||n||(t.hide(),_hide_in_ie(t)),"hide"==i.action&&n&&(t.hide(),_hide_in_ie(t)),"hide"!=i.action||n||(t.show(),_show_in_ie(t),um_field_restore_default_value(t)),e.removeClass("um-field-has-changed")}function um_field_restore_default_value(t){var e=um_get_field_type(t),i=t.data("key"),n=um_field_default_values[i];switch(e){case"text":case"number":case"date":case"textarea":t.find("input:text,input[type=number],textareas").val(n.value);break;case"select":t.find("select").find("option").prop("selected",!1),t.find("select").val(n.value),t.find("select").trigger("change");break;case"multiselect":t.find("select").find("option").prop("selected",!1),jQuery.each(n.value,function(e,i){t.find("select").find('option[value="'+i+'"]').attr("selected",!0)}),t.find("select").trigger("change");break;case"checkbox":if(1<=t.find("input[type=checkbox]:checked").length)if(t.find("input[type=checkbox]:checked").removeAttr("checked"),t.find("span.um-field-checkbox-state i").removeClass("um-icon-android-checkbox-outline"),t.find("span.um-field-checkbox-state i").addClass("um-icon-android-checkbox-outline-blank"),t.find(".um-field-checkbox.active").removeClass("active"),jQuery.isArray(n.value))jQuery.each(n.value,function(e,i){var n=t.find('input[type=checkbox][value="'+i+'"]');n.attr("checked",!0),n.closest(".um-field-checkbox").find("i").removeClass("um-icon-android-checkbox-outline-blank"),n.closest(".um-field-checkbox").find("i").addClass("um-icon-android-checkbox-outline"),n.closest(".um-field-checkbox").addClass("active")});else{var a=t.find('input[type=checkbox][value="'+n.value+'"]');a.attr("checked",!0),a.closest(".um-field-checkbox").find("i").removeClass("um-icon-android-checkbox-outline-blank"),a.closest(".um-field-checkbox").find("i").addClass("um-icon-android-checkbox-outline"),a.closest(".um-field-checkbox").addClass("active")}break;case"radio":1<=t.find("input[type=radio]:checked").length&&setTimeout(function(){t.find("input[type=radio]:checked").removeAttr("checked"),t.find("span.um-field-radio-state i").removeClass("um-icon-android-radio-button-on"),t.find("span.um-field-radio-state i").addClass("um-icon-android-radio-button-off"),t.find(".um-field-radio.active").removeClass("active");var e=t.find("input[type=radio][value='"+n.value+"']");e.attr("checked",!0),e.closest(".um-field-radio").find("i").removeClass("um-icon-android-radio-button-off"),e.closest(".um-field-radio").find("i").addClass("um-icon-android-radio-button-on"),e.closest(".um-field-radio").addClass("active")},100)}if(!t.hasClass("um-field-has-changed")){var u=um_get_field_element(t);"radio"!=e&&"checkbox"!=e||(u=u.find(":checked")),u&&(u.trigger("change"),t.addClass("um-field-has-changed"))}}function um_field_hide_siblings(){jQuery.each(um_field_conditions,function(e,i){(1<=jQuery('.um-field[data-key="'+e+'"]:hidden').length||"none"==jQuery('.um-field[data-key="'+e+'"]').css("display"))&&jQuery.each(i,function(e,i){jQuery('.um-field[data-key="'+i.owner+'"]').hide()})})}function _hide_in_ie(e){void 0!==jQuery.browser&&jQuery.browser.msie&&e.css({visibility:"hidden"})}function _show_in_ie(e){void 0!==jQuery.browser&&jQuery.browser.msie&&e.css({visibility:"visible"})}function um_init_field_conditions(){var e=[];jQuery(".um-field[data-key]").each(function(){var t=jQuery(this).data("key");e.push(t);var u={};jQuery.each(jQuery(this)[0].attributes,function(e,i){if(-1!=i.name.indexOf("data-cond")){var n=i.name.slice(10),t=n.substring(1,0),a=n.slice(2);void 0===u[t]&&(u[t]={}),u[t][a]=i.value}}),jQuery.each(u,function(e,i){var n={field:{owner:t,action:i.action,parent:i.field,operator:i.operator,value:i.value,condition:{owner:t,action:i.action,operator:i.operator,value:i.value}}};arr_all_conditions.push(n)}),um_field_default_values[jQuery(this).data("key")]=um_get_field_default_value(jQuery(this))}),jQuery.each(e,function(e,i){um_field_conditions[i]=um_get_field_children(i)}),jQuery(".um-field[data-key]:visible").each(function(){var e=um_get_field_element(jQuery(this));void 0!==e.trigger&&e.trigger("change")})}jQuery(document).ready(function(){jQuery(document).on("change",'.um-field select, .um-field input[type="radio"], .um-field input[type="checkbox"]',function(){um_apply_conditions(jQuery(this),!1)}),jQuery(document).on("input change",'.um-field input[type="text"]',function(){um_apply_conditions(jQuery(this),!1)}),jQuery(document).on("input change",'.um-field input[type="number"]',function(){um_apply_conditions(jQuery(this),!1)}),jQuery(document).on("input change",'.um-field input[type="password"]',function(){um_apply_conditions(jQuery(this),!1)}),jQuery(document).on("um_fields_change",function(){um_field_hide_siblings(),um_field_hide_siblings()}),um_init_field_conditions()});
|
assets/js/um-scripts.js
CHANGED
@@ -124,10 +124,10 @@ jQuery(document).ready(function() {
|
|
124 |
score: function() {return jQuery(this).attr('data-score');},
|
125 |
scoreName: function(){return jQuery(this).attr('data-key');},
|
126 |
hints: false,
|
127 |
-
click: function(score, evt) {
|
128 |
live_field = this.id;
|
129 |
live_value = score;
|
130 |
-
|
131 |
}
|
132 |
});
|
133 |
|
124 |
score: function() {return jQuery(this).attr('data-score');},
|
125 |
scoreName: function(){return jQuery(this).attr('data-key');},
|
126 |
hints: false,
|
127 |
+
click: function( score, evt ) {
|
128 |
live_field = this.id;
|
129 |
live_value = score;
|
130 |
+
um_apply_conditions( jQuery(this), false );
|
131 |
}
|
132 |
});
|
133 |
|
assets/js/um-scripts.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(){jQuery(document).on("click",".um-dropdown a",function(e){return!1}),jQuery(document).on("click",".um-dropdown a.real_url",function(e){window.location=jQuery(this).attr("href")}),jQuery(document).on("click",".um-trigger-menu-on-click",function(e){return jQuery(".um-dropdown").hide(),menu=jQuery(this).find(".um-dropdown"),menu.show(),!1}),jQuery(document).on("click",".um-dropdown-hide",function(e){UM_hide_menus()}),jQuery(document).on("click","a.um-manual-trigger",function(){var e=jQuery(this).attr("data-child"),t=jQuery(this).attr("data-parent");jQuery(this).parents(t).find(e).trigger("click")}),jQuery(".um-tip-n").tipsy({gravity:"n",opacity:1,live:"a.live",offset:3}),jQuery(".um-tip-w").tipsy({gravity:"w",opacity:1,live:"a.live",offset:3}),jQuery(".um-tip-e").tipsy({gravity:"e",opacity:1,live:"a.live",offset:3}),jQuery(".um-tip-s").tipsy({gravity:"s",opacity:1,live:"a.live",offset:3}),jQuery(document).on("change",".um-field-area input[type=radio]",function(){var e=jQuery(this).parents(".um-field-area"),t=jQuery(this).parents("label");e.find(".um-field-radio").removeClass("active"),e.find(".um-field-radio").find("i").removeAttr("class").addClass("um-icon-android-radio-button-off"),t.addClass("active"),t.find("i").removeAttr("class").addClass("um-icon-android-radio-button-on")}),jQuery(document).on("change",".um-field-area input[type=checkbox]",function(){jQuery(this).parents(".um-field-area");var e=jQuery(this).parents("label");e.hasClass("active")?(e.removeClass("active"),e.find("i").removeAttr("class").addClass("um-icon-android-checkbox-outline-blank")):(e.addClass("active"),e.find("i").removeAttr("class").addClass("um-icon-android-checkbox-outline"))}),jQuery(".um-datepicker").each(function(){if(elem=jQuery(this),""!=elem.attr("data-disabled_weekdays"))var e=JSON.parse(elem.attr("data-disabled_weekdays"));else e=!1;var t=elem.attr("data-years"),a=elem.attr("data-date_min"),i=elem.attr("data-date_max"),r=a.split(","),n=i.split(","),u=r.length?new Date(r):null,o=r.length?new Date(n):null;if(u&&"Invalid Date"==u.toString()&&3==r.length){var d=r[1]+"/"+r[2]+"/"+r[0];u=new Date(Date.parse(d))}if(o&&"Invalid Date"==o.toString()&&3==n.length){var s=n[1]+"/"+n[2]+"/"+n[0];o=new Date(Date.parse(s))}elem.pickadate({selectYears:t,min:u,max:o,disable:e,format:elem.attr("data-format"),formatSubmit:"yyyy/mm/dd",hiddenName:!0,onOpen:function(){elem.blur()},onClose:function(){elem.blur()}})}),jQuery(".um-timepicker").each(function(){elem=jQuery(this),elem.pickatime({format:elem.attr("data-format"),interval:parseInt(elem.attr("data-intervals")),formatSubmit:"HH:i",hiddenName:!0,onOpen:function(){elem.blur()},onClose:function(){elem.blur()}})}),jQuery(".um-rating").um_raty({half:!1,starType:"i",number:function(){return jQuery(this).attr("data-number")},score:function(){return jQuery(this).attr("data-score")},scoreName:function(){return jQuery(this).attr("data-key")},hints:!1,click:function(e,t){live_field=this.id,live_value=e,
|
1 |
+
jQuery(document).ready(function(){jQuery(document).on("click",".um-dropdown a",function(e){return!1}),jQuery(document).on("click",".um-dropdown a.real_url",function(e){window.location=jQuery(this).attr("href")}),jQuery(document).on("click",".um-trigger-menu-on-click",function(e){return jQuery(".um-dropdown").hide(),menu=jQuery(this).find(".um-dropdown"),menu.show(),!1}),jQuery(document).on("click",".um-dropdown-hide",function(e){UM_hide_menus()}),jQuery(document).on("click","a.um-manual-trigger",function(){var e=jQuery(this).attr("data-child"),t=jQuery(this).attr("data-parent");jQuery(this).parents(t).find(e).trigger("click")}),jQuery(".um-tip-n").tipsy({gravity:"n",opacity:1,live:"a.live",offset:3}),jQuery(".um-tip-w").tipsy({gravity:"w",opacity:1,live:"a.live",offset:3}),jQuery(".um-tip-e").tipsy({gravity:"e",opacity:1,live:"a.live",offset:3}),jQuery(".um-tip-s").tipsy({gravity:"s",opacity:1,live:"a.live",offset:3}),jQuery(document).on("change",".um-field-area input[type=radio]",function(){var e=jQuery(this).parents(".um-field-area"),t=jQuery(this).parents("label");e.find(".um-field-radio").removeClass("active"),e.find(".um-field-radio").find("i").removeAttr("class").addClass("um-icon-android-radio-button-off"),t.addClass("active"),t.find("i").removeAttr("class").addClass("um-icon-android-radio-button-on")}),jQuery(document).on("change",".um-field-area input[type=checkbox]",function(){jQuery(this).parents(".um-field-area");var e=jQuery(this).parents("label");e.hasClass("active")?(e.removeClass("active"),e.find("i").removeAttr("class").addClass("um-icon-android-checkbox-outline-blank")):(e.addClass("active"),e.find("i").removeAttr("class").addClass("um-icon-android-checkbox-outline"))}),jQuery(".um-datepicker").each(function(){if(elem=jQuery(this),""!=elem.attr("data-disabled_weekdays"))var e=JSON.parse(elem.attr("data-disabled_weekdays"));else e=!1;var t=elem.attr("data-years"),a=elem.attr("data-date_min"),i=elem.attr("data-date_max"),r=a.split(","),n=i.split(","),u=r.length?new Date(r):null,o=r.length?new Date(n):null;if(u&&"Invalid Date"==u.toString()&&3==r.length){var d=r[1]+"/"+r[2]+"/"+r[0];u=new Date(Date.parse(d))}if(o&&"Invalid Date"==o.toString()&&3==n.length){var s=n[1]+"/"+n[2]+"/"+n[0];o=new Date(Date.parse(s))}elem.pickadate({selectYears:t,min:u,max:o,disable:e,format:elem.attr("data-format"),formatSubmit:"yyyy/mm/dd",hiddenName:!0,onOpen:function(){elem.blur()},onClose:function(){elem.blur()}})}),jQuery(".um-timepicker").each(function(){elem=jQuery(this),elem.pickatime({format:elem.attr("data-format"),interval:parseInt(elem.attr("data-intervals")),formatSubmit:"HH:i",hiddenName:!0,onOpen:function(){elem.blur()},onClose:function(){elem.blur()}})}),jQuery(".um-rating").um_raty({half:!1,starType:"i",number:function(){return jQuery(this).attr("data-number")},score:function(){return jQuery(this).attr("data-score")},scoreName:function(){return jQuery(this).attr("data-key")},hints:!1,click:function(e,t){live_field=this.id,live_value=e,um_apply_conditions(jQuery(this),!1)}}),jQuery(".um-rating-readonly").um_raty({half:!1,starType:"i",number:function(){return jQuery(this).attr("data-number")},score:function(){return jQuery(this).attr("data-score")},scoreName:function(){return jQuery(this).attr("data-key")},hints:!1,readOnly:!0}),jQuery(document).on("click",".um .um-single-image-preview a.cancel",function(e){e.preventDefault();var t=jQuery(this).parents(".um-field"),a=jQuery(this).parents(".um-field").find(".um-single-image-preview img").attr("src");return t.find(".um-single-image-preview img").attr("src",""),t.find(".um-single-image-preview").hide(),t.find(".um-btn-auto-width").html("Upload"),t.find("input[type=hidden]").val("empty_file"),jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_remove_file",src:a}}),!1}),jQuery(document).on("click",".um .um-single-file-preview a.cancel",function(e){e.preventDefault();var t=jQuery(this).parents(".um-field"),a=jQuery(this).parents(".um-field").find(".um-single-fileinfo a").attr("href");return t.find(".um-single-file-preview").hide(),t.find(".um-btn-auto-width").html("Upload"),t.find("input[type=hidden]").val("empty_file"),jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_remove_file",src:a}}),!1}),jQuery(".um-s1,.um-s2").css({display:"block"}),jQuery(".um-s1").select2({allowClear:!0}),jQuery(".um-s2").select2({allowClear:!1,minimumResultsForSearch:10}),jQuery(document).on("click",".um-field-group-head:not(.disabled)",function(){var e=jQuery(this).parents(".um-field-group"),t=e.data("max_entries");e.find(".um-field-group-body").is(":hidden")?e.find(".um-field-group-body").show():e.find(".um-field-group-body:first").clone().appendTo(e),increase_id=0,e.find(".um-field-group-body").each(function(){increase_id++,jQuery(this).find("input").each(function(){var e=jQuery(this);e.attr("id",e.data("key")+"-"+increase_id),e.attr("name",e.data("key")+"-"+increase_id),e.parent().parent().find("label").attr("for",e.data("key")+"-"+increase_id)})}),0<t&&e.find(".um-field-group-body").length==t&&jQuery(this).addClass("disabled")}),jQuery(document).on("click",".um-field-group-cancel",function(e){e.preventDefault();var t=jQuery(this).parents(".um-field-group"),a=t.data("max_entries");return 1<t.find(".um-field-group-body").length?jQuery(this).parents(".um-field-group-body").remove():jQuery(this).parents(".um-field-group-body").hide(),0<a&&t.find(".um-field-group-body").length<a&&t.find(".um-field-group-head").removeClass("disabled"),!1}),jQuery(document.body).on("click",".um-ajax-paginate",function(e){e.preventDefault();var t=jQuery(this),a=jQuery(this).parent();a.addClass("loading");var i=jQuery(this).data("hook");if("um_load_posts"===i){var r=1*jQuery(this).data("pages"),n=1*jQuery(this).data("page")+1;jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_ajax_paginate_posts",author:jQuery(this).data("author"),page:n},complete:function(){a.removeClass("loading")},success:function(e){a.before(e),n===r?a.remove():t.data("page",n)}})}else{var u=jQuery(this).data("args"),o=jQuery(this).parents(".um").find(".um-ajax-items");jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_ajax_paginate",hook:i,args:u},complete:function(){a.removeClass("loading")},success:function(e){a.remove(),o.append(e)}})}}),jQuery(document).on("click",".um-ajax-action",function(e){e.preventDefault();var t=jQuery(this).data("hook"),a=jQuery(this).data("user_id"),arguments=jQuery(this).data("arguments");return jQuery(this).data("js-remove")&&jQuery(this).parents("."+jQuery(this).data("js-remove")).fadeOut("fast"),jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_muted_action",hook:t,user_id:a,arguments:arguments},success:function(e){}}),!1}),jQuery(document).on("click","#um-search-button",function(){jQuery(this).parents("form").submit()}),jQuery(".um-form input[class=um-button][type=submit]").removeAttr("disabled"),jQuery(document).one("click",".um:not(.um-account) .um-form input[class=um-button][type=submit]:not(.um-has-recaptcha)",function(){jQuery(this).attr("disabled","disabled"),jQuery(this).parents("form").submit()});var o={};function d(e,t,a,i){var r=e.data("um-parent");e.attr("name"),jQuery('select[name="'+r+'"]');e.find('option[value!=""]').remove(),e.hasClass("um-child-option-disabled")||e.removeAttr("disabled");i=[];var n="";if("yes"===t.post.members_directory){var u=new URLSearchParams(window.location.search);n=u.get(t.post.child_name)}jQuery.each(t.items,function(e,t){i.push({id:e,text:t,selected:t===n})}),e.select2("destroy"),e.select2({data:i,allowClear:!0,minimumResultsForSearch:10}),"yes"!==t.post.members_directory&&(void 0===t.field.default||e.data("um-original-value")?""!=e.data("um-original-value")&&e.val(e.data("um-original-value")).trigger("change"):e.val(t.field.default).trigger("change"),0==t.field.editable&&(e.addClass("um-child-option-disabled"),e.attr("disabled","disabled"))),o[a]=t}jQuery("select[data-um-parent]").each(function(){var r=jQuery(this),n=r.data("um-parent"),u=(r.data("um-ajax-url"),r.data("um-ajax-source"));r.val();r.attr("data-um-init-field",!0),jQuery(document).on("change",'select[name="'+n+'"]',function(){var t=jQuery(this),e=t.closest("form").find("input[type=hidden][name=form_id]").val(),a=t.val();if(""!=t.val()&&"object"!=typeof o[a]&&jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_select_options",parent_option_name:n,parent_option:t.val(),child_callback:u,child_name:r.attr("name"),members_directory:r.attr("data-mebers-directory"),form_id:e},success:function(e){"success"==e.status&&""!=t.val()&&d(r,e,a),void 0!==e.debug&&console.log(e)},error:function(e){console.log(e)}}),""!=t.val()&&"object"==typeof o[a]){var i=o[a];d(r,i,a)}""==t.val()&&(r.find('option[value!=""]').remove(),r.val("").trigger("change"))}),jQuery('select[name="'+n+'"]').trigger("change")})});
|
assets/js/um-scrollto.js
DELETED
@@ -1,210 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
* jQuery.scrollTo
|
3 |
-
* Copyright (c) 2007-2015 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
|
4 |
-
* Licensed under MIT
|
5 |
-
* http://flesler.blogspot.com/2007/10/jqueryscrollto.html
|
6 |
-
* @projectDescription Lightweight, cross-browser and highly customizable animated scrolling with jQuery
|
7 |
-
* @author Ariel Flesler
|
8 |
-
* @version 2.1.1
|
9 |
-
*/
|
10 |
-
;(function(factory) {
|
11 |
-
'use strict';
|
12 |
-
if (typeof define === 'function' && define.amd) {
|
13 |
-
// AMD
|
14 |
-
define(['jquery'], factory);
|
15 |
-
} else if (typeof module !== 'undefined' && module.exports) {
|
16 |
-
// CommonJS
|
17 |
-
module.exports = factory(require('jquery'));
|
18 |
-
} else {
|
19 |
-
// Global
|
20 |
-
factory(jQuery);
|
21 |
-
}
|
22 |
-
})(function($) {
|
23 |
-
'use strict';
|
24 |
-
|
25 |
-
var $scrollTo = $.scrollTo = function(target, duration, settings) {
|
26 |
-
return $(window).scrollTo(target, duration, settings);
|
27 |
-
};
|
28 |
-
|
29 |
-
$scrollTo.defaults = {
|
30 |
-
axis:'xy',
|
31 |
-
duration: 0,
|
32 |
-
limit:true
|
33 |
-
};
|
34 |
-
|
35 |
-
function isWin(elem) {
|
36 |
-
return !elem.nodeName ||
|
37 |
-
$.inArray(elem.nodeName.toLowerCase(), ['iframe','#document','html','body']) !== -1;
|
38 |
-
}
|
39 |
-
|
40 |
-
$.fn.scrollTo = function(target, duration, settings) {
|
41 |
-
if (typeof duration === 'object') {
|
42 |
-
settings = duration;
|
43 |
-
duration = 0;
|
44 |
-
}
|
45 |
-
if (typeof settings === 'function') {
|
46 |
-
settings = { onAfter:settings };
|
47 |
-
}
|
48 |
-
if (target === 'max') {
|
49 |
-
target = 9e9;
|
50 |
-
}
|
51 |
-
|
52 |
-
settings = $.extend({}, $scrollTo.defaults, settings);
|
53 |
-
// Speed is still recognized for backwards compatibility
|
54 |
-
duration = duration || settings.duration;
|
55 |
-
// Make sure the settings are given right
|
56 |
-
var queue = settings.queue && settings.axis.length > 1;
|
57 |
-
if (queue) {
|
58 |
-
// Let's keep the overall duration
|
59 |
-
duration /= 2;
|
60 |
-
}
|
61 |
-
settings.offset = both(settings.offset);
|
62 |
-
settings.over = both(settings.over);
|
63 |
-
|
64 |
-
return this.each(function() {
|
65 |
-
// Null target yields nothing, just like jQuery does
|
66 |
-
if (target === null) return;
|
67 |
-
|
68 |
-
var win = isWin(this),
|
69 |
-
elem = win ? this.contentWindow || window : this,
|
70 |
-
$elem = $(elem),
|
71 |
-
targ = target,
|
72 |
-
attr = {},
|
73 |
-
toff;
|
74 |
-
|
75 |
-
switch (typeof targ) {
|
76 |
-
// A number will pass the regex
|
77 |
-
case 'number':
|
78 |
-
case 'string':
|
79 |
-
if (/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)) {
|
80 |
-
targ = both(targ);
|
81 |
-
// We are done
|
82 |
-
break;
|
83 |
-
}
|
84 |
-
// Relative/Absolute selector
|
85 |
-
targ = win ? $(targ) : $(targ, elem);
|
86 |
-
if (!targ.length) return;
|
87 |
-
/* falls through */
|
88 |
-
case 'object':
|
89 |
-
// DOMElement / jQuery
|
90 |
-
if (targ.is || targ.style) {
|
91 |
-
// Get the real position of the target
|
92 |
-
toff = (targ = $(targ)).offset();
|
93 |
-
}
|
94 |
-
}
|
95 |
-
|
96 |
-
var offset = $.isFunction(settings.offset) && settings.offset(elem, targ) || settings.offset;
|
97 |
-
|
98 |
-
$.each(settings.axis.split(''), function(i, axis) {
|
99 |
-
var Pos = axis === 'x' ? 'Left' : 'Top',
|
100 |
-
pos = Pos.toLowerCase(),
|
101 |
-
key = 'scroll' + Pos,
|
102 |
-
prev = $elem[key](),
|
103 |
-
max = $scrollTo.max(elem, axis);
|
104 |
-
|
105 |
-
if (toff) {// jQuery / DOMElement
|
106 |
-
attr[key] = toff[pos] + (win ? 0 : prev - $elem.offset()[pos]);
|
107 |
-
|
108 |
-
// If it's a dom element, reduce the margin
|
109 |
-
if (settings.margin) {
|
110 |
-
attr[key] -= parseInt(targ.css('margin'+Pos), 10) || 0;
|
111 |
-
attr[key] -= parseInt(targ.css('border'+Pos+'Width'), 10) || 0;
|
112 |
-
}
|
113 |
-
|
114 |
-
attr[key] += offset[pos] || 0;
|
115 |
-
|
116 |
-
if (settings.over[pos]) {
|
117 |
-
// Scroll to a fraction of its width/height
|
118 |
-
attr[key] += targ[axis === 'x'?'width':'height']() * settings.over[pos];
|
119 |
-
}
|
120 |
-
} else {
|
121 |
-
var val = targ[pos];
|
122 |
-
// Handle percentage values
|
123 |
-
attr[key] = val.slice && val.slice(-1) === '%' ?
|
124 |
-
parseFloat(val) / 100 * max
|
125 |
-
: val;
|
126 |
-
}
|
127 |
-
|
128 |
-
// Number or 'number'
|
129 |
-
if (settings.limit && /^\d+$/.test(attr[key])) {
|
130 |
-
// Check the limits
|
131 |
-
attr[key] = attr[key] <= 0 ? 0 : Math.min(attr[key], max);
|
132 |
-
}
|
133 |
-
|
134 |
-
// Don't waste time animating, if there's no need.
|
135 |
-
if (!i && settings.axis.length > 1) {
|
136 |
-
if (prev === attr[key]) {
|
137 |
-
// No animation needed
|
138 |
-
attr = {};
|
139 |
-
} else if (queue) {
|
140 |
-
// Intermediate animation
|
141 |
-
animate(settings.onAfterFirst);
|
142 |
-
// Don't animate this axis again in the next iteration.
|
143 |
-
attr = {};
|
144 |
-
}
|
145 |
-
}
|
146 |
-
});
|
147 |
-
|
148 |
-
animate(settings.onAfter);
|
149 |
-
|
150 |
-
function animate(callback) {
|
151 |
-
var opts = $.extend({}, settings, {
|
152 |
-
// The queue setting conflicts with animate()
|
153 |
-
// Force it to always be true
|
154 |
-
queue: true,
|
155 |
-
duration: duration,
|
156 |
-
complete: callback && function() {
|
157 |
-
callback.call(elem, targ, settings);
|
158 |
-
}
|
159 |
-
});
|
160 |
-
$elem.animate(attr, opts);
|
161 |
-
}
|
162 |
-
});
|
163 |
-
};
|
164 |
-
|
165 |
-
// Max scrolling position, works on quirks mode
|
166 |
-
// It only fails (not too badly) on IE, quirks mode.
|
167 |
-
$scrollTo.max = function(elem, axis) {
|
168 |
-
var Dim = axis === 'x' ? 'Width' : 'Height',
|
169 |
-
scroll = 'scroll'+Dim;
|
170 |
-
|
171 |
-
if (!isWin(elem))
|
172 |
-
return elem[scroll] - $(elem)[Dim.toLowerCase()]();
|
173 |
-
|
174 |
-
var size = 'client' + Dim,
|
175 |
-
doc = elem.ownerDocument || elem.document,
|
176 |
-
html = doc.documentElement,
|
177 |
-
body = doc.body;
|
178 |
-
|
179 |
-
return Math.max(html[scroll], body[scroll]) - Math.min(html[size], body[size]);
|
180 |
-
};
|
181 |
-
|
182 |
-
function both(val) {
|
183 |
-
return $.isFunction(val) || $.isPlainObject(val) ? val : { top:val, left:val };
|
184 |
-
}
|
185 |
-
|
186 |
-
// Add special hooks so that window scroll properties can be animated
|
187 |
-
$.Tween.propHooks.scrollLeft =
|
188 |
-
$.Tween.propHooks.scrollTop = {
|
189 |
-
get: function(t) {
|
190 |
-
return $(t.elem)[t.prop]();
|
191 |
-
},
|
192 |
-
set: function(t) {
|
193 |
-
var curr = this.get(t);
|
194 |
-
// If interrupt is true and user scrolled, stop animating
|
195 |
-
if (t.options.interrupt && t._last && t._last !== curr) {
|
196 |
-
return $(t.elem).stop();
|
197 |
-
}
|
198 |
-
var next = Math.round(t.now);
|
199 |
-
// Don't waste CPU
|
200 |
-
// Browsers don't render floating point scroll
|
201 |
-
if (curr !== next) {
|
202 |
-
$(t.elem)[t.prop](next);
|
203 |
-
t._last = this.get(t);
|
204 |
-
}
|
205 |
-
}
|
206 |
-
};
|
207 |
-
|
208 |
-
// AMD requirement
|
209 |
-
return $scrollTo;
|
210 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/um-scrollto.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(w){"use strict";var y=w.scrollTo=function(e,t,o){return w(window).scrollTo(e,t,o)};function g(e){return!e.nodeName||-1!==w.inArray(e.nodeName.toLowerCase(),["iframe","#document","html","body"])}function t(e){return w.isFunction(e)||w.isPlainObject(e)?e:{top:e,left:e}}return y.defaults={axis:"xy",duration:0,limit:!0},w.fn.scrollTo=function(e,o,x){"object"==typeof o&&(x=o,o=0),"function"==typeof x&&(x={onAfter:x}),"max"===e&&(e=9e9),x=w.extend({},y.defaults,x),o=o||x.duration;var v=x.queue&&1<x.axis.length;return v&&(o/=2),x.offset=t(x.offset),x.over=t(x.over),this.each(function(){if(null!==e){var f,u=g(this),c=u?this.contentWindow||window:this,l=w(c),d=e,m={};switch(typeof d){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(d)){d=t(d);break}if(!(d=u?w(d):w(d,c)).length)return;case"object":(d.is||d.style)&&(f=(d=w(d)).offset())}var p=w.isFunction(x.offset)&&x.offset(c,d)||x.offset;w.each(x.axis.split(""),function(e,t){var o="x"===t?"Left":"Top",n=o.toLowerCase(),r="scroll"+o,i=l[r](),s=y.max(c,t);if(f)m[r]=f[n]+(u?0:i-l.offset()[n]),x.margin&&(m[r]-=parseInt(d.css("margin"+o),10)||0,m[r]-=parseInt(d.css("border"+o+"Width"),10)||0),m[r]+=p[n]||0,x.over[n]&&(m[r]+=d["x"===t?"width":"height"]()*x.over[n]);else{var a=d[n];m[r]=a.slice&&"%"===a.slice(-1)?parseFloat(a)/100*s:a}x.limit&&/^\d+$/.test(m[r])&&(m[r]=m[r]<=0?0:Math.min(m[r],s)),!e&&1<x.axis.length&&(i===m[r]?m={}:v&&(h(x.onAfterFirst),m={}))}),h(x.onAfter)}function h(e){var t=w.extend({},x,{queue:!0,duration:o,complete:e&&function(){e.call(c,d,x)}});l.animate(m,t)}})},y.max=function(e,t){var o="x"===t?"Width":"Height",n="scroll"+o;if(!g(e))return e[n]-w(e)[o.toLowerCase()]();var r="client"+o,i=e.ownerDocument||e.document,s=i.documentElement,a=i.body;return Math.max(s[n],a[n])-Math.min(s[r],a[r])},w.Tween.propHooks.scrollLeft=w.Tween.propHooks.scrollTop={get:function(e){return w(e.elem)[e.prop]()},set:function(e){var t=this.get(e);if(e.options.interrupt&&e._last&&e._last!==t)return w(e.elem).stop();var o=Math.round(e.now);t!==o&&(w(e.elem)[e.prop](o),e._last=this.get(e))}},y});
|
|
assets/js/um-select.js
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
Copyright 2014 Igor Vaynberg
|
3 |
-
|
4 |
-
Version: 3.4.8 Timestamp: Thu May 1 09:50:32 EDT 2014
|
5 |
-
|
6 |
-
This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
|
7 |
-
General Public License version 2 (the "GPL License"). You may choose either license to govern your
|
8 |
-
use of this software only upon the condition that you accept all of the terms of either the Apache
|
9 |
-
License or the GPL License.
|
10 |
-
|
11 |
-
You may obtain a copy of the Apache License and the GPL License at:
|
12 |
-
|
13 |
-
http://www.apache.org/licenses/LICENSE-2.0
|
14 |
-
http://www.gnu.org/licenses/gpl-2.0.html
|
15 |
-
|
16 |
-
Unless required by applicable law or agreed to in writing, software distributed under the Apache License
|
17 |
-
or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
18 |
-
either express or implied. See the Apache License and the GPL License for the specific language governing
|
19 |
-
permissions and limitations under the Apache License and the GPL License.
|
20 |
-
*/
|
21 |
-
!function(a){"undefined"==typeof a.fn.each2&&a.extend(a.fn,{each2:function(b){for(var c=a([0]),d=-1,e=this.length;++d<e&&(c.context=c[0]=this[d])&&b.call(c[0],d,c)!==!1;);return this}})}(jQuery),function(a,b){"use strict";function n(b){var c=a(document.createTextNode(""));b.before(c),c.before(b),c.remove()}function o(a){function b(a){return m[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function p(a,b){for(var c=0,d=b.length;d>c;c+=1)if(r(a,b[c]))return c;return-1}function q(){var b=a(l);b.appendTo("body");var c={width:b.width()-b[0].clientWidth,height:b.height()-b[0].clientHeight};return b.remove(),c}function r(a,c){return a===c?!0:a===b||c===b?!1:null===a||null===c?!1:a.constructor===String?a+""==c+"":c.constructor===String?c+""==a+"":!1}function s(b,c){var d,e,f;if(null===b||b.length<1)return[];for(d=b.split(c),e=0,f=d.length;f>e;e+=1)d[e]=a.trim(d[e]);return d}function t(a){return a.outerWidth(!1)-a.width()}function u(c){var d="keyup-change-value";c.on("keydown",function(){a.data(c,d)===b&&a.data(c,d,c.val())}),c.on("keyup",function(){var e=a.data(c,d);e!==b&&c.val()!==e&&(a.removeData(c,d),c.trigger("keyup-change"))})}function v(c){c.on("mousemove",function(c){var d=i;(d===b||d.x!==c.pageX||d.y!==c.pageY)&&a(c.target).trigger("mousemove-filtered",c)})}function w(a,c,d){d=d||b;var e;return function(){var b=arguments;window.clearTimeout(e),e=window.setTimeout(function(){c.apply(d,b)},a)}}function x(a,b){var c=w(a,function(a){b.trigger("scroll-debounced",a)});b.on("scroll",function(a){p(a.target,b.get())>=0&&c(a)})}function y(a){a[0]!==document.activeElement&&window.setTimeout(function(){var d,b=a[0],c=a.val().length;a.focus();var e=b.offsetWidth>0||b.offsetHeight>0;e&&b===document.activeElement&&(b.setSelectionRange?b.setSelectionRange(c,c):b.createTextRange&&(d=b.createTextRange(),d.collapse(!1),d.select()))},0)}function z(b){b=a(b)[0];var c=0,d=0;if("selectionStart"in b)c=b.selectionStart,d=b.selectionEnd-c;else if("selection"in document){b.focus();var e=document.selection.createRange();d=document.selection.createRange().text.length,e.moveStart("character",-b.value.length),c=e.text.length-d}return{offset:c,length:d}}function A(a){a.preventDefault(),a.stopPropagation()}function B(a){a.preventDefault(),a.stopImmediatePropagation()}function C(b){if(!h){var c=b[0].currentStyle||window.getComputedStyle(b[0],null);h=a(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:c.fontSize,fontFamily:c.fontFamily,fontStyle:c.fontStyle,fontWeight:c.fontWeight,letterSpacing:c.letterSpacing,textTransform:c.textTransform,whiteSpace:"nowrap"}),h.attr("class","select2-sizer"),a("body").append(h)}return h.text(b.val()),h.width()}function D(b,c,d){var e,g,f=[];e=b.attr("class"),e&&(e=""+e,a(e.split(" ")).each2(function(){0===this.indexOf("select2-")&&f.push(this)})),e=c.attr("class"),e&&(e=""+e,a(e.split(" ")).each2(function(){0!==this.indexOf("select2-")&&(g=d(this),g&&f.push(g))})),b.attr("class",f.join(" "))}function E(a,b,c,d){var e=o(a.toUpperCase()).indexOf(o(b.toUpperCase())),f=b.length;return 0>e?(c.push(d(a)),void 0):(c.push(d(a.substring(0,e))),c.push("<span class='select2-match'>"),c.push(d(a.substring(e,e+f))),c.push("</span>"),c.push(d(a.substring(e+f,a.length))),void 0)}function F(a){var b={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})}function G(c){var d,e=null,f=c.quietMillis||100,g=c.url,h=this;return function(i){window.clearTimeout(d),d=window.setTimeout(function(){var d=c.data,f=g,j=c.transport||a.fn.select2.ajaxDefaults.transport,k={type:c.type||"GET",cache:c.cache||!1,jsonpCallback:c.jsonpCallback||b,dataType:c.dataType||"json"},l=a.extend({},a.fn.select2.ajaxDefaults.params,k);d=d?d.call(h,i.term,i.page,i.context):null,f="function"==typeof f?f.call(h,i.term,i.page,i.context):f,e&&"function"==typeof e.abort&&e.abort(),c.params&&(a.isFunction(c.params)?a.extend(l,c.params.call(h)):a.extend(l,c.params)),a.extend(l,{url:f,dataType:c.dataType,data:d,success:function(a){var b=c.results(a,i.page);i.callback(b)}}),e=j.call(h,l)},f)}}function H(b){var d,e,c=b,f=function(a){return""+a.text};a.isArray(c)&&(e=c,c={results:e}),a.isFunction(c)===!1&&(e=c,c=function(){return e});var g=c();return g.text&&(f=g.text,a.isFunction(f)||(d=g.text,f=function(a){return a[d]})),function(b){var g,d=b.term,e={results:[]};return""===d?(b.callback(c()),void 0):(g=function(c,e){var h,i;if(c=c[0],c.children){h={};for(i in c)c.hasOwnProperty(i)&&(h[i]=c[i]);h.children=[],a(c.children).each2(function(a,b){g(b,h.children)}),(h.children.length||b.matcher(d,f(h),c))&&e.push(h)}else b.matcher(d,f(c),c)&&e.push(c)},a(c().results).each2(function(a,b){g(b,e.results)}),b.callback(e),void 0)}}function I(c){var d=a.isFunction(c);return function(e){var f=e.term,g={results:[]},h=d?c(e):c;a.isArray(h)&&(a(h).each(function(){var a=this.text!==b,c=a?this.text:this;(""===f||e.matcher(f,c))&&g.results.push(a?this:{id:this,text:this})}),e.callback(g))}}function J(b,c){if(a.isFunction(b))return!0;if(!b)return!1;if("string"==typeof b)return!0;throw new Error(c+" must be a string, function, or falsy value")}function K(b){if(a.isFunction(b)){var c=Array.prototype.slice.call(arguments,1);return b.apply(null,c)}return b}function L(b){var c=0;return a.each(b,function(a,b){b.children?c+=L(b.children):c++}),c}function M(a,c,d,e){var h,i,j,k,l,f=a,g=!1;if(!e.createSearchChoice||!e.tokenSeparators||e.tokenSeparators.length<1)return b;for(;;){for(i=-1,j=0,k=e.tokenSeparators.length;k>j&&(l=e.tokenSeparators[j],i=a.indexOf(l),!(i>=0));j++);if(0>i)break;if(h=a.substring(0,i),a=a.substring(i+l.length),h.length>0&&(h=e.createSearchChoice.call(this,h,c),h!==b&&null!==h&&e.id(h)!==b&&null!==e.id(h))){for(g=!1,j=0,k=c.length;k>j;j++)if(r(e.id(h),e.id(c[j]))){g=!0;break}g||d(h)}}return f!==a?a:void 0}function N(){var a=this;Array.prototype.forEach.call(arguments,function(b){a[b].remove(),a[b]=null})}function O(b,c){var d=function(){};return d.prototype=new b,d.prototype.constructor=d,d.prototype.parent=b.prototype,d.prototype=a.extend(d.prototype,c),d}if(window.Select2===b){var c,d,e,f,g,h,j,k,i={x:0,y:0},c={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(a){switch(a=a.which?a.which:a){case c.LEFT:case c.RIGHT:case c.UP:case c.DOWN:return!0}return!1},isControl:function(a){var b=a.which;switch(b){case c.SHIFT:case c.CTRL:case c.ALT:return!0}return a.metaKey?!0:!1},isFunctionKey:function(a){return a=a.which?a.which:a,a>=112&&123>=a}},l="<div class='select2-measure-scrollbar'></div>",m={"\u24b6":"A","\uff21":"A","\xc0":"A","\xc1":"A","\xc2":"A","\u1ea6":"A","\u1ea4":"A","\u1eaa":"A","\u1ea8":"A","\xc3":"A","\u0100":"A","\u0102":"A","\u1eb0":"A","\u1eae":"A","\u1eb4":"A","\u1eb2":"A","\u0226":"A","\u01e0":"A","\xc4":"A","\u01de":"A","\u1ea2":"A","\xc5":"A","\u01fa":"A","\u01cd":"A","\u0200":"A","\u0202":"A","\u1ea0":"A","\u1eac":"A","\u1eb6":"A","\u1e00":"A","\u0104":"A","\u023a":"A","\u2c6f":"A","\ua732":"AA","\xc6":"AE","\u01fc":"AE","\u01e2":"AE","\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u24b7":"B","\uff22":"B","\u1e02":"B","\u1e04":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24b8":"C","\uff23":"C","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\xc7":"C","\u1e08":"C","\u0187":"C","\u023b":"C","\ua73e":"C","\u24b9":"D","\uff24":"D","\u1e0a":"D","\u010e":"D","\u1e0c":"D","\u1e10":"D","\u1e12":"D","\u1e0e":"D","\u0110":"D","\u018b":"D","\u018a":"D","\u0189":"D","\ua779":"D","\u01f1":"DZ","\u01c4":"DZ","\u01f2":"Dz","\u01c5":"Dz","\u24ba":"E","\uff25":"E","\xc8":"E","\xc9":"E","\xca":"E","\u1ec0":"E","\u1ebe":"E","\u1ec4":"E","\u1ec2":"E","\u1ebc":"E","\u0112":"E","\u1e14":"E","\u1e16":"E","\u0114":"E","\u0116":"E","\xcb":"E","\u1eba":"E","\u011a":"E","\u0204":"E","\u0206":"E","\u1eb8":"E","\u1ec6":"E","\u0228":"E","\u1e1c":"E","\u0118":"E","\u1e18":"E","\u1e1a":"E","\u0190":"E","\u018e":"E","\u24bb":"F","\uff26":"F","\u1e1e":"F","\u0191":"F","\ua77b":"F","\u24bc":"G","\uff27":"G","\u01f4":"G","\u011c":"G","\u1e20":"G","\u011e":"G","\u0120":"G","\u01e6":"G","\u0122":"G","\u01e4":"G","\u0193":"G","\ua7a0":"G","\ua77d":"G","\ua77e":"G","\u24bd":"H","\uff28":"H","\u0124":"H","\u1e22":"H","\u1e26":"H","\u021e":"H","\u1e24":"H","\u1e28":"H","\u1e2a":"H","\u0126":"H","\u2c67":"H","\u2c75":"H","\ua78d":"H","\u24be":"I","\uff29":"I","\xcc":"I","\xcd":"I","\xce":"I","\u0128":"I","\u012a":"I","\u012c":"I","\u0130":"I","\xcf":"I","\u1e2e":"I","\u1ec8":"I","\u01cf":"I","\u0208":"I","\u020a":"I","\u1eca":"I","\u012e":"I","\u1e2c":"I","\u0197":"I","\u24bf":"J","\uff2a":"J","\u0134":"J","\u0248":"J","\u24c0":"K","\uff2b":"K","\u1e30":"K","\u01e8":"K","\u1e32":"K","\u0136":"K","\u1e34":"K","\u0198":"K","\u2c69":"K","\ua740":"K","\ua742":"K","\ua744":"K","\ua7a2":"K","\u24c1":"L","\uff2c":"L","\u013f":"L","\u0139":"L","\u013d":"L","\u1e36":"L","\u1e38":"L","\u013b":"L","\u1e3c":"L","\u1e3a":"L","\u0141":"L","\u023d":"L","\u2c62":"L","\u2c60":"L","\ua748":"L","\ua746":"L","\ua780":"L","\u01c7":"LJ","\u01c8":"Lj","\u24c2":"M","\uff2d":"M","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u019c":"M","\u24c3":"N","\uff2e":"N","\u01f8":"N","\u0143":"N","\xd1":"N","\u1e44":"N","\u0147":"N","\u1e46":"N","\u0145":"N","\u1e4a":"N","\u1e48":"N","\u0220":"N","\u019d":"N","\ua790":"N","\ua7a4":"N","\u01ca":"NJ","\u01cb":"Nj","\u24c4":"O","\uff2f":"O","\xd2":"O","\xd3":"O","\xd4":"O","\u1ed2":"O","\u1ed0":"O","\u1ed6":"O","\u1ed4":"O","\xd5":"O","\u1e4c":"O","\u022c":"O","\u1e4e":"O","\u014c":"O","\u1e50":"O","\u1e52":"O","\u014e":"O","\u022e":"O","\u0230":"O","\xd6":"O","\u022a":"O","\u1ece":"O","\u0150":"O","\u01d1":"O","\u020c":"O","\u020e":"O","\u01a0":"O","\u1edc":"O","\u1eda":"O","\u1ee0":"O","\u1ede":"O","\u1ee2":"O","\u1ecc":"O","\u1ed8":"O","\u01ea":"O","\u01ec":"O","\xd8":"O","\u01fe":"O","\u0186":"O","\u019f":"O","\ua74a":"O","\ua74c":"O","\u01a2":"OI","\ua74e":"OO","\u0222":"OU","\u24c5":"P","\uff30":"P","\u1e54":"P","\u1e56":"P","\u01a4":"P","\u2c63":"P","\ua750":"P","\ua752":"P","\ua754":"P","\u24c6":"Q","\uff31":"Q","\ua756":"Q","\ua758":"Q","\u024a":"Q","\u24c7":"R","\uff32":"R","\u0154":"R","\u1e58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1e5a":"R","\u1e5c":"R","\u0156":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua75a":"R","\ua7a6":"R","\ua782":"R","\u24c8":"S","\uff33":"S","\u1e9e":"S","\u015a":"S","\u1e64":"S","\u015c":"S","\u1e60":"S","\u0160":"S","\u1e66":"S","\u1e62":"S","\u1e68":"S","\u0218":"S","\u015e":"S","\u2c7e":"S","\ua7a8":"S","\ua784":"S","\u24c9":"T","\uff34":"T","\u1e6a":"T","\u0164":"T","\u1e6c":"T","\u021a":"T","\u0162":"T","\u1e70":"T","\u1e6e":"T","\u0166":"T","\u01ac":"T","\u01ae":"T","\u023e":"T","\ua786":"T","\ua728":"TZ","\u24ca":"U","\uff35":"U","\xd9":"U","\xda":"U","\xdb":"U","\u0168":"U","\u1e78":"U","\u016a":"U","\u1e7a":"U","\u016c":"U","\xdc":"U","\u01db":"U","\u01d7":"U","\u01d5":"U","\u01d9":"U","\u1ee6":"U","\u016e":"U","\u0170":"U","\u01d3":"U","\u0214":"U","\u0216":"U","\u01af":"U","\u1eea":"U","\u1ee8":"U","\u1eee":"U","\u1eec":"U","\u1ef0":"U","\u1ee4":"U","\u1e72":"U","\u0172":"U","\u1e76":"U","\u1e74":"U","\u0244":"U","\u24cb":"V","\uff36":"V","\u1e7c":"V","\u1e7e":"V","\u01b2":"V","\ua75e":"V","\u0245":"V","\ua760":"VY","\u24cc":"W","\uff37":"W","\u1e80":"W","\u1e82":"W","\u0174":"W","\u1e86":"W","\u1e84":"W","\u1e88":"W","\u2c72":"W","\u24cd":"X","\uff38":"X","\u1e8a":"X","\u1e8c":"X","\u24ce":"Y","\uff39":"Y","\u1ef2":"Y","\xdd":"Y","\u0176":"Y","\u1ef8":"Y","\u0232":"Y","\u1e8e":"Y","\u0178":"Y","\u1ef6":"Y","\u1ef4":"Y","\u01b3":"Y","\u024e":"Y","\u1efe":"Y","\u24cf":"Z","\uff3a":"Z","\u0179":"Z","\u1e90":"Z","\u017b":"Z","\u017d":"Z","\u1e92":"Z","\u1e94":"Z","\u01b5":"Z","\u0224":"Z","\u2c7f":"Z","\u2c6b":"Z","\ua762":"Z","\u24d0":"a","\uff41":"a","\u1e9a":"a","\xe0":"a","\xe1":"a","\xe2":"a","\u1ea7":"a","\u1ea5":"a","\u1eab":"a","\u1ea9":"a","\xe3":"a","\u0101":"a","\u0103":"a","\u1eb1":"a","\u1eaf":"a","\u1eb5":"a","\u1eb3":"a","\u0227":"a","\u01e1":"a","\xe4":"a","\u01df":"a","\u1ea3":"a","\xe5":"a","\u01fb":"a","\u01ce":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1ead":"a","\u1eb7":"a","\u1e01":"a","\u0105":"a","\u2c65":"a","\u0250":"a","\ua733":"aa","\xe6":"ae","\u01fd":"ae","\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u24d1":"b","\uff42":"b","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24d2":"c","\uff43":"c","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\xe7":"c","\u1e09":"c","\u0188":"c","\u023c":"c","\ua73f":"c","\u2184":"c","\u24d3":"d","\uff44":"d","\u1e0b":"d","\u010f":"d","\u1e0d":"d","\u1e11":"d","\u1e13":"d","\u1e0f":"d","\u0111":"d","\u018c":"d","\u0256":"d","\u0257":"d","\ua77a":"d","\u01f3":"dz","\u01c6":"dz","\u24d4":"e","\uff45":"e","\xe8":"e","\xe9":"e","\xea":"e","\u1ec1":"e","\u1ebf":"e","\u1ec5":"e","\u1ec3":"e","\u1ebd":"e","\u0113":"e","\u1e15":"e","\u1e17":"e","\u0115":"e","\u0117":"e","\xeb":"e","\u1ebb":"e","\u011b":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u1e19":"e","\u1e1b":"e","\u0247":"e","\u025b":"e","\u01dd":"e","\u24d5":"f","\uff46":"f","\u1e1f":"f","\u0192":"f","\ua77c":"f","\u24d6":"g","\uff47":"g","\u01f5":"g","\u011d":"g","\u1e21":"g","\u011f":"g","\u0121":"g","\u01e7":"g","\u0123":"g","\u01e5":"g","\u0260":"g","\ua7a1":"g","\u1d79":"g","\ua77f":"g","\u24d7":"h","\uff48":"h","\u0125":"h","\u1e23":"h","\u1e27":"h","\u021f":"h","\u1e25":"h","\u1e29":"h","\u1e2b":"h","\u1e96":"h","\u0127":"h","\u2c68":"h","\u2c76":"h","\u0265":"h","\u0195":"hv","\u24d8":"i","\uff49":"i","\xec":"i","\xed":"i","\xee":"i","\u0129":"i","\u012b":"i","\u012d":"i","\xef":"i","\u1e2f":"i","\u1ec9":"i","\u01d0":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u012f":"i","\u1e2d":"i","\u0268":"i","\u0131":"i","\u24d9":"j","\uff4a":"j","\u0135":"j","\u01f0":"j","\u0249":"j","\u24da":"k","\uff4b":"k","\u1e31":"k","\u01e9":"k","\u1e33":"k","\u0137":"k","\u1e35":"k","\u0199":"k","\u2c6a":"k","\ua741":"k","\ua743":"k","\ua745":"k","\ua7a3":"k","\u24db":"l","\uff4c":"l","\u0140":"l","\u013a":"l","\u013e":"l","\u1e37":"l","\u1e39":"l","\u013c":"l","\u1e3d":"l","\u1e3b":"l","\u017f":"l","\u0142":"l","\u019a":"l","\u026b":"l","\u2c61":"l","\ua749":"l","\ua781":"l","\ua747":"l","\u01c9":"lj","\u24dc":"m","\uff4d":"m","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u026f":"m","\u24dd":"n","\uff4e":"n","\u01f9":"n","\u0144":"n","\xf1":"n","\u1e45":"n","\u0148":"n","\u1e47":"n","\u0146":"n","\u1e4b":"n","\u1e49":"n","\u019e":"n","\u0272":"n","\u0149":"n","\ua791":"n","\ua7a5":"n","\u01cc":"nj","\u24de":"o","\uff4f":"o","\xf2":"o","\xf3":"o","\xf4":"o","\u1ed3":"o","\u1ed1":"o","\u1ed7":"o","\u1ed5":"o","\xf5":"o","\u1e4d":"o","\u022d":"o","\u1e4f":"o","\u014d":"o","\u1e51":"o","\u1e53":"o","\u014f":"o","\u022f":"o","\u0231":"o","\xf6":"o","\u022b":"o","\u1ecf":"o","\u0151":"o","\u01d2":"o","\u020d":"o","\u020f":"o","\u01a1":"o","\u1edd":"o","\u1edb":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o","\u01eb":"o","\u01ed":"o","\xf8":"o","\u01ff":"o","\u0254":"o","\ua74b":"o","\ua74d":"o","\u0275":"o","\u01a3":"oi","\u0223":"ou","\ua74f":"oo","\u24df":"p","\uff50":"p","\u1e55":"p","\u1e57":"p","\u01a5":"p","\u1d7d":"p","\ua751":"p","\ua753":"p","\ua755":"p","\u24e0":"q","\uff51":"q","\u024b":"q","\ua757":"q","\ua759":"q","\u24e1":"r","\uff52":"r","\u0155":"r","\u1e59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u0157":"r","\u1e5f":"r","\u024d":"r","\u027d":"r","\ua75b":"r","\ua7a7":"r","\ua783":"r","\u24e2":"s","\uff53":"s","\xdf":"s","\u015b":"s","\u1e65":"s","\u015d":"s","\u1e61":"s","\u0161":"s","\u1e67":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u015f":"s","\u023f":"s","\ua7a9":"s","\ua785":"s","\u1e9b":"s","\u24e3":"t","\uff54":"t","\u1e6b":"t","\u1e97":"t","\u0165":"t","\u1e6d":"t","\u021b":"t","\u0163":"t","\u1e71":"t","\u1e6f":"t","\u0167":"t","\u01ad":"t","\u0288":"t","\u2c66":"t","\ua787":"t","\ua729":"tz","\u24e4":"u","\uff55":"u","\xf9":"u","\xfa":"u","\xfb":"u","\u0169":"u","\u1e79":"u","\u016b":"u","\u1e7b":"u","\u016d":"u","\xfc":"u","\u01dc":"u","\u01d8":"u","\u01d6":"u","\u01da":"u","\u1ee7":"u","\u016f":"u","\u0171":"u","\u01d4":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1eeb":"u","\u1ee9":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u0173":"u","\u1e77":"u","\u1e75":"u","\u0289":"u","\u24e5":"v","\uff56":"v","\u1e7d":"v","\u1e7f":"v","\u028b":"v","\ua75f":"v","\u028c":"v","\ua761":"vy","\u24e6":"w","\uff57":"w","\u1e81":"w","\u1e83":"w","\u0175":"w","\u1e87":"w","\u1e85":"w","\u1e98":"w","\u1e89":"w","\u2c73":"w","\u24e7":"x","\uff58":"x","\u1e8b":"x","\u1e8d":"x","\u24e8":"y","\uff59":"y","\u1ef3":"y","\xfd":"y","\u0177":"y","\u1ef9":"y","\u0233":"y","\u1e8f":"y","\xff":"y","\u1ef7":"y","\u1e99":"y","\u1ef5":"y","\u01b4":"y","\u024f":"y","\u1eff":"y","\u24e9":"z","\uff5a":"z","\u017a":"z","\u1e91":"z","\u017c":"z","\u017e":"z","\u1e93":"z","\u1e95":"z","\u01b6":"z","\u0225":"z","\u0240":"z","\u2c6c":"z","\ua763":"z"};j=a(document),g=function(){var a=1;return function(){return a++}}(),j.on("mousemove",function(a){i.x=a.pageX,i.y=a.pageY}),d=O(Object,{bind:function(a){var b=this;return function(){a.apply(b,arguments)}},init:function(c){var d,e,f=".select2-results";this.opts=c=this.prepareOpts(c),this.id=c.id,c.element.data("select2")!==b&&null!==c.element.data("select2")&&c.element.data("select2").destroy(),this.container=this.createContainer(),this.liveRegion=a("<span>",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body),this.containerId="s2id_"+(c.element.attr("id")||"autogen"+g()),this.containerEventName=this.containerId.replace(/([.])/g,"_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.container.attr("title",c.element.attr("title")),this.body=a("body"),D(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",c.element.attr("style")),this.container.css(K(c.containerCss)),this.container.addClass(K(c.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",A),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),D(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(K(c.dropdownCssClass)),this.dropdown.data("select2",this),this.dropdown.on("click",A),this.results=d=this.container.find(f),this.search=e=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",A),v(this.results),this.dropdown.on("mousemove-filtered",f,this.bind(this.highlightUnderEvent)),this.dropdown.on("touchstart touchmove touchend",f,this.bind(function(a){this._touchEvent=!0,this.highlightUnderEvent(a)})),this.dropdown.on("touchmove",f,this.bind(this.touchMoved)),this.dropdown.on("touchstart touchend",f,this.bind(this.clearTouchMoved)),this.dropdown.on("click",this.bind(function(){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())})),x(80,this.results),this.dropdown.on("scroll-debounced",f,this.bind(this.loadMoreIfNeeded)),a(this.container).on("change",".select2-input",function(a){a.stopPropagation()}),a(this.dropdown).on("change",".select2-input",function(a){a.stopPropagation()}),a.fn.mousewheel&&d.mousewheel(function(a,b,c,e){var f=d.scrollTop();e>0&&0>=f-e?(d.scrollTop(0),A(a)):0>e&&d.get(0).scrollHeight-d.scrollTop()+e<=d.height()&&(d.scrollTop(d.get(0).scrollHeight-d.height()),A(a))}),u(e),e.on("keyup-change input paste",this.bind(this.updateResults)),e.on("focus",function(){e.addClass("select2-focused")}),e.on("blur",function(){e.removeClass("select2-focused")}),this.dropdown.on("mouseup",f,this.bind(function(b){a(b.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(b),this.selectHighlighted(b))})),this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(a){a.stopPropagation()}),this.nextSearchTerm=b,a.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==c.maximumInputLength&&this.search.attr("maxlength",c.maximumInputLength);var h=c.element.prop("disabled");h===b&&(h=!1),this.enable(!h);var i=c.element.prop("readonly");i===b&&(i=!1),this.readonly(i),k=k||q(),this.autofocus=c.element.prop("autofocus"),c.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.search.attr("placeholder",c.searchInputPlaceholder)},destroy:function(){var a=this.opts.element,c=a.data("select2");this.close(),this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null),c!==b&&(c.container.remove(),c.liveRegion.remove(),c.dropdown.remove(),a.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?a.attr({tabindex:this.elementTabIndex}):a.removeAttr("tabindex"),a.show()),N.call(this,"container","liveRegion","dropdown","results","search")},optionToData:function(a){return a.is("option")?{id:a.prop("value"),text:a.text(),element:a.get(),css:a.attr("class"),disabled:a.prop("disabled"),locked:r(a.attr("locked"),"locked")||r(a.data("locked"),!0)}:a.is("optgroup")?{text:a.attr("label"),children:[],element:a.get(),css:a.attr("class")}:void 0},prepareOpts:function(c){var d,e,f,h,i=this;if(d=c.element,"select"===d.get(0).tagName.toLowerCase()&&(this.select=e=c.element),e&&a.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in c)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),c=a.extend({},{populateResults:function(d,e,f){var h,j=this.opts.id,k=this.liveRegion;h=function(d,e,l){var m,n,o,p,q,r,s,t,u,v;for(d=c.sortResults(d,e,f),m=0,n=d.length;n>m;m+=1)o=d[m],q=o.disabled===!0,p=!q&&j(o)!==b,r=o.children&&o.children.length>0,s=a("<li></li>"),s.addClass("select2-results-dept-"+l),s.addClass("select2-result"),s.addClass(p?"select2-result-selectable":"select2-result-unselectable"),q&&s.addClass("select2-disabled"),r&&s.addClass("select2-result-with-children"),s.addClass(i.opts.formatResultCssClass(o)),s.attr("role","presentation"),t=a(document.createElement("div")),t.addClass("select2-result-label"),t.attr("id","select2-result-label-"+g()),t.attr("role","option"),v=c.formatResult(o,t,f,i.opts.escapeMarkup),v!==b&&(t.html(v),s.append(t)),r&&(u=a("<ul></ul>"),u.addClass("select2-result-sub"),h(o.children,u,l+1),s.append(u)),s.data("select2-data",o),e.append(s);k.text(c.formatMatches(d.length))},h(e,d,0)}},a.fn.select2.defaults,c),"function"!=typeof c.id&&(f=c.id,c.id=function(a){return a[f]}),a.isArray(c.element.data("select2Tags"))){if("tags"in c)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+c.element.attr("id");c.tags=c.element.data("select2Tags")}if(e?(c.query=this.bind(function(a){var f,g,h,c={results:[],more:!1},e=a.term;h=function(b,c){var d;b.is("option")?a.matcher(e,b.text(),b)&&c.push(i.optionToData(b)):b.is("optgroup")&&(d=i.optionToData(b),b.children().each2(function(a,b){h(b,d.children)}),d.children.length>0&&c.push(d))},f=d.children(),this.getPlaceholder()!==b&&f.length>0&&(g=this.getPlaceholderOption(),g&&(f=f.not(g))),f.each2(function(a,b){h(b,c.results)}),a.callback(c)}),c.id=function(a){return a.id}):"query"in c||("ajax"in c?(h=c.element.data("ajax-url"),h&&h.length>0&&(c.ajax.url=h),c.query=G.call(c.element,c.ajax)):"data"in c?c.query=H(c.data):"tags"in c&&(c.query=I(c.tags),c.createSearchChoice===b&&(c.createSearchChoice=function(b){return{id:a.trim(b),text:a.trim(b)}}),c.initSelection===b&&(c.initSelection=function(b,d){var e=[];a(s(b.val(),c.separator)).each(function(){var b={id:this,text:this},d=c.tags;a.isFunction(d)&&(d=d()),a(d).each(function(){return r(this.id,b.id)?(b=this,!1):void 0}),e.push(b)}),d(e)}))),"function"!=typeof c.query)throw"query function not defined for Select2 "+c.element.attr("id");if("top"===c.createSearchChoicePosition)c.createSearchChoicePosition=function(a,b){a.unshift(b)};else if("bottom"===c.createSearchChoicePosition)c.createSearchChoicePosition=function(a,b){a.push(b)};else if("function"!=typeof c.createSearchChoicePosition)throw"invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function";return c},monitorSource:function(){var c,d,a=this.opts.element;a.on("change.select2",this.bind(function(){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),c=this.bind(function(){var c=a.prop("disabled");c===b&&(c=!1),this.enable(!c);var d=a.prop("readonly");d===b&&(d=!1),this.readonly(d),D(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(K(this.opts.containerCssClass)),D(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(K(this.opts.dropdownCssClass))}),a.length&&a[0].attachEvent&&a.each(function(){this.attachEvent("onpropertychange",c)}),d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,d!==b&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new d(function(a){a.forEach(c)}),this.propertyObserver.observe(a.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(b){var c=a.Event("select2-selecting",{val:this.id(b),object:b});return this.opts.element.trigger(c),!c.isDefaultPrevented()},triggerChange:function(b){b=b||{},b=a.extend({},b,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(b),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return this.enabledInterface===!0},enableInterface:function(){var a=this._enabled&&!this._readonly,b=!a;return a===this.enabledInterface?!1:(this.container.toggleClass("select2-container-disabled",b),this.close(),this.enabledInterface=a,!0)},enable:function(a){a===b&&(a=!0),this._enabled!==a&&(this._enabled=a,this.opts.element.prop("disabled",!a),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(a){a===b&&(a=!1),this._readonly!==a&&(this._readonly=a,this.opts.element.prop("readonly",a),this.enableInterface())},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var t,u,v,w,x,b=this.dropdown,c=this.container.offset(),d=this.container.outerHeight(!1),e=this.container.outerWidth(!1),f=b.outerHeight(!1),g=a(window),h=g.width(),i=g.height(),j=g.scrollLeft()+h,l=g.scrollTop()+i,m=c.top+d,n=c.left,o=l>=m+f,p=c.top-f>=g.scrollTop(),q=b.outerWidth(!1),r=j>=n+q,s=b.hasClass("select2-drop-above");s?(u=!0,!p&&o&&(v=!0,u=!1)):(u=!1,!o&&p&&(v=!0,u=!0)),v&&(b.hide(),c=this.container.offset(),d=this.container.outerHeight(!1),e=this.container.outerWidth(!1),f=b.outerHeight(!1),j=g.scrollLeft()+h,l=g.scrollTop()+i,m=c.top+d,n=c.left,q=b.outerWidth(!1),r=j>=n+q,b.show(),this.focusSearch()),this.opts.dropdownAutoWidth?(x=a(".select2-results",b)[0],b.addClass("select2-drop-auto-width"),b.css("width",""),q=b.outerWidth(!1)+(x.scrollHeight===x.clientHeight?0:k.width),q>e?e=q:q=e,f=b.outerHeight(!1),r=j>=n+q):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body.css("position")&&(t=this.body.offset(),m-=t.top,n-=t.left),r||(n=c.left+this.container.outerWidth(!1)-q),w={left:n,width:e},u?(w.top=c.top-f,w.bottom="auto",this.container.addClass("select2-drop-above"),b.addClass("select2-drop-above")):(w.top=m,w.bottom="auto",this.container.removeClass("select2-drop-above"),b.removeClass("select2-drop-above")),w=a.extend(w,K(this.opts.dropdownCss)),b.css(w)},shouldOpen:function(){var b;return this.opened()?!1:this._enabled===!1||this._readonly===!0?!1:(b=a.Event("select2-opening"),this.opts.element.trigger(b),!b.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(this.opening(),!0):!1},opening:function(){var f,b=this.containerEventName,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body.children().last()[0]&&this.dropdown.detach().appendTo(this.body),f=a("#select2-drop-mask"),0==f.length&&(f=a(document.createElement("div")),f.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),f.hide(),f.appendTo(this.body),f.on("mousedown touchstart click",function(b){n(f);var d,c=a("#select2-drop");c.length>0&&(d=c.data("select2"),d.opts.selectOnBlur&&d.selectHighlighted({noFocus:!0}),d.close(),b.preventDefault(),b.stopPropagation())})),this.dropdown.prev()[0]!==f[0]&&this.dropdown.before(f),a("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),f.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var g=this;this.container.parents().add(window).each(function(){a(this).on(d+" "+c+" "+e,function(){g.opened()&&g.positionDropdown()})})},close:function(){if(this.opened()){var b=this.containerEventName,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.container.parents().add(window).each(function(){a(this).off(c).off(d).off(e)}),this.clearDropdownAlignmentPreference(),a("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active"),this.results.empty(),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(a.Event("select2-close"))}},externalSearch:function(a){this.open(),this.search.val(a),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return K(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var c,d,e,f,g,h,i,b=this.results;if(d=this.highlight(),!(0>d)){if(0==d)return b.scrollTop(0),void 0;c=this.findHighlightableChoices().find(".select2-result-label"),e=a(c[d]),f=e.offset().top+e.outerHeight(!0),d===c.length-1&&(i=b.find("li.select2-more-results"),i.length>0&&(f=i.offset().top+i.outerHeight(!0))),g=b.offset().top+b.outerHeight(!0),f>g&&b.scrollTop(b.scrollTop()+(f-g)),h=e.offset().top-b.offset().top,0>h&&"none"!=e.css("display")&&b.scrollTop(b.scrollTop()+h)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)")},moveHighlight:function(b){for(var c=this.findHighlightableChoices(),d=this.highlight();d>-1&&d<c.length;){d+=b;var e=a(c[d]);if(e.hasClass("select2-result-selectable")&&!e.hasClass("select2-disabled")&&!e.hasClass("select2-selected")){this.highlight(d);break}}},highlight:function(b){var d,e,c=this.findHighlightableChoices();return 0===arguments.length?p(c.filter(".select2-highlighted")[0],c.get()):(b>=c.length&&(b=c.length-1),0>b&&(b=0),this.removeHighlight(),d=a(c[b]),d.addClass("select2-highlighted"),this.search.attr("aria-activedescendant",d.find(".select2-result-label").attr("id")),this.ensureHighlightVisible(),this.liveRegion.text(d.text()),e=d.data("select2-data"),e&&this.opts.element.trigger({type:"select2-highlight",val:this.id(e),choice:e}),void 0)},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},touchMoved:function(){this._touchMoved=!0},clearTouchMoved:function(){this._touchMoved=!1},countSelectableResults:function(){return this.findHighlightableChoices().length
|
22 |
-
},highlightUnderEvent:function(b){var c=a(b.target).closest(".select2-result-selectable");if(c.length>0&&!c.is(".select2-highlighted")){var d=this.findHighlightableChoices();this.highlight(d.index(c))}else 0==c.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var c,a=this.results,b=a.find("li.select2-more-results"),d=this.resultsPage+1,e=this,f=this.search.val(),g=this.context;0!==b.length&&(c=b.offset().top-a.offset().top-a.height(),c<=this.opts.loadMorePadding&&(b.addClass("select2-active"),this.opts.query({element:this.opts.element,term:f,page:d,context:g,matcher:this.opts.matcher,callback:this.bind(function(c){e.opened()&&(e.opts.populateResults.call(this,a,c.results,{term:f,page:d,context:g}),e.postprocessResults(c,!1,!1),c.more===!0?(b.detach().appendTo(a).text(K(e.opts.formatLoadMore,d+1)),window.setTimeout(function(){e.loadMoreIfNeeded()},10)):b.remove(),e.positionDropdown(),e.resultsPage=d,e.context=c.context,this.opts.element.trigger({type:"select2-loaded",items:c}))})})))},tokenize:function(){},updateResults:function(c){function m(){d.removeClass("select2-active"),h.positionDropdown(),e.find(".select2-no-results,.select2-selection-limit,.select2-searching").length?h.liveRegion.text(e.text()):h.liveRegion.text(h.opts.formatMatches(e.find(".select2-result-selectable").length))}function n(a){e.html(a),m()}var g,i,l,d=this.search,e=this.results,f=this.opts,h=this,j=d.val(),k=a.data(this.container,"select2-last-term");if((c===!0||!k||!r(j,k))&&(a.data(this.container,"select2-last-term",j),c===!0||this.showSearchInput!==!1&&this.opened())){l=++this.queryCount;var o=this.getMaximumSelectionSize();if(o>=1&&(g=this.data(),a.isArray(g)&&g.length>=o&&J(f.formatSelectionTooBig,"formatSelectionTooBig")))return n("<li class='select2-selection-limit'>"+K(f.formatSelectionTooBig,o)+"</li>"),void 0;if(d.val().length<f.minimumInputLength)return J(f.formatInputTooShort,"formatInputTooShort")?n("<li class='select2-no-results'>"+K(f.formatInputTooShort,d.val(),f.minimumInputLength)+"</li>"):n(""),c&&this.showSearch&&this.showSearch(!0),void 0;if(f.maximumInputLength&&d.val().length>f.maximumInputLength)return J(f.formatInputTooLong,"formatInputTooLong")?n("<li class='select2-no-results'>"+K(f.formatInputTooLong,d.val(),f.maximumInputLength)+"</li>"):n(""),void 0;f.formatSearching&&0===this.findHighlightableChoices().length&&n("<li class='select2-searching'>"+K(f.formatSearching)+"</li>"),d.addClass("select2-active"),this.removeHighlight(),i=this.tokenize(),i!=b&&null!=i&&d.val(i),this.resultsPage=1,f.query({element:f.element,term:d.val(),page:this.resultsPage,context:null,matcher:f.matcher,callback:this.bind(function(g){var i;if(l==this.queryCount){if(!this.opened())return this.search.removeClass("select2-active"),void 0;if(this.context=g.context===b?null:g.context,this.opts.createSearchChoice&&""!==d.val()&&(i=this.opts.createSearchChoice.call(h,d.val(),g.results),i!==b&&null!==i&&h.id(i)!==b&&null!==h.id(i)&&0===a(g.results).filter(function(){return r(h.id(this),h.id(i))}).length&&this.opts.createSearchChoicePosition(g.results,i)),0===g.results.length&&J(f.formatNoMatches,"formatNoMatches"))return n("<li class='select2-no-results'>"+K(f.formatNoMatches,d.val())+"</li>"),void 0;e.empty(),h.opts.populateResults.call(this,e,g.results,{term:d.val(),page:this.resultsPage,context:null}),g.more===!0&&J(f.formatLoadMore,"formatLoadMore")&&(e.append("<li class='select2-more-results'>"+h.opts.escapeMarkup(K(f.formatLoadMore,this.resultsPage))+"</li>"),window.setTimeout(function(){h.loadMoreIfNeeded()},10)),this.postprocessResults(g,c),m(),this.opts.element.trigger({type:"select2-loaded",items:g})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){y(this.search)},selectHighlighted:function(a){if(this._touchMoved)return this.clearTouchMoved(),void 0;var b=this.highlight(),c=this.results.find(".select2-highlighted"),d=c.closest(".select2-result").data("select2-data");d?(this.highlight(b),this.onSelect(d,a)):a&&a.noFocus&&this.close()},getPlaceholder:function(){var a;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((a=this.getPlaceholderOption())!==b?a.text():b)},getPlaceholderOption:function(){if(this.select){var c=this.select.children("option").first();if(this.opts.placeholderOption!==b)return"first"===this.opts.placeholderOption&&c||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===a.trim(c.text())&&""===c.val())return c}},initContainerWidth:function(){function c(){var c,d,e,f,g,h;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if(c=this.opts.element.attr("style"),c!==b)for(d=c.split(";"),f=0,g=d.length;g>f;f+=1)if(h=d[f].replace(/\s/g,""),e=h.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i),null!==e&&e.length>=1)return e[1];return"resolve"===this.opts.width?(c=this.opts.element.css("width"),c.indexOf("%")>0?c:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px"):null}return a.isFunction(this.opts.width)?this.opts.width():this.opts.width}var d=c.call(this);null!==d&&this.container.css("width",d)}}),e=O(d,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>"," <span class='select2-chosen'> </span><abbr class='select2-search-choice-close'></abbr>"," <span class='select2-arrow' role='presentation'><b role='presentation'></b></span>","</a>","<label for='' class='select2-offscreen'></label>","<input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />","<div class='select2-drop select2-display-none'>"," <div class='select2-search'>"," <label for='' class='select2-offscreen'></label>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'"," aria-autocomplete='list' />"," </div>"," <ul class='select2-results' role='listbox'>"," </ul>","</div>"].join(""));return b},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var c,d,e;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),c=this.search.get(0),c.createTextRange?(d=c.createTextRange(),d.collapse(!1),d.select()):c.setSelectionRange&&(e=this.search.val().length,c.setSelectionRange(e,e))),""===this.search.val()&&this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(a.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){a("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),N.call(this,"selection","focusser")},initContainer:function(){var b,h,d=this.container,e=this.dropdown,f=g();this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=b=d.find(".select2-choice"),this.focusser=d.find(".select2-focusser"),b.find(".select2-chosen").attr("id","select2-chosen-"+f),this.focusser.attr("aria-labelledby","select2-chosen-"+f),this.results.attr("id","select2-results-"+f),this.search.attr("aria-owns","select2-results-"+f),this.focusser.attr("id","s2id_autogen"+f),h=a("label[for='"+this.opts.element.attr("id")+"']"),this.focusser.prev().text(h.text()).attr("for",this.focusser.attr("id"));var i=this.opts.element.attr("title");this.opts.element.attr("title",i||h.text()),this.focusser.attr("tabindex",this.elementTabIndex),this.search.attr("id",this.focusser.attr("id")+"_search"),this.search.prev().text(a("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()){if(a.which===c.PAGE_UP||a.which===c.PAGE_DOWN)return A(a),void 0;switch(a.which){case c.UP:case c.DOWN:return this.moveHighlight(a.which===c.UP?-1:1),A(a),void 0;case c.ENTER:return this.selectHighlighted(),A(a),void 0;case c.TAB:return this.selectHighlighted({noFocus:!0}),void 0;case c.ESC:return this.cancel(a),A(a),void 0}}})),this.search.on("blur",this.bind(function(){document.activeElement===this.body.get(0)&&window.setTimeout(this.bind(function(){this.opened()&&this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()&&a.which!==c.TAB&&!c.isControl(a)&&!c.isFunctionKey(a)&&a.which!==c.ESC){if(this.opts.openOnEnter===!1&&a.which===c.ENTER)return A(a),void 0;if(a.which==c.DOWN||a.which==c.UP||a.which==c.ENTER&&this.opts.openOnEnter){if(a.altKey||a.ctrlKey||a.shiftKey||a.metaKey)return;return this.open(),A(a),void 0}return a.which==c.DELETE||a.which==c.BACKSPACE?(this.opts.allowClear&&this.clear(),A(a),void 0):void 0}})),u(this.focusser),this.focusser.on("keyup-change input",this.bind(function(a){if(this.opts.minimumResultsForSearch>=0){if(a.stopPropagation(),this.opened())return;this.open()}})),b.on("mousedown touchstart","abbr",this.bind(function(a){this.isInterfaceEnabled()&&(this.clear(),B(a),this.close(),this.selection.focus())})),b.on("mousedown touchstart",this.bind(function(c){n(b),this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),A(c)})),e.on("mousedown touchstart",this.bind(function(){this.opts.shouldFocusInput(this)&&this.search.focus()})),b.on("focus",this.bind(function(a){A(a)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(a.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.setPlaceholder()},clear:function(b){var c=this.selection.data("select2-data");if(c){var d=a.Event("select2-clearing");if(this.opts.element.trigger(d),d.isDefaultPrevented())return;var e=this.getPlaceholderOption();this.opts.element.val(e?e.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),b!==!1&&(this.opts.element.trigger({type:"select2-removed",val:this.id(c),choice:c}),this.triggerChange({removed:c}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var c=this;this.opts.initSelection.call(null,this.opts.element,function(a){a!==b&&null!==a&&(c.updateSelection(a),c.close(),c.setPlaceholder(),c.nextSearchTerm=c.opts.nextSearchTerm(a,c.search.val()))})}},isPlaceholderOptionSelected:function(){var a;return this.getPlaceholder()===b?!1:(a=this.getPlaceholderOption())!==b&&a.prop("selected")||""===this.opts.element.val()||this.opts.element.val()===b||null===this.opts.element.val()},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments),c=this;return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var d=a.find("option").filter(function(){return this.selected&&!this.disabled});b(c.optionToData(d))}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=c.val(),f=null;b.query({matcher:function(a,c,d){var g=r(e,b.id(d));return g&&(f=d),g},callback:a.isFunction(d)?function(){d(f)}:a.noop})}),b},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===b?b:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var a=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&a!==b){if(this.select&&this.getPlaceholderOption()===b)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(a)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(a,b,c){var d=0,e=this;if(this.findHighlightableChoices().each2(function(a,b){return r(e.id(b.data("select2-data")),e.opts.element.val())?(d=a,!1):void 0}),c!==!1&&(b===!0&&d>=0?this.highlight(d):this.highlight(0)),b===!0){var g=this.opts.minimumResultsForSearch;g>=0&&this.showSearch(L(a.results)>=g)}},showSearch:function(b){this.showSearchInput!==b&&(this.showSearchInput=b,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!b),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!b),a(this.dropdown,this.container).toggleClass("select2-with-searchbox",b))},onSelect:function(a,b){if(this.triggerSelect(a)){var c=this.opts.element.val(),d=this.data();this.opts.element.val(this.id(a)),this.updateSelection(a),this.opts.element.trigger({type:"select2-selected",val:this.id(a),choice:a}),this.nextSearchTerm=this.opts.nextSearchTerm(a,this.search.val()),this.close(),b&&b.noFocus||!this.opts.shouldFocusInput(this)||this.focusser.focus(),r(c,this.id(a))||this.triggerChange({added:a,removed:d})}},updateSelection:function(a){var d,e,c=this.selection.find(".select2-chosen");this.selection.data("select2-data",a),c.empty(),null!==a&&(d=this.opts.formatSelection(a,c,this.opts.escapeMarkup)),d!==b&&c.append(d),e=this.opts.formatSelectionCssClass(a,c),e!==b&&c.addClass(e),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==b&&this.container.addClass("select2-allowclear")},val:function(){var a,c=!1,d=null,e=this,f=this.data();if(0===arguments.length)return this.opts.element.val();if(a=arguments[0],arguments.length>1&&(c=arguments[1]),this.select)this.select.val(a).find("option").filter(function(){return this.selected}).each2(function(a,b){return d=e.optionToData(b),!1}),this.updateSelection(d),this.setPlaceholder(),c&&this.triggerChange({added:d,removed:f});else{if(!a&&0!==a)return this.clear(c),void 0;if(this.opts.initSelection===b)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(a),this.opts.initSelection(this.opts.element,function(a){e.opts.element.val(a?e.id(a):""),e.updateSelection(a),e.setPlaceholder(),c&&e.triggerChange({added:a,removed:f})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(a){var c,d=!1;return 0===arguments.length?(c=this.selection.data("select2-data"),c==b&&(c=null),c):(arguments.length>1&&(d=arguments[1]),a?(c=this.data(),this.opts.element.val(a?this.id(a):""),this.updateSelection(a),d&&this.triggerChange({added:a,removed:c})):this.clear(d),void 0)}}),f=O(d,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>"," <li class='select2-search-field'>"," <label for='' class='select2-offscreen'></label>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return b},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments),c=this;return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var d=[];a.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(a,b){d.push(c.optionToData(b))}),b(d)}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=s(c.val(),b.separator),f=[];b.query({matcher:function(c,d,g){var h=a.grep(e,function(a){return r(a,b.id(g))}).length;return h&&f.push(g),h},callback:a.isFunction(d)?function(){for(var a=[],c=0;c<e.length;c++)for(var g=e[c],h=0;h<f.length;h++){var i=f[h];if(r(g,b.id(i))){a.push(i),f.splice(h,1);break}}d(a)}:a.noop})}),b},selectChoice:function(a){var b=this.container.find(".select2-search-choice-focus");b.length&&a&&a[0]==b[0]||(b.length&&this.opts.element.trigger("choice-deselected",b),b.removeClass("select2-search-choice-focus"),a&&a.length&&(this.close(),a.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",a)))},destroy:function(){a("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),N.call(this,"searchContainer","selection")},initContainer:function(){var d,b=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=d=this.container.find(b);var e=this;this.selection.on("click",".select2-search-choice:not(.select2-locked)",function(){e.search[0].focus(),e.selectChoice(a(this))}),this.search.attr("id","s2id_autogen"+g()),this.search.prev().text(a("label[for='"+this.opts.element.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("input paste",this.bind(function(){this.isInterfaceEnabled()&&(this.opened()||this.open())})),this.search.attr("tabindex",this.elementTabIndex),this.keydowns=0,this.search.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()){++this.keydowns;var b=d.find(".select2-search-choice-focus"),e=b.prev(".select2-search-choice:not(.select2-locked)"),f=b.next(".select2-search-choice:not(.select2-locked)"),g=z(this.search);if(b.length&&(a.which==c.LEFT||a.which==c.RIGHT||a.which==c.BACKSPACE||a.which==c.DELETE||a.which==c.ENTER)){var h=b;return a.which==c.LEFT&&e.length?h=e:a.which==c.RIGHT?h=f.length?f:null:a.which===c.BACKSPACE?this.unselect(b.first())&&(this.search.width(10),h=e.length?e:f):a.which==c.DELETE?this.unselect(b.first())&&(this.search.width(10),h=f.length?f:null):a.which==c.ENTER&&(h=null),this.selectChoice(h),A(a),h&&h.length||this.open(),void 0}if((a.which===c.BACKSPACE&&1==this.keydowns||a.which==c.LEFT)&&0==g.offset&&!g.length)return this.selectChoice(d.find(".select2-search-choice:not(.select2-locked)").last()),A(a),void 0;if(this.selectChoice(null),this.opened())switch(a.which){case c.UP:case c.DOWN:return this.moveHighlight(a.which===c.UP?-1:1),A(a),void 0;case c.ENTER:return this.selectHighlighted(),A(a),void 0;case c.TAB:return this.selectHighlighted({noFocus:!0}),this.close(),void 0;case c.ESC:return this.cancel(a),A(a),void 0}if(a.which!==c.TAB&&!c.isControl(a)&&!c.isFunctionKey(a)&&a.which!==c.BACKSPACE&&a.which!==c.ESC){if(a.which===c.ENTER){if(this.opts.openOnEnter===!1)return;if(a.altKey||a.ctrlKey||a.shiftKey||a.metaKey)return}this.open(),(a.which===c.PAGE_UP||a.which===c.PAGE_DOWN)&&A(a),a.which===c.ENTER&&A(a)}}})),this.search.on("keyup",this.bind(function(){this.keydowns=0,this.resizeSearch()})),this.search.on("blur",this.bind(function(b){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.selectChoice(null),this.opened()||this.clearSearch(),b.stopImmediatePropagation(),this.opts.element.trigger(a.Event("select2-blur"))})),this.container.on("click",b,this.bind(function(b){this.isInterfaceEnabled()&&(a(b.target).closest(".select2-search-choice").length>0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.open(),this.focusSearch(),b.preventDefault()))})),this.container.on("focus",b,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var c=this;this.opts.initSelection.call(null,this.opts.element,function(a){a!==b&&null!==a&&(c.updateSelection(a),c.close(),c.clearSearch())})}},clearSearch:function(){var a=this.getPlaceholder(),c=this.getMaxSearchWidth();a!==b&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(a).addClass("select2-default"),this.search.width(c>0?c:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),""===this.search.val()&&this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.search.select()),this.updateResults(!0),this.opts.shouldFocusInput(this)&&this.search.focus(),this.opts.element.trigger(a.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(b){var c=[],d=[],e=this;a(b).each(function(){p(e.id(this),c)<0&&(c.push(e.id(this)),d.push(this))}),b=d,this.selection.find(".select2-search-choice").remove(),a(b).each(function(){e.addSelectedChoice(this)}),e.postprocessResults()},tokenize:function(){var a=this.search.val();a=this.opts.tokenizer.call(this,a,this.data(),this.bind(this.onSelect),this.opts),null!=a&&a!=b&&(this.search.val(a),a.length>0&&this.open())},onSelect:function(a,c){this.triggerSelect(a)&&(this.addSelectedChoice(a),this.opts.element.trigger({type:"selected",val:this.id(a),choice:a}),this.nextSearchTerm=this.opts.nextSearchTerm(a,this.search.val()),this.clearSearch(),this.updateResults(),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(a,!1,this.opts.closeOnSelect===!0),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()?this.updateResults(!0):this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.updateResults(),this.search.select()),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:a}),c&&c.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(c){var j,k,d=!c.locked,e=a("<li class='select2-search-choice'> <div></div> <a href='#' class='select2-search-choice-close' tabindex='-1'></a></li>"),f=a("<li class='select2-search-choice select2-locked'><div></div></li>"),g=d?e:f,h=this.id(c),i=this.getVal();j=this.opts.formatSelection(c,g.find("div"),this.opts.escapeMarkup),j!=b&&g.find("div").replaceWith("<div>"+j+"</div>"),k=this.opts.formatSelectionCssClass(c,g.find("div")),k!=b&&g.addClass(k),d&&g.find(".select2-search-choice-close").on("mousedown",A).on("click dblclick",this.bind(function(b){this.isInterfaceEnabled()&&(this.unselect(a(b.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),A(b),this.close(),this.focusSearch())})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),g.data("select2-data",c),g.insertBefore(this.searchContainer),i.push(h),this.setVal(i)},unselect:function(b){var d,e,c=this.getVal();if(b=b.closest(".select2-search-choice"),0===b.length)throw"Invalid argument: "+b+". Must be .select2-search-choice";if(d=b.data("select2-data")){var f=a.Event("select2-removing");if(f.val=this.id(d),f.choice=d,this.opts.element.trigger(f),f.isDefaultPrevented())return!1;for(;(e=p(this.id(d),c))>=0;)c.splice(e,1),this.setVal(c),this.select&&this.postprocessResults();return b.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(d),choice:d}),this.triggerChange({removed:d}),!0}},postprocessResults:function(a,b,c){var d=this.getVal(),e=this.results.find(".select2-result"),f=this.results.find(".select2-result-with-children"),g=this;e.each2(function(a,b){var c=g.id(b.data("select2-data"));p(c,d)>=0&&(b.addClass("select2-selected"),b.find(".select2-result-selectable").addClass("select2-selected"))}),f.each2(function(a,b){b.is(".select2-result-selectable")||0!==b.find(".select2-result-selectable:not(.select2-selected)").length||b.addClass("select2-selected")}),-1==this.highlight()&&c!==!1&&g.highlight(0),!this.opts.createSearchChoice&&!e.filter(".select2-result:not(.select2-selected)").length>0&&(!a||a&&!a.more&&0===this.results.find(".select2-no-results").length)&&J(g.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+K(g.opts.formatNoMatches,g.search.val())+"</li>")},getMaxSearchWidth:function(){return this.selection.width()-t(this.search)},resizeSearch:function(){var a,b,c,d,e,f=t(this.search);a=C(this.search)+10,b=this.search.offset().left,c=this.selection.width(),d=this.selection.offset().left,e=c-(b-d)-f,a>e&&(e=c-f),40>e&&(e=c-f),0>=e&&(e=a),this.search.width(Math.floor(e))},getVal:function(){var a;return this.select?(a=this.select.val(),null===a?[]:a):(a=this.opts.element.val(),s(a,this.opts.separator))},setVal:function(b){var c;this.select?this.select.val(b):(c=[],a(b).each(function(){p(this,c)<0&&c.push(this)}),this.opts.element.val(0===c.length?"":c.join(this.opts.separator)))},buildChangeDetails:function(a,b){for(var b=b.slice(0),a=a.slice(0),c=0;c<b.length;c++)for(var d=0;d<a.length;d++)r(this.opts.id(b[c]),this.opts.id(a[d]))&&(b.splice(c,1),c>0&&c--,a.splice(d,1),d--);return{added:b,removed:a}},val:function(c,d){var e,f=this;if(0===arguments.length)return this.getVal();if(e=this.data(),e.length||(e=[]),!c&&0!==c)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),d&&this.triggerChange({added:this.data(),removed:e}),void 0;if(this.setVal(c),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),d&&this.triggerChange(this.buildChangeDetails(e,this.data()));else{if(this.opts.initSelection===b)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(b){var c=a.map(b,f.id);f.setVal(c),f.updateSelection(b),f.clearSearch(),d&&f.triggerChange(f.buildChangeDetails(e,f.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var b=[],c=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){b.push(c.opts.id(a(this).data("select2-data")))}),this.setVal(b),this.triggerChange()},data:function(b,c){var e,f,d=this;return 0===arguments.length?this.selection.children(".select2-search-choice").map(function(){return a(this).data("select2-data")}).get():(f=this.data(),b||(b=[]),e=a.map(b,function(a){return d.opts.id(a)}),this.setVal(e),this.updateSelection(b),this.clearSearch(),c&&this.triggerChange(this.buildChangeDetails(f,this.data())),void 0)}}),a.fn.select2=function(){var d,e,f,g,h,c=Array.prototype.slice.call(arguments,0),i=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],j=["opened","isFocused","container","dropdown"],k=["val","data"],l={search:"externalSearch"};return this.each(function(){if(0===c.length||"object"==typeof c[0])d=0===c.length?{}:a.extend({},c[0]),d.element=a(this),"select"===d.element.get(0).tagName.toLowerCase()?h=d.element.prop("multiple"):(h=d.multiple||!1,"tags"in d&&(d.multiple=h=!0)),e=h?new window.Select2["class"].multi:new window.Select2["class"].single,e.init(d);else{if("string"!=typeof c[0])throw"Invalid arguments to select2 plugin: "+c;if(p(c[0],i)<0)throw"Unknown method: "+c[0];if(g=b,e=a(this).data("select2"),e===b)return;if(f=c[0],"container"===f?g=e.container:"dropdown"===f?g=e.dropdown:(l[f]&&(f=l[f]),g=e[f].apply(e,c.slice(1))),p(c[0],j)>=0||p(c[0],k)>=0&&1==c.length)return!1}}),g===b?this:g},a.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(a,b,c,d){var e=[];return E(a.text,c.term,e,d),e.join("")},formatSelection:function(a,c,d){return a?d(a.text):b},sortResults:function(a){return a},formatResultCssClass:function(a){return a.css},formatSelectionCssClass:function(){return b},formatMatches:function(a){return a+" results are available, use up and down arrow keys to navigate."},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(a,b){var c=b-a.length;return"Please enter "+c+" or more character"+(1==c?"":"s")},formatInputTooLong:function(a,b){var c=a.length-b;return"Please delete "+c+" character"+(1==c?"":"s")},formatSelectionTooBig:function(a){return"You can only select "+a+" item"+(1==a?"":"s")},formatLoadMore:function(){return"Loading more results\u2026"},formatSearching:function(){return"Searching\u2026"},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(a){return a==b?null:a.id},matcher:function(a,b){return o(""+b).toUpperCase().indexOf(o(""+a).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:M,escapeMarkup:F,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(a){return a},adaptDropdownCssClass:function(){return null},nextSearchTerm:function(){return b},searchInputPlaceholder:"",createSearchChoicePosition:"top",shouldFocusInput:function(a){var b="ontouchstart"in window||navigator.msMaxTouchPoints>0;return b?a.opts.minimumResultsForSearch<0?!1:!0:!0}},a.fn.select2.ajaxDefaults={transport:a.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:G,local:H,tags:I},util:{debounce:w,markMatch:E,escapeMarkup:F,stripDiacritics:o},"class":{"abstract":d,single:e,multi:f}}}}(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/um-select.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
!function(n){void 0===n.fn.each2&&n.extend(n.fn,{each2:function(e){for(var t=n([0]),s=-1,i=this.length;++s<i&&(t.context=t[0]=this[s])&&!1!==e.call(t[0],s,t););return this}})}(jQuery),function(S,b){"use strict";function a(e){var t=S(document.createTextNode(""));e.before(t),t.before(e),t.remove()}function r(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return A[e]||e})}function h(e,t){for(var s=0,i=t.length;s<i;s+=1)if(p(e,t[s]))return s;return-1}function p(e,t){return e===t||e!==b&&t!==b&&(null!==e&&null!==t&&(e.constructor===String?e+""==t+"":t.constructor===String&&t+""==e+""))}function n(e,t){var s,i,n;if(null===e||e.length<1)return[];for(i=0,n=(s=e.split(t)).length;i<n;i+=1)s[i]=S.trim(s[i]);return s}function o(e){return e.outerWidth(!1)-e.width()}function l(t){var s="keyup-change-value";t.on("keydown",function(){S.data(t,s)===b&&S.data(t,s,t.val())}),t.on("keyup",function(){var e=S.data(t,s);e!==b&&t.val()!==e&&(S.removeData(t,s),t.trigger("keyup-change"))})}function d(t,s,i){var n;return i=i||b,function(){var e=arguments;window.clearTimeout(n),n=window.setTimeout(function(){s.apply(i,e)},t)}}function u(e){e.preventDefault(),e.stopPropagation()}function f(e,t,s){var i,n,o=[];(i=e.attr("class"))&&S((i=""+i).split(" ")).each2(function(){0===this.indexOf("select2-")&&o.push(this)}),(i=t.attr("class"))&&S((i=""+i).split(" ")).each2(function(){0!==this.indexOf("select2-")&&((n=s(this))&&o.push(n))}),e.attr("class",o.join(" "))}function c(e,t,s,i){var n=r(e.toUpperCase()).indexOf(r(t.toUpperCase())),o=t.length;return n<0?void s.push(i(e)):(s.push(i(e.substring(0,n))),s.push("<span class='select2-match'>"),s.push(i(e.substring(n,n+o))),s.push("</span>"),void s.push(i(e.substring(n+o,e.length))))}function e(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})}function i(a){var e,r=null,t=a.quietMillis||100,c=a.url,l=this;return function(o){window.clearTimeout(e),e=window.setTimeout(function(){var e=a.data,t=c,s=a.transport||S.fn.select2.ajaxDefaults.transport,i={type:a.type||"GET",cache:a.cache||!1,jsonpCallback:a.jsonpCallback||b,dataType:a.dataType||"json"},n=S.extend({},S.fn.select2.ajaxDefaults.params,i);e=e?e.call(l,o.term,o.page,o.context):null,t="function"==typeof t?t.call(l,o.term,o.page,o.context):t,r&&"function"==typeof r.abort&&r.abort(),a.params&&(S.isFunction(a.params)?S.extend(n,a.params.call(l)):S.extend(n,a.params)),S.extend(n,{url:t,dataType:a.dataType,data:e,success:function(e){var t=a.results(e,o.page);o.callback(t)}}),r=s.call(l,n)},t)}}function g(e){var t,s,i=e,r=function(e){return""+e.text};S.isArray(i)&&(i={results:s=i}),!1===S.isFunction(i)&&(s=i,i=function(){return s});var n=i();return n.text&&(r=n.text,S.isFunction(r)||(t=n.text,r=function(e){return e[t]})),function(n){var o,a=n.term,s={results:[]};return""===a?void n.callback(i()):(o=function(e,t){var s,i;if((e=e[0]).children){for(i in s={},e)e.hasOwnProperty(i)&&(s[i]=e[i]);s.children=[],S(e.children).each2(function(e,t){o(t,s.children)}),(s.children.length||n.matcher(a,r(s),e))&&t.push(s)}else n.matcher(a,r(e),e)&&t.push(e)},S(i().results).each2(function(e,t){o(t,s.results)}),void n.callback(s))}}function m(t){var o=S.isFunction(t);return function(s){var i=s.term,n={results:[]},e=o?t(s):t;S.isArray(e)&&(S(e).each(function(){var e=this.text!==b,t=e?this.text:this;(""===i||s.matcher(i,t))&&n.results.push(e?this:{id:this,text:this})}),s.callback(n))}}function v(e,t){if(S.isFunction(e))return!0;if(!e)return!1;if("string"==typeof e)return!0;throw new Error(t+" must be a string, function, or falsy value")}function y(e){if(S.isFunction(e)){var t=Array.prototype.slice.call(arguments,1);return e.apply(null,t)}return e}function s(){var t=this;Array.prototype.forEach.call(arguments,function(e){t[e].remove(),t[e]=null})}function t(e,t){var s=function(){};return((s.prototype=new e).constructor=s).prototype.parent=e.prototype,s.prototype=S.extend(s.prototype,t),s}if(window.Select2===b){var w,C,E,x,T,O,P,I={x:0,y:0},k={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(e){switch(e=e.which?e.which:e){case k.LEFT:case k.RIGHT:case k.UP:case k.DOWN:return!0}return!1},isControl:function(e){switch(e.which){case k.SHIFT:case k.CTRL:case k.ALT:return!0}return!!e.metaKey},isFunctionKey:function(e){return 112<=(e=e.which?e.which:e)&&e<=123}},A={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z"};O=S(document),R=1,x=function(){return R++},O.on("mousemove",function(e){I.x=e.pageX,I.y=e.pageY}),C=t(w=t(Object,{bind:function(e){var t=this;return function(){e.apply(t,arguments)}},init:function(e){var o,t,s,i,n,a=".select2-results";this.opts=e=this.prepareOpts(e),this.id=e.id,e.element.data("select2")!==b&&null!==e.element.data("select2")&&e.element.data("select2").destroy(),this.container=this.createContainer(),this.liveRegion=S("<span>",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body),this.containerId="s2id_"+(e.element.attr("id")||"autogen"+x()),this.containerEventName=this.containerId.replace(/([.])/g,"_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.container.attr("title",e.element.attr("title")),this.body=S("body"),f(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",e.element.attr("style")),this.container.css(y(e.containerCss)),this.container.addClass(y(e.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",u),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),f(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(y(e.dropdownCssClass)),this.dropdown.data("select2",this),this.dropdown.on("click",u),this.results=o=this.container.find(a),this.search=t=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",u),this.results.on("mousemove",function(e){var t=I;(t===b||t.x!==e.pageX||t.y!==e.pageY)&&S(e.target).trigger("mousemove-filtered",e)}),this.dropdown.on("mousemove-filtered",a,this.bind(this.highlightUnderEvent)),this.dropdown.on("touchstart touchmove touchend",a,this.bind(function(e){this._touchEvent=!0,this.highlightUnderEvent(e)})),this.dropdown.on("touchmove",a,this.bind(this.touchMoved)),this.dropdown.on("touchstart touchend",a,this.bind(this.clearTouchMoved)),this.dropdown.on("click",this.bind(function(){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())})),s=80,i=this.results,n=d(s,function(e){i.trigger("scroll-debounced",e)}),i.on("scroll",function(e){0<=h(e.target,i.get())&&n(e)}),this.dropdown.on("scroll-debounced",a,this.bind(this.loadMoreIfNeeded)),S(this.container).on("change",".select2-input",function(e){e.stopPropagation()}),S(this.dropdown).on("change",".select2-input",function(e){e.stopPropagation()}),S.fn.mousewheel&&o.mousewheel(function(e,t,s,i){var n=o.scrollTop();0<i&&n-i<=0?(o.scrollTop(0),u(e)):i<0&&o.get(0).scrollHeight-o.scrollTop()+i<=o.height()&&(o.scrollTop(o.get(0).scrollHeight-o.height()),u(e))}),l(t),t.on("keyup-change input paste",this.bind(this.updateResults)),t.on("focus",function(){t.addClass("select2-focused")}),t.on("blur",function(){t.removeClass("select2-focused")}),this.dropdown.on("mouseup",a,this.bind(function(e){0<S(e.target).closest(".select2-result-selectable").length&&(this.highlightUnderEvent(e),this.selectHighlighted(e))})),this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(e){e.stopPropagation()}),this.nextSearchTerm=b,S.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==e.maximumInputLength&&this.search.attr("maxlength",e.maximumInputLength);var r=e.element.prop("disabled");r===b&&(r=!1),this.enable(!r);var c=e.element.prop("readonly");c===b&&(c=!1),this.readonly(c),P=P||function(){var e=S("<div class='select2-measure-scrollbar'></div>");e.appendTo("body");var t={width:e.width()-e[0].clientWidth,height:e.height()-e[0].clientHeight};return e.remove(),t}(),this.autofocus=e.element.prop("autofocus"),e.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.search.attr("placeholder",e.searchInputPlaceholder)},destroy:function(){var e=this.opts.element,t=e.data("select2");this.close(),this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null),t!==b&&(t.container.remove(),t.liveRegion.remove(),t.dropdown.remove(),e.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?e.attr({tabindex:this.elementTabIndex}):e.removeAttr("tabindex"),e.show()),s.call(this,"container","liveRegion","dropdown","results","search")},optionToData:function(e){return e.is("option")?{id:e.prop("value"),text:e.text(),element:e.get(),css:e.attr("class"),disabled:e.prop("disabled"),locked:p(e.attr("locked"),"locked")||p(e.data("locked"),!0)}:e.is("optgroup")?{text:e.attr("label"),children:[],element:e.get(),css:e.attr("class")}:void 0},prepareOpts:function(v){var a,e,t,s,w=this;if("select"===(a=v.element).get(0).tagName.toLowerCase()&&(this.select=e=v.element),e&&S.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in v)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),"function"!=typeof(v=S.extend({},{populateResults:function(e,t,p){var f,g=this.opts.id,m=this.liveRegion;(f=function(e,t,s){var i,n,o,a,r,c,l,h,d,u;for(i=0,n=(e=v.sortResults(e,t,p)).length;i<n;i+=1)a=!(r=!0===(o=e[i]).disabled)&&g(o)!==b,c=o.children&&0<o.children.length,(l=S("<li></li>")).addClass("select2-results-dept-"+s),l.addClass("select2-result"),l.addClass(a?"select2-result-selectable":"select2-result-unselectable"),r&&l.addClass("select2-disabled"),c&&l.addClass("select2-result-with-children"),l.addClass(w.opts.formatResultCssClass(o)),l.attr("role","presentation"),(h=S(document.createElement("div"))).addClass("select2-result-label"),h.attr("id","select2-result-label-"+x()),h.attr("role","option"),(u=v.formatResult(o,h,p,w.opts.escapeMarkup))!==b&&(h.html(u),l.append(h)),c&&((d=S("<ul></ul>")).addClass("select2-result-sub"),f(o.children,d,s+1),l.append(d)),l.data("select2-data",o),t.append(l);m.text(v.formatMatches(e.length))})(t,e,0)}},S.fn.select2.defaults,v)).id&&(t=v.id,v.id=function(e){return e[t]}),S.isArray(v.element.data("select2Tags"))){if("tags"in v)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+v.element.attr("id");v.tags=v.element.data("select2Tags")}if(e?(v.query=this.bind(function(i){var e,t,n,s={results:[],more:!1},o=i.term;n=function(e,t){var s;e.is("option")?i.matcher(o,e.text(),e)&&t.push(w.optionToData(e)):e.is("optgroup")&&(s=w.optionToData(e),e.children().each2(function(e,t){n(t,s.children)}),0<s.children.length&&t.push(s))},e=a.children(),this.getPlaceholder()!==b&&0<e.length&&((t=this.getPlaceholderOption())&&(e=e.not(t))),e.each2(function(e,t){n(t,s.results)}),i.callback(s)}),v.id=function(e){return e.id}):"query"in v||("ajax"in v?((s=v.element.data("ajax-url"))&&0<s.length&&(v.ajax.url=s),v.query=i.call(v.element,v.ajax)):"data"in v?v.query=g(v.data):"tags"in v&&(v.query=m(v.tags),v.createSearchChoice===b&&(v.createSearchChoice=function(e){return{id:S.trim(e),text:S.trim(e)}}),v.initSelection===b&&(v.initSelection=function(e,t){var s=[];S(n(e.val(),v.separator)).each(function(){var e={id:this,text:this},t=v.tags;S.isFunction(t)&&(t=t()),S(t).each(function(){return p(this.id,e.id)?(e=this,!1):void 0}),s.push(e)}),t(s)}))),"function"!=typeof v.query)throw"query function not defined for Select2 "+v.element.attr("id");if("top"===v.createSearchChoicePosition)v.createSearchChoicePosition=function(e,t){e.unshift(t)};else if("bottom"===v.createSearchChoicePosition)v.createSearchChoicePosition=function(e,t){e.push(t)};else if("function"!=typeof v.createSearchChoicePosition)throw"invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function";return v},monitorSource:function(){var t,e,s=this.opts.element;s.on("change.select2",this.bind(function(){!0!==this.opts.element.data("select2-change-triggered")&&this.initSelection()})),t=this.bind(function(){var e=s.prop("disabled");e===b&&(e=!1),this.enable(!e);var t=s.prop("readonly");t===b&&(t=!1),this.readonly(t),f(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(y(this.opts.containerCssClass)),f(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(y(this.opts.dropdownCssClass))}),s.length&&s[0].attachEvent&&s.each(function(){this.attachEvent("onpropertychange",t)}),(e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver)!==b&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new e(function(e){e.forEach(t)}),this.propertyObserver.observe(s.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(e){var t=S.Event("select2-selecting",{val:this.id(e),object:e});return this.opts.element.trigger(t),!t.isDefaultPrevented()},triggerChange:function(e){e=e||{},e=S.extend({},e,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(e),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return!0===this.enabledInterface},enableInterface:function(){var e=this._enabled&&!this._readonly,t=!e;return e!==this.enabledInterface&&(this.container.toggleClass("select2-container-disabled",t),this.close(),this.enabledInterface=e,!0)},enable:function(e){e===b&&(e=!0),this._enabled!==e&&(this._enabled=e,this.opts.element.prop("disabled",!e),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(e){e===b&&(e=!1),this._readonly!==e&&(this._readonly=e,this.opts.element.prop("readonly",e),this.enableInterface())},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var e,t,s,i,n,o=this.dropdown,a=this.container.offset(),r=this.container.outerHeight(!1),c=this.container.outerWidth(!1),l=o.outerHeight(!1),h=S(window),d=h.width(),u=h.height(),p=h.scrollLeft()+d,f=h.scrollTop()+u,g=a.top+r,m=a.left,v=g+l<=f,w=a.top-l>=h.scrollTop(),b=o.outerWidth(!1),C=m+b<=p;o.hasClass("select2-drop-above")?(t=!0,!w&&v&&(t=!(s=!0))):(t=!1,!v&&w&&(t=s=!0)),s&&(o.hide(),a=this.container.offset(),r=this.container.outerHeight(!1),c=this.container.outerWidth(!1),l=o.outerHeight(!1),p=h.scrollLeft()+d,f=h.scrollTop()+u,g=a.top+r,C=(m=a.left)+(b=o.outerWidth(!1))<=p,o.show(),this.focusSearch()),this.opts.dropdownAutoWidth?(n=S(".select2-results",o)[0],o.addClass("select2-drop-auto-width"),o.css("width",""),c<(b=o.outerWidth(!1)+(n.scrollHeight===n.clientHeight?0:P.width))?c=b:b=c,l=o.outerHeight(!1),C=m+b<=p):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body.css("position")&&(g-=(e=this.body.offset()).top,m-=e.left),C||(m=a.left+this.container.outerWidth(!1)-b),i={left:m,width:c},t?(i.top=a.top-l,i.bottom="auto",this.container.addClass("select2-drop-above"),o.addClass("select2-drop-above")):(i.top=g,i.bottom="auto",this.container.removeClass("select2-drop-above"),o.removeClass("select2-drop-above")),i=S.extend(i,y(this.opts.dropdownCss)),o.css(i)},shouldOpen:function(){var e;return!this.opened()&&(!1!==this._enabled&&!0!==this._readonly&&(e=S.Event("select2-opening"),this.opts.element.trigger(e),!e.isDefaultPrevented()))},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return!!this.shouldOpen()&&(this.opening(),!0)},opening:function(){var i,e=this.containerEventName,t="scroll."+e,s="resize."+e,n="orientationchange."+e;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body.children().last()[0]&&this.dropdown.detach().appendTo(this.body),0==(i=S("#select2-drop-mask")).length&&((i=S(document.createElement("div"))).attr("id","select2-drop-mask").attr("class","select2-drop-mask"),i.hide(),i.appendTo(this.body),i.on("mousedown touchstart click",function(e){a(i);var t,s=S("#select2-drop");0<s.length&&((t=s.data("select2")).opts.selectOnBlur&&t.selectHighlighted({noFocus:!0}),t.close(),e.preventDefault(),e.stopPropagation())})),this.dropdown.prev()[0]!==i[0]&&this.dropdown.before(i),S("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),i.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var o=this;this.container.parents().add(window).each(function(){S(this).on(s+" "+t+" "+n,function(){o.opened()&&o.positionDropdown()})})},close:function(){if(this.opened()){var e=this.containerEventName,t="scroll."+e,s="resize."+e,i="orientationchange."+e;this.container.parents().add(window).each(function(){S(this).off(t).off(s).off(i)}),this.clearDropdownAlignmentPreference(),S("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active"),this.results.empty(),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(S.Event("select2-close"))}},externalSearch:function(e){this.open(),this.search.val(e),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return y(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var e,t,s,i,n,o,a,r=this.results;if(!((t=this.highlight())<0)){if(0==t)return void r.scrollTop(0);e=this.findHighlightableChoices().find(".select2-result-label"),i=(s=S(e[t])).offset().top+s.outerHeight(!0),t===e.length-1&&(0<(a=r.find("li.select2-more-results")).length&&(i=a.offset().top+a.outerHeight(!0))),(n=r.offset().top+r.outerHeight(!0))<i&&r.scrollTop(r.scrollTop()+(i-n)),(o=s.offset().top-r.offset().top)<0&&"none"!=s.css("display")&&r.scrollTop(r.scrollTop()+o)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)")},moveHighlight:function(e){for(var t=this.findHighlightableChoices(),s=this.highlight();-1<s&&s<t.length;){var i=S(t[s+=e]);if(i.hasClass("select2-result-selectable")&&!i.hasClass("select2-disabled")&&!i.hasClass("select2-selected")){this.highlight(s);break}}},highlight:function(e){var t,s,i=this.findHighlightableChoices();return 0===arguments.length?h(i.filter(".select2-highlighted")[0],i.get()):(e>=i.length&&(e=i.length-1),e<0&&(e=0),this.removeHighlight(),(t=S(i[e])).addClass("select2-highlighted"),this.search.attr("aria-activedescendant",t.find(".select2-result-label").attr("id")),this.ensureHighlightVisible(),this.liveRegion.text(t.text()),void((s=t.data("select2-data"))&&this.opts.element.trigger({type:"select2-highlight",val:this.id(s),choice:s})))},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},touchMoved:function(){this._touchMoved=!0},clearTouchMoved:function(){this._touchMoved=!1},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(e){var t=S(e.target).closest(".select2-result-selectable");if(0<t.length&&!t.is(".select2-highlighted")){var s=this.findHighlightableChoices();this.highlight(s.index(t))}else 0==t.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var t=this.results,s=t.find("li.select2-more-results"),i=this.resultsPage+1,n=this,o=this.search.val(),a=this.context;0!==s.length&&(s.offset().top-t.offset().top-t.height()<=this.opts.loadMorePadding&&(s.addClass("select2-active"),this.opts.query({element:this.opts.element,term:o,page:i,context:a,matcher:this.opts.matcher,callback:this.bind(function(e){n.opened()&&(n.opts.populateResults.call(this,t,e.results,{term:o,page:i,context:a}),n.postprocessResults(e,!1,!1),!0===e.more?(s.detach().appendTo(t).text(y(n.opts.formatLoadMore,i+1)),window.setTimeout(function(){n.loadMoreIfNeeded()},10)):s.remove(),n.positionDropdown(),n.resultsPage=i,n.context=e.context,this.opts.element.trigger({type:"select2-loaded",items:e}))})})))},tokenize:function(){},updateResults:function(s){function i(){a.removeClass("select2-active"),l.positionDropdown(),r.find(".select2-no-results,.select2-selection-limit,.select2-searching").length?l.liveRegion.text(r.text()):l.liveRegion.text(l.opts.formatMatches(r.find(".select2-result-selectable").length))}function n(e){r.html(e),i()}var e,t,o,a=this.search,r=this.results,c=this.opts,l=this,h=a.val(),d=S.data(this.container,"select2-last-term");if((!0===s||!d||!p(h,d))&&(S.data(this.container,"select2-last-term",h),!0===s||!1!==this.showSearchInput&&this.opened())){o=++this.queryCount;var u=this.getMaximumSelectionSize();if(1<=u&&(e=this.data(),S.isArray(e)&&e.length>=u&&v(c.formatSelectionTooBig,"formatSelectionTooBig")))return void n("<li class='select2-selection-limit'>"+y(c.formatSelectionTooBig,u)+"</li>");if(a.val().length<c.minimumInputLength)return v(c.formatInputTooShort,"formatInputTooShort")?n("<li class='select2-no-results'>"+y(c.formatInputTooShort,a.val(),c.minimumInputLength)+"</li>"):n(""),void(s&&this.showSearch&&this.showSearch(!0));if(c.maximumInputLength&&a.val().length>c.maximumInputLength)return void(v(c.formatInputTooLong,"formatInputTooLong")?n("<li class='select2-no-results'>"+y(c.formatInputTooLong,a.val(),c.maximumInputLength)+"</li>"):n(""));c.formatSearching&&0===this.findHighlightableChoices().length&&n("<li class='select2-searching'>"+y(c.formatSearching)+"</li>"),a.addClass("select2-active"),this.removeHighlight(),(t=this.tokenize())!=b&&null!=t&&a.val(t),this.resultsPage=1,c.query({element:c.element,term:a.val(),page:this.resultsPage,context:null,matcher:c.matcher,callback:this.bind(function(e){var t;if(o==this.queryCount){if(!this.opened())return void this.search.removeClass("select2-active");if(this.context=e.context===b?null:e.context,this.opts.createSearchChoice&&""!==a.val()&&((t=this.opts.createSearchChoice.call(l,a.val(),e.results))!==b&&null!==t&&l.id(t)!==b&&null!==l.id(t)&&0===S(e.results).filter(function(){return p(l.id(this),l.id(t))}).length&&this.opts.createSearchChoicePosition(e.results,t)),0===e.results.length&&v(c.formatNoMatches,"formatNoMatches"))return void n("<li class='select2-no-results'>"+y(c.formatNoMatches,a.val())+"</li>");r.empty(),l.opts.populateResults.call(this,r,e.results,{term:a.val(),page:this.resultsPage,context:null}),!0===e.more&&v(c.formatLoadMore,"formatLoadMore")&&(r.append("<li class='select2-more-results'>"+l.opts.escapeMarkup(y(c.formatLoadMore,this.resultsPage))+"</li>"),window.setTimeout(function(){l.loadMoreIfNeeded()},10)),this.postprocessResults(e,s),i(),this.opts.element.trigger({type:"select2-loaded",items:e})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){var i;(i=this.search)[0]!==document.activeElement&&window.setTimeout(function(){var e,t=i[0],s=i.val().length;i.focus(),(0<t.offsetWidth||0<t.offsetHeight)&&t===document.activeElement&&(t.setSelectionRange?t.setSelectionRange(s,s):t.createTextRange&&((e=t.createTextRange()).collapse(!1),e.select()))},0)},selectHighlighted:function(e){if(this._touchMoved)this.clearTouchMoved();else{var t=this.highlight(),s=this.results.find(".select2-highlighted").closest(".select2-result").data("select2-data");s?(this.highlight(t),this.onSelect(s,e)):e&&e.noFocus&&this.close()}},getPlaceholder:function(){var e;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((e=this.getPlaceholderOption())!==b?e.text():b)},getPlaceholderOption:function(){if(this.select){var e=this.select.children("option").first();if(this.opts.placeholderOption!==b)return"first"===this.opts.placeholderOption&&e||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===S.trim(e.text())&&""===e.val())return e}},initContainerWidth:function(){var e=function(){var e,t,s,i,n;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if((e=this.opts.element.attr("style"))!==b)for(i=0,n=(t=e.split(";")).length;i<n;i+=1)if(null!==(s=t[i].replace(/\s/g,"").match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i))&&1<=s.length)return s[1];return"resolve"===this.opts.width?0<(e=this.opts.element.css("width")).indexOf("%")?e:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px":null}return S.isFunction(this.opts.width)?this.opts.width():this.opts.width}.call(this);null!==e&&this.container.css("width",e)}}),{createContainer:function(){return S(document.createElement("div")).attr({class:"select2-container"}).html(["<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>"," <span class='select2-chosen'> </span><abbr class='select2-search-choice-close'></abbr>"," <span class='select2-arrow' role='presentation'><b role='presentation'></b></span>","</a>","<label for='' class='select2-offscreen'></label>","<input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />","<div class='select2-drop select2-display-none'>"," <div class='select2-search'>"," <label for='' class='select2-offscreen'></label>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'"," aria-autocomplete='list' />"," </div>"," <ul class='select2-results' role='listbox'>"," </ul>","</div>"].join(""))},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var e,t,s;0<=this.opts.minimumResultsForSearch&&this.showSearch(!0),this.parent.opening.apply(this,arguments),!1!==this.showSearchInput&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),(e=this.search.get(0)).createTextRange?((t=e.createTextRange()).collapse(!1),t.select()):e.setSelectionRange&&(s=this.search.val().length,e.setSelectionRange(s,s))),""===this.search.val()&&this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(S.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){S("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),s.call(this,"selection","focusser")},initContainer:function(){var t,e,s=this.container,i=this.dropdown,n=x();this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=t=s.find(".select2-choice"),this.focusser=s.find(".select2-focusser"),t.find(".select2-chosen").attr("id","select2-chosen-"+n),this.focusser.attr("aria-labelledby","select2-chosen-"+n),this.results.attr("id","select2-results-"+n),this.search.attr("aria-owns","select2-results-"+n),this.focusser.attr("id","s2id_autogen"+n),e=S("label[for='"+this.opts.element.attr("id")+"']"),this.focusser.prev().text(e.text()).attr("for",this.focusser.attr("id"));var o=this.opts.element.attr("title");this.opts.element.attr("title",o||e.text()),this.focusser.attr("tabindex",this.elementTabIndex),this.search.attr("id",this.focusser.attr("id")+"_search"),this.search.prev().text(S("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()){if(e.which===k.PAGE_UP||e.which===k.PAGE_DOWN)return void u(e);switch(e.which){case k.UP:case k.DOWN:return this.moveHighlight(e.which===k.UP?-1:1),void u(e);case k.ENTER:return this.selectHighlighted(),void u(e);case k.TAB:return void this.selectHighlighted({noFocus:!0});case k.ESC:return this.cancel(e),void u(e)}}})),this.search.on("blur",this.bind(function(){document.activeElement===this.body.get(0)&&window.setTimeout(this.bind(function(){this.opened()&&this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()&&e.which!==k.TAB&&!k.isControl(e)&&!k.isFunctionKey(e)&&e.which!==k.ESC){if(!1===this.opts.openOnEnter&&e.which===k.ENTER)return void u(e);if(e.which==k.DOWN||e.which==k.UP||e.which==k.ENTER&&this.opts.openOnEnter){if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return;return this.open(),void u(e)}return e.which==k.DELETE||e.which==k.BACKSPACE?(this.opts.allowClear&&this.clear(),void u(e)):void 0}})),l(this.focusser),this.focusser.on("keyup-change input",this.bind(function(e){if(0<=this.opts.minimumResultsForSearch){if(e.stopPropagation(),this.opened())return;this.open()}})),t.on("mousedown touchstart","abbr",this.bind(function(e){var t;this.isInterfaceEnabled()&&(this.clear(),(t=e).preventDefault(),t.stopImmediatePropagation(),this.close(),this.selection.focus())})),t.on("mousedown touchstart",this.bind(function(e){a(t),this.container.hasClass("select2-container-active")||this.opts.element.trigger(S.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),u(e)})),i.on("mousedown touchstart",this.bind(function(){this.opts.shouldFocusInput(this)&&this.search.focus()})),t.on("focus",this.bind(function(e){u(e)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(S.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(S.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(S.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.setPlaceholder()},clear:function(e){var t=this.selection.data("select2-data");if(t){var s=S.Event("select2-clearing");if(this.opts.element.trigger(s),s.isDefaultPrevented())return;var i=this.getPlaceholderOption();this.opts.element.val(i?i.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),!1!==e&&(this.opts.element.trigger({type:"select2-removed",val:this.id(t),choice:t}),this.triggerChange({removed:t}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var t=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==b&&null!==e&&(t.updateSelection(e),t.close(),t.setPlaceholder(),t.nextSearchTerm=t.opts.nextSearchTerm(e,t.search.val()))})}},isPlaceholderOptionSelected:function(){var e;return this.getPlaceholder()!==b&&((e=this.getPlaceholderOption())!==b&&e.prop("selected")||""===this.opts.element.val()||this.opts.element.val()===b||null===this.opts.element.val())},prepareOpts:function(){var a=this.parent.prepareOpts.apply(this,arguments),i=this;return"select"===a.element.get(0).tagName.toLowerCase()?a.initSelection=function(e,t){var s=e.find("option").filter(function(){return this.selected&&!this.disabled});t(i.optionToData(s))}:"data"in a&&(a.initSelection=a.initSelection||function(e,t){var n=e.val(),o=null;a.query({matcher:function(e,t,s){var i=p(n,a.id(s));return i&&(o=s),i},callback:S.isFunction(t)?function(){t(o)}:S.noop})}),a},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===b?b:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var e=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&e!==b){if(this.select&&this.getPlaceholderOption()===b)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(e)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(e,t,s){var i=0,n=this;if(this.findHighlightableChoices().each2(function(e,t){return p(n.id(t.data("select2-data")),n.opts.element.val())?(i=e,!1):void 0}),!1!==s&&(!0===t&&0<=i?this.highlight(i):this.highlight(0)),!0===t){var o=this.opts.minimumResultsForSearch;0<=o&&this.showSearch(function s(e){var i=0;return S.each(e,function(e,t){t.children?i+=s(t.children):i++}),i}(e.results)>=o)}},showSearch:function(e){this.showSearchInput!==e&&(this.showSearchInput=e,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!e),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!e),S(this.dropdown,this.container).toggleClass("select2-with-searchbox",e))},onSelect:function(e,t){if(this.triggerSelect(e)){var s=this.opts.element.val(),i=this.data();this.opts.element.val(this.id(e)),this.updateSelection(e),this.opts.element.trigger({type:"select2-selected",val:this.id(e),choice:e}),this.nextSearchTerm=this.opts.nextSearchTerm(e,this.search.val()),this.close(),t&&t.noFocus||!this.opts.shouldFocusInput(this)||this.focusser.focus(),p(s,this.id(e))||this.triggerChange({added:e,removed:i})}},updateSelection:function(e){var t,s,i=this.selection.find(".select2-chosen");this.selection.data("select2-data",e),i.empty(),null!==e&&(t=this.opts.formatSelection(e,i,this.opts.escapeMarkup)),t!==b&&i.append(t),(s=this.opts.formatSelectionCssClass(e,i))!==b&&i.addClass(s),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==b&&this.container.addClass("select2-allowclear")},val:function(){var e,t=!1,s=null,i=this,n=this.data();if(0===arguments.length)return this.opts.element.val();if(e=arguments[0],1<arguments.length&&(t=arguments[1]),this.select)this.select.val(e).find("option").filter(function(){return this.selected}).each2(function(e,t){return s=i.optionToData(t),!1}),this.updateSelection(s),this.setPlaceholder(),t&&this.triggerChange({added:s,removed:n});else{if(!e&&0!==e)return void this.clear(t);if(this.opts.initSelection===b)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(e),this.opts.initSelection(this.opts.element,function(e){i.opts.element.val(e?i.id(e):""),i.updateSelection(e),i.setPlaceholder(),t&&i.triggerChange({added:e,removed:n})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(e){var t,s=!1;return 0===arguments.length?((t=this.selection.data("select2-data"))==b&&(t=null),t):(1<arguments.length&&(s=arguments[1]),void(e?(t=this.data(),this.opts.element.val(e?this.id(e):""),this.updateSelection(e),s&&this.triggerChange({added:e,removed:t})):this.clear(s)))}}),E=t(w,{createContainer:function(){return S(document.createElement("div")).attr({class:"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>"," <li class='select2-search-field'>"," <label for='' class='select2-offscreen'></label>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""))},prepareOpts:function(){var c=this.parent.prepareOpts.apply(this,arguments),i=this;return"select"===c.element.get(0).tagName.toLowerCase()?c.initSelection=function(e,t){var s=[];e.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(e,t){s.push(i.optionToData(t))}),t(s)}:"data"in c&&(c.initSelection=c.initSelection||function(e,o){var a=n(e.val(),c.separator),r=[];c.query({matcher:function(e,t,s){var i=S.grep(a,function(e){return p(e,c.id(s))}).length;return i&&r.push(s),i},callback:S.isFunction(o)?function(){for(var e=[],t=0;t<a.length;t++)for(var s=a[t],i=0;i<r.length;i++){var n=r[i];if(p(s,c.id(n))){e.push(n),r.splice(i,1);break}}o(e)}:S.noop})}),c},selectChoice:function(e){var t=this.container.find(".select2-search-choice-focus");t.length&&e&&e[0]==t[0]||(t.length&&this.opts.element.trigger("choice-deselected",t),t.removeClass("select2-search-choice-focus"),e&&e.length&&(this.close(),e.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",e)))},destroy:function(){S("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),s.call(this,"searchContainer","selection")},initContainer:function(){var a,e=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=a=this.container.find(e);var t=this;this.selection.on("click",".select2-search-choice:not(.select2-locked)",function(){t.search[0].focus(),t.selectChoice(S(this))}),this.search.attr("id","s2id_autogen"+x()),this.search.prev().text(S("label[for='"+this.opts.element.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("input paste",this.bind(function(){this.isInterfaceEnabled()&&(this.opened()||this.open())})),this.search.attr("tabindex",this.elementTabIndex),this.keydowns=0,this.search.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()){++this.keydowns;var t=a.find(".select2-search-choice-focus"),s=t.prev(".select2-search-choice:not(.select2-locked)"),i=t.next(".select2-search-choice:not(.select2-locked)"),n=function(e){var t=0,s=0;if("selectionStart"in(e=S(e)[0]))t=e.selectionStart,s=e.selectionEnd-t;else if("selection"in document){e.focus();var i=document.selection.createRange();s=document.selection.createRange().text.length,i.moveStart("character",-e.value.length),t=i.text.length-s}return{offset:t,length:s}}(this.search);if(t.length&&(e.which==k.LEFT||e.which==k.RIGHT||e.which==k.BACKSPACE||e.which==k.DELETE||e.which==k.ENTER)){var o=t;return e.which==k.LEFT&&s.length?o=s:e.which==k.RIGHT?o=i.length?i:null:e.which===k.BACKSPACE?this.unselect(t.first())&&(this.search.width(10),o=s.length?s:i):e.which==k.DELETE?this.unselect(t.first())&&(this.search.width(10),o=i.length?i:null):e.which==k.ENTER&&(o=null),this.selectChoice(o),u(e),void(o&&o.length||this.open())}if((e.which===k.BACKSPACE&&1==this.keydowns||e.which==k.LEFT)&&0==n.offset&&!n.length)return this.selectChoice(a.find(".select2-search-choice:not(.select2-locked)").last()),void u(e);if(this.selectChoice(null),this.opened())switch(e.which){case k.UP:case k.DOWN:return this.moveHighlight(e.which===k.UP?-1:1),void u(e);case k.ENTER:return this.selectHighlighted(),void u(e);case k.TAB:return this.selectHighlighted({noFocus:!0}),void this.close();case k.ESC:return this.cancel(e),void u(e)}if(e.which!==k.TAB&&!k.isControl(e)&&!k.isFunctionKey(e)&&e.which!==k.BACKSPACE&&e.which!==k.ESC){if(e.which===k.ENTER){if(!1===this.opts.openOnEnter)return;if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return}this.open(),(e.which===k.PAGE_UP||e.which===k.PAGE_DOWN)&&u(e),e.which===k.ENTER&&u(e)}}})),this.search.on("keyup",this.bind(function(){this.keydowns=0,this.resizeSearch()})),this.search.on("blur",this.bind(function(e){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.selectChoice(null),this.opened()||this.clearSearch(),e.stopImmediatePropagation(),this.opts.element.trigger(S.Event("select2-blur"))})),this.container.on("click",e,this.bind(function(e){this.isInterfaceEnabled()&&(0<S(e.target).closest(".select2-search-choice").length||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(S.Event("select2-focus")),this.open(),this.focusSearch(),e.preventDefault()))})),this.container.on("focus",e,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(S.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var t=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==b&&null!==e&&(t.updateSelection(e),t.close(),t.clearSearch())})}},clearSearch:function(){var e=this.getPlaceholder(),t=this.getMaxSearchWidth();e!==b&&0===this.getVal().length&&!1===this.search.hasClass("select2-focused")?(this.search.val(e).addClass("select2-default"),this.search.width(0<t?t:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),""===this.search.val()&&this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.search.select()),this.updateResults(!0),this.opts.shouldFocusInput(this)&&this.search.focus(),this.opts.element.trigger(S.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(e){var t=[],s=[],i=this;S(e).each(function(){h(i.id(this),t)<0&&(t.push(i.id(this)),s.push(this))}),e=s,this.selection.find(".select2-search-choice").remove(),S(e).each(function(){i.addSelectedChoice(this)}),i.postprocessResults()},tokenize:function(){var e=this.search.val();null!=(e=this.opts.tokenizer.call(this,e,this.data(),this.bind(this.onSelect),this.opts))&&e!=b&&(this.search.val(e),0<e.length&&this.open())},onSelect:function(e,t){this.triggerSelect(e)&&(this.addSelectedChoice(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),this.nextSearchTerm=this.opts.nextSearchTerm(e,this.search.val()),this.clearSearch(),this.updateResults(),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(e,!1,!0===this.opts.closeOnSelect),this.opts.closeOnSelect?(this.close(),this.search.width(10)):0<this.countSelectableResults()?(this.search.width(10),this.resizeSearch(),0<this.getMaximumSelectionSize()&&this.val().length>=this.getMaximumSelectionSize()?this.updateResults(!0):this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.updateResults(),this.search.select()),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:e}),t&&t.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(e){var t,s,i=!e.locked,n=S("<li class='select2-search-choice'> <div></div> <a href='#' class='select2-search-choice-close' tabindex='-1'></a></li>"),o=S("<li class='select2-search-choice select2-locked'><div></div></li>"),a=i?n:o,r=this.id(e),c=this.getVal();(t=this.opts.formatSelection(e,a.find("div"),this.opts.escapeMarkup))!=b&&a.find("div").replaceWith("<div>"+t+"</div>"),(s=this.opts.formatSelectionCssClass(e,a.find("div")))!=b&&a.addClass(s),i&&a.find(".select2-search-choice-close").on("mousedown",u).on("click dblclick",this.bind(function(e){this.isInterfaceEnabled()&&(this.unselect(S(e.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),u(e),this.close(),this.focusSearch())})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),a.data("select2-data",e),a.insertBefore(this.searchContainer),c.push(r),this.setVal(c)},unselect:function(e){var t,s,i=this.getVal();if(0===(e=e.closest(".select2-search-choice")).length)throw"Invalid argument: "+e+". Must be .select2-search-choice";if(t=e.data("select2-data")){var n=S.Event("select2-removing");if(n.val=this.id(t),n.choice=t,this.opts.element.trigger(n),n.isDefaultPrevented())return!1;for(;0<=(s=h(this.id(t),i));)i.splice(s,1),this.setVal(i),this.select&&this.postprocessResults();return e.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(t),choice:t}),this.triggerChange({removed:t}),!0}},postprocessResults:function(e,t,s){var i=this.getVal(),n=this.results.find(".select2-result"),o=this.results.find(".select2-result-with-children"),a=this;n.each2(function(e,t){0<=h(a.id(t.data("select2-data")),i)&&(t.addClass("select2-selected"),t.find(".select2-result-selectable").addClass("select2-selected"))}),o.each2(function(e,t){t.is(".select2-result-selectable")||0!==t.find(".select2-result-selectable:not(.select2-selected)").length||t.addClass("select2-selected")}),-1==this.highlight()&&!1!==s&&a.highlight(0),!this.opts.createSearchChoice&&0<!n.filter(".select2-result:not(.select2-selected)").length&&(!e||e&&!e.more&&0===this.results.find(".select2-no-results").length)&&v(a.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+y(a.opts.formatNoMatches,a.search.val())+"</li>")},getMaxSearchWidth:function(){return this.selection.width()-o(this.search)},resizeSearch:function(){var e,t,s,i,n=o(this.search);e=function(e){if(!T){var t=e[0].currentStyle||window.getComputedStyle(e[0],null);(T=S(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:t.fontSize,fontFamily:t.fontFamily,fontStyle:t.fontStyle,fontWeight:t.fontWeight,letterSpacing:t.letterSpacing,textTransform:t.textTransform,whiteSpace:"nowrap"})).attr("class","select2-sizer"),S("body").append(T)}return T.text(e.val()),T.width()}(this.search)+10,t=this.search.offset().left,(i=(s=this.selection.width())-(t-this.selection.offset().left)-n)<e&&(i=s-n),i<40&&(i=s-n),i<=0&&(i=e),this.search.width(Math.floor(i))},getVal:function(){var e;return this.select?null===(e=this.select.val())?[]:e:n(e=this.opts.element.val(),this.opts.separator)},setVal:function(e){var t;this.select?this.select.val(e):(t=[],S(e).each(function(){h(this,t)<0&&t.push(this)}),this.opts.element.val(0===t.length?"":t.join(this.opts.separator)))},buildChangeDetails:function(e,t){t=t.slice(0),e=e.slice(0);for(var s=0;s<t.length;s++)for(var i=0;i<e.length;i++)p(this.opts.id(t[s]),this.opts.id(e[i]))&&(t.splice(s,1),0<s&&s--,e.splice(i,1),i--);return{added:t,removed:e}},val:function(e,s){var i,n=this;if(0===arguments.length)return this.getVal();if((i=this.data()).length||(i=[]),!e&&0!==e)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),void(s&&this.triggerChange({added:this.data(),removed:i}));if(this.setVal(e),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),s&&this.triggerChange(this.buildChangeDetails(i,this.data()));else{if(this.opts.initSelection===b)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(e){var t=S.map(e,n.id);n.setVal(t),n.updateSelection(e),n.clearSearch(),s&&n.triggerChange(n.buildChangeDetails(i,n.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var e=[],t=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){e.push(t.opts.id(S(this).data("select2-data")))}),this.setVal(e),this.triggerChange()},data:function(e,t){var s,i,n=this;return 0===arguments.length?this.selection.children(".select2-search-choice").map(function(){return S(this).data("select2-data")}).get():(i=this.data(),e||(e=[]),s=S.map(e,function(e){return n.opts.id(e)}),this.setVal(s),this.updateSelection(e),this.clearSearch(),void(t&&this.triggerChange(this.buildChangeDetails(i,this.data()))))}}),S.fn.select2=function(){var e,t,s,i,n,o=Array.prototype.slice.call(arguments,0),a=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],r=["opened","isFocused","container","dropdown"],c=["val","data"],l={search:"externalSearch"};return this.each(function(){if(0===o.length||"object"==typeof o[0])(e=0===o.length?{}:S.extend({},o[0])).element=S(this),"select"===e.element.get(0).tagName.toLowerCase()?n=e.element.prop("multiple"):(n=e.multiple||!1,"tags"in e&&(e.multiple=n=!0)),(t=n?new window.Select2.class.multi:new window.Select2.class.single).init(e);else{if("string"!=typeof o[0])throw"Invalid arguments to select2 plugin: "+o;if(h(o[0],a)<0)throw"Unknown method: "+o[0];if(i=b,(t=S(this).data("select2"))===b)return;if("container"===(s=o[0])?i=t.container:"dropdown"===s?i=t.dropdown:(l[s]&&(s=l[s]),i=t[s].apply(t,o.slice(1))),0<=h(o[0],r)||0<=h(o[0],c)&&1==o.length)return!1}}),i===b?this:i},S.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(e,t,s,i){var n=[];return c(e.text,s.term,n,i),n.join("")},formatSelection:function(e,t,s){return e?s(e.text):b},sortResults:function(e){return e},formatResultCssClass:function(e){return e.css},formatSelectionCssClass:function(){return b},formatMatches:function(e){return e+" results are available, use up and down arrow keys to navigate."},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(e,t){var s=t-e.length;return"Please enter "+s+" or more character"+(1==s?"":"s")},formatInputTooLong:function(e,t){var s=e.length-t;return"Please delete "+s+" character"+(1==s?"":"s")},formatSelectionTooBig:function(e){return"You can only select "+e+" item"+(1==e?"":"s")},formatLoadMore:function(){return"Loading more results…"},formatSearching:function(){return"Searching…"},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e==b?null:e.id},matcher:function(e,t){return 0<=r(""+t).toUpperCase().indexOf(r(""+e).toUpperCase())},separator:",",tokenSeparators:[],tokenizer:function(e,t,s,i){var n,o,a,r,c,l=e,h=!1;if(!i.createSearchChoice||!i.tokenSeparators||i.tokenSeparators.length<1)return b;for(;;){for(o=-1,a=0,r=i.tokenSeparators.length;a<r&&(c=i.tokenSeparators[a],!(0<=(o=e.indexOf(c))));a++);if(o<0)break;if(n=e.substring(0,o),e=e.substring(o+c.length),0<n.length&&(n=i.createSearchChoice.call(this,n,t))!==b&&null!==n&&i.id(n)!==b&&null!==i.id(n)){for(h=!1,a=0,r=t.length;a<r;a++)if(p(i.id(n),i.id(t[a]))){h=!0;break}h||s(n)}}return l!==e?e:void 0},escapeMarkup:e,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(e){return e},adaptDropdownCssClass:function(){return null},nextSearchTerm:function(){return b},searchInputPlaceholder:"",createSearchChoicePosition:"top",shouldFocusInput:function(e){return!("ontouchstart"in window||0<navigator.msMaxTouchPoints)||!(e.opts.minimumResultsForSearch<0)}},S.fn.select2.ajaxDefaults={transport:S.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:i,local:g,tags:m},util:{debounce:d,markMatch:c,escapeMarkup:e,stripDiacritics:r},class:{abstract:w,single:C,multi:E}}}var R}(jQuery);
|
|
includes/admin/assets/css/um-admin-columns.css
CHANGED
@@ -5,6 +5,7 @@
|
|
5 |
|
6 |
.um-admin.post-type-um_form .manage-column.column-id {width: 60px}
|
7 |
.um-admin.post-type-um_form .manage-column.column-mode {width: 100px}
|
|
|
8 |
.um-admin.post-type-um_form .manage-column.column-title {width: 200px}
|
9 |
.um-admin.post-type-um_form .manage-column.column-shortcode {width: 200px}
|
10 |
.um-admin.post-type-um_form .manage-column.column-impressions {width: 100px}
|
@@ -12,6 +13,7 @@
|
|
12 |
|
13 |
.um-admin.post-type-um_directory .manage-column.column-id {width: 60px}
|
14 |
.um-admin.post-type-um_directory .manage-column.column-title {width: 250px}
|
|
|
15 |
|
16 |
.um-admin.post-type-um_role .manage-column.column-title {width: 200px}
|
17 |
.um-admin.post-type-um_role .manage-column.column-count {width: 150px}
|
5 |
|
6 |
.um-admin.post-type-um_form .manage-column.column-id {width: 60px}
|
7 |
.um-admin.post-type-um_form .manage-column.column-mode {width: 100px}
|
8 |
+
.um-admin.post-type-um_form .manage-column.column-is_default {width: 60px}
|
9 |
.um-admin.post-type-um_form .manage-column.column-title {width: 200px}
|
10 |
.um-admin.post-type-um_form .manage-column.column-shortcode {width: 200px}
|
11 |
.um-admin.post-type-um_form .manage-column.column-impressions {width: 100px}
|
13 |
|
14 |
.um-admin.post-type-um_directory .manage-column.column-id {width: 60px}
|
15 |
.um-admin.post-type-um_directory .manage-column.column-title {width: 250px}
|
16 |
+
.um-admin.post-type-um_directory .manage-column.column-is_default {width: 60px}
|
17 |
|
18 |
.um-admin.post-type-um_role .manage-column.column-title {width: 200px}
|
19 |
.um-admin.post-type-um_role .manage-column.column-count {width: 150px}
|
includes/admin/assets/js/um-admin-forms.js
CHANGED
@@ -123,10 +123,13 @@ jQuery(document).ready( function() {
|
|
123 |
button.siblings('.um-media-upload-data-width').val(attachment.width);
|
124 |
button.siblings('.um-media-upload-data-height').val(attachment.height);
|
125 |
button.siblings('.um-media-upload-data-thumbnail').val(attachment.thumbnail);
|
|
|
126 |
button.siblings('.um-media-upload-url').val(attachment.url);
|
127 |
|
128 |
button.siblings('.um-clear-image').show();
|
129 |
button.hide();
|
|
|
|
|
130 |
});
|
131 |
|
132 |
frame.open();
|
@@ -137,16 +140,20 @@ jQuery(document).ready( function() {
|
|
137 |
});
|
138 |
|
139 |
jQuery('.um-clear-image').click( function(e) {
|
140 |
-
var
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
|
|
|
|
|
|
|
|
150 |
});
|
151 |
}
|
152 |
|
@@ -154,7 +161,7 @@ jQuery(document).ready( function() {
|
|
154 |
/**
|
155 |
* On option fields change
|
156 |
*/
|
157 |
-
jQuery(
|
158 |
if ( jQuery('.um-forms-line[data-conditional*=\'"' + jQuery(this).data('field_id') + '",\']').length > 0 ) {
|
159 |
run_check_conditions();
|
160 |
}
|
123 |
button.siblings('.um-media-upload-data-width').val(attachment.width);
|
124 |
button.siblings('.um-media-upload-data-height').val(attachment.height);
|
125 |
button.siblings('.um-media-upload-data-thumbnail').val(attachment.thumbnail);
|
126 |
+
button.siblings('.um-media-upload-data-url').trigger('change');
|
127 |
button.siblings('.um-media-upload-url').val(attachment.url);
|
128 |
|
129 |
button.siblings('.um-clear-image').show();
|
130 |
button.hide();
|
131 |
+
|
132 |
+
jQuery( document ).trigger( 'um_media_upload_select', [button, attachment] );
|
133 |
});
|
134 |
|
135 |
frame.open();
|
140 |
});
|
141 |
|
142 |
jQuery('.um-clear-image').click( function(e) {
|
143 |
+
var clear_button = jQuery(this);
|
144 |
+
var default_image_url = clear_button.siblings('.um-forms-field').data('default');
|
145 |
+
clear_button.siblings('.um-set-image').show();
|
146 |
+
clear_button.hide();
|
147 |
+
clear_button.siblings('.icon_preview').attr( 'src', default_image_url );
|
148 |
+
clear_button.siblings('.um-media-upload-data-id').val('');
|
149 |
+
clear_button.siblings('.um-media-upload-data-width').val('');
|
150 |
+
clear_button.siblings('.um-media-upload-data-height').val('');
|
151 |
+
clear_button.siblings('.um-media-upload-data-thumbnail').val('');
|
152 |
+
clear_button.siblings('.um-forms-field').val( default_image_url );
|
153 |
+
clear_button.siblings('.um-media-upload-data-url').trigger('change');
|
154 |
+
clear_button.siblings('.um-media-upload-url').val( default_image_url );
|
155 |
+
|
156 |
+
jQuery( document ).trigger( 'um_media_upload_clear', clear_button );
|
157 |
});
|
158 |
}
|
159 |
|
161 |
/**
|
162 |
* On option fields change
|
163 |
*/
|
164 |
+
jQuery( document.body ).on('change', '.um-forms-field', function() {
|
165 |
if ( jQuery('.um-forms-line[data-conditional*=\'"' + jQuery(this).data('field_id') + '",\']').length > 0 ) {
|
166 |
run_check_conditions();
|
167 |
}
|
includes/admin/class-admin.php
CHANGED
@@ -45,22 +45,32 @@ if ( ! class_exists( 'um\admin\Admin' ) ) {
|
|
45 |
|
46 |
add_action( 'um_admin_do_action__install_core_pages', array( &$this, 'install_core_pages' ) );
|
47 |
|
|
|
|
|
48 |
add_action( 'parent_file', array( &$this, 'parent_file' ), 9 );
|
49 |
add_filter( 'gettext', array( &$this, 'gettext' ), 10, 4 );
|
50 |
add_filter( 'post_updated_messages', array( &$this, 'post_updated_messages' ) );
|
|
|
51 |
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
|
|
|
|
|
|
|
|
61 |
}
|
62 |
|
63 |
|
|
|
|
|
|
|
64 |
function manual_upgrades_request() {
|
65 |
if ( ! is_admin() || ! current_user_can( 'manage_options' ) ) {
|
66 |
die();
|
45 |
|
46 |
add_action( 'um_admin_do_action__install_core_pages', array( &$this, 'install_core_pages' ) );
|
47 |
|
48 |
+
add_filter( 'admin_body_class', array( &$this, 'admin_body_class' ), 999 );
|
49 |
+
|
50 |
add_action( 'parent_file', array( &$this, 'parent_file' ), 9 );
|
51 |
add_filter( 'gettext', array( &$this, 'gettext' ), 10, 4 );
|
52 |
add_filter( 'post_updated_messages', array( &$this, 'post_updated_messages' ) );
|
53 |
+
}
|
54 |
|
55 |
|
56 |
+
/**
|
57 |
+
* Adds class to our admin pages
|
58 |
+
*
|
59 |
+
* @param $classes
|
60 |
+
*
|
61 |
+
* @return string
|
62 |
+
*/
|
63 |
+
function admin_body_class( $classes ) {
|
64 |
+
if ( $this->is_um_screen() ) {
|
65 |
+
return "$classes um-admin";
|
66 |
+
}
|
67 |
+
return $classes;
|
68 |
}
|
69 |
|
70 |
|
71 |
+
/**
|
72 |
+
*
|
73 |
+
*/
|
74 |
function manual_upgrades_request() {
|
75 |
if ( ! is_admin() || ! current_user_can( 'manage_options' ) ) {
|
76 |
die();
|
includes/admin/core/class-admin-ajax-hooks.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace um\admin\core;
|
3 |
+
|
4 |
+
|
5 |
+
// Exit if accessed directly.
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
7 |
+
|
8 |
+
|
9 |
+
if ( ! class_exists( 'um\admin\core\Admin_Ajax_Hooks' ) ) {
|
10 |
+
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class Admin_Ajax_Hooks
|
14 |
+
* @package um\admin\core
|
15 |
+
*/
|
16 |
+
class Admin_Ajax_Hooks {
|
17 |
+
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Admin_Columns constructor.
|
21 |
+
*/
|
22 |
+
function __construct() {
|
23 |
+
add_action( 'wp_ajax_um_do_ajax_action', array( UM()->fields(), 'do_ajax_action' ) );
|
24 |
+
add_action( 'wp_ajax_um_update_builder', array( UM()->builder(), 'update_builder' ) );
|
25 |
+
add_action( 'wp_ajax_um_update_order', array( UM()->dragdrop(), 'update_order' ) );
|
26 |
+
add_action( 'wp_ajax_um_update_field', array( UM()->builder(), 'update_field' ) );
|
27 |
+
add_action( 'wp_ajax_um_dynamic_modal_content', array( UM()->builder(), 'dynamic_modal_content' ) );
|
28 |
+
add_action( 'wp_ajax_um_populate_dropdown_options', array( UM()->builder(), 'populate_dropdown_options' ) );
|
29 |
+
add_action( 'wp_ajax_um_rated', array( UM()->admin_menu(), 'ultimatemember_rated' ) );
|
30 |
+
}
|
31 |
+
|
32 |
+
}
|
33 |
+
}
|
includes/admin/core/class-admin-columns.php
CHANGED
@@ -90,11 +90,12 @@ if ( ! class_exists( 'um\admin\core\Admin_Columns' ) ) {
|
|
90 |
*/
|
91 |
function manage_edit_um_form_columns( $columns ) {
|
92 |
$new_columns['cb'] = '<input type="checkbox" />';
|
93 |
-
$new_columns['title'] = __( 'Title', '
|
94 |
-
$new_columns['id'] = __('ID', '
|
95 |
-
$new_columns['mode'] = __( 'Type', '
|
96 |
-
$new_columns['
|
97 |
-
$new_columns['
|
|
|
98 |
|
99 |
return $new_columns;
|
100 |
}
|
@@ -111,6 +112,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Columns' ) ) {
|
|
111 |
$new_columns['cb'] = '<input type="checkbox" />';
|
112 |
$new_columns['title'] = __( 'Title', 'ultimate-member' );
|
113 |
$new_columns['id'] = __( 'ID', 'ultimate-member' );
|
|
|
114 |
$new_columns['shortcode'] = __( 'Shortcode', 'ultimate-member' );
|
115 |
$new_columns['date'] = __( 'Date', 'ultimate-member' );
|
116 |
|
@@ -131,7 +133,19 @@ if ( ! class_exists( 'um\admin\core\Admin_Columns' ) ) {
|
|
131 |
break;
|
132 |
|
133 |
case 'shortcode':
|
134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
break;
|
136 |
|
137 |
case 'mode':
|
@@ -143,7 +157,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Columns' ) ) {
|
|
143 |
|
144 |
|
145 |
/**
|
146 |
-
* Display
|
147 |
*
|
148 |
* @param string $column_name
|
149 |
* @param int $id
|
@@ -154,7 +168,17 @@ if ( ! class_exists( 'um\admin\core\Admin_Columns' ) ) {
|
|
154 |
echo '<span class="um-admin-number">'.$id.'</span>';
|
155 |
break;
|
156 |
case 'shortcode':
|
157 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
break;
|
159 |
}
|
160 |
}
|
90 |
*/
|
91 |
function manage_edit_um_form_columns( $columns ) {
|
92 |
$new_columns['cb'] = '<input type="checkbox" />';
|
93 |
+
$new_columns['title'] = __( 'Title', 'ulitmate-member' );
|
94 |
+
$new_columns['id'] = __('ID', 'ulitmate-member' );
|
95 |
+
$new_columns['mode'] = __( 'Type', 'ulitmate-member' );
|
96 |
+
$new_columns['is_default'] = __( 'Default', 'ulitmate-member' );
|
97 |
+
$new_columns['shortcode'] = __( 'Shortcode', 'ulitmate-member' );
|
98 |
+
$new_columns['date'] = __( 'Date', 'ulitmate-member' );
|
99 |
|
100 |
return $new_columns;
|
101 |
}
|
112 |
$new_columns['cb'] = '<input type="checkbox" />';
|
113 |
$new_columns['title'] = __( 'Title', 'ultimate-member' );
|
114 |
$new_columns['id'] = __( 'ID', 'ultimate-member' );
|
115 |
+
$new_columns['is_default'] = __( 'Default', 'ulitmate-member' );
|
116 |
$new_columns['shortcode'] = __( 'Shortcode', 'ultimate-member' );
|
117 |
$new_columns['date'] = __( 'Date', 'ultimate-member' );
|
118 |
|
133 |
break;
|
134 |
|
135 |
case 'shortcode':
|
136 |
+
$is_default = UM()->query()->get_attr( 'is_default', $id );
|
137 |
+
|
138 |
+
if ( $is_default ) {
|
139 |
+
echo UM()->shortcodes()->get_default_shortcode( $id );
|
140 |
+
} else {
|
141 |
+
echo UM()->shortcodes()->get_shortcode( $id );
|
142 |
+
}
|
143 |
+
|
144 |
+
break;
|
145 |
+
|
146 |
+
case 'is_default':
|
147 |
+
$is_default = UM()->query()->get_attr( 'is_default', $id );
|
148 |
+
echo empty( $is_default ) ? __( 'No', 'ultimate-member' ) : __( 'Yes', 'ultimate-member' );
|
149 |
break;
|
150 |
|
151 |
case 'mode':
|
157 |
|
158 |
|
159 |
/**
|
160 |
+
* Display custom columns for Directory
|
161 |
*
|
162 |
* @param string $column_name
|
163 |
* @param int $id
|
168 |
echo '<span class="um-admin-number">'.$id.'</span>';
|
169 |
break;
|
170 |
case 'shortcode':
|
171 |
+
$is_default = UM()->query()->get_attr( 'is_default', $id );
|
172 |
+
|
173 |
+
if ( $is_default ) {
|
174 |
+
echo UM()->shortcodes()->get_default_shortcode( $id );
|
175 |
+
} else {
|
176 |
+
echo UM()->shortcodes()->get_shortcode( $id );
|
177 |
+
}
|
178 |
+
break;
|
179 |
+
case 'is_default':
|
180 |
+
$is_default = UM()->query()->get_attr( 'is_default', $id );
|
181 |
+
echo empty( $is_default ) ? __( 'No', 'ultimate-member' ) : __( 'Yes', 'ultimate-member' );
|
182 |
break;
|
183 |
}
|
184 |
}
|
includes/admin/core/class-admin-enqueue.php
CHANGED
@@ -39,8 +39,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
|
|
39 |
|
40 |
add_action( 'admin_enqueue_scripts', array( &$this, 'admin_enqueue_scripts' ) );
|
41 |
|
42 |
-
add_filter( 'admin_body_class', array( &$this, 'admin_body_class' ), 999 );
|
43 |
-
|
44 |
add_filter( 'enter_title_here', array( &$this, 'enter_title_here' ) );
|
45 |
|
46 |
add_action( 'load-user-new.php', array( &$this, 'enqueue_role_wrapper' ) );
|
@@ -344,21 +342,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
|
|
344 |
}
|
345 |
|
346 |
|
347 |
-
/**
|
348 |
-
* Adds class to our admin pages
|
349 |
-
*
|
350 |
-
* @param $classes
|
351 |
-
*
|
352 |
-
* @return string
|
353 |
-
*/
|
354 |
-
function admin_body_class( $classes ) {
|
355 |
-
if ( UM()->admin()->is_um_screen() ) {
|
356 |
-
return "$classes um-admin";
|
357 |
-
}
|
358 |
-
return $classes;
|
359 |
-
}
|
360 |
-
|
361 |
-
|
362 |
/**
|
363 |
* Enqueue scripts and styles
|
364 |
*/
|
39 |
|
40 |
add_action( 'admin_enqueue_scripts', array( &$this, 'admin_enqueue_scripts' ) );
|
41 |
|
|
|
|
|
42 |
add_filter( 'enter_title_here', array( &$this, 'enter_title_here' ) );
|
43 |
|
44 |
add_action( 'load-user-new.php', array( &$this, 'enqueue_role_wrapper' ) );
|
342 |
}
|
343 |
|
344 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
345 |
/**
|
346 |
* Enqueue scripts and styles
|
347 |
*/
|
includes/admin/core/class-admin-forms.php
CHANGED
@@ -967,7 +967,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
|
|
967 |
$class_attr = ' class="um-forms-field um-media-upload-data-url ' . $class . '"';
|
968 |
|
969 |
$data = array(
|
970 |
-
'field_id' => $field_data['id'],
|
971 |
);
|
972 |
|
973 |
if ( ! empty( $field_data['default']['url'] ) )
|
967 |
$class_attr = ' class="um-forms-field um-media-upload-data-url ' . $class . '"';
|
968 |
|
969 |
$data = array(
|
970 |
+
'field_id' => $field_data['id'] . '_url',
|
971 |
);
|
972 |
|
973 |
if ( ! empty( $field_data['default']['url'] ) )
|
includes/admin/core/class-admin-metabox.php
CHANGED
@@ -1087,6 +1087,21 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
|
|
1087 |
$v = preg_split( '/[\r\n]+/', $v, -1, PREG_SPLIT_NO_EMPTY );
|
1088 |
}
|
1089 |
if ( strstr( $k, '_um_' ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1090 |
update_post_meta( $post_id, $k, $v );
|
1091 |
}
|
1092 |
}
|
@@ -1121,8 +1136,24 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
|
|
1121 |
// save
|
1122 |
delete_post_meta( $post_id, '_um_profile_metafields' );
|
1123 |
foreach ( $_POST['form'] as $k => $v ) {
|
1124 |
-
if ( strstr( $k, '_um_' ) ){
|
1125 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1126 |
}
|
1127 |
}
|
1128 |
|
1087 |
$v = preg_split( '/[\r\n]+/', $v, -1, PREG_SPLIT_NO_EMPTY );
|
1088 |
}
|
1089 |
if ( strstr( $k, '_um_' ) ) {
|
1090 |
+
if ( $k === '_um_is_default' ) {
|
1091 |
+
$mode = UM()->query()->get_attr( 'mode', $post_id );
|
1092 |
+
if ( ! empty( $mode ) ) {
|
1093 |
+
$posts = $wpdb->get_col(
|
1094 |
+
"SELECT post_id
|
1095 |
+
FROM {$wpdb->postmeta}
|
1096 |
+
WHERE meta_key = '_um_mode' AND
|
1097 |
+
meta_value = 'directory'"
|
1098 |
+
);
|
1099 |
+
foreach ( $posts as $p_id ) {
|
1100 |
+
delete_post_meta( $p_id, '_um_is_default' );
|
1101 |
+
}
|
1102 |
+
}
|
1103 |
+
}
|
1104 |
+
|
1105 |
update_post_meta( $post_id, $k, $v );
|
1106 |
}
|
1107 |
}
|
1136 |
// save
|
1137 |
delete_post_meta( $post_id, '_um_profile_metafields' );
|
1138 |
foreach ( $_POST['form'] as $k => $v ) {
|
1139 |
+
if ( strstr( $k, '_um_' ) ) {
|
1140 |
+
if ( $k === '_um_is_default' ) {
|
1141 |
+
$mode = UM()->query()->get_attr( 'mode', $post_id );
|
1142 |
+
if ( ! empty( $mode ) ) {
|
1143 |
+
$posts = $wpdb->get_col( $wpdb->prepare(
|
1144 |
+
"SELECT post_id
|
1145 |
+
FROM {$wpdb->postmeta}
|
1146 |
+
WHERE meta_key = '_um_mode' AND
|
1147 |
+
meta_value = %s",
|
1148 |
+
$mode
|
1149 |
+
) );
|
1150 |
+
foreach ( $posts as $p_id ) {
|
1151 |
+
delete_post_meta( $p_id, '_um_is_default' );
|
1152 |
+
}
|
1153 |
+
}
|
1154 |
+
}
|
1155 |
+
|
1156 |
+
update_post_meta( $post_id, $k, $v );
|
1157 |
}
|
1158 |
}
|
1159 |
|
includes/admin/core/class-admin-notices.php
CHANGED
@@ -298,11 +298,11 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
|
298 |
ob_start(); ?>
|
299 |
|
300 |
<p>
|
301 |
-
<?php printf( __( '
|
302 |
</p>
|
303 |
|
304 |
<p>
|
305 |
-
<a href="<?php echo esc_attr( add_query_arg( 'um_adm_action', 'install_core_pages' ) ); ?>" class="button button-primary"><?php _e( '
|
306 |
|
307 |
<a href="javascript:void(0);" class="button-secondary um_secondary_dimiss"><?php _e( 'No thanks', 'ultimate-member' ) ?></a>
|
308 |
</p>
|
@@ -531,7 +531,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
|
531 |
ob_start(); ?>
|
532 |
|
533 |
<p>
|
534 |
-
<?php printf( __( 'Thanks for installing <strong>%s</strong>! We hope you like the plugin.
|
535 |
</p>
|
536 |
|
537 |
<p>
|
298 |
ob_start(); ?>
|
299 |
|
300 |
<p>
|
301 |
+
<?php printf( __( '%s needs to create several pages (User Profiles, Account, Registration, Login, Password Reset, Logout, Member Directory) to function correctly.', 'ultimate-member' ), ultimatemember_plugin_name ); ?>
|
302 |
</p>
|
303 |
|
304 |
<p>
|
305 |
+
<a href="<?php echo esc_attr( add_query_arg( 'um_adm_action', 'install_core_pages' ) ); ?>" class="button button-primary"><?php _e( 'Create Pages', 'ultimate-member' ) ?></a>
|
306 |
|
307 |
<a href="javascript:void(0);" class="button-secondary um_secondary_dimiss"><?php _e( 'No thanks', 'ultimate-member' ) ?></a>
|
308 |
</p>
|
531 |
ob_start(); ?>
|
532 |
|
533 |
<p>
|
534 |
+
<?php printf( __( 'Thanks for installing <strong>%s</strong>! We hope you like the plugin. To fund full-time development and support of the plugin we also sell extensions. If you subscribe to our mailing list we will send you a 20%% discount code for our <a href="%s" target="_blank">extensions bundle</a>.', 'ultimate-member' ), ultimatemember_plugin_name, 'https://ultimatemember.com/core-extensions-bundle/' ); ?>
|
535 |
</p>
|
536 |
|
537 |
<p>
|
includes/admin/core/class-admin-settings.php
CHANGED
@@ -1170,7 +1170,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
|
1170 |
*/
|
1171 |
do_action( "um_settings_page_before_" . $current_tab . "_" . $current_subtab . "_content" );
|
1172 |
|
1173 |
-
if ( in_array( $current_tab, apply_filters('um_settings_custom_tabs', array( 'licenses', 'install_info' ) ) ) || in_array( $current_subtab, apply_filters('um_settings_custom_subtabs', array() ) ) ) {
|
1174 |
|
1175 |
/**
|
1176 |
* UM hook
|
1170 |
*/
|
1171 |
do_action( "um_settings_page_before_" . $current_tab . "_" . $current_subtab . "_content" );
|
1172 |
|
1173 |
+
if ( in_array( $current_tab, apply_filters('um_settings_custom_tabs', array( 'licenses', 'install_info' ) ) ) || in_array( $current_subtab, apply_filters( 'um_settings_custom_subtabs', array(), $current_tab ) ) ) {
|
1174 |
|
1175 |
/**
|
1176 |
* UM hook
|
includes/admin/templates/directory/shortcode.php
CHANGED
@@ -1,3 +1,24 @@
|
|
1 |
<div class="um-admin-metabox">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<p><?php echo UM()->shortcodes()->get_shortcode( get_the_ID() ); ?></p>
|
|
|
3 |
</div>
|
1 |
<div class="um-admin-metabox">
|
2 |
+
<?php /*UM()->admin_forms( array(
|
3 |
+
'class' => 'um-member-directory-shortcode um-top-label',
|
4 |
+
'prefix_id' => 'um_metadata',
|
5 |
+
'fields' => array(
|
6 |
+
array(
|
7 |
+
'id' => '_um_is_default',
|
8 |
+
'type' => 'select',
|
9 |
+
'label' => __( 'Default Member Directory', 'ultimate-member' ),
|
10 |
+
'tooltip' => sprintf( __( 'If you set this member directory as default you will have an ability to use %s shortcode for the displaying directory at the page. Otherwise you will have to use %s', 'ultimate-member' ), UM()->shortcodes()->get_default_shortcode( get_the_ID() ), UM()->shortcodes()->get_shortcode( get_the_ID() ) ),
|
11 |
+
'value' => UM()->query()->get_meta_value( '_um_is_default' ),
|
12 |
+
'options' => array(
|
13 |
+
0 => __( 'No', 'ultimate-member' ),
|
14 |
+
1 => __( 'Yes', 'ultimate-member' ),
|
15 |
+
),
|
16 |
+
),
|
17 |
+
)
|
18 |
+
) )->render_form();*/ ?>
|
19 |
+
|
20 |
+
<!-- <div class="um-admin-clear"></div>-->
|
21 |
+
|
22 |
<p><?php echo UM()->shortcodes()->get_shortcode( get_the_ID() ); ?></p>
|
23 |
+
<!-- <p>--><?php //echo UM()->shortcodes()->get_default_shortcode( get_the_ID() ); ?><!--</p>-->
|
24 |
</div>
|
includes/admin/templates/form/shortcode.php
CHANGED
@@ -1,3 +1,24 @@
|
|
1 |
<div class="um-admin-metabox">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<p><?php echo UM()->shortcodes()->get_shortcode( get_the_ID() ); ?></p>
|
|
|
3 |
</div>
|
1 |
<div class="um-admin-metabox">
|
2 |
+
<?php /*UM()->admin_forms( array(
|
3 |
+
'class' => 'um-form-shortcode um-top-label',
|
4 |
+
'prefix_id' => 'form',
|
5 |
+
'fields' => array(
|
6 |
+
array(
|
7 |
+
'id' => '_um_is_default',
|
8 |
+
'type' => 'select',
|
9 |
+
'label' => __( 'Default Form', 'ultimate-member' ),
|
10 |
+
'tooltip' => sprintf( __( 'If you set this form as default you will have an ability to use %s shortcode for the displaying form at the page. Otherwise you will have to use %s', 'ultimate-member' ), UM()->shortcodes()->get_default_shortcode( get_the_ID() ), UM()->shortcodes()->get_shortcode( get_the_ID() ) ),
|
11 |
+
'value' => UM()->query()->get_meta_value( '_um_is_default' ),
|
12 |
+
'options' => array(
|
13 |
+
0 => __( 'No', 'ultimate-member' ),
|
14 |
+
1 => __( 'Yes', 'ultimate-member' ),
|
15 |
+
),
|
16 |
+
),
|
17 |
+
)
|
18 |
+
) )->render_form();*/ ?>
|
19 |
+
|
20 |
+
<!-- <div class="um-admin-clear"></div>-->
|
21 |
+
|
22 |
<p><?php echo UM()->shortcodes()->get_shortcode( get_the_ID() ); ?></p>
|
23 |
+
<!-- <p>--><?php //echo UM()->shortcodes()->get_default_shortcode( get_the_ID() ); ?><!--</p>-->
|
24 |
</div>
|
includes/class-dependencies.php
CHANGED
@@ -59,6 +59,7 @@ if ( ! class_exists( 'um\Dependencies' ) ) {
|
|
59 |
'beaver-builder' => '2.0',
|
60 |
'user-photos' => '2.0.1',
|
61 |
'user-exporter' => '1.0.0',
|
|
|
62 |
);
|
63 |
|
64 |
|
59 |
'beaver-builder' => '2.0',
|
60 |
'user-photos' => '2.0.1',
|
61 |
'user-exporter' => '1.0.0',
|
62 |
+
'bookmark' => '2.0',
|
63 |
);
|
64 |
|
65 |
|
includes/class-init.php
CHANGED
@@ -525,6 +525,7 @@ if ( ! class_exists( 'UM' ) ) {
|
|
525 |
if ( $this->is_request( 'ajax' ) ) {
|
526 |
$this->admin();
|
527 |
$this->ajax_init();
|
|
|
528 |
$this->metabox();
|
529 |
$this->admin_upgrade()->init_packages_ajax_handlers();
|
530 |
$this->admin_gdpr();
|
@@ -638,6 +639,17 @@ if ( ! class_exists( 'UM' ) ) {
|
|
638 |
}
|
639 |
|
640 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
641 |
/**
|
642 |
* @since 2.0
|
643 |
*
|
@@ -1313,6 +1325,20 @@ if ( ! class_exists( 'UM' ) ) {
|
|
1313 |
}
|
1314 |
|
1315 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1316 |
/**
|
1317 |
* @since 2.0
|
1318 |
*
|
525 |
if ( $this->is_request( 'ajax' ) ) {
|
526 |
$this->admin();
|
527 |
$this->ajax_init();
|
528 |
+
$this->admin_ajax_hooks();
|
529 |
$this->metabox();
|
530 |
$this->admin_upgrade()->init_packages_ajax_handlers();
|
531 |
$this->admin_gdpr();
|
639 |
}
|
640 |
|
641 |
|
642 |
+
/**
|
643 |
+
* @since 2.0.30
|
644 |
+
*/
|
645 |
+
function admin_ajax_hooks() {
|
646 |
+
if ( empty( $this->classes['admin_ajax_hooks'] ) ) {
|
647 |
+
$this->classes['admin_ajax_hooks'] = new um\admin\core\Admin_Ajax_Hooks();
|
648 |
+
}
|
649 |
+
return $this->classes['admin_ajax_hooks'];
|
650 |
+
}
|
651 |
+
|
652 |
+
|
653 |
/**
|
654 |
* @since 2.0
|
655 |
*
|
1325 |
}
|
1326 |
|
1327 |
|
1328 |
+
/**
|
1329 |
+
* @since 2.0
|
1330 |
+
*
|
1331 |
+
* @return um\core\Templates
|
1332 |
+
*/
|
1333 |
+
function templates() {
|
1334 |
+
if ( empty( $this->classes['templates'] ) ) {
|
1335 |
+
$this->classes['templates'] = new um\core\Templates();
|
1336 |
+
}
|
1337 |
+
|
1338 |
+
return $this->classes['templates'];
|
1339 |
+
}
|
1340 |
+
|
1341 |
+
|
1342 |
/**
|
1343 |
* @since 2.0
|
1344 |
*
|
includes/core/class-ajax-common.php
CHANGED
@@ -39,6 +39,7 @@ if ( ! class_exists( 'um\core\AJAX_Common' ) ) {
|
|
39 |
|
40 |
add_action( 'wp_ajax_um_ajax_paginate', array( UM()->query(), 'ajax_paginate' ) );
|
41 |
add_action( 'wp_ajax_um_ajax_paginate_posts', array( UM()->user_posts(), 'load_posts' ) );
|
|
|
42 |
|
43 |
add_action( 'wp_ajax_um_muted_action', array( UM()->form(), 'ajax_muted_action' ) );
|
44 |
|
39 |
|
40 |
add_action( 'wp_ajax_um_ajax_paginate', array( UM()->query(), 'ajax_paginate' ) );
|
41 |
add_action( 'wp_ajax_um_ajax_paginate_posts', array( UM()->user_posts(), 'load_posts' ) );
|
42 |
+
add_action( 'wp_ajax_nopriv_um_ajax_paginate_posts', array( UM()->user_posts(), 'load_posts' ) );
|
43 |
|
44 |
add_action( 'wp_ajax_um_muted_action', array( UM()->form(), 'ajax_muted_action' ) );
|
45 |
|
includes/core/class-date-time.php
CHANGED
@@ -36,10 +36,10 @@ if ( ! class_exists( 'um\core\Date_Time' ) ) {
|
|
36 |
/**
|
37 |
* Show a cool time difference between 2 timestamps
|
38 |
*
|
39 |
-
* @param $from
|
40 |
-
* @param
|
41 |
*
|
42 |
-
* @return
|
43 |
*/
|
44 |
function time_diff( $from, $to = '' ) {
|
45 |
$since = '';
|
@@ -51,52 +51,50 @@ if ( ! class_exists( 'um\core\Date_Time' ) ) {
|
|
51 |
$diff = (int) abs( $to - $from );
|
52 |
if ( $diff < 60 ) {
|
53 |
|
54 |
-
$since = __('just now','ultimate-member');
|
55 |
|
56 |
} elseif ( $diff < HOUR_IN_SECONDS ) {
|
57 |
|
58 |
$mins = round( $diff / MINUTE_IN_SECONDS );
|
59 |
-
if ( $mins <= 1 )
|
60 |
$mins = 1;
|
61 |
-
if ( $mins == 1 ) {
|
62 |
-
$since = sprintf( __('%s min','ultimate-member'), $mins );
|
63 |
-
} else {
|
64 |
-
$since = sprintf( __('%s mins','ultimate-member'), $mins );
|
65 |
}
|
66 |
|
|
|
|
|
67 |
} elseif ( $diff < DAY_IN_SECONDS && $diff >= HOUR_IN_SECONDS ) {
|
68 |
|
69 |
$hours = round( $diff / HOUR_IN_SECONDS );
|
70 |
-
if ( $hours <= 1 )
|
71 |
$hours = 1;
|
72 |
-
if ( $hours == 1 ) {
|
73 |
-
$since = sprintf( __('%s hr','ultimate-member'), $hours );
|
74 |
-
} else {
|
75 |
-
$since = sprintf( __('%s hrs','ultimate-member'), $hours );
|
76 |
}
|
77 |
|
|
|
|
|
78 |
} elseif ( $diff < WEEK_IN_SECONDS && $diff >= DAY_IN_SECONDS ) {
|
79 |
|
80 |
$days = round( $diff / DAY_IN_SECONDS );
|
81 |
-
if ( $days <= 1 )
|
82 |
$days = 1;
|
|
|
|
|
83 |
if ( $days == 1 ) {
|
84 |
-
$since = sprintf( __('Yesterday at %s','ultimate-member'),
|
85 |
} else {
|
86 |
-
$since = sprintf(__('%s at %s','ultimate-member'),
|
87 |
}
|
88 |
|
89 |
} elseif ( $diff < 30 * DAY_IN_SECONDS && $diff >= WEEK_IN_SECONDS ) {
|
90 |
|
91 |
-
$since = sprintf(__('%s at %s','ultimate-member'),
|
92 |
|
93 |
} elseif ( $diff < YEAR_IN_SECONDS && $diff >= 30 * DAY_IN_SECONDS ) {
|
94 |
|
95 |
-
$since = sprintf(__('%s at %s','ultimate-member'),
|
96 |
|
97 |
} elseif ( $diff >= YEAR_IN_SECONDS ) {
|
98 |
|
99 |
-
$since = sprintf(__('%s at %s','ultimate-member'),
|
100 |
|
101 |
}
|
102 |
|
36 |
/**
|
37 |
* Show a cool time difference between 2 timestamps
|
38 |
*
|
39 |
+
* @param int $from
|
40 |
+
* @param int $to
|
41 |
*
|
42 |
+
* @return string
|
43 |
*/
|
44 |
function time_diff( $from, $to = '' ) {
|
45 |
$since = '';
|
51 |
$diff = (int) abs( $to - $from );
|
52 |
if ( $diff < 60 ) {
|
53 |
|
54 |
+
$since = __( 'just now', 'ultimate-member' );
|
55 |
|
56 |
} elseif ( $diff < HOUR_IN_SECONDS ) {
|
57 |
|
58 |
$mins = round( $diff / MINUTE_IN_SECONDS );
|
59 |
+
if ( $mins <= 1 ) {
|
60 |
$mins = 1;
|
|
|
|
|
|
|
|
|
61 |
}
|
62 |
|
63 |
+
$since = sprintf( _n( '%s min', '%s mins', $mins, 'ultimate-member' ), $mins );
|
64 |
+
|
65 |
} elseif ( $diff < DAY_IN_SECONDS && $diff >= HOUR_IN_SECONDS ) {
|
66 |
|
67 |
$hours = round( $diff / HOUR_IN_SECONDS );
|
68 |
+
if ( $hours <= 1 ) {
|
69 |
$hours = 1;
|
|
|
|
|
|
|
|
|
70 |
}
|
71 |
|
72 |
+
$since = sprintf( _n( '%s hr', '%s hrs', $hours, 'ultimate-member' ), $hours );
|
73 |
+
|
74 |
} elseif ( $diff < WEEK_IN_SECONDS && $diff >= DAY_IN_SECONDS ) {
|
75 |
|
76 |
$days = round( $diff / DAY_IN_SECONDS );
|
77 |
+
if ( $days <= 1 ) {
|
78 |
$days = 1;
|
79 |
+
}
|
80 |
+
|
81 |
if ( $days == 1 ) {
|
82 |
+
$since = sprintf( __( 'Yesterday at %s', 'ultimate-member' ), date_i18n( 'g:ia', $from ) );
|
83 |
} else {
|
84 |
+
$since = sprintf( __( '%s at %s', 'ultimate-member' ), date_i18n( 'F d', $from ), date_i18n( 'g:ia', $from ) );
|
85 |
}
|
86 |
|
87 |
} elseif ( $diff < 30 * DAY_IN_SECONDS && $diff >= WEEK_IN_SECONDS ) {
|
88 |
|
89 |
+
$since = sprintf( __( '%s at %s', 'ultimate-member' ), date_i18n( 'F d', $from ), date_i18n( 'g:ia', $from ) );
|
90 |
|
91 |
} elseif ( $diff < YEAR_IN_SECONDS && $diff >= 30 * DAY_IN_SECONDS ) {
|
92 |
|
93 |
+
$since = sprintf( __( '%s at %s','ultimate-member'), date_i18n( 'F d', $from ), date_i18n( 'g:ia', $from ) );
|
94 |
|
95 |
} elseif ( $diff >= YEAR_IN_SECONDS ) {
|
96 |
|
97 |
+
$since = sprintf( __( '%s at %s', 'ultimate-member' ), date_i18n( 'F d, Y', $from ), date_i18n( 'g:ia', $from ) );
|
98 |
|
99 |
}
|
100 |
|
includes/core/class-enqueue.php
CHANGED
@@ -1,9 +1,11 @@
|
|
1 |
<?php
|
2 |
namespace um\core;
|
3 |
|
|
|
4 |
// Exit if accessed directly
|
5 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
6 |
|
|
|
7 |
if ( ! class_exists( 'um\core\Enqueue' ) ) {
|
8 |
|
9 |
|
@@ -13,16 +15,33 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
|
|
13 |
*/
|
14 |
class Enqueue {
|
15 |
|
|
|
16 |
/**
|
17 |
* @var string
|
18 |
*/
|
19 |
var $suffix = '';
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
/**
|
22 |
* Enqueue constructor.
|
23 |
*/
|
24 |
function __construct() {
|
|
|
25 |
|
|
|
|
|
26 |
|
27 |
/**
|
28 |
* UM hook
|
@@ -50,20 +69,106 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
|
|
50 |
|
51 |
|
52 |
/**
|
53 |
-
* Minify css string
|
54 |
*
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
*
|
57 |
-
* @return mixed
|
58 |
*/
|
59 |
-
function
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
}
|
68 |
|
69 |
|
@@ -71,81 +176,38 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
|
|
71 |
* Enqueue scripts and styles
|
72 |
*/
|
73 |
function wp_enqueue_scripts() {
|
74 |
-
global $post;
|
75 |
|
76 |
-
$this->
|
77 |
-
|
78 |
-
if ( ! is_admin() ) {
|
79 |
-
$c_url = UM()->permalinks()->get_current_url( get_option( 'permalink_structure' ) );
|
80 |
-
|
81 |
-
$exclude = UM()->options()->get( 'js_css_exclude' );
|
82 |
-
if ( is_array( $exclude ) ) {
|
83 |
-
array_filter( $exclude );
|
84 |
-
}
|
85 |
-
|
86 |
-
if ( $exclude && is_array( $exclude ) ) {
|
87 |
-
foreach ( $exclude as $match ) {
|
88 |
-
$sub_match = untrailingslashit( $match );
|
89 |
-
if ( ! empty( $c_url ) && ! empty( $sub_match ) && strstr( $c_url, $sub_match ) ) {
|
90 |
-
return;
|
91 |
-
}
|
92 |
-
}
|
93 |
-
}
|
94 |
-
|
95 |
-
$include = UM()->options()->get( 'js_css_include' );
|
96 |
-
if ( is_array( $include ) ) {
|
97 |
-
array_filter( $include );
|
98 |
-
}
|
99 |
-
|
100 |
-
if ( $include && is_array( $include ) ) {
|
101 |
-
foreach ( $include as $match ) {
|
102 |
-
$sub_match = untrailingslashit( $match );
|
103 |
-
if ( ! empty( $c_url ) && ! empty( $sub_match ) && strstr( $c_url, $sub_match ) ) {
|
104 |
-
$force_load = true;
|
105 |
-
} else {
|
106 |
-
if ( ! isset( $force_load ) ) {
|
107 |
-
$force_load = false;
|
108 |
-
}
|
109 |
-
}
|
110 |
-
}
|
111 |
-
}
|
112 |
-
}
|
113 |
-
|
114 |
-
if ( isset( $force_load ) && $force_load == false ) {
|
115 |
-
return;
|
116 |
-
}
|
117 |
|
118 |
$this->load_original();
|
119 |
|
120 |
// rtl style
|
121 |
if ( is_rtl() ) {
|
122 |
-
|
123 |
-
wp_enqueue_style('um_rtl');
|
124 |
}
|
125 |
|
126 |
-
|
127 |
-
$
|
128 |
-
|
129 |
-
wp_register_script('um_datetime_locale', um_url . 'assets/js/pickadate/translations/' . $locale . '.js', '', ultimatemember_version, true );
|
130 |
-
wp_enqueue_script('um_datetime_locale');
|
131 |
-
}
|
132 |
-
|
133 |
-
if(is_object($post) && has_shortcode($post->post_content,'ultimate-member')) {
|
134 |
-
wp_dequeue_script('jquery-form');
|
135 |
}
|
136 |
|
137 |
//old settings before UM 2.0 CSS
|
138 |
-
|
139 |
-
wp_enqueue_style('um_default_css');
|
140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
$uploads = wp_upload_dir();
|
142 |
$upload_dir = $uploads['basedir'] . DIRECTORY_SEPARATOR . 'ultimatemember' . DIRECTORY_SEPARATOR;
|
143 |
if ( file_exists( $upload_dir . 'um_old_settings.css' ) ) {
|
144 |
-
|
145 |
-
|
146 |
-
//fixed using "../../"
|
147 |
-
wp_register_style('um_old_css', um_url . '../../uploads/ultimatemember/um_old_settings.css' );
|
148 |
-
wp_enqueue_style('um_old_css');
|
149 |
}
|
150 |
}
|
151 |
|
@@ -172,7 +234,7 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
|
|
172 |
|
173 |
$this->load_raty();
|
174 |
|
175 |
-
|
176 |
|
177 |
$this->load_scrollbar();
|
178 |
|
@@ -193,10 +255,7 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
|
|
193 |
* Include Google charts
|
194 |
*/
|
195 |
function load_google_charts() {
|
196 |
-
|
197 |
-
wp_register_script('um_gchart', 'https://www.google.com/jsapi' );
|
198 |
-
wp_enqueue_script('um_gchart');
|
199 |
-
|
200 |
}
|
201 |
|
202 |
|
@@ -204,22 +263,11 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
|
|
204 |
* Load plugin css
|
205 |
*/
|
206 |
function load_css() {
|
207 |
-
|
208 |
-
|
209 |
-
wp_enqueue_style('
|
210 |
-
|
211 |
-
|
212 |
-
wp_enqueue_style('um_members');
|
213 |
-
|
214 |
-
wp_register_style('um_profile', um_url . 'assets/css/um-profile.css' );
|
215 |
-
wp_enqueue_style('um_profile');
|
216 |
-
|
217 |
-
wp_register_style('um_account', um_url . 'assets/css/um-account.css' );
|
218 |
-
wp_enqueue_style('um_account');
|
219 |
-
|
220 |
-
wp_register_style('um_misc', um_url . 'assets/css/um-misc.css' );
|
221 |
-
wp_enqueue_style('um_misc');
|
222 |
-
|
223 |
}
|
224 |
|
225 |
|
@@ -227,37 +275,17 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
|
|
227 |
* Load select-dropdowns JS
|
228 |
*/
|
229 |
function load_selectjs() {
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
if ( class_exists( 'WooCommerce' ) || $dequeue_select2 ) {
|
234 |
-
wp_dequeue_style( 'select2' );
|
235 |
-
wp_deregister_style( 'select2' );
|
236 |
-
|
237 |
-
wp_dequeue_script( 'select2');
|
238 |
-
wp_deregister_script('select2');
|
239 |
-
}
|
240 |
-
|
241 |
-
wp_register_script('select2', um_url . 'assets/js/select2/select2.full.min.js', array('jquery', 'jquery-masonry') );
|
242 |
-
wp_enqueue_script('select2');
|
243 |
-
|
244 |
-
wp_register_style('select2', um_url . 'assets/css/select2/select2.min.css' );
|
245 |
-
wp_enqueue_style('select2');
|
246 |
-
|
247 |
}
|
248 |
|
249 |
|
250 |
/**
|
251 |
* Load Fonticons
|
252 |
*/
|
253 |
-
function load_fonticons(){
|
254 |
-
|
255 |
-
|
256 |
-
wp_enqueue_style('um_fonticons_ii');
|
257 |
-
|
258 |
-
wp_register_style('um_fonticons_fa', um_url . 'assets/css/um-fonticons-fa.css' );
|
259 |
-
wp_enqueue_style('um_fonticons_fa');
|
260 |
-
|
261 |
}
|
262 |
|
263 |
|
@@ -265,16 +293,8 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
|
|
265 |
* Load fileupload JS
|
266 |
*/
|
267 |
function load_fileupload() {
|
268 |
-
|
269 |
-
|
270 |
-
wp_enqueue_script('um_jquery_form');
|
271 |
-
|
272 |
-
wp_register_script('um_fileupload', um_url . 'assets/js/um-fileupload' . $this->suffix . '.js' );
|
273 |
-
wp_enqueue_script('um_fileupload');
|
274 |
-
|
275 |
-
wp_register_style('um_fileupload', um_url . 'assets/css/um-fileupload.css' );
|
276 |
-
wp_enqueue_style('um_fileupload');
|
277 |
-
|
278 |
}
|
279 |
|
280 |
|
@@ -282,12 +302,8 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
|
|
282 |
* Load JS functions
|
283 |
*/
|
284 |
function load_functions() {
|
285 |
-
|
286 |
-
|
287 |
-
wp_enqueue_script('um_functions');
|
288 |
-
|
289 |
-
wp_enqueue_script( 'um-gdpr', um_url . 'assets/js/um-gdpr' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, false );
|
290 |
-
|
291 |
}
|
292 |
|
293 |
|
@@ -295,47 +311,11 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
|
|
295 |
* Load custom JS
|
296 |
*/
|
297 |
function load_customjs() {
|
298 |
-
|
299 |
-
wp_register_script('um_conditional', um_url . 'assets/js/um-conditional' . $this->suffix . '.js' );
|
300 |
wp_enqueue_script('um_conditional');
|
301 |
-
|
302 |
-
wp_register_script('um_scripts', um_url . 'assets/js/um-scripts' . $this->suffix . '.js', array('jquery','wp-util') );
|
303 |
-
|
304 |
-
/**
|
305 |
-
* UM hook
|
306 |
-
*
|
307 |
-
* @type filter
|
308 |
-
* @title um_enqueue_localize_data
|
309 |
-
* @description Extend UM localized data
|
310 |
-
* @input_vars
|
311 |
-
* [{"var":"$data","type":"array","desc":"Localize Array"}]
|
312 |
-
* @change_log
|
313 |
-
* ["Since: 2.0"]
|
314 |
-
* @usage add_filter( 'um_enqueue_localize_data', 'function_name', 10, 1 );
|
315 |
-
* @example
|
316 |
-
* <?php
|
317 |
-
* add_filter( 'um_enqueue_localize_data', 'my_enqueue_localize_data', 10, 1 );
|
318 |
-
* function my_enqueue_localize_data( $data ) {
|
319 |
-
* // your code here
|
320 |
-
* return $data;
|
321 |
-
* }
|
322 |
-
* ?>
|
323 |
-
*/
|
324 |
-
$localize_data = apply_filters( 'um_enqueue_localize_data', array() );
|
325 |
-
|
326 |
-
wp_localize_script( 'um_scripts', 'um_scripts', $localize_data );
|
327 |
-
|
328 |
wp_enqueue_script('um_scripts');
|
329 |
-
|
330 |
-
wp_register_script('um_members', um_url . 'assets/js/um-members' . $this->suffix . '.js' );
|
331 |
wp_enqueue_script('um_members');
|
332 |
-
|
333 |
-
wp_register_script('um_profile', um_url . 'assets/js/um-profile' . $this->suffix . '.js', array('jquery','wp-util') );
|
334 |
wp_enqueue_script('um_profile');
|
335 |
-
|
336 |
-
wp_register_script('um_account', um_url . 'assets/js/um-account' . $this->suffix . '.js' );
|
337 |
wp_enqueue_script('um_account');
|
338 |
-
|
339 |
}
|
340 |
|
341 |
|
@@ -343,39 +323,13 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
|
|
343 |
* Load date & time picker
|
344 |
*/
|
345 |
function load_datetimepicker() {
|
346 |
-
|
347 |
-
wp_register_script('um_datetime', um_url . 'assets/js/pickadate/picker.js' );
|
348 |
wp_enqueue_script('um_datetime');
|
349 |
-
|
350 |
-
wp_register_script('um_datetime_date', um_url . 'assets/js/pickadate/picker.date.js' );
|
351 |
wp_enqueue_script('um_datetime_date');
|
352 |
-
|
353 |
-
wp_register_script('um_datetime_time', um_url . 'assets/js/pickadate/picker.time.js' );
|
354 |
wp_enqueue_script('um_datetime_time');
|
355 |
-
|
356 |
-
wp_register_script('um_datetime_legacy', um_url . 'assets/js/pickadate/legacy.js' );
|
357 |
wp_enqueue_script('um_datetime_legacy');
|
358 |
-
|
359 |
-
wp_register_style('um_datetime', um_url . 'assets/css/pickadate/default.css' );
|
360 |
wp_enqueue_style('um_datetime');
|
361 |
-
|
362 |
-
wp_register_style('um_datetime_date', um_url . 'assets/css/pickadate/default.date.css' );
|
363 |
wp_enqueue_style('um_datetime_date');
|
364 |
-
|
365 |
-
wp_register_style('um_datetime_time', um_url . 'assets/css/pickadate/default.time.css' );
|
366 |
wp_enqueue_style('um_datetime_time');
|
367 |
-
|
368 |
-
}
|
369 |
-
|
370 |
-
|
371 |
-
/**
|
372 |
-
* Load scrollto
|
373 |
-
*/
|
374 |
-
function load_scrollto(){
|
375 |
-
|
376 |
-
wp_register_script('um_scrollto', um_url . 'assets/js/um-scrollto' . $this->suffix . '.js' );
|
377 |
-
wp_enqueue_script('um_scrollto');
|
378 |
-
|
379 |
}
|
380 |
|
381 |
|
@@ -383,83 +337,52 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
|
|
383 |
* Load scrollbar
|
384 |
*/
|
385 |
function load_scrollbar(){
|
386 |
-
|
387 |
-
wp_register_script('um_scrollbar', um_url . 'assets/js/um-scrollbar' . $this->suffix . '.js' );
|
388 |
-
wp_enqueue_script('um_scrollbar');
|
389 |
-
|
390 |
-
wp_register_style('um_scrollbar', um_url . 'assets/css/um-scrollbar.css' );
|
391 |
wp_enqueue_style('um_scrollbar');
|
392 |
-
|
393 |
}
|
394 |
|
395 |
|
396 |
/**
|
397 |
* Load rating
|
398 |
*/
|
399 |
-
function load_raty(){
|
400 |
-
|
401 |
-
wp_register_script('um_raty', um_url . 'assets/js/um-raty' . $this->suffix . '.js' );
|
402 |
wp_enqueue_script('um_raty');
|
403 |
-
|
404 |
-
wp_register_style('um_raty', um_url . 'assets/css/um-raty.css' );
|
405 |
wp_enqueue_style('um_raty');
|
406 |
-
|
407 |
}
|
408 |
|
409 |
|
410 |
/**
|
411 |
* Load crop script
|
412 |
*/
|
413 |
-
function load_imagecrop(){
|
414 |
-
|
415 |
-
|
416 |
-
wp_enqueue_script('um_crop');
|
417 |
-
|
418 |
-
wp_register_style('um_crop', um_url . 'assets/css/um-crop.css' );
|
419 |
-
wp_enqueue_style('um_crop');
|
420 |
-
|
421 |
}
|
422 |
|
423 |
|
424 |
/**
|
425 |
* Load tipsy
|
426 |
*/
|
427 |
-
function load_tipsy(){
|
428 |
-
|
429 |
-
|
430 |
-
wp_enqueue_script('um_tipsy');
|
431 |
-
|
432 |
-
wp_register_style('um_tipsy', um_url . 'assets/css/um-tipsy.css' );
|
433 |
-
wp_enqueue_style('um_tipsy');
|
434 |
-
|
435 |
}
|
436 |
|
437 |
|
438 |
/**
|
439 |
* Load modal
|
440 |
*/
|
441 |
-
function load_modal(){
|
442 |
-
|
443 |
-
|
444 |
-
wp_enqueue_style('um_modal');
|
445 |
-
|
446 |
-
wp_register_script('um_modal', um_url . 'assets/js/um-modal' . $this->suffix . '.js', array('jquery','wp-util') );
|
447 |
-
wp_enqueue_script('um_modal');
|
448 |
-
|
449 |
}
|
450 |
|
451 |
|
452 |
/**
|
453 |
* Load responsive styles
|
454 |
*/
|
455 |
-
function load_responsive(){
|
456 |
-
|
457 |
-
|
458 |
-
wp_enqueue_script('um_responsive');
|
459 |
-
|
460 |
-
wp_register_style('um_responsive', um_url . 'assets/css/um-responsive.css', array( 'um_profile' ) );
|
461 |
-
wp_enqueue_style('um_responsive');
|
462 |
-
|
463 |
}
|
464 |
|
465 |
}
|
1 |
<?php
|
2 |
namespace um\core;
|
3 |
|
4 |
+
|
5 |
// Exit if accessed directly
|
6 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
7 |
|
8 |
+
|
9 |
if ( ! class_exists( 'um\core\Enqueue' ) ) {
|
10 |
|
11 |
|
15 |
*/
|
16 |
class Enqueue {
|
17 |
|
18 |
+
|
19 |
/**
|
20 |
* @var string
|
21 |
*/
|
22 |
var $suffix = '';
|
23 |
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @var string
|
27 |
+
*/
|
28 |
+
var $js_baseurl = '';
|
29 |
+
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @var string
|
33 |
+
*/
|
34 |
+
var $css_baseurl = '';
|
35 |
+
|
36 |
+
|
37 |
/**
|
38 |
* Enqueue constructor.
|
39 |
*/
|
40 |
function __construct() {
|
41 |
+
$this->suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG || defined( 'UM_SCRIPT_DEBUG' ) ) ? '' : '.min';
|
42 |
|
43 |
+
$this->js_baseurl = um_url . 'assets/js/';
|
44 |
+
$this->css_baseurl = um_url . 'assets/css/';
|
45 |
|
46 |
/**
|
47 |
* UM hook
|
69 |
|
70 |
|
71 |
/**
|
|
|
72 |
*
|
73 |
+
*/
|
74 |
+
function register_scripts() {
|
75 |
+
$dequeue_select2 = apply_filters( 'um_dequeue_select2_scripts', false );
|
76 |
+
if ( class_exists( 'WooCommerce' ) || $dequeue_select2 ) {
|
77 |
+
wp_dequeue_style( 'select2' );
|
78 |
+
wp_deregister_style( 'select2' );
|
79 |
+
|
80 |
+
wp_dequeue_script( 'select2');
|
81 |
+
wp_deregister_script('select2');
|
82 |
+
}
|
83 |
+
wp_register_script( 'select2', $this->js_baseurl . 'select2/select2.full.min.js', array( 'jquery', 'jquery-masonry' ), ultimatemember_version, true );
|
84 |
+
|
85 |
+
wp_register_script( 'um_scrollbar', $this->js_baseurl . 'um-scrollbar' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
|
86 |
+
|
87 |
+
wp_register_script( 'um_jquery_form', $this->js_baseurl . 'um-jquery-form' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
|
88 |
+
wp_register_script( 'um_fileupload', $this->js_baseurl . 'um-fileupload' . $this->suffix . '.js', array( 'jquery', 'um_jquery_form' ), ultimatemember_version, true );
|
89 |
+
|
90 |
+
|
91 |
+
$datetime_deps = array( 'jquery' );
|
92 |
+
// load a localized version for date/time
|
93 |
+
$locale = get_locale();
|
94 |
+
if ( $locale && file_exists( um_path . 'assets/js/pickadate/translations/' . $locale . '.js' ) ) {
|
95 |
+
wp_register_script('um_datetime_locale', um_url . 'assets/js/pickadate/translations/' . $locale . '.js', array( 'jquery' ), ultimatemember_version, true );
|
96 |
+
$datetime_deps[] = 'um_datetime_locale';
|
97 |
+
}
|
98 |
+
wp_register_script( 'um_datetime', $this->js_baseurl . 'pickadate/picker.js', $datetime_deps, ultimatemember_version, true );
|
99 |
+
wp_register_script( 'um_datetime_date', $this->js_baseurl . 'pickadate/picker.date.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
|
100 |
+
wp_register_script( 'um_datetime_time', $this->js_baseurl . 'pickadate/picker.time.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
|
101 |
+
wp_register_script( 'um_datetime_legacy', $this->js_baseurl . 'pickadate/legacy.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
|
102 |
+
|
103 |
+
wp_register_script( 'um_tipsy', $this->js_baseurl . 'um-tipsy' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
|
104 |
+
wp_register_script( 'um_raty', $this->js_baseurl . 'um-raty' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
|
105 |
+
wp_register_script( 'um_crop', $this->js_baseurl . 'um-crop' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
|
106 |
+
|
107 |
+
wp_register_script( 'um_modal', $this->js_baseurl . 'um-modal' . $this->suffix . '.js', array( 'jquery', 'wp-util', 'um_crop' ), ultimatemember_version, true );
|
108 |
+
wp_register_script( 'um_responsive', $this->js_baseurl . 'um-responsive' . $this->suffix . '.js', array( 'jquery', 'um_functions', 'um_crop' ), ultimatemember_version, true );
|
109 |
+
|
110 |
+
wp_register_script('um_functions', $this->js_baseurl . 'um-functions' . $this->suffix . '.js', array( 'jquery', 'jquery-masonry', 'wp-util', 'um_scrollbar' ), ultimatemember_version, true );
|
111 |
+
wp_register_script( 'um-gdpr', $this->js_baseurl . 'um-gdpr' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, false );
|
112 |
+
wp_register_script('um_conditional', $this->js_baseurl . 'um-conditional' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
|
113 |
+
wp_register_script('um_scripts', $this->js_baseurl . 'um-scripts' . $this->suffix . '.js', array( 'jquery', 'wp-util', 'um_conditional' ), ultimatemember_version, true );
|
114 |
+
/**
|
115 |
+
* UM hook
|
116 |
+
*
|
117 |
+
* @type filter
|
118 |
+
* @title um_enqueue_localize_data
|
119 |
+
* @description Extend UM localized data
|
120 |
+
* @input_vars
|
121 |
+
* [{"var":"$data","type":"array","desc":"Localize Array"}]
|
122 |
+
* @change_log
|
123 |
+
* ["Since: 2.0"]
|
124 |
+
* @usage add_filter( 'um_enqueue_localize_data', 'function_name', 10, 1 );
|
125 |
+
* @example
|
126 |
+
* <?php
|
127 |
+
* add_filter( 'um_enqueue_localize_data', 'my_enqueue_localize_data', 10, 1 );
|
128 |
+
* function my_enqueue_localize_data( $data ) {
|
129 |
+
* // your code here
|
130 |
+
* return $data;
|
131 |
+
* }
|
132 |
+
* ?>
|
133 |
+
*/
|
134 |
+
$localize_data = apply_filters( 'um_enqueue_localize_data', array() );
|
135 |
+
wp_localize_script( 'um_scripts', 'um_scripts', $localize_data );
|
136 |
+
|
137 |
+
wp_register_script('um_members', $this->js_baseurl . 'um-members' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
|
138 |
+
wp_register_script('um_profile', $this->js_baseurl . 'um-profile' . $this->suffix . '.js', array( 'jquery', 'wp-util' ), ultimatemember_version, true );
|
139 |
+
wp_register_script('um_account', $this->js_baseurl . 'um-account' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
|
140 |
+
|
141 |
+
wp_register_script( 'um_gchart', 'https://www.google.com/jsapi', array(), ultimatemember_version, true );
|
142 |
+
}
|
143 |
+
|
144 |
+
|
145 |
+
/**
|
146 |
*
|
|
|
147 |
*/
|
148 |
+
function register_styles() {
|
149 |
+
//FontAwesome and FontIcons styles
|
150 |
+
wp_register_style( 'um_fonticons_ii', $this->css_baseurl . 'um-fonticons-ii.css', array(), ultimatemember_version );
|
151 |
+
wp_register_style( 'um_fonticons_fa', $this->css_baseurl . 'um-fonticons-fa.css', array(), ultimatemember_version );
|
152 |
+
wp_register_style( 'um_crop', $this->css_baseurl . 'um-crop.css', array(), ultimatemember_version );
|
153 |
+
wp_register_style( 'um_tipsy', $this->css_baseurl . 'um-tipsy.css', array(), ultimatemember_version );
|
154 |
+
wp_register_style( 'um_raty', $this->css_baseurl . 'um-raty.css', array(), ultimatemember_version );
|
155 |
+
wp_register_style( 'select2', $this->css_baseurl . 'select2/select2.min.css', array(), ultimatemember_version );
|
156 |
+
wp_register_style( 'um_fileupload', $this->css_baseurl . 'um-fileupload.css', array(), ultimatemember_version );
|
157 |
+
wp_register_style( 'um_datetime', $this->css_baseurl . 'pickadate/default.css', array(), ultimatemember_version );
|
158 |
+
wp_register_style( 'um_datetime_date', $this->css_baseurl . 'pickadate/default.date.css', array( 'um_datetime' ), ultimatemember_version );
|
159 |
+
wp_register_style( 'um_datetime_time', $this->css_baseurl . 'pickadate/default.time.css', array( 'um_datetime' ), ultimatemember_version );
|
160 |
+
wp_register_style( 'um_scrollbar', $this->css_baseurl . 'um-scrollbar.css', array(), ultimatemember_version );
|
161 |
+
|
162 |
+
wp_register_style( 'um_rtl', $this->css_baseurl . 'um.rtl.css', array(), ultimatemember_version );
|
163 |
+
wp_register_style( 'um_default_css', $this->css_baseurl . 'um-old-default.css', array(), ultimatemember_version );
|
164 |
+
wp_register_style( 'um_modal', $this->css_baseurl . 'um-modal.css', array( 'um_crop' ), ultimatemember_version );
|
165 |
+
wp_register_style( 'um_responsive', $this->css_baseurl . 'um-responsive.css', array( 'um_profile', 'um_crop' ), ultimatemember_version );
|
166 |
+
|
167 |
+
wp_register_style( 'um_styles', $this->css_baseurl . 'um-styles.css', array(), ultimatemember_version );
|
168 |
+
wp_register_style( 'um_members', $this->css_baseurl . 'um-members.css', array(), ultimatemember_version );
|
169 |
+
wp_register_style( 'um_profile', $this->css_baseurl . 'um-profile.css', array(), ultimatemember_version );
|
170 |
+
wp_register_style( 'um_account', $this->css_baseurl . 'um-account.css', array(), ultimatemember_version );
|
171 |
+
wp_register_style( 'um_misc', $this->css_baseurl . 'um-misc.css', array(), ultimatemember_version );
|
172 |
}
|
173 |
|
174 |
|
176 |
* Enqueue scripts and styles
|
177 |
*/
|
178 |
function wp_enqueue_scripts() {
|
|
|
179 |
|
180 |
+
$this->register_scripts();
|
181 |
+
$this->register_styles();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
|
183 |
$this->load_original();
|
184 |
|
185 |
// rtl style
|
186 |
if ( is_rtl() ) {
|
187 |
+
wp_enqueue_style( 'um_rtl' );
|
|
|
188 |
}
|
189 |
|
190 |
+
global $post;
|
191 |
+
if ( is_object( $post ) && has_shortcode( $post->post_content,'ultimatemember' ) ) {
|
192 |
+
wp_dequeue_script( 'jquery-form' );
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
}
|
194 |
|
195 |
//old settings before UM 2.0 CSS
|
196 |
+
wp_enqueue_style( 'um_default_css' );
|
|
|
197 |
|
198 |
+
$this->old_css_settings();
|
199 |
+
}
|
200 |
+
|
201 |
+
|
202 |
+
/**
|
203 |
+
*
|
204 |
+
*/
|
205 |
+
function old_css_settings() {
|
206 |
$uploads = wp_upload_dir();
|
207 |
$upload_dir = $uploads['basedir'] . DIRECTORY_SEPARATOR . 'ultimatemember' . DIRECTORY_SEPARATOR;
|
208 |
if ( file_exists( $upload_dir . 'um_old_settings.css' ) ) {
|
209 |
+
wp_register_style( 'um_old_css', um_url . '../../uploads/ultimatemember/um_old_settings.css' );
|
210 |
+
wp_enqueue_style( 'um_old_css' );
|
|
|
|
|
|
|
211 |
}
|
212 |
}
|
213 |
|
234 |
|
235 |
$this->load_raty();
|
236 |
|
237 |
+
//$this->load_scrollto();
|
238 |
|
239 |
$this->load_scrollbar();
|
240 |
|
255 |
* Include Google charts
|
256 |
*/
|
257 |
function load_google_charts() {
|
258 |
+
wp_enqueue_script( 'um_gchart' );
|
|
|
|
|
|
|
259 |
}
|
260 |
|
261 |
|
263 |
* Load plugin css
|
264 |
*/
|
265 |
function load_css() {
|
266 |
+
wp_enqueue_style( 'um_styles' );
|
267 |
+
wp_enqueue_style( 'um_members' );
|
268 |
+
wp_enqueue_style( 'um_profile' );
|
269 |
+
wp_enqueue_style( 'um_account' );
|
270 |
+
wp_enqueue_style( 'um_misc' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
}
|
272 |
|
273 |
|
275 |
* Load select-dropdowns JS
|
276 |
*/
|
277 |
function load_selectjs() {
|
278 |
+
wp_enqueue_script( 'select2' );
|
279 |
+
wp_enqueue_style( 'select2' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
}
|
281 |
|
282 |
|
283 |
/**
|
284 |
* Load Fonticons
|
285 |
*/
|
286 |
+
function load_fonticons() {
|
287 |
+
wp_enqueue_style( 'um_fonticons_ii' );
|
288 |
+
wp_enqueue_style( 'um_fonticons_fa' );
|
|
|
|
|
|
|
|
|
|
|
289 |
}
|
290 |
|
291 |
|
293 |
* Load fileupload JS
|
294 |
*/
|
295 |
function load_fileupload() {
|
296 |
+
wp_enqueue_script( 'um_fileupload' );
|
297 |
+
wp_enqueue_style( 'um_fileupload' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
298 |
}
|
299 |
|
300 |
|
302 |
* Load JS functions
|
303 |
*/
|
304 |
function load_functions() {
|
305 |
+
wp_enqueue_script('um_functions' );
|
306 |
+
wp_enqueue_script( 'um-gdpr' );
|
|
|
|
|
|
|
|
|
307 |
}
|
308 |
|
309 |
|
311 |
* Load custom JS
|
312 |
*/
|
313 |
function load_customjs() {
|
|
|
|
|
314 |
wp_enqueue_script('um_conditional');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
315 |
wp_enqueue_script('um_scripts');
|
|
|
|
|
316 |
wp_enqueue_script('um_members');
|
|
|
|
|
317 |
wp_enqueue_script('um_profile');
|
|
|
|
|
318 |
wp_enqueue_script('um_account');
|
|
|
319 |
}
|
320 |
|
321 |
|
323 |
* Load date & time picker
|
324 |
*/
|
325 |
function load_datetimepicker() {
|
|
|
|
|
326 |
wp_enqueue_script('um_datetime');
|
|
|
|
|
327 |
wp_enqueue_script('um_datetime_date');
|
|
|
|
|
328 |
wp_enqueue_script('um_datetime_time');
|
|
|
|
|
329 |
wp_enqueue_script('um_datetime_legacy');
|
|
|
|
|
330 |
wp_enqueue_style('um_datetime');
|
|
|
|
|
331 |
wp_enqueue_style('um_datetime_date');
|
|
|
|
|
332 |
wp_enqueue_style('um_datetime_time');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
333 |
}
|
334 |
|
335 |
|
337 |
* Load scrollbar
|
338 |
*/
|
339 |
function load_scrollbar(){
|
|
|
|
|
|
|
|
|
|
|
340 |
wp_enqueue_style('um_scrollbar');
|
|
|
341 |
}
|
342 |
|
343 |
|
344 |
/**
|
345 |
* Load rating
|
346 |
*/
|
347 |
+
function load_raty() {
|
|
|
|
|
348 |
wp_enqueue_script('um_raty');
|
|
|
|
|
349 |
wp_enqueue_style('um_raty');
|
|
|
350 |
}
|
351 |
|
352 |
|
353 |
/**
|
354 |
* Load crop script
|
355 |
*/
|
356 |
+
function load_imagecrop() {
|
357 |
+
wp_enqueue_script( 'um_crop' );
|
358 |
+
wp_enqueue_style( 'um_crop' );
|
|
|
|
|
|
|
|
|
|
|
359 |
}
|
360 |
|
361 |
|
362 |
/**
|
363 |
* Load tipsy
|
364 |
*/
|
365 |
+
function load_tipsy() {
|
366 |
+
wp_enqueue_script( 'um_tipsy' );
|
367 |
+
wp_enqueue_style( 'um_tipsy' );
|
|
|
|
|
|
|
|
|
|
|
368 |
}
|
369 |
|
370 |
|
371 |
/**
|
372 |
* Load modal
|
373 |
*/
|
374 |
+
function load_modal() {
|
375 |
+
wp_enqueue_script( 'um_modal' );
|
376 |
+
wp_enqueue_style( 'um_modal' );
|
|
|
|
|
|
|
|
|
|
|
377 |
}
|
378 |
|
379 |
|
380 |
/**
|
381 |
* Load responsive styles
|
382 |
*/
|
383 |
+
function load_responsive() {
|
384 |
+
wp_enqueue_script( 'um_responsive' );
|
385 |
+
wp_enqueue_style( 'um_responsive' );
|
|
|
|
|
|
|
|
|
|
|
386 |
}
|
387 |
|
388 |
}
|
includes/core/class-external-integrations.php
CHANGED
@@ -286,8 +286,8 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
|
|
286 |
$language_codes = $this->get_languages_codes();
|
287 |
|
288 |
$lang = '';
|
289 |
-
if ( $language_codes['default'] != $language_codes['current']
|
290 |
-
UM()->config()->email_notifications[ $template_name ]['recipient'] != 'admin' ) {
|
291 |
$lang = $language_codes['current'] . '/';
|
292 |
}
|
293 |
|
286 |
$language_codes = $this->get_languages_codes();
|
287 |
|
288 |
$lang = '';
|
289 |
+
if ( $language_codes['default'] != $language_codes['current'] /*&&
|
290 |
+
UM()->config()->email_notifications[ $template_name ]['recipient'] != 'admin'*/ ) {
|
291 |
$lang = $language_codes['current'] . '/';
|
292 |
}
|
293 |
|
includes/core/class-fields.php
CHANGED
@@ -1128,13 +1128,42 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
|
1128 |
* @return string
|
1129 |
*/
|
1130 |
function get_label( $key ) {
|
|
|
|
|
1131 |
$fields = UM()->builtin()->all_user_fields;
|
1132 |
-
if ( isset( $fields[$key]['label'] ) )
|
1133 |
-
|
1134 |
-
|
1135 |
-
return stripslashes( $fields[$key]['title'] );
|
1136 |
|
1137 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1138 |
}
|
1139 |
|
1140 |
|
@@ -2268,8 +2297,8 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
|
2268 |
$output .= '<div class="um-single-image-upload" data-user_id="' . esc_attr( $_um_profile_id ) . '" data-nonce="' . $nonce . '" data-timestamp="' . esc_attr( $this->timestamp ) . '" data-icon="' . esc_attr( $icon ) . '" data-set_id="' . esc_attr( $set_id ) . '" data-set_mode="' . esc_attr( $set_mode ) . '" data-type="' . esc_attr( $type ) . '" data-key="' . esc_attr( $key ) . '" data-max_size="' . esc_attr( $max_size ) . '" data-max_size_error="' . esc_attr( $max_size_error ) . '" data-min_size_error="' . esc_attr( $min_size_error ) . '" data-extension_error="' . esc_attr( $extension_error ) . '" data-allowed_types="' . esc_attr( $allowed_types ) . '" data-upload_text="' . esc_attr( $upload_text ) . '" data-max_files_error="' . esc_attr( $max_files_error ) . '" data-upload_help_text="' . esc_attr( $upload_help_text ) . '">' . $button_text . '</div>';
|
2269 |
$output .= '<div class="um-modal-footer">
|
2270 |
<div class="um-modal-right">
|
2271 |
-
<a href="
|
2272 |
-
<a href="
|
2273 |
</div>
|
2274 |
<div class="um-clear"></div>
|
2275 |
</div>';
|
@@ -2365,8 +2394,8 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
|
2365 |
$output .= '<div class="um-single-file-upload" data-user_id="' . esc_attr( $_um_profile_id ) . '" data-timestamp="' . esc_attr( $this->timestamp ) . '" data-nonce="' . $nonce . '" data-icon="' . esc_attr( $icon ) . '" data-set_id="' . esc_attr( $set_id ) . '" data-set_mode="' . esc_attr( $set_mode ) . '" data-type="' . esc_attr( $type ) . '" data-key="' . esc_attr( $key ) . '" data-max_size="' . esc_attr( $max_size ) . '" data-max_size_error="' . esc_attr( $max_size_error ) . '" data-min_size_error="' . esc_attr( $min_size_error ) . '" data-extension_error="' . esc_attr( $extension_error ) . '" data-allowed_types="' . esc_attr( $allowed_types ) . '" data-upload_text="' . esc_attr( $upload_text ) . '" data-max_files_error="' . esc_attr( $max_files_error ) . '" data-upload_help_text="' . esc_attr( $upload_help_text ) . '">' . $button_text . '</div>';
|
2366 |
$output .= '<div class="um-modal-footer">
|
2367 |
<div class="um-modal-right">
|
2368 |
-
<a href="
|
2369 |
-
<a href="
|
2370 |
</div>
|
2371 |
<div class="um-clear"></div>
|
2372 |
</div>';
|
1128 |
* @return string
|
1129 |
*/
|
1130 |
function get_label( $key ) {
|
1131 |
+
$label = '';
|
1132 |
+
|
1133 |
$fields = UM()->builtin()->all_user_fields;
|
1134 |
+
if ( isset( $fields[ $key ]['label'] ) ) {
|
1135 |
+
$label = stripslashes( $fields[ $key ]['label'] );
|
1136 |
+
}
|
|
|
1137 |
|
1138 |
+
if ( isset( $fields[ $key ]['title'] ) ) {
|
1139 |
+
$label = stripslashes( $fields[ $key ]['title'] );
|
1140 |
+
}
|
1141 |
+
|
1142 |
+
/**
|
1143 |
+
* UM hook
|
1144 |
+
*
|
1145 |
+
* @type filter
|
1146 |
+
* @title um_change_field_label
|
1147 |
+
* @description Change Field Label
|
1148 |
+
* @input_vars
|
1149 |
+
* [{"var":"$label","type":"string","desc":"Field Label"},
|
1150 |
+
* {"var":"$key","type":"string","desc":"Field Key"}]
|
1151 |
+
* @change_log
|
1152 |
+
* ["Since: 2.0.30"]
|
1153 |
+
* @usage add_filter( 'um_change_field_label', 'function_name', 10, 2 );
|
1154 |
+
* @example
|
1155 |
+
* <?php
|
1156 |
+
* add_filter( 'um_change_field_label', 'my_change_field_label', 10, 2 );
|
1157 |
+
* function my_form_fields( $label, $key ) {
|
1158 |
+
* // your code here
|
1159 |
+
* return $label;
|
1160 |
+
* }
|
1161 |
+
* ?>
|
1162 |
+
*/
|
1163 |
+
$label = apply_filters( 'um_change_field_label', $label, $key );
|
1164 |
+
|
1165 |
+
$label = sprintf( __( '%s', 'ultimate-member' ), $label );
|
1166 |
+
return $label;
|
1167 |
}
|
1168 |
|
1169 |
|
2297 |
$output .= '<div class="um-single-image-upload" data-user_id="' . esc_attr( $_um_profile_id ) . '" data-nonce="' . $nonce . '" data-timestamp="' . esc_attr( $this->timestamp ) . '" data-icon="' . esc_attr( $icon ) . '" data-set_id="' . esc_attr( $set_id ) . '" data-set_mode="' . esc_attr( $set_mode ) . '" data-type="' . esc_attr( $type ) . '" data-key="' . esc_attr( $key ) . '" data-max_size="' . esc_attr( $max_size ) . '" data-max_size_error="' . esc_attr( $max_size_error ) . '" data-min_size_error="' . esc_attr( $min_size_error ) . '" data-extension_error="' . esc_attr( $extension_error ) . '" data-allowed_types="' . esc_attr( $allowed_types ) . '" data-upload_text="' . esc_attr( $upload_text ) . '" data-max_files_error="' . esc_attr( $max_files_error ) . '" data-upload_help_text="' . esc_attr( $upload_help_text ) . '">' . $button_text . '</div>';
|
2298 |
$output .= '<div class="um-modal-footer">
|
2299 |
<div class="um-modal-right">
|
2300 |
+
<a href="javascript:void(0);" class="um-modal-btn um-finish-upload image disabled" data-key="' . $key . '" data-change="' . __( 'Change photo', 'ultimate-member' ) . '" data-processing="' . __( 'Processing...', 'ultimate-member' ) . '"> ' . __( 'Apply', 'ultimate-member' ) . '</a>
|
2301 |
+
<a href="javascript:void(0);" class="um-modal-btn alt" data-action="um_remove_modal"> ' . __( 'Cancel', 'ultimate-member' ) . '</a>
|
2302 |
</div>
|
2303 |
<div class="um-clear"></div>
|
2304 |
</div>';
|
2394 |
$output .= '<div class="um-single-file-upload" data-user_id="' . esc_attr( $_um_profile_id ) . '" data-timestamp="' . esc_attr( $this->timestamp ) . '" data-nonce="' . $nonce . '" data-icon="' . esc_attr( $icon ) . '" data-set_id="' . esc_attr( $set_id ) . '" data-set_mode="' . esc_attr( $set_mode ) . '" data-type="' . esc_attr( $type ) . '" data-key="' . esc_attr( $key ) . '" data-max_size="' . esc_attr( $max_size ) . '" data-max_size_error="' . esc_attr( $max_size_error ) . '" data-min_size_error="' . esc_attr( $min_size_error ) . '" data-extension_error="' . esc_attr( $extension_error ) . '" data-allowed_types="' . esc_attr( $allowed_types ) . '" data-upload_text="' . esc_attr( $upload_text ) . '" data-max_files_error="' . esc_attr( $max_files_error ) . '" data-upload_help_text="' . esc_attr( $upload_help_text ) . '">' . $button_text . '</div>';
|
2395 |
$output .= '<div class="um-modal-footer">
|
2396 |
<div class="um-modal-right">
|
2397 |
+
<a href="javascript:void(0);" class="um-modal-btn um-finish-upload file disabled" data-key="' . $key . '" data-change="' . __( 'Change file' ) . '" data-processing="' . __( 'Processing...', 'ultimate-member' ) . '"> ' . __( 'Save', 'ultimate-member' ) . '</a>
|
2398 |
+
<a href="javascript:void(0);" class="um-modal-btn alt" data-action="um_remove_modal"> ' . __( 'Cancel', 'ultimate-member' ) . '</a>
|
2399 |
</div>
|
2400 |
<div class="um-clear"></div>
|
2401 |
</div>';
|
includes/core/class-files.php
CHANGED
@@ -83,12 +83,15 @@ if ( ! class_exists( 'um\core\Files' ) ) {
|
|
83 |
if ( UM()->is_permalinks ) {
|
84 |
$url = get_site_url( get_current_blog_id() );
|
85 |
$nonce = wp_create_nonce( $user_id . $form_id . 'um-download-nonce' );
|
86 |
-
|
87 |
} else {
|
88 |
$url = get_site_url( get_current_blog_id() );
|
89 |
$nonce = wp_create_nonce( $user_id . $form_id . 'um-download-nonce' );
|
90 |
-
|
91 |
}
|
|
|
|
|
|
|
92 |
}
|
93 |
|
94 |
|
@@ -183,6 +186,12 @@ if ( ! class_exists( 'um\core\Files' ) ) {
|
|
183 |
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
184 |
header('Pragma: public');
|
185 |
header('Content-Length: ' . $size);
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
readfile( $file_path );
|
187 |
exit;
|
188 |
}
|
@@ -217,6 +226,12 @@ if ( ! class_exists( 'um\core\Files' ) ) {
|
|
217 |
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
218 |
header('Pragma: public');
|
219 |
header('Content-Length: ' . $size);
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
readfile( $file_path );
|
221 |
exit;
|
222 |
}
|
83 |
if ( UM()->is_permalinks ) {
|
84 |
$url = get_site_url( get_current_blog_id() );
|
85 |
$nonce = wp_create_nonce( $user_id . $form_id . 'um-download-nonce' );
|
86 |
+
$url = $url . "/um-download/{$form_id}/{$field_key}/{$user_id}/{$nonce}";
|
87 |
} else {
|
88 |
$url = get_site_url( get_current_blog_id() );
|
89 |
$nonce = wp_create_nonce( $user_id . $form_id . 'um-download-nonce' );
|
90 |
+
$url = add_query_arg( array( 'um_action' => 'download', 'um_form' => $form_id, 'um_field' => $field_key, 'um_user' => $user_id, 'um_verify' => $nonce ), $url );
|
91 |
}
|
92 |
+
|
93 |
+
//add time to query args for sites with the cache
|
94 |
+
return add_query_arg( array( 't' => time() ), $url );
|
95 |
}
|
96 |
|
97 |
|
186 |
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
187 |
header('Pragma: public');
|
188 |
header('Content-Length: ' . $size);
|
189 |
+
|
190 |
+
$levels = ob_get_level();
|
191 |
+
for ( $i = 0; $i < $levels; $i++ ) {
|
192 |
+
@ob_end_clean();
|
193 |
+
}
|
194 |
+
|
195 |
readfile( $file_path );
|
196 |
exit;
|
197 |
}
|
226 |
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
227 |
header('Pragma: public');
|
228 |
header('Content-Length: ' . $size);
|
229 |
+
|
230 |
+
$levels = ob_get_level();
|
231 |
+
for ( $i = 0; $i < $levels; $i++ ) {
|
232 |
+
@ob_end_clean();
|
233 |
+
}
|
234 |
+
|
235 |
readfile( $file_path );
|
236 |
exit;
|
237 |
}
|
includes/core/class-gdpr.php
CHANGED
@@ -70,10 +70,9 @@ if ( ! class_exists( 'um\core\GDPR' ) ) {
|
|
70 |
* @return mixed
|
71 |
*/
|
72 |
function email_registration_data( $submitted ) {
|
73 |
-
|
74 |
-
$timestamp = ! empty( $submitted['timestamp'] ) ? $submitted['timestamp'] : $submitted['use_gdpr_agreement'];
|
75 |
-
|
76 |
if ( ! empty( $submitted['use_gdpr_agreement'] ) ) {
|
|
|
|
|
77 |
$submitted['GDPR Applied'] = date( "d M Y H:i", $timestamp );
|
78 |
unset( $submitted['use_gdpr_agreement'] );
|
79 |
}
|
70 |
* @return mixed
|
71 |
*/
|
72 |
function email_registration_data( $submitted ) {
|
|
|
|
|
|
|
73 |
if ( ! empty( $submitted['use_gdpr_agreement'] ) ) {
|
74 |
+
$timestamp = ! empty( $submitted['timestamp'] ) ? $submitted['timestamp'] : $submitted['use_gdpr_agreement'];
|
75 |
+
|
76 |
$submitted['GDPR Applied'] = date( "d M Y H:i", $timestamp );
|
77 |
unset( $submitted['use_gdpr_agreement'] );
|
78 |
}
|
includes/core/class-permalinks.php
CHANGED
@@ -373,11 +373,11 @@ if ( ! class_exists( 'um\core\Permalinks' ) ) {
|
|
373 |
|
374 |
} else {
|
375 |
|
376 |
-
$profile_url = add_query_arg( 'um_user', $slug, $profile_url );
|
377 |
|
378 |
}
|
379 |
|
380 |
-
return ! empty( $profile_url ) ?
|
381 |
}
|
382 |
|
383 |
|
373 |
|
374 |
} else {
|
375 |
|
376 |
+
$profile_url = add_query_arg( 'um_user', strtolower( $slug ), $profile_url );
|
377 |
|
378 |
}
|
379 |
|
380 |
+
return ! empty( $profile_url ) ? $profile_url : '';
|
381 |
}
|
382 |
|
383 |
|
includes/core/class-roles-capabilities.php
CHANGED
@@ -530,8 +530,11 @@ if ( ! class_exists( 'um\core\Roles_Capabilities' ) ) {
|
|
530 |
|
531 |
$temp = array();
|
532 |
foreach ( $role_data as $key=>$value ) {
|
533 |
-
if ( strpos( $key, '_um_' ) === 0 )
|
534 |
-
$key =
|
|
|
|
|
|
|
535 |
$temp[ $key ] = $value;
|
536 |
}
|
537 |
|
530 |
|
531 |
$temp = array();
|
532 |
foreach ( $role_data as $key=>$value ) {
|
533 |
+
if ( strpos( $key, '_um_' ) === 0 ) {
|
534 |
+
$key = preg_replace('/_um_/', '', $key, 1);
|
535 |
+
}
|
536 |
+
|
537 |
+
//$key = str_replace( '_um_', '', $key, $count );
|
538 |
$temp[ $key ] = $value;
|
539 |
}
|
540 |
|
includes/core/class-shortcodes.php
CHANGED
@@ -26,6 +26,11 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
|
|
26 |
|
27 |
add_shortcode( 'ultimatemember', array( &$this, 'ultimatemember' ) );
|
28 |
|
|
|
|
|
|
|
|
|
|
|
29 |
add_shortcode( 'um_loggedin', array( &$this, 'um_loggedin' ) );
|
30 |
add_shortcode( 'um_loggedout', array( &$this, 'um_loggedout' ) );
|
31 |
add_shortcode( 'um_show_content', array( &$this, 'um_shortcode_show_content_for_role' ) );
|
@@ -260,7 +265,7 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
|
|
260 |
|
261 |
if ( isset( $this->set_args ) && is_array( $this->set_args ) ) {
|
262 |
$args = $this->set_args;
|
263 |
-
|
264 |
unset( $args['file'] );
|
265 |
unset( $args['theme_file'] );
|
266 |
unset( $args['tpl'] );
|
@@ -358,12 +363,13 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
|
|
358 |
|
359 |
$args = wp_parse_args( $args, $defaults );
|
360 |
|
361 |
-
|
362 |
|
363 |
if ( ! is_user_logged_in() ) {
|
364 |
if ( $args['show_lock'] == 'no' ) {
|
365 |
echo '';
|
366 |
} else {
|
|
|
367 |
$this->set_args = $args;
|
368 |
$this->load_template( 'login-to-view' );
|
369 |
}
|
@@ -375,8 +381,14 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
|
|
375 |
return $output;
|
376 |
}
|
377 |
|
378 |
-
|
379 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
380 |
*/
|
381 |
function um_loggedout($args = array(), $content = "") {
|
382 |
ob_start();
|
@@ -393,6 +405,124 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
|
|
393 |
}
|
394 |
|
395 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
396 |
/**
|
397 |
* Shortcode
|
398 |
*
|
@@ -813,7 +943,36 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
|
|
813 |
* @return string
|
814 |
*/
|
815 |
function get_shortcode( $post_id ) {
|
816 |
-
$shortcode = '[ultimatemember form_id=' . $post_id . ']';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
817 |
return $shortcode;
|
818 |
}
|
819 |
|
26 |
|
27 |
add_shortcode( 'ultimatemember', array( &$this, 'ultimatemember' ) );
|
28 |
|
29 |
+
add_shortcode( 'ultimatemember_login', array( &$this, 'ultimatemember_login' ) );
|
30 |
+
add_shortcode( 'ultimatemember_register', array( &$this, 'ultimatemember_register' ) );
|
31 |
+
add_shortcode( 'ultimatemember_profile', array( &$this, 'ultimatemember_profile' ) );
|
32 |
+
add_shortcode( 'ultimatemember_directory', array( &$this, 'ultimatemember_directory' ) );
|
33 |
+
|
34 |
add_shortcode( 'um_loggedin', array( &$this, 'um_loggedin' ) );
|
35 |
add_shortcode( 'um_loggedout', array( &$this, 'um_loggedout' ) );
|
36 |
add_shortcode( 'um_show_content', array( &$this, 'um_shortcode_show_content_for_role' ) );
|
265 |
|
266 |
if ( isset( $this->set_args ) && is_array( $this->set_args ) ) {
|
267 |
$args = $this->set_args;
|
268 |
+
|
269 |
unset( $args['file'] );
|
270 |
unset( $args['theme_file'] );
|
271 |
unset( $args['tpl'] );
|
363 |
|
364 |
$args = wp_parse_args( $args, $defaults );
|
365 |
|
366 |
+
|
367 |
|
368 |
if ( ! is_user_logged_in() ) {
|
369 |
if ( $args['show_lock'] == 'no' ) {
|
370 |
echo '';
|
371 |
} else {
|
372 |
+
$args['lock_text'] = $this->convert_locker_tags( $args['lock_text'] );
|
373 |
$this->set_args = $args;
|
374 |
$this->load_template( 'login-to-view' );
|
375 |
}
|
381 |
return $output;
|
382 |
}
|
383 |
|
384 |
+
|
385 |
+
/**
|
386 |
+
* Logged-out only content
|
387 |
+
*
|
388 |
+
* @param array $args
|
389 |
+
* @param string $content
|
390 |
+
*
|
391 |
+
* @return string
|
392 |
*/
|
393 |
function um_loggedout($args = array(), $content = "") {
|
394 |
ob_start();
|
405 |
}
|
406 |
|
407 |
|
408 |
+
/**
|
409 |
+
* @param array $args
|
410 |
+
*
|
411 |
+
* @return string
|
412 |
+
*/
|
413 |
+
function ultimatemember_login( $args = array() ) {
|
414 |
+
global $wpdb;
|
415 |
+
|
416 |
+
$args = ! empty( $args ) ? $args : array();
|
417 |
+
|
418 |
+
$default_login = $wpdb->get_var(
|
419 |
+
"SELECT pm.post_id
|
420 |
+
FROM {$wpdb->postmeta} pm
|
421 |
+
LEFT JOIN {$wpdb->postmeta} pm2 ON( pm.post_id = pm2.post_id AND pm2.meta_key = '_um_is_default' )
|
422 |
+
WHERE pm.meta_key = '_um_mode' AND
|
423 |
+
pm.meta_value = 'login' AND
|
424 |
+
pm2.meta_value = '1'"
|
425 |
+
);
|
426 |
+
|
427 |
+
$args['form_id'] = $default_login;
|
428 |
+
$shortcode_attrs = '';
|
429 |
+
foreach ( $args as $key => $value ) {
|
430 |
+
$shortcode_attrs .= " {$key}=\"{$value}\"";
|
431 |
+
}
|
432 |
+
|
433 |
+
return do_shortcode( "[ultimatemember {$shortcode_attrs} /]" );
|
434 |
+
}
|
435 |
+
|
436 |
+
|
437 |
+
/**
|
438 |
+
* @param array $args
|
439 |
+
*
|
440 |
+
* @return string
|
441 |
+
*/
|
442 |
+
function ultimatemember_register( $args = array() ) {
|
443 |
+
global $wpdb;
|
444 |
+
|
445 |
+
$args = ! empty( $args ) ? $args : array();
|
446 |
+
|
447 |
+
$default_register = $wpdb->get_var(
|
448 |
+
"SELECT pm.post_id
|
449 |
+
FROM {$wpdb->postmeta} pm
|
450 |
+
LEFT JOIN {$wpdb->postmeta} pm2 ON( pm.post_id = pm2.post_id AND pm2.meta_key = '_um_is_default' )
|
451 |
+
WHERE pm.meta_key = '_um_mode' AND
|
452 |
+
pm.meta_value = 'register' AND
|
453 |
+
pm2.meta_value = '1'"
|
454 |
+
);
|
455 |
+
|
456 |
+
$args['form_id'] = $default_register;
|
457 |
+
$shortcode_attrs = '';
|
458 |
+
foreach ( $args as $key => $value ) {
|
459 |
+
$shortcode_attrs .= " {$key}=\"{$value}\"";
|
460 |
+
}
|
461 |
+
|
462 |
+
return do_shortcode( "[ultimatemember {$shortcode_attrs} /]" );
|
463 |
+
}
|
464 |
+
|
465 |
+
|
466 |
+
/**
|
467 |
+
* @param array $args
|
468 |
+
*
|
469 |
+
* @return string
|
470 |
+
*/
|
471 |
+
function ultimatemember_profile( $args = array() ) {
|
472 |
+
global $wpdb;
|
473 |
+
|
474 |
+
$args = ! empty( $args ) ? $args : array();
|
475 |
+
|
476 |
+
$default_profile = $wpdb->get_var(
|
477 |
+
"SELECT pm.post_id
|
478 |
+
FROM {$wpdb->postmeta} pm
|
479 |
+
LEFT JOIN {$wpdb->postmeta} pm2 ON( pm.post_id = pm2.post_id AND pm2.meta_key = '_um_is_default' )
|
480 |
+
WHERE pm.meta_key = '_um_mode' AND
|
481 |
+
pm.meta_value = 'profile' AND
|
482 |
+
pm2.meta_value = '1'"
|
483 |
+
);
|
484 |
+
|
485 |
+
$args['form_id'] = $default_profile;
|
486 |
+
|
487 |
+
$shortcode_attrs = '';
|
488 |
+
foreach ( $args as $key => $value ) {
|
489 |
+
$shortcode_attrs .= " {$key}=\"{$value}\"";
|
490 |
+
}
|
491 |
+
|
492 |
+
return do_shortcode( "[ultimatemember {$shortcode_attrs} /]" );
|
493 |
+
}
|
494 |
+
|
495 |
+
|
496 |
+
/**
|
497 |
+
* @param array $args
|
498 |
+
*
|
499 |
+
* @return string
|
500 |
+
*/
|
501 |
+
function ultimatemember_directory( $args = array() ) {
|
502 |
+
global $wpdb;
|
503 |
+
|
504 |
+
$args = ! empty( $args ) ? $args : array();
|
505 |
+
|
506 |
+
$default_directory = $wpdb->get_var(
|
507 |
+
"SELECT pm.post_id
|
508 |
+
FROM {$wpdb->postmeta} pm
|
509 |
+
LEFT JOIN {$wpdb->postmeta} pm2 ON( pm.post_id = pm2.post_id AND pm2.meta_key = '_um_is_default' )
|
510 |
+
WHERE pm.meta_key = '_um_mode' AND
|
511 |
+
pm.meta_value = 'directory' AND
|
512 |
+
pm2.meta_value = '1'"
|
513 |
+
);
|
514 |
+
|
515 |
+
$args['form_id'] = $default_directory;
|
516 |
+
|
517 |
+
$shortcode_attrs = '';
|
518 |
+
foreach ( $args as $key => $value ) {
|
519 |
+
$shortcode_attrs .= " {$key}=\"{$value}\"";
|
520 |
+
}
|
521 |
+
|
522 |
+
return do_shortcode( "[ultimatemember {$shortcode_attrs} /]" );
|
523 |
+
}
|
524 |
+
|
525 |
+
|
526 |
/**
|
527 |
* Shortcode
|
528 |
*
|
943 |
* @return string
|
944 |
*/
|
945 |
function get_shortcode( $post_id ) {
|
946 |
+
$shortcode = '[ultimatemember form_id="' . $post_id . '"]';
|
947 |
+
return $shortcode;
|
948 |
+
}
|
949 |
+
|
950 |
+
|
951 |
+
/**
|
952 |
+
* Get Shortcode for given form ID
|
953 |
+
*
|
954 |
+
* @param $post_id
|
955 |
+
*
|
956 |
+
* @return string
|
957 |
+
*/
|
958 |
+
function get_default_shortcode( $post_id ) {
|
959 |
+
$mode = UM()->query()->get_attr( 'mode', $post_id );
|
960 |
+
|
961 |
+
switch ( $mode ) {
|
962 |
+
case 'login':
|
963 |
+
$shortcode = '[ultimatemember_login]';
|
964 |
+
break;
|
965 |
+
case 'profile':
|
966 |
+
$shortcode = '[ultimatemember_profile]';
|
967 |
+
break;
|
968 |
+
case 'register':
|
969 |
+
$shortcode = '[ultimatemember_register]';
|
970 |
+
break;
|
971 |
+
case 'directory':
|
972 |
+
$shortcode = '[ultimatemember_directory]';
|
973 |
+
break;
|
974 |
+
}
|
975 |
+
|
976 |
return $shortcode;
|
977 |
}
|
978 |
|
includes/core/class-templates.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace um\core;
|
3 |
+
|
4 |
+
|
5 |
+
// Exit if accessed directly
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
7 |
+
|
8 |
+
|
9 |
+
if ( ! class_exists( 'Templates' ) ) {
|
10 |
+
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class Templates
|
14 |
+
* @package um\core
|
15 |
+
*/
|
16 |
+
class Templates {
|
17 |
+
|
18 |
+
function __construct() {
|
19 |
+
|
20 |
+
}
|
21 |
+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Get template path
|
25 |
+
*
|
26 |
+
*
|
27 |
+
* @param $slug
|
28 |
+
* @return string
|
29 |
+
*/
|
30 |
+
function get_template( $slug ) {
|
31 |
+
$file_list = um_path . "templates/{$slug}.php";
|
32 |
+
$theme_file = get_stylesheet_directory() . "/ultimate-member/templates/{$slug}.php";
|
33 |
+
|
34 |
+
if ( file_exists( $theme_file ) ) {
|
35 |
+
$file_list = $theme_file;
|
36 |
+
}
|
37 |
+
|
38 |
+
return $file_list;
|
39 |
+
}
|
40 |
+
}
|
41 |
+
}
|
includes/core/class-uploader.php
CHANGED
@@ -95,7 +95,7 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
95 |
$this->core_upload_dir = DIRECTORY_SEPARATOR . "ultimatemember" . DIRECTORY_SEPARATOR;
|
96 |
$this->core_upload_url = "/ultimatemember/";
|
97 |
$this->upload_image_type = 'stream_photo';
|
98 |
-
$this->wp_upload_dir = wp_upload_dir();
|
99 |
$this->temp_upload_dir = "temp";
|
100 |
|
101 |
add_filter( "upload_dir", array( $this, "set_upload_directory" ), 10, 1 );
|
@@ -120,7 +120,7 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
120 |
/**
|
121 |
* Get core temporary directory path
|
122 |
*
|
123 |
-
* @since 2.0.22
|
124 |
* @return string
|
125 |
*/
|
126 |
public function get_core_temp_dir() {
|
@@ -131,7 +131,7 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
131 |
/**
|
132 |
* Get core temporary directory URL
|
133 |
*
|
134 |
-
* @since 2.0.22
|
135 |
* @return string
|
136 |
*/
|
137 |
public function get_core_temp_url() {
|
@@ -142,7 +142,7 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
142 |
/**
|
143 |
* Get core upload directory
|
144 |
*
|
145 |
-
* @since 2.0.22
|
146 |
* @return string
|
147 |
*/
|
148 |
public function get_core_upload_dir() {
|
@@ -153,7 +153,7 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
153 |
/**
|
154 |
* Get core upload base url
|
155 |
*
|
156 |
-
* @since 2.0.22
|
157 |
* @return string
|
158 |
*/
|
159 |
public function get_upload_base_url() {
|
@@ -168,7 +168,7 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
168 |
/**
|
169 |
* Get core upload base directory
|
170 |
*
|
171 |
-
* @since 2.0.22
|
172 |
* @return string
|
173 |
*/
|
174 |
public function get_upload_base_dir() {
|
@@ -198,7 +198,7 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
198 |
$this->upload_user_basedir = $this->get_upload_base_dir() . $this->user_id;
|
199 |
|
200 |
if ( $create_dir ) {
|
201 |
-
wp_mkdir_p( $this->upload_user_basedir );
|
202 |
}
|
203 |
|
204 |
return $this->upload_user_basedir;
|
@@ -207,9 +207,9 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
207 |
|
208 |
/**
|
209 |
* Get user upload base url
|
210 |
-
*
|
211 |
* @param integer $user_id
|
212 |
-
* @since 2.0.22
|
213 |
* @return string
|
214 |
*/
|
215 |
public function get_upload_user_base_url( $user_id = null ) {
|
@@ -222,10 +222,10 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
222 |
return $this->upload_user_baseurl;
|
223 |
}
|
224 |
|
225 |
-
|
226 |
/**
|
227 |
* Validate file size
|
228 |
-
* @param array $file
|
229 |
* @return array
|
230 |
*/
|
231 |
public function validate_upload( $file ) {
|
@@ -312,7 +312,7 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
312 |
|
313 |
if ( in_array( $field_key, array( 'profile_photo','cover_photo' ) ) ) {
|
314 |
$this->upload_image_type = $field_key;
|
315 |
-
}
|
316 |
|
317 |
$field_data = UM()->fields()->get_field( $field_key );
|
318 |
|
@@ -326,7 +326,7 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
326 |
|
327 |
foreach ( $field_allowed_file_types as $a ) {
|
328 |
$atype = wp_check_filetype( "test.{$a}" );
|
329 |
-
$allowed_image_mimes[ $atype['ext'] ] = $atype['type'];
|
330 |
}
|
331 |
|
332 |
$image_compression = UM()->options()->get('image_compression');
|
@@ -352,9 +352,9 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
352 |
$movefile['url'] = set_url_scheme( $movefile['url'] );
|
353 |
|
354 |
$movefile['file_info']['basename'] = wp_basename( $movefile['file'] );
|
355 |
-
|
356 |
$file_type = wp_check_filetype( $movefile['file_info']['basename'] );
|
357 |
-
|
358 |
$movefile['file_info']['name'] = $movefile['url'];
|
359 |
$movefile['file_info']['original_name'] = $uploadedfile['name'];
|
360 |
$movefile['file_info']['ext'] = $file_type['ext'];
|
@@ -454,7 +454,10 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
454 |
|
455 |
$filename = wp_basename( $movefile['url'] );
|
456 |
|
457 |
-
set_transient( "um_{$filename}", $movefile['file_info'], 2 * HOUR_IN_SECONDS );
|
|
|
|
|
|
|
458 |
}
|
459 |
|
460 |
$response['handle_upload'] = $movefile;
|
@@ -497,7 +500,7 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
497 |
|
498 |
foreach ( $field_allowed_file_types as $a ) {
|
499 |
$atype = wp_check_filetype( "test.{$a}" );
|
500 |
-
$allowed_file_mimes[ $atype['ext'] ] = $atype['type'];
|
501 |
}
|
502 |
|
503 |
$upload_overrides = array(
|
@@ -529,7 +532,7 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
529 |
$movefile['file_info']['type'] = $file_type['type'];
|
530 |
$movefile['file_info']['size'] = filesize( $movefile['file'] );
|
531 |
$movefile['file_info']['size_format'] = size_format( $movefile['file_info']['size'] );
|
532 |
-
|
533 |
|
534 |
/**
|
535 |
* UM hook
|
@@ -619,7 +622,10 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
619 |
|
620 |
$filename = wp_basename( $movefile['url'] );
|
621 |
|
622 |
-
set_transient( "um_{$filename}", $movefile['file_info'], 2 * HOUR_IN_SECONDS );
|
|
|
|
|
|
|
623 |
}
|
624 |
|
625 |
$response['handle_upload'] = $movefile;
|
@@ -854,12 +860,12 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
854 |
|
855 |
/**
|
856 |
* Make unique filename
|
857 |
-
* @param string $filename
|
858 |
-
* @param string $ext
|
859 |
-
* @param string $dir
|
860 |
* @return string $filename
|
861 |
*
|
862 |
-
* @since 2.0.22
|
863 |
*/
|
864 |
public function unique_filename( $filename, $ext, $dir ) {
|
865 |
$image_type = wp_check_filetype( $ext );
|
@@ -897,10 +903,10 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
897 |
|
898 |
/**
|
899 |
* Delete file
|
900 |
-
* @param string $filename
|
901 |
-
* @param string $ext
|
902 |
-
* @param string $dir
|
903 |
-
*
|
904 |
* @since 2.0.22
|
905 |
*/
|
906 |
public function delete_existing_file( $filename, $ext = '', $dir = '' ) {
|
@@ -912,11 +918,11 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
912 |
|
913 |
/**
|
914 |
* Profile photo image process
|
915 |
-
* @param string $src
|
916 |
-
* @param integer $user_id
|
917 |
-
* @param string $coord
|
918 |
-
* @param array $crop
|
919 |
-
*
|
920 |
* @since 2.0.22
|
921 |
*/
|
922 |
public function profile_photo( $image_path, $src, $key, $user_id, $coord, $crop ) {
|
@@ -934,6 +940,11 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
934 |
|
935 |
$image->crop( $src_x, $src_y, $src_w, $src_h );
|
936 |
|
|
|
|
|
|
|
|
|
|
|
937 |
$image->save( $image_path );
|
938 |
|
939 |
$image->set_quality( $quality );
|
@@ -956,11 +967,11 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
956 |
|
957 |
/**
|
958 |
* Cover photo image process
|
959 |
-
* @param string $src
|
960 |
-
* @param integer $user_id
|
961 |
-
* @param string $coord
|
962 |
-
* @param array $crop
|
963 |
-
*
|
964 |
* @since 2.0.22
|
965 |
*/
|
966 |
public function cover_photo( $image_path, $src, $key, $user_id, $coord, $crop ){
|
@@ -980,8 +991,13 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
980 |
|
981 |
$image->crop( $src_x, $src_y, $src_w, $src_h );
|
982 |
|
|
|
|
|
|
|
|
|
|
|
983 |
$image->save( $image_path );
|
984 |
-
|
985 |
$image->set_quality( $quality );
|
986 |
|
987 |
$sizes_array = array();
|
@@ -1000,15 +1016,15 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
1000 |
|
1001 |
/**
|
1002 |
* Stream photo image process
|
1003 |
-
* @param string $src
|
1004 |
-
* @param integer $user_id
|
1005 |
-
* @param string $coord
|
1006 |
-
* @param array $crop
|
1007 |
-
*
|
1008 |
* @since 2.0.22
|
1009 |
*/
|
1010 |
public function stream_photo( $image_path, $src, $key, $user_id, $coord, $crop ){
|
1011 |
-
|
1012 |
$image = wp_get_image_editor( $image_path ); // Return an implementation that extends WP_Image_Editor
|
1013 |
|
1014 |
$quality = UM()->options()->get( 'image_compression' );
|
@@ -1026,10 +1042,15 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
1026 |
$src_h = $crop[3];
|
1027 |
|
1028 |
$image->crop( $src_x, $src_y, $src_w, $src_h );
|
|
|
|
|
|
|
|
|
|
|
1029 |
}
|
1030 |
|
1031 |
$image->save( $image_path );
|
1032 |
-
|
1033 |
$image->set_quality( $quality );
|
1034 |
|
1035 |
} else {
|
@@ -1040,9 +1061,9 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
1040 |
|
1041 |
/**
|
1042 |
* Set stream photo default settings
|
1043 |
-
* @param array $args
|
1044 |
-
* @return array
|
1045 |
-
*
|
1046 |
* @since 2.0.22
|
1047 |
*/
|
1048 |
public function stream_photo_data( $args ) {
|
@@ -1145,10 +1166,18 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
1145 |
$new_files[ $key ] = $new_filename;
|
1146 |
|
1147 |
if ( rename( $temp_file_path, $file ) ) {
|
1148 |
-
$file_info = get_transient("um_{$filename}");
|
1149 |
update_user_meta( $user_id, $key, $new_filename );
|
1150 |
-
|
1151 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1152 |
}
|
1153 |
}
|
1154 |
}
|
@@ -1171,9 +1200,11 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
|
1171 |
$user_meta_keys = UM()->user()->profile;
|
1172 |
|
1173 |
$_array = array();
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
|
|
|
|
1177 |
}
|
1178 |
}
|
1179 |
$_array = array_merge( $_array, $new_files );
|
95 |
$this->core_upload_dir = DIRECTORY_SEPARATOR . "ultimatemember" . DIRECTORY_SEPARATOR;
|
96 |
$this->core_upload_url = "/ultimatemember/";
|
97 |
$this->upload_image_type = 'stream_photo';
|
98 |
+
$this->wp_upload_dir = wp_upload_dir();
|
99 |
$this->temp_upload_dir = "temp";
|
100 |
|
101 |
add_filter( "upload_dir", array( $this, "set_upload_directory" ), 10, 1 );
|
120 |
/**
|
121 |
* Get core temporary directory path
|
122 |
*
|
123 |
+
* @since 2.0.22
|
124 |
* @return string
|
125 |
*/
|
126 |
public function get_core_temp_dir() {
|
131 |
/**
|
132 |
* Get core temporary directory URL
|
133 |
*
|
134 |
+
* @since 2.0.22
|
135 |
* @return string
|
136 |
*/
|
137 |
public function get_core_temp_url() {
|
142 |
/**
|
143 |
* Get core upload directory
|
144 |
*
|
145 |
+
* @since 2.0.22
|
146 |
* @return string
|
147 |
*/
|
148 |
public function get_core_upload_dir() {
|
153 |
/**
|
154 |
* Get core upload base url
|
155 |
*
|
156 |
+
* @since 2.0.22
|
157 |
* @return string
|
158 |
*/
|
159 |
public function get_upload_base_url() {
|
168 |
/**
|
169 |
* Get core upload base directory
|
170 |
*
|
171 |
+
* @since 2.0.22
|
172 |
* @return string
|
173 |
*/
|
174 |
public function get_upload_base_dir() {
|
198 |
$this->upload_user_basedir = $this->get_upload_base_dir() . $this->user_id;
|
199 |
|
200 |
if ( $create_dir ) {
|
201 |
+
wp_mkdir_p( $this->upload_user_basedir );
|
202 |
}
|
203 |
|
204 |
return $this->upload_user_basedir;
|
207 |
|
208 |
/**
|
209 |
* Get user upload base url
|
210 |
+
*
|
211 |
* @param integer $user_id
|
212 |
+
* @since 2.0.22
|
213 |
* @return string
|
214 |
*/
|
215 |
public function get_upload_user_base_url( $user_id = null ) {
|
222 |
return $this->upload_user_baseurl;
|
223 |
}
|
224 |
|
225 |
+
|
226 |
/**
|
227 |
* Validate file size
|
228 |
+
* @param array $file
|
229 |
* @return array
|
230 |
*/
|
231 |
public function validate_upload( $file ) {
|
312 |
|
313 |
if ( in_array( $field_key, array( 'profile_photo','cover_photo' ) ) ) {
|
314 |
$this->upload_image_type = $field_key;
|
315 |
+
}
|
316 |
|
317 |
$field_data = UM()->fields()->get_field( $field_key );
|
318 |
|
326 |
|
327 |
foreach ( $field_allowed_file_types as $a ) {
|
328 |
$atype = wp_check_filetype( "test.{$a}" );
|
329 |
+
$allowed_image_mimes[ $atype['ext'] ] = $atype['type'];
|
330 |
}
|
331 |
|
332 |
$image_compression = UM()->options()->get('image_compression');
|
352 |
$movefile['url'] = set_url_scheme( $movefile['url'] );
|
353 |
|
354 |
$movefile['file_info']['basename'] = wp_basename( $movefile['file'] );
|
355 |
+
|
356 |
$file_type = wp_check_filetype( $movefile['file_info']['basename'] );
|
357 |
+
|
358 |
$movefile['file_info']['name'] = $movefile['url'];
|
359 |
$movefile['file_info']['original_name'] = $uploadedfile['name'];
|
360 |
$movefile['file_info']['ext'] = $file_type['ext'];
|
454 |
|
455 |
$filename = wp_basename( $movefile['url'] );
|
456 |
|
457 |
+
$transient = set_transient( "um_{$filename}", $movefile['file_info'], 2 * HOUR_IN_SECONDS );
|
458 |
+
if ( empty( $transient ) ) {
|
459 |
+
update_user_meta( $this->user_id, "{$field_key}_metadata_temp", $movefile['file_info'] );
|
460 |
+
}
|
461 |
}
|
462 |
|
463 |
$response['handle_upload'] = $movefile;
|
500 |
|
501 |
foreach ( $field_allowed_file_types as $a ) {
|
502 |
$atype = wp_check_filetype( "test.{$a}" );
|
503 |
+
$allowed_file_mimes[ $atype['ext'] ] = $atype['type'];
|
504 |
}
|
505 |
|
506 |
$upload_overrides = array(
|
532 |
$movefile['file_info']['type'] = $file_type['type'];
|
533 |
$movefile['file_info']['size'] = filesize( $movefile['file'] );
|
534 |
$movefile['file_info']['size_format'] = size_format( $movefile['file_info']['size'] );
|
535 |
+
|
536 |
|
537 |
/**
|
538 |
* UM hook
|
622 |
|
623 |
$filename = wp_basename( $movefile['url'] );
|
624 |
|
625 |
+
$transient = set_transient( "um_{$filename}", $movefile['file_info'], 2 * HOUR_IN_SECONDS );
|
626 |
+
if ( empty( $transient ) ) {
|
627 |
+
update_user_meta( $this->user_id, "{$field_key}_metadata_temp", $movefile['file_info'] );
|
628 |
+
}
|
629 |
}
|
630 |
|
631 |
$response['handle_upload'] = $movefile;
|
860 |
|
861 |
/**
|
862 |
* Make unique filename
|
863 |
+
* @param string $filename
|
864 |
+
* @param string $ext
|
865 |
+
* @param string $dir
|
866 |
* @return string $filename
|
867 |
*
|
868 |
+
* @since 2.0.22
|
869 |
*/
|
870 |
public function unique_filename( $filename, $ext, $dir ) {
|
871 |
$image_type = wp_check_filetype( $ext );
|
903 |
|
904 |
/**
|
905 |
* Delete file
|
906 |
+
* @param string $filename
|
907 |
+
* @param string $ext
|
908 |
+
* @param string $dir
|
909 |
+
*
|
910 |
* @since 2.0.22
|
911 |
*/
|
912 |
public function delete_existing_file( $filename, $ext = '', $dir = '' ) {
|
918 |
|
919 |
/**
|
920 |
* Profile photo image process
|
921 |
+
* @param string $src
|
922 |
+
* @param integer $user_id
|
923 |
+
* @param string $coord
|
924 |
+
* @param array $crop
|
925 |
+
*
|
926 |
* @since 2.0.22
|
927 |
*/
|
928 |
public function profile_photo( $image_path, $src, $key, $user_id, $coord, $crop ) {
|
940 |
|
941 |
$image->crop( $src_x, $src_y, $src_w, $src_h );
|
942 |
|
943 |
+
$max_w = UM()->options()->get('image_max_width');
|
944 |
+
if ( $src_w > $max_w ) {
|
945 |
+
$image->resize( $max_w, $src_h );
|
946 |
+
}
|
947 |
+
|
948 |
$image->save( $image_path );
|
949 |
|
950 |
$image->set_quality( $quality );
|
967 |
|
968 |
/**
|
969 |
* Cover photo image process
|
970 |
+
* @param string $src
|
971 |
+
* @param integer $user_id
|
972 |
+
* @param string $coord
|
973 |
+
* @param array $crop
|
974 |
+
*
|
975 |
* @since 2.0.22
|
976 |
*/
|
977 |
public function cover_photo( $image_path, $src, $key, $user_id, $coord, $crop ){
|
991 |
|
992 |
$image->crop( $src_x, $src_y, $src_w, $src_h );
|
993 |
|
994 |
+
$max_w = UM()->options()->get('image_max_width');
|
995 |
+
if ( $src_w > $max_w ) {
|
996 |
+
$image->resize( $max_w, $src_h );
|
997 |
+
}
|
998 |
+
|
999 |
$image->save( $image_path );
|
1000 |
+
|
1001 |
$image->set_quality( $quality );
|
1002 |
|
1003 |
$sizes_array = array();
|
1016 |
|
1017 |
/**
|
1018 |
* Stream photo image process
|
1019 |
+
* @param string $src
|
1020 |
+
* @param integer $user_id
|
1021 |
+
* @param string $coord
|
1022 |
+
* @param array $crop
|
1023 |
+
*
|
1024 |
* @since 2.0.22
|
1025 |
*/
|
1026 |
public function stream_photo( $image_path, $src, $key, $user_id, $coord, $crop ){
|
1027 |
+
|
1028 |
$image = wp_get_image_editor( $image_path ); // Return an implementation that extends WP_Image_Editor
|
1029 |
|
1030 |
$quality = UM()->options()->get( 'image_compression' );
|
1042 |
$src_h = $crop[3];
|
1043 |
|
1044 |
$image->crop( $src_x, $src_y, $src_w, $src_h );
|
1045 |
+
|
1046 |
+
$max_w = UM()->options()->get('image_max_width');
|
1047 |
+
if ( $src_w > $max_w ) {
|
1048 |
+
$image->resize( $max_w, $src_h );
|
1049 |
+
}
|
1050 |
}
|
1051 |
|
1052 |
$image->save( $image_path );
|
1053 |
+
|
1054 |
$image->set_quality( $quality );
|
1055 |
|
1056 |
} else {
|
1061 |
|
1062 |
/**
|
1063 |
* Set stream photo default settings
|
1064 |
+
* @param array $args
|
1065 |
+
* @return array
|
1066 |
+
*
|
1067 |
* @since 2.0.22
|
1068 |
*/
|
1069 |
public function stream_photo_data( $args ) {
|
1166 |
$new_files[ $key ] = $new_filename;
|
1167 |
|
1168 |
if ( rename( $temp_file_path, $file ) ) {
|
|
|
1169 |
update_user_meta( $user_id, $key, $new_filename );
|
1170 |
+
|
1171 |
+
$file_info = get_transient( "um_{$filename}" );
|
1172 |
+
if ( ! $file_info ) {
|
1173 |
+
$file_info = get_user_meta( $user_id, "{$key}_metadata_temp", true );
|
1174 |
+
delete_user_meta( $user_id, "{$key}_metadata_temp" );
|
1175 |
+
}
|
1176 |
+
|
1177 |
+
if ( $file_info ) {
|
1178 |
+
update_user_meta( $user_id, "{$key}_metadata", $file_info );
|
1179 |
+
delete_transient( "um_{$filename}" );
|
1180 |
+
}
|
1181 |
}
|
1182 |
}
|
1183 |
}
|
1200 |
$user_meta_keys = UM()->user()->profile;
|
1201 |
|
1202 |
$_array = array();
|
1203 |
+
if ( ! empty( UM()->builtin()->custom_fields ) ) {
|
1204 |
+
foreach ( UM()->builtin()->custom_fields as $_field ) {
|
1205 |
+
if ( $_field['type'] == 'file' && ! empty( $user_meta_keys[ $_field['metakey'] ] ) ) {
|
1206 |
+
$_array[ $_field['metakey'] ] = $user_meta_keys[ $_field['metakey'] ];
|
1207 |
+
}
|
1208 |
}
|
1209 |
}
|
1210 |
$_array = array_merge( $_array, $new_files );
|
includes/core/um-actions-profile.php
CHANGED
@@ -177,7 +177,7 @@ add_action( 'um_profile_content_main', 'um_profile_content_main' );
|
|
177 |
*/
|
178 |
function um_user_edit_profile( $args ) {
|
179 |
$to_update = null;
|
180 |
-
$files =
|
181 |
|
182 |
if ( isset( $args['user_id'] ) ) {
|
183 |
if ( UM()->roles()->um_current_user_can( 'edit', $args['user_id'] ) ) {
|
@@ -218,18 +218,18 @@ function um_user_edit_profile( $args ) {
|
|
218 |
|
219 |
// loop through fields
|
220 |
if ( ! empty( $fields ) ) {
|
221 |
-
|
222 |
foreach ( $fields as $key => $array ) {
|
223 |
|
224 |
-
if ( ! um_can_edit_field( $
|
225 |
continue;
|
|
|
226 |
|
227 |
-
if ( $
|
228 |
delete_user_meta( um_user( 'ID' ), $key );
|
229 |
}
|
230 |
|
231 |
if ( isset( $args['submitted'][ $key ] ) ) {
|
232 |
-
if ( isset( $
|
233 |
( /*um_is_file_owner( UM()->uploader()->get_upload_base_url() . um_user( 'ID' ) . '/' . $args['submitted'][ $key ], um_user( 'ID' ) ) ||*/
|
234 |
um_is_temp_file( $args['submitted'][ $key ] ) || $args['submitted'][ $key ] == 'empty_file' ) ) {
|
235 |
|
@@ -366,7 +366,7 @@ function um_user_edit_profile( $args ) {
|
|
366 |
*/
|
367 |
$files = apply_filters( 'um_user_pre_updating_files_array', $files );
|
368 |
|
369 |
-
if ( is_array( $files ) ) {
|
370 |
UM()->uploader()->move_temporary_files( um_user( 'ID' ), $files );
|
371 |
}
|
372 |
|
@@ -888,9 +888,7 @@ function um_profile_header( $args ) {
|
|
888 |
data-character-limit="<?php echo UM()->options()->get( 'profile_bio_maxchars' ); ?>"
|
889 |
placeholder="<?php _e( 'Tell us a bit about yourself...', 'ultimate-member' ); ?>"
|
890 |
name="<?php echo 'description-' . $args['form_id']; ?>"
|
891 |
-
id="<?php echo 'description-' . $args['form_id']; ?>"><?php
|
892 |
-
echo um_user( 'description' );
|
893 |
-
} ?></textarea>
|
894 |
<span class="um-meta-bio-character um-right"><span
|
895 |
class="um-bio-limit"><?php echo UM()->options()->get( 'profile_bio_maxchars' ); ?></span></span>
|
896 |
<?php
|
177 |
*/
|
178 |
function um_user_edit_profile( $args ) {
|
179 |
$to_update = null;
|
180 |
+
$files = array();
|
181 |
|
182 |
if ( isset( $args['user_id'] ) ) {
|
183 |
if ( UM()->roles()->um_current_user_can( 'edit', $args['user_id'] ) ) {
|
218 |
|
219 |
// loop through fields
|
220 |
if ( ! empty( $fields ) ) {
|
|
|
221 |
foreach ( $fields as $key => $array ) {
|
222 |
|
223 |
+
if ( ! um_can_edit_field( $array ) && isset( $array['editable'] ) && ! $array['editable'] ) {
|
224 |
continue;
|
225 |
+
}
|
226 |
|
227 |
+
if ( $array['type'] == 'multiselect' || $array['type'] == 'checkbox' && ! isset( $args['submitted'][ $key ] ) ) {
|
228 |
delete_user_meta( um_user( 'ID' ), $key );
|
229 |
}
|
230 |
|
231 |
if ( isset( $args['submitted'][ $key ] ) ) {
|
232 |
+
if ( isset( $array['type'] ) && in_array( $array['type'], array( 'image', 'file' ) ) &&
|
233 |
( /*um_is_file_owner( UM()->uploader()->get_upload_base_url() . um_user( 'ID' ) . '/' . $args['submitted'][ $key ], um_user( 'ID' ) ) ||*/
|
234 |
um_is_temp_file( $args['submitted'][ $key ] ) || $args['submitted'][ $key ] == 'empty_file' ) ) {
|
235 |
|
366 |
*/
|
367 |
$files = apply_filters( 'um_user_pre_updating_files_array', $files );
|
368 |
|
369 |
+
if ( ! empty( $files ) && is_array( $files ) ) {
|
370 |
UM()->uploader()->move_temporary_files( um_user( 'ID' ), $files );
|
371 |
}
|
372 |
|
888 |
data-character-limit="<?php echo UM()->options()->get( 'profile_bio_maxchars' ); ?>"
|
889 |
placeholder="<?php _e( 'Tell us a bit about yourself...', 'ultimate-member' ); ?>"
|
890 |
name="<?php echo 'description-' . $args['form_id']; ?>"
|
891 |
+
id="<?php echo 'description-' . $args['form_id']; ?>"><?php echo UM()->fields()->field_value( 'description' ) ?></textarea>
|
|
|
|
|
892 |
<span class="um-meta-bio-character um-right"><span
|
893 |
class="um-bio-limit"><?php echo UM()->options()->get( 'profile_bio_maxchars' ); ?></span></span>
|
894 |
<?php
|
includes/core/um-filters-avatars.php
CHANGED
@@ -38,8 +38,35 @@ function um_get_avatar( $avatar = '', $id_or_email='', $size = '96', $avatar_cla
|
|
38 |
|
39 |
um_fetch_user( $user_id );
|
40 |
|
41 |
-
$avatar = um_user('profile_photo', $size);
|
42 |
|
43 |
return $avatar;
|
44 |
}
|
45 |
-
add_filter( 'get_avatar', 'um_get_avatar', 99999, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
um_fetch_user( $user_id );
|
40 |
|
41 |
+
$avatar = um_user( 'profile_photo', $size );
|
42 |
|
43 |
return $avatar;
|
44 |
}
|
45 |
+
add_filter( 'get_avatar', 'um_get_avatar', 99999, 5 );
|
46 |
+
|
47 |
+
|
48 |
+
if ( ! function_exists( 'um_filter_get_avatar_url' ) ) {
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Replace Gravatar image URL to Ultimate member profile image URL if setting "Use Gravatars?" disabled
|
52 |
+
*
|
53 |
+
* @param string $url
|
54 |
+
* @param int $id_or_email
|
55 |
+
* @param array $args
|
56 |
+
* @return string
|
57 |
+
*/
|
58 |
+
function um_filter_get_avatar_url( $url, $id_or_email, $args ) {
|
59 |
+
|
60 |
+
if ( is_numeric( $id_or_email ) && ! UM()->options()->get( 'use_gravatars' ) && preg_match( '/gravatar/i', $url ) ) {
|
61 |
+
$data = um_get_user_avatar_data( $id_or_email, $args['size'] );
|
62 |
+
if ( ! empty( $data['url'] ) ) {
|
63 |
+
$url = $data['url'];
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
return $url;
|
68 |
+
}
|
69 |
+
|
70 |
+
// hooked in the get_avatar_data function
|
71 |
+
add_filter( 'get_avatar_url', 'um_filter_get_avatar_url', 20, 3 );
|
72 |
+
}
|
includes/core/um-filters-fields.php
CHANGED
@@ -130,7 +130,8 @@ add_filter( 'um_profile_field_filter_hook__user_registered', 'um_profile_field_f
|
|
130 |
* @return string
|
131 |
*/
|
132 |
function um_profile_field_filter_hook__last_login( $value, $data ) {
|
133 |
-
|
|
|
134 |
return $value;
|
135 |
}
|
136 |
add_filter( 'um_profile_field_filter_hook__last_login', 'um_profile_field_filter_hook__last_login', 99, 2 );
|
130 |
* @return string
|
131 |
*/
|
132 |
function um_profile_field_filter_hook__last_login( $value, $data ) {
|
133 |
+
//$value = sprintf( __('Last login: %s','ultimate-member'), um_user_last_login( um_user('ID') ) );
|
134 |
+
$value = um_user_last_login( um_user( 'ID' ) );
|
135 |
return $value;
|
136 |
}
|
137 |
add_filter( 'um_profile_field_filter_hook__last_login', 'um_profile_field_filter_hook__last_login', 99, 2 );
|
includes/um-deprecated-functions.php
CHANGED
@@ -399,4 +399,22 @@ function um_requesting_password_change() {
|
|
399 |
}
|
400 |
|
401 |
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
402 |
}
|
399 |
}
|
400 |
|
401 |
return false;
|
402 |
+
}
|
403 |
+
|
404 |
+
|
405 |
+
|
406 |
+
/**
|
407 |
+
* Get core page url
|
408 |
+
*
|
409 |
+
* @deprecated 2.0.30
|
410 |
+
*
|
411 |
+
* @param $time1
|
412 |
+
* @param $time2
|
413 |
+
*
|
414 |
+
* @return string
|
415 |
+
*/
|
416 |
+
function um_time_diff( $time1, $time2 ) {
|
417 |
+
//um_deprecated_function( 'um_time_diff', '2.0.30', 'UM()->datetime()->time_diff' );
|
418 |
+
|
419 |
+
return UM()->datetime()->time_diff( $time1, $time2 );
|
420 |
}
|
includes/um-short-functions.php
CHANGED
@@ -835,19 +835,6 @@ function um_is_temp_file( $filename ) {
|
|
835 |
}
|
836 |
|
837 |
|
838 |
-
/**
|
839 |
-
* Get core page url
|
840 |
-
*
|
841 |
-
* @param $time1
|
842 |
-
* @param $time2
|
843 |
-
*
|
844 |
-
* @return mixed|void
|
845 |
-
*/
|
846 |
-
function um_time_diff( $time1, $time2 ) {
|
847 |
-
return UM()->datetime()->time_diff( $time1, $time2 );
|
848 |
-
}
|
849 |
-
|
850 |
-
|
851 |
/**
|
852 |
* Get user's last login timestamp
|
853 |
*
|
@@ -867,19 +854,13 @@ function um_user_last_login_timestamp( $user_id ) {
|
|
867 |
/**
|
868 |
* Get user's last login (time diff)
|
869 |
*
|
870 |
-
* @param $user_id
|
871 |
*
|
872 |
-
* @return
|
873 |
*/
|
874 |
function um_user_last_login( $user_id ) {
|
875 |
$value = get_user_meta( $user_id, '_um_last_login', true );
|
876 |
-
|
877 |
-
$value = um_time_diff( $value, current_time( 'timestamp' ) );
|
878 |
-
} else {
|
879 |
-
$value = '';
|
880 |
-
}
|
881 |
-
|
882 |
-
return $value;
|
883 |
}
|
884 |
|
885 |
|
@@ -1671,6 +1652,9 @@ function um_get_cover_uri( $image, $attrs ) {
|
|
1671 |
$uri_common = false;
|
1672 |
$ext = '.' . pathinfo( $image, PATHINFO_EXTENSION );
|
1673 |
|
|
|
|
|
|
|
1674 |
if ( is_multisite() ) {
|
1675 |
//multisite fix for old customers
|
1676 |
$multisite_fix_dir = UM()->uploader()->get_upload_base_dir();
|
@@ -1682,8 +1666,8 @@ function um_get_cover_uri( $image, $attrs ) {
|
|
1682 |
$uri_common = $multisite_fix_url . um_user( 'ID' ) . "/cover_photo{$ext}?" . current_time( 'timestamp' );
|
1683 |
}
|
1684 |
|
1685 |
-
if ( file_exists( $multisite_fix_dir . um_user( 'ID' ) . DIRECTORY_SEPARATOR . "cover_photo-{$attrs}x{$
|
1686 |
-
$uri_common = $multisite_fix_url . um_user( 'ID' ) . "/cover_photo-{$attrs}x{$
|
1687 |
} elseif ( file_exists( $multisite_fix_dir . um_user( 'ID' ) . DIRECTORY_SEPARATOR . "cover_photo-{$attrs}{$ext}" ) ) {
|
1688 |
$uri_common = $multisite_fix_url . um_user( 'ID' ) . "/cover_photo-{$attrs}{$ext}?" . current_time( 'timestamp' );
|
1689 |
}
|
@@ -1693,8 +1677,8 @@ function um_get_cover_uri( $image, $attrs ) {
|
|
1693 |
$uri = UM()->uploader()->get_upload_base_url() . um_user( 'ID' ) . "/cover_photo{$ext}?" . current_time( 'timestamp' );
|
1694 |
}
|
1695 |
|
1696 |
-
if ( file_exists( UM()->uploader()->get_upload_base_dir() . um_user( 'ID' ) . DIRECTORY_SEPARATOR . "cover_photo-{$attrs}x{$
|
1697 |
-
$uri = UM()->uploader()->get_upload_base_url() . um_user( 'ID' ) . "/cover_photo-{$attrs}x{$
|
1698 |
} elseif ( file_exists( UM()->uploader()->get_upload_base_dir() . um_user( 'ID' ) . DIRECTORY_SEPARATOR . "cover_photo-{$attrs}{$ext}" ) ) {
|
1699 |
$uri = UM()->uploader()->get_upload_base_url() . um_user( 'ID' ) . "/cover_photo-{$attrs}{$ext}?" . current_time( 'timestamp' );
|
1700 |
}
|
@@ -2179,17 +2163,16 @@ function um_user( $data, $attrs = null ) {
|
|
2179 |
}
|
2180 |
|
2181 |
|
2182 |
-
if ($op == 'field' && UM()->options()->get( 'display_name_field' ) != '') {
|
2183 |
$fields = array_filter( preg_split( '/[,\s]+/', UM()->options()->get( 'display_name_field' ) ) );
|
2184 |
$name = '';
|
2185 |
|
2186 |
-
foreach ($fields as $field) {
|
2187 |
-
if (um_profile( $field )) {
|
2188 |
$name .= um_profile( $field ) . ' ';
|
2189 |
-
}
|
2190 |
$name .= um_user( $field ) . ' ';
|
2191 |
}
|
2192 |
-
|
2193 |
}
|
2194 |
}
|
2195 |
|
835 |
}
|
836 |
|
837 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
838 |
/**
|
839 |
* Get user's last login timestamp
|
840 |
*
|
854 |
/**
|
855 |
* Get user's last login (time diff)
|
856 |
*
|
857 |
+
* @param int $user_id
|
858 |
*
|
859 |
+
* @return string
|
860 |
*/
|
861 |
function um_user_last_login( $user_id ) {
|
862 |
$value = get_user_meta( $user_id, '_um_last_login', true );
|
863 |
+
return ! empty( $value ) ? UM()->datetime()->time_diff( $value, current_time( 'timestamp' ) ) : '';
|
|
|
|
|
|
|
|
|
|
|
|
|
864 |
}
|
865 |
|
866 |
|
1652 |
$uri_common = false;
|
1653 |
$ext = '.' . pathinfo( $image, PATHINFO_EXTENSION );
|
1654 |
|
1655 |
+
$ratio = str_replace(':1','',UM()->options()->get( 'profile_cover_ratio' ) );
|
1656 |
+
$height = round( $attrs / $ratio );
|
1657 |
+
|
1658 |
if ( is_multisite() ) {
|
1659 |
//multisite fix for old customers
|
1660 |
$multisite_fix_dir = UM()->uploader()->get_upload_base_dir();
|
1666 |
$uri_common = $multisite_fix_url . um_user( 'ID' ) . "/cover_photo{$ext}?" . current_time( 'timestamp' );
|
1667 |
}
|
1668 |
|
1669 |
+
if ( file_exists( $multisite_fix_dir . um_user( 'ID' ) . DIRECTORY_SEPARATOR . "cover_photo-{$attrs}x{$height}{$ext}" ) ) {
|
1670 |
+
$uri_common = $multisite_fix_url . um_user( 'ID' ) . "/cover_photo-{$attrs}x{$height}{$ext}?". current_time( 'timestamp' );
|
1671 |
} elseif ( file_exists( $multisite_fix_dir . um_user( 'ID' ) . DIRECTORY_SEPARATOR . "cover_photo-{$attrs}{$ext}" ) ) {
|
1672 |
$uri_common = $multisite_fix_url . um_user( 'ID' ) . "/cover_photo-{$attrs}{$ext}?" . current_time( 'timestamp' );
|
1673 |
}
|
1677 |
$uri = UM()->uploader()->get_upload_base_url() . um_user( 'ID' ) . "/cover_photo{$ext}?" . current_time( 'timestamp' );
|
1678 |
}
|
1679 |
|
1680 |
+
if ( file_exists( UM()->uploader()->get_upload_base_dir() . um_user( 'ID' ) . DIRECTORY_SEPARATOR . "cover_photo-{$attrs}x{$height}{$ext}" ) ) {
|
1681 |
+
$uri = UM()->uploader()->get_upload_base_url() . um_user( 'ID' ) . "/cover_photo-{$attrs}x{$height}{$ext}?". current_time( 'timestamp' );
|
1682 |
} elseif ( file_exists( UM()->uploader()->get_upload_base_dir() . um_user( 'ID' ) . DIRECTORY_SEPARATOR . "cover_photo-{$attrs}{$ext}" ) ) {
|
1683 |
$uri = UM()->uploader()->get_upload_base_url() . um_user( 'ID' ) . "/cover_photo-{$attrs}{$ext}?" . current_time( 'timestamp' );
|
1684 |
}
|
2163 |
}
|
2164 |
|
2165 |
|
2166 |
+
if ( $op == 'field' && UM()->options()->get( 'display_name_field' ) != '' ) {
|
2167 |
$fields = array_filter( preg_split( '/[,\s]+/', UM()->options()->get( 'display_name_field' ) ) );
|
2168 |
$name = '';
|
2169 |
|
2170 |
+
foreach ( $fields as $field ) {
|
2171 |
+
if ( um_profile( $field ) ) {
|
2172 |
$name .= um_profile( $field ) . ' ';
|
2173 |
+
} elseif ( um_user( $field ) && $field != 'display_name' ) {
|
2174 |
$name .= um_user( $field ) . ' ';
|
2175 |
}
|
|
|
2176 |
}
|
2177 |
}
|
2178 |
|
languages/ultimate-member-en_US.mo
CHANGED
Binary file
|
languages/ultimate-member-en_US.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Ultimate Member\n"
|
4 |
-
"POT-Creation-Date: 2018-
|
5 |
-
"PO-Revision-Date: 2018-
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: en_US\n"
|
@@ -21,53 +21,53 @@ msgstr ""
|
|
21 |
"X-Poedit-SearchPath-0: .\n"
|
22 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
23 |
|
24 |
-
#: includes/admin/class-admin.php:
|
25 |
#, php-format
|
26 |
msgid "Duplicate of %s"
|
27 |
msgstr ""
|
28 |
|
29 |
-
#: includes/admin/class-admin.php:
|
30 |
msgid "Docs"
|
31 |
msgstr ""
|
32 |
|
33 |
-
#: includes/admin/class-admin.php:
|
34 |
#: includes/admin/core/class-admin-settings.php:1119
|
35 |
msgid "Settings"
|
36 |
msgstr ""
|
37 |
|
38 |
-
#: includes/admin/class-admin.php:
|
39 |
msgid "Form updated."
|
40 |
msgstr ""
|
41 |
|
42 |
-
#: includes/admin/class-admin.php:
|
43 |
msgid "Custom field updated."
|
44 |
msgstr ""
|
45 |
|
46 |
-
#: includes/admin/class-admin.php:
|
47 |
msgid "Custom field deleted."
|
48 |
msgstr ""
|
49 |
|
50 |
-
#: includes/admin/class-admin.php:
|
51 |
msgid "Form restored to revision."
|
52 |
msgstr ""
|
53 |
|
54 |
-
#: includes/admin/class-admin.php:
|
55 |
msgid "Form created."
|
56 |
msgstr ""
|
57 |
|
58 |
-
#: includes/admin/class-admin.php:
|
59 |
msgid "Form saved."
|
60 |
msgstr ""
|
61 |
|
62 |
-
#: includes/admin/class-admin.php:
|
63 |
msgid "Form submitted."
|
64 |
msgstr ""
|
65 |
|
66 |
-
#: includes/admin/class-admin.php:
|
67 |
msgid "Form scheduled."
|
68 |
msgstr ""
|
69 |
|
70 |
-
#: includes/admin/class-admin.php:
|
71 |
msgid "Form draft updated."
|
72 |
msgstr ""
|
73 |
|
@@ -115,7 +115,7 @@ msgstr ""
|
|
115 |
|
116 |
#: includes/admin/core/class-admin-builder.php:609
|
117 |
#: includes/admin/core/class-admin-builder.php:763
|
118 |
-
#: includes/core/class-fields.php:
|
119 |
msgid "Please login as administrator"
|
120 |
msgstr ""
|
121 |
|
@@ -160,13 +160,13 @@ msgid "Duplicate"
|
|
160 |
msgstr ""
|
161 |
|
162 |
#: includes/admin/core/class-admin-columns.php:93
|
163 |
-
#: includes/admin/core/class-admin-columns.php:
|
164 |
#: includes/admin/templates/role/role-edit.php:171
|
165 |
msgid "Title"
|
166 |
msgstr ""
|
167 |
|
168 |
#: includes/admin/core/class-admin-columns.php:94
|
169 |
-
#: includes/admin/core/class-admin-columns.php:
|
170 |
msgid "ID"
|
171 |
msgstr ""
|
172 |
|
@@ -175,19 +175,75 @@ msgid "Type"
|
|
175 |
msgstr ""
|
176 |
|
177 |
#: includes/admin/core/class-admin-columns.php:96
|
178 |
-
#: includes/admin/core/class-admin-columns.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
#: includes/admin/core/class-admin-metabox.php:818
|
180 |
#: includes/admin/core/class-admin-metabox.php:979
|
181 |
msgid "Shortcode"
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: includes/admin/core/class-admin-columns.php:
|
185 |
-
#: includes/admin/core/class-admin-columns.php:
|
186 |
msgid "Date"
|
187 |
msgstr ""
|
188 |
|
189 |
-
#: includes/admin/core/class-admin-
|
190 |
-
#: includes/admin/core/class-admin-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
#: includes/admin/core/class-admin-forms.php:813
|
192 |
#: includes/admin/core/class-admin-forms.php:827
|
193 |
#: includes/admin/core/class-admin-forms.php:932
|
@@ -197,13 +253,13 @@ msgstr ""
|
|
197 |
msgid "Remove"
|
198 |
msgstr ""
|
199 |
|
200 |
-
#: includes/admin/core/class-admin-enqueue.php:
|
201 |
-
#: includes/admin/core/class-admin-enqueue.php:
|
202 |
#: includes/admin/core/class-admin-forms.php:1009
|
203 |
msgid "Select"
|
204 |
msgstr ""
|
205 |
|
206 |
-
#: includes/admin/core/class-admin-enqueue.php:
|
207 |
msgid "Are sure, maybe some settings not saved"
|
208 |
msgstr ""
|
209 |
|
@@ -633,306 +689,306 @@ msgstr ""
|
|
633 |
msgid "Options"
|
634 |
msgstr ""
|
635 |
|
636 |
-
#: includes/admin/core/class-admin-metabox.php:
|
637 |
msgid ""
|
638 |
"Select where this field should appear. This option should only be changed on "
|
639 |
"the profile form and allows you to show a field in one mode only (edit or "
|
640 |
"view) or in both modes."
|
641 |
msgstr ""
|
642 |
|
643 |
-
#: includes/admin/core/class-admin-metabox.php:
|
644 |
msgid "If"
|
645 |
msgstr ""
|
646 |
|
647 |
-
#: includes/admin/core/class-admin-metabox.php:
|
648 |
msgid "Value"
|
649 |
msgstr ""
|
650 |
|
651 |
-
#: includes/admin/core/class-admin-metabox.php:
|
652 |
msgid "Does this field require a special validation"
|
653 |
msgstr ""
|
654 |
|
655 |
-
#: includes/admin/core/class-admin-metabox.php:
|
656 |
msgid ""
|
657 |
"If you want to apply your custom validation, you can use action hooks to add "
|
658 |
"custom validation. Please refer to documentation for further details."
|
659 |
msgstr ""
|
660 |
|
661 |
-
#: includes/admin/core/class-admin-metabox.php:
|
662 |
-
#: includes/admin/core/class-admin-metabox.php:
|
663 |
msgid ""
|
664 |
"Select an icon to appear in the field. Leave blank if you do not want an "
|
665 |
"icon to show in the field."
|
666 |
msgstr ""
|
667 |
|
668 |
-
#: includes/admin/core/class-admin-metabox.php:
|
669 |
msgid "Specify a custom CSS class to be applied to this element"
|
670 |
msgstr ""
|
671 |
|
672 |
-
#: includes/admin/core/class-admin-metabox.php:
|
673 |
msgid "This is the width in pixels, e.g. 4 or 2, etc"
|
674 |
msgstr ""
|
675 |
|
676 |
-
#: includes/admin/core/class-admin-metabox.php:
|
677 |
msgid "Optional text to include with the divider"
|
678 |
msgstr ""
|
679 |
|
680 |
-
#: includes/admin/core/class-admin-metabox.php:
|
681 |
msgid "Set padding for this section"
|
682 |
msgstr ""
|
683 |
|
684 |
-
#: includes/admin/core/class-admin-metabox.php:
|
685 |
msgid "Set margin for this section"
|
686 |
msgstr ""
|
687 |
|
688 |
-
#: includes/admin/core/class-admin-metabox.php:
|
689 |
msgid "Set border for this section"
|
690 |
msgstr ""
|
691 |
|
692 |
-
#: includes/admin/core/class-admin-metabox.php:
|
693 |
msgid "Choose the border style"
|
694 |
msgstr ""
|
695 |
|
696 |
-
#: includes/admin/core/class-admin-metabox.php:
|
697 |
msgid "Rounded corners can be applied by setting a pixels value here. e.g. 5px"
|
698 |
msgstr ""
|
699 |
|
700 |
-
#: includes/admin/core/class-admin-metabox.php:
|
701 |
msgid "Give a color to this border"
|
702 |
msgstr ""
|
703 |
|
704 |
-
#: includes/admin/core/class-admin-metabox.php:
|
705 |
msgid "Enable Row Heading"
|
706 |
msgstr ""
|
707 |
|
708 |
-
#: includes/admin/core/class-admin-metabox.php:
|
709 |
msgid "Whether to enable a heading for this row"
|
710 |
msgstr ""
|
711 |
|
712 |
-
#: includes/admin/core/class-admin-metabox.php:
|
713 |
msgid "Enter the row heading text here"
|
714 |
msgstr ""
|
715 |
|
716 |
-
#: includes/admin/core/class-admin-metabox.php:
|
717 |
msgid "This will be the background of entire section"
|
718 |
msgstr ""
|
719 |
|
720 |
-
#: includes/admin/core/class-admin-metabox.php:
|
721 |
msgid "This will be the background of the heading section"
|
722 |
msgstr ""
|
723 |
|
724 |
-
#: includes/admin/core/class-admin-metabox.php:
|
725 |
msgid "This will be the text color of heading part only"
|
726 |
msgstr ""
|
727 |
|
728 |
-
#: includes/admin/core/class-admin-metabox.php:
|
729 |
msgid "This will be the text color of entire section"
|
730 |
msgstr ""
|
731 |
|
732 |
-
#: includes/admin/core/class-admin-metabox.php:
|
733 |
msgid ""
|
734 |
"This will be the color of selected icon. By default It will be the same "
|
735 |
"color as heading text color"
|
736 |
msgstr ""
|
737 |
|
738 |
-
#: includes/admin/core/class-admin-metabox.php:
|
739 |
msgid "Select a color for this divider"
|
740 |
msgstr ""
|
741 |
|
742 |
-
#: includes/admin/core/class-admin-metabox.php:
|
743 |
msgid "Entering custom text here will replace the url with a text link"
|
744 |
msgstr ""
|
745 |
|
746 |
-
#: includes/admin/core/class-admin-metabox.php:
|
747 |
msgid "Choose whether to open this link in same window or in a new window"
|
748 |
msgstr ""
|
749 |
|
750 |
-
#: includes/admin/core/class-admin-metabox.php:
|
751 |
msgid "Whether to follow or nofollow this link by search engines"
|
752 |
msgstr ""
|
753 |
|
754 |
-
#: includes/admin/core/class-admin-metabox.php:
|
755 |
msgid ""
|
756 |
"Turn on to force users to create a strong password (A combination of one "
|
757 |
"lowercase letter, one uppercase letter, and one number). If turned on this "
|
758 |
"option is only applied to register forms and not to login forms."
|
759 |
msgstr ""
|
760 |
|
761 |
-
#: includes/admin/core/class-admin-metabox.php:
|
762 |
msgid ""
|
763 |
"Turn on to add a confirm password field. If turned on the confirm password "
|
764 |
"field will only show on register forms and not on login forms."
|
765 |
msgstr ""
|
766 |
|
767 |
-
#: includes/admin/core/class-admin-metabox.php:
|
768 |
msgid "This is the line-style of divider"
|
769 |
msgstr ""
|
770 |
|
771 |
-
#: includes/admin/core/class-admin-metabox.php:
|
772 |
msgid "Choose the minutes interval between each time in the time picker."
|
773 |
msgstr ""
|
774 |
|
775 |
-
#: includes/admin/core/class-admin-metabox.php:
|
776 |
msgid "The display format of the date which is visible to user."
|
777 |
msgstr ""
|
778 |
|
779 |
-
#: includes/admin/core/class-admin-metabox.php:
|
780 |
msgid "Choose the displayed time-format for this field"
|
781 |
msgstr ""
|
782 |
|
783 |
-
#: includes/admin/core/class-admin-metabox.php:
|
784 |
msgid ""
|
785 |
"Whether you wish to show the date in full or only show the years e.g. 25 "
|
786 |
"Years"
|
787 |
msgstr ""
|
788 |
|
789 |
-
#: includes/admin/core/class-admin-metabox.php:
|
790 |
msgid ""
|
791 |
"Disable specific week days from being available for selection in this date "
|
792 |
"picker"
|
793 |
msgstr ""
|
794 |
|
795 |
-
#: includes/admin/core/class-admin-metabox.php:
|
796 |
msgid ""
|
797 |
"Number of years available for the date selection. Default to last 50 years"
|
798 |
msgstr ""
|
799 |
|
800 |
-
#: includes/admin/core/class-admin-metabox.php:
|
801 |
msgid "This decides which years should be shown relative to today date"
|
802 |
msgstr ""
|
803 |
|
804 |
-
#: includes/admin/core/class-admin-metabox.php:
|
805 |
msgid "Set the minimum date/day in range in the format YYYY/MM/DD"
|
806 |
msgstr ""
|
807 |
|
808 |
-
#: includes/admin/core/class-admin-metabox.php:
|
809 |
msgid "Set the maximum date/day in range in the format YYYY/MM/DD"
|
810 |
msgstr ""
|
811 |
|
812 |
-
#: includes/admin/core/class-admin-metabox.php:
|
813 |
msgid ""
|
814 |
"Whether to show a specific number of years or specify a date range to be "
|
815 |
"available for the date picker."
|
816 |
msgstr ""
|
817 |
|
818 |
-
#: includes/admin/core/class-admin-metabox.php:
|
819 |
msgid ""
|
820 |
"Enter the shortcode in the following textarea and it will be displayed on "
|
821 |
"the fields"
|
822 |
msgstr ""
|
823 |
|
824 |
-
#: includes/admin/core/class-admin-metabox.php:
|
825 |
msgid "Edit the content of this field here"
|
826 |
msgstr ""
|
827 |
|
828 |
-
#: includes/admin/core/class-admin-metabox.php:
|
829 |
msgid "Enable/disable crop feature for this image upload and define ratio"
|
830 |
msgstr ""
|
831 |
|
832 |
-
#: includes/admin/core/class-admin-metabox.php:
|
833 |
-
#: includes/admin/core/class-admin-metabox.php:
|
834 |
msgid ""
|
835 |
"Select the image types that you want to allow to be uploaded via this field."
|
836 |
msgstr ""
|
837 |
|
838 |
-
#: includes/admin/core/class-admin-metabox.php:
|
839 |
msgid "This is the headline that appears in the upload box for this field"
|
840 |
msgstr ""
|
841 |
|
842 |
-
#: includes/admin/core/class-admin-metabox.php:
|
843 |
msgid ""
|
844 |
"If you need to add information or secondary line below the headline of "
|
845 |
"upload box, enter it here"
|
846 |
msgstr ""
|
847 |
|
848 |
-
#: includes/admin/core/class-admin-metabox.php:
|
849 |
msgid "The text that appears on the button. e.g. Upload"
|
850 |
msgstr ""
|
851 |
|
852 |
-
#: includes/admin/core/class-admin-metabox.php:
|
853 |
msgid ""
|
854 |
"The maximum size for image that can be uploaded through this field. Leave "
|
855 |
"empty for unlimited size."
|
856 |
msgstr ""
|
857 |
|
858 |
-
#: includes/admin/core/class-admin-metabox.php:
|
859 |
msgid "The height of textarea in pixels. Default is 100 pixels"
|
860 |
msgstr ""
|
861 |
|
862 |
-
#: includes/admin/core/class-admin-metabox.php:
|
863 |
msgid "This is the required spacing in pixels. e.g. 20px"
|
864 |
msgstr ""
|
865 |
|
866 |
-
#: includes/admin/core/class-admin-metabox.php:
|
867 |
msgid "Enable/disable multiple selections for this field"
|
868 |
msgstr ""
|
869 |
|
870 |
-
#: includes/admin/core/class-admin-metabox.php:
|
871 |
msgid ""
|
872 |
"Enter a number here to force a maximum number of selections by user for this "
|
873 |
"field"
|
874 |
msgstr ""
|
875 |
|
876 |
-
#: includes/admin/core/class-admin-metabox.php:
|
877 |
msgid ""
|
878 |
"Enter a number here to force a minimum number of selections by user for this "
|
879 |
"field"
|
880 |
msgstr ""
|
881 |
|
882 |
-
#: includes/admin/core/class-admin-metabox.php:
|
883 |
msgid "This is the max number of entries the user can add via field group."
|
884 |
msgstr ""
|
885 |
|
886 |
-
#: includes/admin/core/class-admin-metabox.php:
|
887 |
msgid ""
|
888 |
"If you want to enable a maximum number of words to be input in this "
|
889 |
"textarea. Leave empty to disable this setting"
|
890 |
msgstr ""
|
891 |
|
892 |
-
#: includes/admin/core/class-admin-metabox.php:
|
893 |
msgid "Minimum number that can be entered in this field"
|
894 |
msgstr ""
|
895 |
|
896 |
-
#: includes/admin/core/class-admin-metabox.php:
|
897 |
msgid "Maximum number that can be entered in this field"
|
898 |
msgstr ""
|
899 |
|
900 |
-
#: includes/admin/core/class-admin-metabox.php:
|
901 |
msgid ""
|
902 |
"If you want to enable a minimum number of characters to be input in this "
|
903 |
"field. Leave empty to disable this setting"
|
904 |
msgstr ""
|
905 |
|
906 |
-
#: includes/admin/core/class-admin-metabox.php:
|
907 |
msgid ""
|
908 |
"If you want to enable a maximum number of characters to be input in this "
|
909 |
"field. Leave empty to disable this setting"
|
910 |
msgstr ""
|
911 |
|
912 |
-
#: includes/admin/core/class-admin-metabox.php:
|
913 |
msgid "Turn on/off HTML tags for this textarea"
|
914 |
msgstr ""
|
915 |
|
916 |
-
#: includes/admin/core/class-admin-metabox.php:
|
917 |
msgid ""
|
918 |
"Enter one choice per line. This will represent the available choices or "
|
919 |
"selections available for user."
|
920 |
msgstr ""
|
921 |
|
922 |
-
#: includes/admin/core/class-admin-metabox.php:
|
923 |
msgid ""
|
924 |
"This is the title of the field for your reference in the backend. The title "
|
925 |
"will not appear on the front-end of your website."
|
926 |
msgstr ""
|
927 |
|
928 |
-
#: includes/admin/core/class-admin-metabox.php:
|
929 |
msgid ""
|
930 |
"The meta key cannot be changed for duplicated fields or when editing an "
|
931 |
"existing field. If you require a different meta key please create a new "
|
932 |
"field."
|
933 |
msgstr ""
|
934 |
|
935 |
-
#: includes/admin/core/class-admin-metabox.php:
|
936 |
msgid ""
|
937 |
"A meta key is required to store the entered info in this field in the "
|
938 |
"database. The meta key should be unique to this field and be written in "
|
@@ -940,7 +996,7 @@ msgid ""
|
|
940 |
"job_title"
|
941 |
msgstr ""
|
942 |
|
943 |
-
#: includes/admin/core/class-admin-metabox.php:
|
944 |
msgid ""
|
945 |
"This is the text that appears in a tooltip when a user hovers over the info "
|
946 |
"icon. Help text is useful for providing users with more information about "
|
@@ -948,73 +1004,73 @@ msgid ""
|
|
948 |
"for field."
|
949 |
msgstr ""
|
950 |
|
951 |
-
#: includes/admin/core/class-admin-metabox.php:
|
952 |
msgid "Text to display by default in this field"
|
953 |
msgstr ""
|
954 |
|
955 |
-
#: includes/admin/core/class-admin-metabox.php:
|
956 |
msgid ""
|
957 |
"If you wish the rating field to be prefilled with a number of stars, enter "
|
958 |
"it here."
|
959 |
msgstr ""
|
960 |
|
961 |
-
#: includes/admin/core/class-admin-metabox.php:
|
962 |
msgid ""
|
963 |
"This option allows you to pre-fill the field with a default value prior to "
|
964 |
"the user entering a value in the field. Leave blank to have no default value"
|
965 |
msgstr ""
|
966 |
|
967 |
-
#: includes/admin/core/class-admin-metabox.php:
|
968 |
msgid ""
|
969 |
"The field label is the text that appears above the field on your front-end "
|
970 |
"form. Leave blank to not show a label above field."
|
971 |
msgstr ""
|
972 |
|
973 |
-
#: includes/admin/core/class-admin-metabox.php:
|
974 |
msgid ""
|
975 |
"This is the text that appears within the field e.g please enter your email "
|
976 |
"address. Leave blank to not show any placeholder text."
|
977 |
msgstr ""
|
978 |
|
979 |
-
#: includes/admin/core/class-admin-metabox.php:
|
980 |
msgid ""
|
981 |
"Field privacy allows you to select who can view this field on the front-end. "
|
982 |
"The site admin can view all fields regardless of the option set here."
|
983 |
msgstr ""
|
984 |
|
985 |
-
#: includes/admin/core/class-admin-metabox.php:
|
986 |
msgid "Select the member roles that can view this field on the front-end."
|
987 |
msgstr ""
|
988 |
|
989 |
-
#: includes/admin/core/class-admin-metabox.php:
|
990 |
msgid ""
|
991 |
"This option allows you to set whether the field must be filled in before the "
|
992 |
"form can be processed."
|
993 |
msgstr ""
|
994 |
|
995 |
-
#: includes/admin/core/class-admin-metabox.php:
|
996 |
msgid ""
|
997 |
"This option allows you to set whether or not the user can edit the "
|
998 |
"information in this field."
|
999 |
msgstr ""
|
1000 |
|
1001 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1002 |
msgid "Choose whether you want a 5-stars or 10-stars ratings based here."
|
1003 |
msgstr ""
|
1004 |
|
1005 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1006 |
msgid "Add a callback source to retrieve choices."
|
1007 |
msgstr ""
|
1008 |
|
1009 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1010 |
msgid "Parent Option"
|
1011 |
msgstr ""
|
1012 |
|
1013 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1014 |
msgid "Dynamically populates the option based from selected parent option."
|
1015 |
msgstr ""
|
1016 |
|
1017 |
-
#: includes/admin/core/class-admin-metabox.php:
|
1018 |
msgid "No Selected"
|
1019 |
msgstr ""
|
1020 |
|
@@ -1057,12 +1113,12 @@ msgstr ""
|
|
1057 |
#: includes/admin/core/class-admin-notices.php:301
|
1058 |
#, php-format
|
1059 |
msgid ""
|
1060 |
-
"
|
1061 |
-
"
|
1062 |
msgstr ""
|
1063 |
|
1064 |
#: includes/admin/core/class-admin-notices.php:305
|
1065 |
-
msgid "
|
1066 |
msgstr ""
|
1067 |
|
1068 |
#: includes/admin/core/class-admin-notices.php:307
|
@@ -1170,7 +1226,7 @@ msgstr ""
|
|
1170 |
#: includes/admin/core/class-admin-notices.php:534
|
1171 |
#, php-format
|
1172 |
msgid ""
|
1173 |
-
"Thanks for installing <strong>%s</strong>! We hope you like the plugin.
|
1174 |
"fund full-time development and support of the plugin we also sell "
|
1175 |
"extensions. If you subscribe to our mailing list we will send you a 20%% "
|
1176 |
"discount code for our <a href=\"%s\" target=\"_blank\">extensions bundle</a>."
|
@@ -1478,13 +1534,6 @@ msgid ""
|
|
1478 |
"Gravatar has a number of built in options which you can also use as defaults"
|
1479 |
msgstr ""
|
1480 |
|
1481 |
-
#: includes/admin/core/class-admin-settings.php:310
|
1482 |
-
#: includes/admin/templates/form/login_settings.php:13
|
1483 |
-
#: includes/admin/templates/form/register_customize.php:3
|
1484 |
-
#: includes/admin/templates/form/register_customize.php:29
|
1485 |
-
msgid "Default"
|
1486 |
-
msgstr ""
|
1487 |
-
|
1488 |
#: includes/admin/core/class-admin-settings.php:311
|
1489 |
msgid "404 ( File Not Found response )"
|
1490 |
msgstr ""
|
@@ -2482,7 +2531,7 @@ msgid "UM Action"
|
|
2482 |
msgstr ""
|
2483 |
|
2484 |
#: includes/admin/core/class-admin-users.php:116
|
2485 |
-
#: includes/core/class-fields.php:
|
2486 |
msgid "Apply"
|
2487 |
msgstr ""
|
2488 |
|
@@ -2609,49 +2658,6 @@ msgstr ""
|
|
2609 |
msgid "Reset UM Role meta"
|
2610 |
msgstr ""
|
2611 |
|
2612 |
-
#: includes/admin/core/list-tables/roles-list-table.php:367
|
2613 |
-
#: includes/admin/core/list-tables/roles-list-table.php:375
|
2614 |
-
#: includes/admin/templates/form/login_customize.php:14
|
2615 |
-
#: includes/admin/templates/form/login_customize.php:62
|
2616 |
-
#: includes/admin/templates/form/login_customize.php:81
|
2617 |
-
#: includes/admin/templates/form/login_customize.php:92
|
2618 |
-
#: includes/admin/templates/form/profile_customize.php:23
|
2619 |
-
#: includes/admin/templates/form/profile_customize.php:89
|
2620 |
-
#: includes/admin/templates/form/profile_customize.php:108
|
2621 |
-
#: includes/admin/templates/form/profile_customize.php:141
|
2622 |
-
#: includes/admin/templates/form/profile_customize.php:152
|
2623 |
-
#: includes/admin/templates/form/profile_customize.php:163
|
2624 |
-
#: includes/admin/templates/form/profile_customize.php:174
|
2625 |
-
#: includes/admin/templates/form/register_customize.php:21
|
2626 |
-
#: includes/admin/templates/form/register_customize.php:77
|
2627 |
-
#: includes/admin/templates/form/register_gdpr.php:24
|
2628 |
-
#: includes/core/class-builtin.php:1130 includes/core/class-builtin.php:1145
|
2629 |
-
#: includes/core/um-filters-members.php:68
|
2630 |
-
msgid "Yes"
|
2631 |
-
msgstr ""
|
2632 |
-
|
2633 |
-
#: includes/admin/core/list-tables/roles-list-table.php:367
|
2634 |
-
#: includes/admin/core/list-tables/roles-list-table.php:375
|
2635 |
-
#: includes/admin/templates/form/login_customize.php:13
|
2636 |
-
#: includes/admin/templates/form/login_customize.php:61
|
2637 |
-
#: includes/admin/templates/form/login_customize.php:80
|
2638 |
-
#: includes/admin/templates/form/login_customize.php:91
|
2639 |
-
#: includes/admin/templates/form/profile_customize.php:22
|
2640 |
-
#: includes/admin/templates/form/profile_customize.php:88
|
2641 |
-
#: includes/admin/templates/form/profile_customize.php:107
|
2642 |
-
#: includes/admin/templates/form/profile_customize.php:140
|
2643 |
-
#: includes/admin/templates/form/profile_customize.php:151
|
2644 |
-
#: includes/admin/templates/form/profile_customize.php:162
|
2645 |
-
#: includes/admin/templates/form/profile_customize.php:173
|
2646 |
-
#: includes/admin/templates/form/register_customize.php:20
|
2647 |
-
#: includes/admin/templates/form/register_customize.php:76
|
2648 |
-
#: includes/admin/templates/form/register_gdpr.php:23
|
2649 |
-
#: includes/core/class-builtin.php:1130 includes/core/class-builtin.php:1144
|
2650 |
-
#: includes/core/class-builtin.php:1145
|
2651 |
-
#: includes/core/um-actions-account.php:251
|
2652 |
-
msgid "No"
|
2653 |
-
msgstr ""
|
2654 |
-
|
2655 |
#: includes/admin/core/list-tables/roles-list-table.php:397
|
2656 |
msgid "Role"
|
2657 |
msgstr ""
|
@@ -3178,25 +3184,25 @@ msgstr ""
|
|
3178 |
msgid "We are sorry. We cannot find any users who match your search criteria."
|
3179 |
msgstr ""
|
3180 |
|
3181 |
-
#: includes/admin/templates/extensions.php:
|
3182 |
msgid "View our Extensions Bundle"
|
3183 |
msgstr ""
|
3184 |
|
3185 |
-
#: includes/admin/templates/extensions.php:
|
3186 |
msgid "Premium"
|
3187 |
msgstr ""
|
3188 |
|
3189 |
-
#: includes/admin/templates/extensions.php:
|
3190 |
msgid "Free"
|
3191 |
msgstr ""
|
3192 |
|
3193 |
-
#: includes/admin/templates/extensions.php:
|
3194 |
-
#: includes/admin/templates/extensions.php:
|
3195 |
msgid "Get this Add on"
|
3196 |
msgstr ""
|
3197 |
|
3198 |
-
#: includes/admin/templates/extensions.php:
|
3199 |
-
#: includes/admin/templates/extensions.php:
|
3200 |
msgid "More Details"
|
3201 |
msgstr ""
|
3202 |
|
@@ -3526,7 +3532,7 @@ msgstr ""
|
|
3526 |
#: includes/admin/templates/modal/dynamic_new_group.php:14
|
3527 |
#: includes/admin/templates/modal/fonticons.php:11
|
3528 |
#: includes/admin/templates/role/publish.php:24
|
3529 |
-
#: includes/core/class-fields.php:
|
3530 |
#: includes/core/um-actions-profile.php:554
|
3531 |
#: includes/core/um-actions-profile.php:693
|
3532 |
#: includes/core/um-actions-profile.php:726
|
@@ -4019,36 +4025,36 @@ msgid ""
|
|
4019 |
"account data from the site. To delete your account enter your password below"
|
4020 |
msgstr ""
|
4021 |
|
4022 |
-
#: includes/class-dependencies.php:
|
4023 |
#, php-format
|
4024 |
msgid ""
|
4025 |
"This version of <strong>\"%s\"</strong> requires the core <strong>%s</"
|
4026 |
"strong> plugin to be <strong>%s</strong> or higher."
|
4027 |
msgstr ""
|
4028 |
|
4029 |
-
#: includes/class-dependencies.php:
|
4030 |
#, php-format
|
4031 |
msgid "Please update <strong>%s</strong> to the latest version."
|
4032 |
msgstr ""
|
4033 |
|
4034 |
-
#: includes/class-dependencies.php:
|
4035 |
#, php-format
|
4036 |
msgid ""
|
4037 |
"Sorry, but this version of <strong>%s</strong> does not work with extension "
|
4038 |
"<strong>\"%s\" %s</strong> version."
|
4039 |
msgstr ""
|
4040 |
|
4041 |
-
#: includes/class-dependencies.php:
|
4042 |
#, php-format
|
4043 |
msgid "Please update extension <strong>\"%s\"</strong> to the latest version."
|
4044 |
msgstr ""
|
4045 |
|
4046 |
-
#: includes/class-dependencies.php:
|
4047 |
#, php-format
|
4048 |
msgid "Please check <strong>\"%s\" %s</strong> extension's folder name."
|
4049 |
msgstr ""
|
4050 |
|
4051 |
-
#: includes/class-dependencies.php:
|
4052 |
#, php-format
|
4053 |
msgid "Correct folder name is <strong>\"%s\"</strong>"
|
4054 |
msgstr ""
|
@@ -6189,48 +6195,42 @@ msgstr ""
|
|
6189 |
msgid "just now"
|
6190 |
msgstr ""
|
6191 |
|
6192 |
-
#: includes/core/class-date-time.php:
|
6193 |
#, php-format
|
6194 |
msgid "%s min"
|
6195 |
-
|
6196 |
-
|
6197 |
-
|
6198 |
-
#, php-format
|
6199 |
-
msgid "%s mins"
|
6200 |
-
msgstr ""
|
6201 |
|
6202 |
-
#: includes/core/class-date-time.php:
|
6203 |
#, php-format
|
6204 |
msgid "%s hr"
|
6205 |
-
|
6206 |
-
|
6207 |
-
|
6208 |
-
#, php-format
|
6209 |
-
msgid "%s hrs"
|
6210 |
-
msgstr ""
|
6211 |
|
6212 |
-
#: includes/core/class-date-time.php:
|
6213 |
#, php-format
|
6214 |
msgid "Yesterday at %s"
|
6215 |
msgstr ""
|
6216 |
|
6217 |
-
#: includes/core/class-date-time.php:
|
6218 |
-
#: includes/core/class-date-time.php:
|
6219 |
#, php-format
|
6220 |
msgid "%s at %s"
|
6221 |
msgstr ""
|
6222 |
|
6223 |
-
#: includes/core/class-date-time.php:
|
6224 |
#, php-format
|
6225 |
msgid "%s year old"
|
6226 |
msgstr ""
|
6227 |
|
6228 |
-
#: includes/core/class-date-time.php:
|
6229 |
#, php-format
|
6230 |
msgid "%s years old"
|
6231 |
msgstr ""
|
6232 |
|
6233 |
-
#: includes/core/class-date-time.php:
|
6234 |
msgid "Less than 1 year old"
|
6235 |
msgstr ""
|
6236 |
|
@@ -6244,116 +6244,121 @@ msgstr ""
|
|
6244 |
msgid "Add translation to %s"
|
6245 |
msgstr ""
|
6246 |
|
6247 |
-
#: includes/core/class-fields.php:
|
|
|
|
|
|
|
|
|
|
|
6248 |
msgid "Custom Field"
|
6249 |
msgstr ""
|
6250 |
|
6251 |
-
#: includes/core/class-fields.php:
|
6252 |
msgid "Please upload a valid image!"
|
6253 |
msgstr ""
|
6254 |
|
6255 |
-
#: includes/core/class-fields.php:
|
6256 |
msgid "Upload"
|
6257 |
msgstr ""
|
6258 |
|
6259 |
-
#: includes/core/class-fields.php:
|
6260 |
msgid "Sorry this is not a valid image."
|
6261 |
msgstr ""
|
6262 |
|
6263 |
-
#: includes/core/class-fields.php:
|
6264 |
msgid "This image is too large!"
|
6265 |
msgstr ""
|
6266 |
|
6267 |
-
#: includes/core/class-fields.php:
|
6268 |
msgid "This image is too small!"
|
6269 |
msgstr ""
|
6270 |
|
6271 |
-
#: includes/core/class-fields.php:
|
6272 |
msgid "You can only upload one image"
|
6273 |
msgstr ""
|
6274 |
|
6275 |
-
#: includes/core/class-fields.php:
|
6276 |
msgid "Current Password"
|
6277 |
msgstr ""
|
6278 |
|
6279 |
-
#: includes/core/class-fields.php:
|
6280 |
msgid "New Password"
|
6281 |
msgstr ""
|
6282 |
|
6283 |
-
#: includes/core/class-fields.php:
|
6284 |
#, php-format
|
6285 |
msgid "Confirm %s"
|
6286 |
msgstr ""
|
6287 |
|
6288 |
-
#: includes/core/class-fields.php:
|
6289 |
msgid "Upload Photo"
|
6290 |
msgstr ""
|
6291 |
|
6292 |
-
#: includes/core/class-fields.php:
|
6293 |
#: includes/core/um-actions-profile.php:724
|
6294 |
msgid "Change photo"
|
6295 |
msgstr ""
|
6296 |
|
6297 |
-
#: includes/core/class-fields.php:
|
6298 |
msgid "Processing..."
|
6299 |
msgstr ""
|
6300 |
|
6301 |
-
#: includes/core/class-fields.php:
|
6302 |
msgid "Upload File"
|
6303 |
msgstr ""
|
6304 |
|
6305 |
-
#: includes/core/class-fields.php:
|
6306 |
msgid "This file has been removed."
|
6307 |
msgstr ""
|
6308 |
|
6309 |
-
#: includes/core/class-fields.php:
|
6310 |
msgid "Change file"
|
6311 |
msgstr ""
|
6312 |
|
6313 |
-
#: includes/core/class-fields.php:
|
6314 |
msgid "Save"
|
6315 |
msgstr ""
|
6316 |
|
6317 |
-
#: includes/core/class-fields.php:
|
6318 |
#, php-format
|
6319 |
msgid ""
|
6320 |
"Your profile is looking a little empty. Why not <a href=\"%s\">add</a> some "
|
6321 |
"information!"
|
6322 |
msgstr ""
|
6323 |
|
6324 |
-
#: includes/core/class-fields.php:
|
6325 |
msgid "This user has not added any information to their profile yet."
|
6326 |
msgstr ""
|
6327 |
|
6328 |
-
#: includes/core/class-files.php:
|
6329 |
msgid "Invalid parameters"
|
6330 |
msgstr ""
|
6331 |
|
6332 |
-
#: includes/core/class-files.php:
|
6333 |
msgid "Invalid coordinates"
|
6334 |
msgstr ""
|
6335 |
|
6336 |
-
#: includes/core/class-files.php:
|
6337 |
msgid "Invalid file ownership"
|
6338 |
msgstr ""
|
6339 |
|
6340 |
-
#: includes/core/class-files.php:
|
6341 |
msgid "Invalid nonce"
|
6342 |
msgstr ""
|
6343 |
|
6344 |
-
#: includes/core/class-files.php:
|
6345 |
msgid "A theme or plugin compatibility issue"
|
6346 |
msgstr ""
|
6347 |
|
6348 |
-
#: includes/core/class-files.php:
|
6349 |
msgid "Ultimate Member: Not a valid temp file"
|
6350 |
msgstr ""
|
6351 |
|
6352 |
-
#: includes/core/class-files.php:
|
6353 |
msgid "Invalid user ID: "
|
6354 |
msgstr ""
|
6355 |
|
6356 |
-
#: includes/core/class-files.php:
|
6357 |
msgid "Unauthorized to do this attempt."
|
6358 |
msgstr ""
|
6359 |
|
@@ -6513,42 +6518,42 @@ msgstr ""
|
|
6513 |
msgid "Wrong nonce"
|
6514 |
msgstr ""
|
6515 |
|
6516 |
-
#: includes/core/class-shortcodes.php:
|
6517 |
msgid ""
|
6518 |
"This content has been restricted to logged in users only. Please <a href="
|
6519 |
"\"{login_referrer}\">login</a> to view this content."
|
6520 |
msgstr ""
|
6521 |
|
6522 |
-
#: includes/core/class-shortcodes.php:
|
6523 |
msgid "You are already registered"
|
6524 |
msgstr ""
|
6525 |
|
6526 |
-
#: includes/core/class-shortcodes.php:
|
6527 |
msgid "Default Template"
|
6528 |
msgstr ""
|
6529 |
|
6530 |
-
#: includes/core/class-uploader.php:
|
6531 |
msgid "Your image is invalid!"
|
6532 |
msgstr ""
|
6533 |
|
6534 |
-
#: includes/core/class-uploader.php:
|
6535 |
msgid "This media type is not recognized."
|
6536 |
msgstr ""
|
6537 |
|
6538 |
-
#: includes/core/class-uploader.php:
|
6539 |
msgid "Your image is invalid or too large!"
|
6540 |
msgstr ""
|
6541 |
|
6542 |
-
#: includes/core/class-uploader.php:
|
6543 |
#, php-format
|
6544 |
msgid "Your photo is too small. It must be at least %spx wide."
|
6545 |
msgstr ""
|
6546 |
|
6547 |
-
#: includes/core/class-uploader.php:
|
6548 |
msgid "This file type is not recognized."
|
6549 |
msgstr ""
|
6550 |
|
6551 |
-
#: includes/core/class-uploader.php:
|
6552 |
#, php-format
|
6553 |
msgid "Maximum file size allowed: %s"
|
6554 |
msgstr ""
|
@@ -6939,12 +6944,7 @@ msgstr ""
|
|
6939 |
msgid "Joined %s"
|
6940 |
msgstr ""
|
6941 |
|
6942 |
-
#: includes/core/um-filters-fields.php:
|
6943 |
-
#, php-format
|
6944 |
-
msgid "Last login: %s"
|
6945 |
-
msgstr ""
|
6946 |
-
|
6947 |
-
#: includes/core/um-filters-fields.php:274
|
6948 |
msgid "Untitled photo"
|
6949 |
msgstr ""
|
6950 |
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Ultimate Member\n"
|
4 |
+
"POT-Creation-Date: 2018-11-12 17:51+0200\n"
|
5 |
+
"PO-Revision-Date: 2018-11-12 17:52+0200\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: en_US\n"
|
21 |
"X-Poedit-SearchPath-0: .\n"
|
22 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
23 |
|
24 |
+
#: includes/admin/class-admin.php:182
|
25 |
#, php-format
|
26 |
msgid "Duplicate of %s"
|
27 |
msgstr ""
|
28 |
|
29 |
+
#: includes/admin/class-admin.php:331
|
30 |
msgid "Docs"
|
31 |
msgstr ""
|
32 |
|
33 |
+
#: includes/admin/class-admin.php:332
|
34 |
#: includes/admin/core/class-admin-settings.php:1119
|
35 |
msgid "Settings"
|
36 |
msgstr ""
|
37 |
|
38 |
+
#: includes/admin/class-admin.php:403 includes/admin/class-admin.php:406
|
39 |
msgid "Form updated."
|
40 |
msgstr ""
|
41 |
|
42 |
+
#: includes/admin/class-admin.php:404
|
43 |
msgid "Custom field updated."
|
44 |
msgstr ""
|
45 |
|
46 |
+
#: includes/admin/class-admin.php:405
|
47 |
msgid "Custom field deleted."
|
48 |
msgstr ""
|
49 |
|
50 |
+
#: includes/admin/class-admin.php:407
|
51 |
msgid "Form restored to revision."
|
52 |
msgstr ""
|
53 |
|
54 |
+
#: includes/admin/class-admin.php:408
|
55 |
msgid "Form created."
|
56 |
msgstr ""
|
57 |
|
58 |
+
#: includes/admin/class-admin.php:409
|
59 |
msgid "Form saved."
|
60 |
msgstr ""
|
61 |
|
62 |
+
#: includes/admin/class-admin.php:410
|
63 |
msgid "Form submitted."
|
64 |
msgstr ""
|
65 |
|
66 |
+
#: includes/admin/class-admin.php:411
|
67 |
msgid "Form scheduled."
|
68 |
msgstr ""
|
69 |
|
70 |
+
#: includes/admin/class-admin.php:412
|
71 |
msgid "Form draft updated."
|
72 |
msgstr ""
|
73 |
|
115 |
|
116 |
#: includes/admin/core/class-admin-builder.php:609
|
117 |
#: includes/admin/core/class-admin-builder.php:763
|
118 |
+
#: includes/core/class-fields.php:4062
|
119 |
msgid "Please login as administrator"
|
120 |
msgstr ""
|
121 |
|
160 |
msgstr ""
|
161 |
|
162 |
#: includes/admin/core/class-admin-columns.php:93
|
163 |
+
#: includes/admin/core/class-admin-columns.php:113
|
164 |
#: includes/admin/templates/role/role-edit.php:171
|
165 |
msgid "Title"
|
166 |
msgstr ""
|
167 |
|
168 |
#: includes/admin/core/class-admin-columns.php:94
|
169 |
+
#: includes/admin/core/class-admin-columns.php:114
|
170 |
msgid "ID"
|
171 |
msgstr ""
|
172 |
|
175 |
msgstr ""
|
176 |
|
177 |
#: includes/admin/core/class-admin-columns.php:96
|
178 |
+
#: includes/admin/core/class-admin-columns.php:115
|
179 |
+
#: includes/admin/core/class-admin-settings.php:310
|
180 |
+
#: includes/admin/templates/form/login_settings.php:13
|
181 |
+
#: includes/admin/templates/form/register_customize.php:3
|
182 |
+
#: includes/admin/templates/form/register_customize.php:29
|
183 |
+
msgid "Default"
|
184 |
+
msgstr ""
|
185 |
+
|
186 |
+
#: includes/admin/core/class-admin-columns.php:97
|
187 |
+
#: includes/admin/core/class-admin-columns.php:116
|
188 |
#: includes/admin/core/class-admin-metabox.php:818
|
189 |
#: includes/admin/core/class-admin-metabox.php:979
|
190 |
msgid "Shortcode"
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: includes/admin/core/class-admin-columns.php:98
|
194 |
+
#: includes/admin/core/class-admin-columns.php:117
|
195 |
msgid "Date"
|
196 |
msgstr ""
|
197 |
|
198 |
+
#: includes/admin/core/class-admin-columns.php:148
|
199 |
+
#: includes/admin/core/class-admin-columns.php:181
|
200 |
+
#: includes/admin/core/list-tables/roles-list-table.php:367
|
201 |
+
#: includes/admin/core/list-tables/roles-list-table.php:375
|
202 |
+
#: includes/admin/templates/form/login_customize.php:13
|
203 |
+
#: includes/admin/templates/form/login_customize.php:61
|
204 |
+
#: includes/admin/templates/form/login_customize.php:80
|
205 |
+
#: includes/admin/templates/form/login_customize.php:91
|
206 |
+
#: includes/admin/templates/form/profile_customize.php:22
|
207 |
+
#: includes/admin/templates/form/profile_customize.php:88
|
208 |
+
#: includes/admin/templates/form/profile_customize.php:107
|
209 |
+
#: includes/admin/templates/form/profile_customize.php:140
|
210 |
+
#: includes/admin/templates/form/profile_customize.php:151
|
211 |
+
#: includes/admin/templates/form/profile_customize.php:162
|
212 |
+
#: includes/admin/templates/form/profile_customize.php:173
|
213 |
+
#: includes/admin/templates/form/register_customize.php:20
|
214 |
+
#: includes/admin/templates/form/register_customize.php:76
|
215 |
+
#: includes/admin/templates/form/register_gdpr.php:23
|
216 |
+
#: includes/core/class-builtin.php:1130 includes/core/class-builtin.php:1144
|
217 |
+
#: includes/core/class-builtin.php:1145
|
218 |
+
#: includes/core/um-actions-account.php:251
|
219 |
+
msgid "No"
|
220 |
+
msgstr ""
|
221 |
+
|
222 |
+
#: includes/admin/core/class-admin-columns.php:148
|
223 |
+
#: includes/admin/core/class-admin-columns.php:181
|
224 |
+
#: includes/admin/core/list-tables/roles-list-table.php:367
|
225 |
+
#: includes/admin/core/list-tables/roles-list-table.php:375
|
226 |
+
#: includes/admin/templates/form/login_customize.php:14
|
227 |
+
#: includes/admin/templates/form/login_customize.php:62
|
228 |
+
#: includes/admin/templates/form/login_customize.php:81
|
229 |
+
#: includes/admin/templates/form/login_customize.php:92
|
230 |
+
#: includes/admin/templates/form/profile_customize.php:23
|
231 |
+
#: includes/admin/templates/form/profile_customize.php:89
|
232 |
+
#: includes/admin/templates/form/profile_customize.php:108
|
233 |
+
#: includes/admin/templates/form/profile_customize.php:141
|
234 |
+
#: includes/admin/templates/form/profile_customize.php:152
|
235 |
+
#: includes/admin/templates/form/profile_customize.php:163
|
236 |
+
#: includes/admin/templates/form/profile_customize.php:174
|
237 |
+
#: includes/admin/templates/form/register_customize.php:21
|
238 |
+
#: includes/admin/templates/form/register_customize.php:77
|
239 |
+
#: includes/admin/templates/form/register_gdpr.php:24
|
240 |
+
#: includes/core/class-builtin.php:1130 includes/core/class-builtin.php:1145
|
241 |
+
#: includes/core/um-filters-members.php:68
|
242 |
+
msgid "Yes"
|
243 |
+
msgstr ""
|
244 |
+
|
245 |
+
#: includes/admin/core/class-admin-enqueue.php:125
|
246 |
+
#: includes/admin/core/class-admin-enqueue.php:159
|
247 |
#: includes/admin/core/class-admin-forms.php:813
|
248 |
#: includes/admin/core/class-admin-forms.php:827
|
249 |
#: includes/admin/core/class-admin-forms.php:932
|
253 |
msgid "Remove"
|
254 |
msgstr ""
|
255 |
|
256 |
+
#: includes/admin/core/class-admin-enqueue.php:126
|
257 |
+
#: includes/admin/core/class-admin-enqueue.php:160
|
258 |
#: includes/admin/core/class-admin-forms.php:1009
|
259 |
msgid "Select"
|
260 |
msgstr ""
|
261 |
|
262 |
+
#: includes/admin/core/class-admin-enqueue.php:157
|
263 |
msgid "Are sure, maybe some settings not saved"
|
264 |
msgstr ""
|
265 |
|
689 |
msgid "Options"
|
690 |
msgstr ""
|
691 |
|
692 |
+
#: includes/admin/core/class-admin-metabox.php:1236
|
693 |
msgid ""
|
694 |
"Select where this field should appear. This option should only be changed on "
|
695 |
"the profile form and allows you to show a field in one mode only (edit or "
|
696 |
"view) or in both modes."
|
697 |
msgstr ""
|
698 |
|
699 |
+
#: includes/admin/core/class-admin-metabox.php:1270
|
700 |
msgid "If"
|
701 |
msgstr ""
|
702 |
|
703 |
+
#: includes/admin/core/class-admin-metabox.php:1347
|
704 |
msgid "Value"
|
705 |
msgstr ""
|
706 |
|
707 |
+
#: includes/admin/core/class-admin-metabox.php:1356
|
708 |
msgid "Does this field require a special validation"
|
709 |
msgstr ""
|
710 |
|
711 |
+
#: includes/admin/core/class-admin-metabox.php:1401
|
712 |
msgid ""
|
713 |
"If you want to apply your custom validation, you can use action hooks to add "
|
714 |
"custom validation. Please refer to documentation for further details."
|
715 |
msgstr ""
|
716 |
|
717 |
+
#: includes/admin/core/class-admin-metabox.php:1415
|
718 |
+
#: includes/admin/core/class-admin-metabox.php:1443
|
719 |
msgid ""
|
720 |
"Select an icon to appear in the field. Leave blank if you do not want an "
|
721 |
"icon to show in the field."
|
722 |
msgstr ""
|
723 |
|
724 |
+
#: includes/admin/core/class-admin-metabox.php:1470
|
725 |
msgid "Specify a custom CSS class to be applied to this element"
|
726 |
msgstr ""
|
727 |
|
728 |
+
#: includes/admin/core/class-admin-metabox.php:1480
|
729 |
msgid "This is the width in pixels, e.g. 4 or 2, etc"
|
730 |
msgstr ""
|
731 |
|
732 |
+
#: includes/admin/core/class-admin-metabox.php:1490
|
733 |
msgid "Optional text to include with the divider"
|
734 |
msgstr ""
|
735 |
|
736 |
+
#: includes/admin/core/class-admin-metabox.php:1500
|
737 |
msgid "Set padding for this section"
|
738 |
msgstr ""
|
739 |
|
740 |
+
#: includes/admin/core/class-admin-metabox.php:1510
|
741 |
msgid "Set margin for this section"
|
742 |
msgstr ""
|
743 |
|
744 |
+
#: includes/admin/core/class-admin-metabox.php:1520
|
745 |
msgid "Set border for this section"
|
746 |
msgstr ""
|
747 |
|
748 |
+
#: includes/admin/core/class-admin-metabox.php:1530
|
749 |
msgid "Choose the border style"
|
750 |
msgstr ""
|
751 |
|
752 |
+
#: includes/admin/core/class-admin-metabox.php:1545
|
753 |
msgid "Rounded corners can be applied by setting a pixels value here. e.g. 5px"
|
754 |
msgstr ""
|
755 |
|
756 |
+
#: includes/admin/core/class-admin-metabox.php:1555
|
757 |
msgid "Give a color to this border"
|
758 |
msgstr ""
|
759 |
|
760 |
+
#: includes/admin/core/class-admin-metabox.php:1565
|
761 |
msgid "Enable Row Heading"
|
762 |
msgstr ""
|
763 |
|
764 |
+
#: includes/admin/core/class-admin-metabox.php:1565
|
765 |
msgid "Whether to enable a heading for this row"
|
766 |
msgstr ""
|
767 |
|
768 |
+
#: includes/admin/core/class-admin-metabox.php:1575
|
769 |
msgid "Enter the row heading text here"
|
770 |
msgstr ""
|
771 |
|
772 |
+
#: includes/admin/core/class-admin-metabox.php:1585
|
773 |
msgid "This will be the background of entire section"
|
774 |
msgstr ""
|
775 |
|
776 |
+
#: includes/admin/core/class-admin-metabox.php:1595
|
777 |
msgid "This will be the background of the heading section"
|
778 |
msgstr ""
|
779 |
|
780 |
+
#: includes/admin/core/class-admin-metabox.php:1605
|
781 |
msgid "This will be the text color of heading part only"
|
782 |
msgstr ""
|
783 |
|
784 |
+
#: includes/admin/core/class-admin-metabox.php:1615
|
785 |
msgid "This will be the text color of entire section"
|
786 |
msgstr ""
|
787 |
|
788 |
+
#: includes/admin/core/class-admin-metabox.php:1625
|
789 |
msgid ""
|
790 |
"This will be the color of selected icon. By default It will be the same "
|
791 |
"color as heading text color"
|
792 |
msgstr ""
|
793 |
|
794 |
+
#: includes/admin/core/class-admin-metabox.php:1635
|
795 |
msgid "Select a color for this divider"
|
796 |
msgstr ""
|
797 |
|
798 |
+
#: includes/admin/core/class-admin-metabox.php:1645
|
799 |
msgid "Entering custom text here will replace the url with a text link"
|
800 |
msgstr ""
|
801 |
|
802 |
+
#: includes/admin/core/class-admin-metabox.php:1655
|
803 |
msgid "Choose whether to open this link in same window or in a new window"
|
804 |
msgstr ""
|
805 |
|
806 |
+
#: includes/admin/core/class-admin-metabox.php:1668
|
807 |
msgid "Whether to follow or nofollow this link by search engines"
|
808 |
msgstr ""
|
809 |
|
810 |
+
#: includes/admin/core/class-admin-metabox.php:1681
|
811 |
msgid ""
|
812 |
"Turn on to force users to create a strong password (A combination of one "
|
813 |
"lowercase letter, one uppercase letter, and one number). If turned on this "
|
814 |
"option is only applied to register forms and not to login forms."
|
815 |
msgstr ""
|
816 |
|
817 |
+
#: includes/admin/core/class-admin-metabox.php:1691
|
818 |
msgid ""
|
819 |
"Turn on to add a confirm password field. If turned on the confirm password "
|
820 |
"field will only show on register forms and not on login forms."
|
821 |
msgstr ""
|
822 |
|
823 |
+
#: includes/admin/core/class-admin-metabox.php:1701
|
824 |
msgid "This is the line-style of divider"
|
825 |
msgstr ""
|
826 |
|
827 |
+
#: includes/admin/core/class-admin-metabox.php:1717
|
828 |
msgid "Choose the minutes interval between each time in the time picker."
|
829 |
msgstr ""
|
830 |
|
831 |
+
#: includes/admin/core/class-admin-metabox.php:1730
|
832 |
msgid "The display format of the date which is visible to user."
|
833 |
msgstr ""
|
834 |
|
835 |
+
#: includes/admin/core/class-admin-metabox.php:1741
|
836 |
msgid "Choose the displayed time-format for this field"
|
837 |
msgstr ""
|
838 |
|
839 |
+
#: includes/admin/core/class-admin-metabox.php:1756
|
840 |
msgid ""
|
841 |
"Whether you wish to show the date in full or only show the years e.g. 25 "
|
842 |
"Years"
|
843 |
msgstr ""
|
844 |
|
845 |
+
#: includes/admin/core/class-admin-metabox.php:1775
|
846 |
msgid ""
|
847 |
"Disable specific week days from being available for selection in this date "
|
848 |
"picker"
|
849 |
msgstr ""
|
850 |
|
851 |
+
#: includes/admin/core/class-admin-metabox.php:1793
|
852 |
msgid ""
|
853 |
"Number of years available for the date selection. Default to last 50 years"
|
854 |
msgstr ""
|
855 |
|
856 |
+
#: includes/admin/core/class-admin-metabox.php:1803
|
857 |
msgid "This decides which years should be shown relative to today date"
|
858 |
msgstr ""
|
859 |
|
860 |
+
#: includes/admin/core/class-admin-metabox.php:1817
|
861 |
msgid "Set the minimum date/day in range in the format YYYY/MM/DD"
|
862 |
msgstr ""
|
863 |
|
864 |
+
#: includes/admin/core/class-admin-metabox.php:1827
|
865 |
msgid "Set the maximum date/day in range in the format YYYY/MM/DD"
|
866 |
msgstr ""
|
867 |
|
868 |
+
#: includes/admin/core/class-admin-metabox.php:1837
|
869 |
msgid ""
|
870 |
"Whether to show a specific number of years or specify a date range to be "
|
871 |
"available for the date picker."
|
872 |
msgstr ""
|
873 |
|
874 |
+
#: includes/admin/core/class-admin-metabox.php:1853
|
875 |
msgid ""
|
876 |
"Enter the shortcode in the following textarea and it will be displayed on "
|
877 |
"the fields"
|
878 |
msgstr ""
|
879 |
|
880 |
+
#: includes/admin/core/class-admin-metabox.php:1863
|
881 |
msgid "Edit the content of this field here"
|
882 |
msgstr ""
|
883 |
|
884 |
+
#: includes/admin/core/class-admin-metabox.php:1876
|
885 |
msgid "Enable/disable crop feature for this image upload and define ratio"
|
886 |
msgstr ""
|
887 |
|
888 |
+
#: includes/admin/core/class-admin-metabox.php:1898
|
889 |
+
#: includes/admin/core/class-admin-metabox.php:1918
|
890 |
msgid ""
|
891 |
"Select the image types that you want to allow to be uploaded via this field."
|
892 |
msgstr ""
|
893 |
|
894 |
+
#: includes/admin/core/class-admin-metabox.php:1939
|
895 |
msgid "This is the headline that appears in the upload box for this field"
|
896 |
msgstr ""
|
897 |
|
898 |
+
#: includes/admin/core/class-admin-metabox.php:1949
|
899 |
msgid ""
|
900 |
"If you need to add information or secondary line below the headline of "
|
901 |
"upload box, enter it here"
|
902 |
msgstr ""
|
903 |
|
904 |
+
#: includes/admin/core/class-admin-metabox.php:1959
|
905 |
msgid "The text that appears on the button. e.g. Upload"
|
906 |
msgstr ""
|
907 |
|
908 |
+
#: includes/admin/core/class-admin-metabox.php:1969
|
909 |
msgid ""
|
910 |
"The maximum size for image that can be uploaded through this field. Leave "
|
911 |
"empty for unlimited size."
|
912 |
msgstr ""
|
913 |
|
914 |
+
#: includes/admin/core/class-admin-metabox.php:1979
|
915 |
msgid "The height of textarea in pixels. Default is 100 pixels"
|
916 |
msgstr ""
|
917 |
|
918 |
+
#: includes/admin/core/class-admin-metabox.php:1989
|
919 |
msgid "This is the required spacing in pixels. e.g. 20px"
|
920 |
msgstr ""
|
921 |
|
922 |
+
#: includes/admin/core/class-admin-metabox.php:1999
|
923 |
msgid "Enable/disable multiple selections for this field"
|
924 |
msgstr ""
|
925 |
|
926 |
+
#: includes/admin/core/class-admin-metabox.php:2009
|
927 |
msgid ""
|
928 |
"Enter a number here to force a maximum number of selections by user for this "
|
929 |
"field"
|
930 |
msgstr ""
|
931 |
|
932 |
+
#: includes/admin/core/class-admin-metabox.php:2019
|
933 |
msgid ""
|
934 |
"Enter a number here to force a minimum number of selections by user for this "
|
935 |
"field"
|
936 |
msgstr ""
|
937 |
|
938 |
+
#: includes/admin/core/class-admin-metabox.php:2029
|
939 |
msgid "This is the max number of entries the user can add via field group."
|
940 |
msgstr ""
|
941 |
|
942 |
+
#: includes/admin/core/class-admin-metabox.php:2039
|
943 |
msgid ""
|
944 |
"If you want to enable a maximum number of words to be input in this "
|
945 |
"textarea. Leave empty to disable this setting"
|
946 |
msgstr ""
|
947 |
|
948 |
+
#: includes/admin/core/class-admin-metabox.php:2049
|
949 |
msgid "Minimum number that can be entered in this field"
|
950 |
msgstr ""
|
951 |
|
952 |
+
#: includes/admin/core/class-admin-metabox.php:2059
|
953 |
msgid "Maximum number that can be entered in this field"
|
954 |
msgstr ""
|
955 |
|
956 |
+
#: includes/admin/core/class-admin-metabox.php:2069
|
957 |
msgid ""
|
958 |
"If you want to enable a minimum number of characters to be input in this "
|
959 |
"field. Leave empty to disable this setting"
|
960 |
msgstr ""
|
961 |
|
962 |
+
#: includes/admin/core/class-admin-metabox.php:2079
|
963 |
msgid ""
|
964 |
"If you want to enable a maximum number of characters to be input in this "
|
965 |
"field. Leave empty to disable this setting"
|
966 |
msgstr ""
|
967 |
|
968 |
+
#: includes/admin/core/class-admin-metabox.php:2089
|
969 |
msgid "Turn on/off HTML tags for this textarea"
|
970 |
msgstr ""
|
971 |
|
972 |
+
#: includes/admin/core/class-admin-metabox.php:2108
|
973 |
msgid ""
|
974 |
"Enter one choice per line. This will represent the available choices or "
|
975 |
"selections available for user."
|
976 |
msgstr ""
|
977 |
|
978 |
+
#: includes/admin/core/class-admin-metabox.php:2118
|
979 |
msgid ""
|
980 |
"This is the title of the field for your reference in the backend. The title "
|
981 |
"will not appear on the front-end of your website."
|
982 |
msgstr ""
|
983 |
|
984 |
+
#: includes/admin/core/class-admin-metabox.php:2143
|
985 |
msgid ""
|
986 |
"The meta key cannot be changed for duplicated fields or when editing an "
|
987 |
"existing field. If you require a different meta key please create a new "
|
988 |
"field."
|
989 |
msgstr ""
|
990 |
|
991 |
+
#: includes/admin/core/class-admin-metabox.php:2149
|
992 |
msgid ""
|
993 |
"A meta key is required to store the entered info in this field in the "
|
994 |
"database. The meta key should be unique to this field and be written in "
|
996 |
"job_title"
|
997 |
msgstr ""
|
998 |
|
999 |
+
#: includes/admin/core/class-admin-metabox.php:2162
|
1000 |
msgid ""
|
1001 |
"This is the text that appears in a tooltip when a user hovers over the info "
|
1002 |
"icon. Help text is useful for providing users with more information about "
|
1004 |
"for field."
|
1005 |
msgstr ""
|
1006 |
|
1007 |
+
#: includes/admin/core/class-admin-metabox.php:2174
|
1008 |
msgid "Text to display by default in this field"
|
1009 |
msgstr ""
|
1010 |
|
1011 |
+
#: includes/admin/core/class-admin-metabox.php:2180
|
1012 |
msgid ""
|
1013 |
"If you wish the rating field to be prefilled with a number of stars, enter "
|
1014 |
"it here."
|
1015 |
msgstr ""
|
1016 |
|
1017 |
+
#: includes/admin/core/class-admin-metabox.php:2186
|
1018 |
msgid ""
|
1019 |
"This option allows you to pre-fill the field with a default value prior to "
|
1020 |
"the user entering a value in the field. Leave blank to have no default value"
|
1021 |
msgstr ""
|
1022 |
|
1023 |
+
#: includes/admin/core/class-admin-metabox.php:2198
|
1024 |
msgid ""
|
1025 |
"The field label is the text that appears above the field on your front-end "
|
1026 |
"form. Leave blank to not show a label above field."
|
1027 |
msgstr ""
|
1028 |
|
1029 |
+
#: includes/admin/core/class-admin-metabox.php:2208
|
1030 |
msgid ""
|
1031 |
"This is the text that appears within the field e.g please enter your email "
|
1032 |
"address. Leave blank to not show any placeholder text."
|
1033 |
msgstr ""
|
1034 |
|
1035 |
+
#: includes/admin/core/class-admin-metabox.php:2218
|
1036 |
msgid ""
|
1037 |
"Field privacy allows you to select who can view this field on the front-end. "
|
1038 |
"The site admin can view all fields regardless of the option set here."
|
1039 |
msgstr ""
|
1040 |
|
1041 |
+
#: includes/admin/core/class-admin-metabox.php:2241
|
1042 |
msgid "Select the member roles that can view this field on the front-end."
|
1043 |
msgstr ""
|
1044 |
|
1045 |
+
#: includes/admin/core/class-admin-metabox.php:2267
|
1046 |
msgid ""
|
1047 |
"This option allows you to set whether the field must be filled in before the "
|
1048 |
"form can be processed."
|
1049 |
msgstr ""
|
1050 |
|
1051 |
+
#: includes/admin/core/class-admin-metabox.php:2281
|
1052 |
msgid ""
|
1053 |
"This option allows you to set whether or not the user can edit the "
|
1054 |
"information in this field."
|
1055 |
msgstr ""
|
1056 |
|
1057 |
+
#: includes/admin/core/class-admin-metabox.php:2294
|
1058 |
msgid "Choose whether you want a 5-stars or 10-stars ratings based here."
|
1059 |
msgstr ""
|
1060 |
|
1061 |
+
#: includes/admin/core/class-admin-metabox.php:2307
|
1062 |
msgid "Add a callback source to retrieve choices."
|
1063 |
msgstr ""
|
1064 |
|
1065 |
+
#: includes/admin/core/class-admin-metabox.php:2318
|
1066 |
msgid "Parent Option"
|
1067 |
msgstr ""
|
1068 |
|
1069 |
+
#: includes/admin/core/class-admin-metabox.php:2318
|
1070 |
msgid "Dynamically populates the option based from selected parent option."
|
1071 |
msgstr ""
|
1072 |
|
1073 |
+
#: includes/admin/core/class-admin-metabox.php:2320
|
1074 |
msgid "No Selected"
|
1075 |
msgstr ""
|
1076 |
|
1113 |
#: includes/admin/core/class-admin-notices.php:301
|
1114 |
#, php-format
|
1115 |
msgid ""
|
1116 |
+
"%s needs to create several pages (User Profiles, Account, Registration, "
|
1117 |
+
"Login, Password Reset, Logout, Member Directory) to function correctly."
|
1118 |
msgstr ""
|
1119 |
|
1120 |
#: includes/admin/core/class-admin-notices.php:305
|
1121 |
+
msgid "Create Pages"
|
1122 |
msgstr ""
|
1123 |
|
1124 |
#: includes/admin/core/class-admin-notices.php:307
|
1226 |
#: includes/admin/core/class-admin-notices.php:534
|
1227 |
#, php-format
|
1228 |
msgid ""
|
1229 |
+
"Thanks for installing <strong>%s</strong>! We hope you like the plugin. To "
|
1230 |
"fund full-time development and support of the plugin we also sell "
|
1231 |
"extensions. If you subscribe to our mailing list we will send you a 20%% "
|
1232 |
"discount code for our <a href=\"%s\" target=\"_blank\">extensions bundle</a>."
|
1534 |
"Gravatar has a number of built in options which you can also use as defaults"
|
1535 |
msgstr ""
|
1536 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1537 |
#: includes/admin/core/class-admin-settings.php:311
|
1538 |
msgid "404 ( File Not Found response )"
|
1539 |
msgstr ""
|
2531 |
msgstr ""
|
2532 |
|
2533 |
#: includes/admin/core/class-admin-users.php:116
|
2534 |
+
#: includes/core/class-fields.php:2300
|
2535 |
msgid "Apply"
|
2536 |
msgstr ""
|
2537 |
|
2658 |
msgid "Reset UM Role meta"
|
2659 |
msgstr ""
|
2660 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2661 |
#: includes/admin/core/list-tables/roles-list-table.php:397
|
2662 |
msgid "Role"
|
2663 |
msgstr ""
|
3184 |
msgid "We are sorry. We cannot find any users who match your search criteria."
|
3185 |
msgstr ""
|
3186 |
|
3187 |
+
#: includes/admin/templates/extensions.php:169
|
3188 |
msgid "View our Extensions Bundle"
|
3189 |
msgstr ""
|
3190 |
|
3191 |
+
#: includes/admin/templates/extensions.php:178
|
3192 |
msgid "Premium"
|
3193 |
msgstr ""
|
3194 |
|
3195 |
+
#: includes/admin/templates/extensions.php:183
|
3196 |
msgid "Free"
|
3197 |
msgstr ""
|
3198 |
|
3199 |
+
#: includes/admin/templates/extensions.php:209
|
3200 |
+
#: includes/admin/templates/extensions.php:243
|
3201 |
msgid "Get this Add on"
|
3202 |
msgstr ""
|
3203 |
|
3204 |
+
#: includes/admin/templates/extensions.php:214
|
3205 |
+
#: includes/admin/templates/extensions.php:248
|
3206 |
msgid "More Details"
|
3207 |
msgstr ""
|
3208 |
|
3532 |
#: includes/admin/templates/modal/dynamic_new_group.php:14
|
3533 |
#: includes/admin/templates/modal/fonticons.php:11
|
3534 |
#: includes/admin/templates/role/publish.php:24
|
3535 |
+
#: includes/core/class-fields.php:2301 includes/core/class-fields.php:2398
|
3536 |
#: includes/core/um-actions-profile.php:554
|
3537 |
#: includes/core/um-actions-profile.php:693
|
3538 |
#: includes/core/um-actions-profile.php:726
|
4025 |
"account data from the site. To delete your account enter your password below"
|
4026 |
msgstr ""
|
4027 |
|
4028 |
+
#: includes/class-dependencies.php:161
|
4029 |
#, php-format
|
4030 |
msgid ""
|
4031 |
"This version of <strong>\"%s\"</strong> requires the core <strong>%s</"
|
4032 |
"strong> plugin to be <strong>%s</strong> or higher."
|
4033 |
msgstr ""
|
4034 |
|
4035 |
+
#: includes/class-dependencies.php:163
|
4036 |
#, php-format
|
4037 |
msgid "Please update <strong>%s</strong> to the latest version."
|
4038 |
msgstr ""
|
4039 |
|
4040 |
+
#: includes/class-dependencies.php:165
|
4041 |
#, php-format
|
4042 |
msgid ""
|
4043 |
"Sorry, but this version of <strong>%s</strong> does not work with extension "
|
4044 |
"<strong>\"%s\" %s</strong> version."
|
4045 |
msgstr ""
|
4046 |
|
4047 |
+
#: includes/class-dependencies.php:167
|
4048 |
#, php-format
|
4049 |
msgid "Please update extension <strong>\"%s\"</strong> to the latest version."
|
4050 |
msgstr ""
|
4051 |
|
4052 |
+
#: includes/class-dependencies.php:176
|
4053 |
#, php-format
|
4054 |
msgid "Please check <strong>\"%s\" %s</strong> extension's folder name."
|
4055 |
msgstr ""
|
4056 |
|
4057 |
+
#: includes/class-dependencies.php:178
|
4058 |
#, php-format
|
4059 |
msgid "Correct folder name is <strong>\"%s\"</strong>"
|
4060 |
msgstr ""
|
6195 |
msgid "just now"
|
6196 |
msgstr ""
|
6197 |
|
6198 |
+
#: includes/core/class-date-time.php:63
|
6199 |
#, php-format
|
6200 |
msgid "%s min"
|
6201 |
+
msgid_plural "%s mins"
|
6202 |
+
msgstr[0] ""
|
6203 |
+
msgstr[1] ""
|
|
|
|
|
|
|
6204 |
|
6205 |
+
#: includes/core/class-date-time.php:72
|
6206 |
#, php-format
|
6207 |
msgid "%s hr"
|
6208 |
+
msgid_plural "%s hrs"
|
6209 |
+
msgstr[0] ""
|
6210 |
+
msgstr[1] ""
|
|
|
|
|
|
|
6211 |
|
6212 |
+
#: includes/core/class-date-time.php:82
|
6213 |
#, php-format
|
6214 |
msgid "Yesterday at %s"
|
6215 |
msgstr ""
|
6216 |
|
6217 |
+
#: includes/core/class-date-time.php:84 includes/core/class-date-time.php:89
|
6218 |
+
#: includes/core/class-date-time.php:93 includes/core/class-date-time.php:97
|
6219 |
#, php-format
|
6220 |
msgid "%s at %s"
|
6221 |
msgstr ""
|
6222 |
|
6223 |
+
#: includes/core/class-date-time.php:146
|
6224 |
#, php-format
|
6225 |
msgid "%s year old"
|
6226 |
msgstr ""
|
6227 |
|
6228 |
+
#: includes/core/class-date-time.php:149
|
6229 |
#, php-format
|
6230 |
msgid "%s years old"
|
6231 |
msgstr ""
|
6232 |
|
6233 |
+
#: includes/core/class-date-time.php:152
|
6234 |
msgid "Less than 1 year old"
|
6235 |
msgstr ""
|
6236 |
|
6244 |
msgid "Add translation to %s"
|
6245 |
msgstr ""
|
6246 |
|
6247 |
+
#: includes/core/class-fields.php:1165 templates/message.php:5
|
6248 |
+
#, php-format
|
6249 |
+
msgid "%s"
|
6250 |
+
msgstr ""
|
6251 |
+
|
6252 |
+
#: includes/core/class-fields.php:1184
|
6253 |
msgid "Custom Field"
|
6254 |
msgstr ""
|
6255 |
|
6256 |
+
#: includes/core/class-fields.php:1481
|
6257 |
msgid "Please upload a valid image!"
|
6258 |
msgstr ""
|
6259 |
|
6260 |
+
#: includes/core/class-fields.php:1488 includes/core/class-fields.php:1509
|
6261 |
msgid "Upload"
|
6262 |
msgstr ""
|
6263 |
|
6264 |
+
#: includes/core/class-fields.php:1489
|
6265 |
msgid "Sorry this is not a valid image."
|
6266 |
msgstr ""
|
6267 |
|
6268 |
+
#: includes/core/class-fields.php:1490
|
6269 |
msgid "This image is too large!"
|
6270 |
msgstr ""
|
6271 |
|
6272 |
+
#: includes/core/class-fields.php:1491
|
6273 |
msgid "This image is too small!"
|
6274 |
msgstr ""
|
6275 |
|
6276 |
+
#: includes/core/class-fields.php:1492
|
6277 |
msgid "You can only upload one image"
|
6278 |
msgstr ""
|
6279 |
|
6280 |
+
#: includes/core/class-fields.php:1959
|
6281 |
msgid "Current Password"
|
6282 |
msgstr ""
|
6283 |
|
6284 |
+
#: includes/core/class-fields.php:1988
|
6285 |
msgid "New Password"
|
6286 |
msgstr ""
|
6287 |
|
6288 |
+
#: includes/core/class-fields.php:2020
|
6289 |
#, php-format
|
6290 |
msgid "Confirm %s"
|
6291 |
msgstr ""
|
6292 |
|
6293 |
+
#: includes/core/class-fields.php:2255
|
6294 |
msgid "Upload Photo"
|
6295 |
msgstr ""
|
6296 |
|
6297 |
+
#: includes/core/class-fields.php:2276 includes/core/class-fields.php:2300
|
6298 |
#: includes/core/um-actions-profile.php:724
|
6299 |
msgid "Change photo"
|
6300 |
msgstr ""
|
6301 |
|
6302 |
+
#: includes/core/class-fields.php:2300 includes/core/class-fields.php:2397
|
6303 |
msgid "Processing..."
|
6304 |
msgstr ""
|
6305 |
|
6306 |
+
#: includes/core/class-fields.php:2322
|
6307 |
msgid "Upload File"
|
6308 |
msgstr ""
|
6309 |
|
6310 |
+
#: includes/core/class-fields.php:2364 includes/core/um-filters-fields.php:244
|
6311 |
msgid "This file has been removed."
|
6312 |
msgstr ""
|
6313 |
|
6314 |
+
#: includes/core/class-fields.php:2367 includes/core/class-fields.php:2397
|
6315 |
msgid "Change file"
|
6316 |
msgstr ""
|
6317 |
|
6318 |
+
#: includes/core/class-fields.php:2397
|
6319 |
msgid "Save"
|
6320 |
msgstr ""
|
6321 |
|
6322 |
+
#: includes/core/class-fields.php:3820
|
6323 |
#, php-format
|
6324 |
msgid ""
|
6325 |
"Your profile is looking a little empty. Why not <a href=\"%s\">add</a> some "
|
6326 |
"information!"
|
6327 |
msgstr ""
|
6328 |
|
6329 |
+
#: includes/core/class-fields.php:3822
|
6330 |
msgid "This user has not added any information to their profile yet."
|
6331 |
msgstr ""
|
6332 |
|
6333 |
+
#: includes/core/class-files.php:271
|
6334 |
msgid "Invalid parameters"
|
6335 |
msgstr ""
|
6336 |
|
6337 |
+
#: includes/core/class-files.php:276
|
6338 |
msgid "Invalid coordinates"
|
6339 |
msgstr ""
|
6340 |
|
6341 |
+
#: includes/core/class-files.php:281
|
6342 |
msgid "Invalid file ownership"
|
6343 |
msgstr ""
|
6344 |
|
6345 |
+
#: includes/core/class-files.php:334
|
6346 |
msgid "Invalid nonce"
|
6347 |
msgstr ""
|
6348 |
|
6349 |
+
#: includes/core/class-files.php:354 includes/core/class-files.php:439
|
6350 |
msgid "A theme or plugin compatibility issue"
|
6351 |
msgstr ""
|
6352 |
|
6353 |
+
#: includes/core/class-files.php:982
|
6354 |
msgid "Ultimate Member: Not a valid temp file"
|
6355 |
msgstr ""
|
6356 |
|
6357 |
+
#: includes/core/class-files.php:1110
|
6358 |
msgid "Invalid user ID: "
|
6359 |
msgstr ""
|
6360 |
|
6361 |
+
#: includes/core/class-files.php:1119 includes/core/class-files.php:1147
|
6362 |
msgid "Unauthorized to do this attempt."
|
6363 |
msgstr ""
|
6364 |
|
6518 |
msgid "Wrong nonce"
|
6519 |
msgstr ""
|
6520 |
|
6521 |
+
#: includes/core/class-shortcodes.php:360
|
6522 |
msgid ""
|
6523 |
"This content has been restricted to logged in users only. Please <a href="
|
6524 |
"\"{login_referrer}\">login</a> to view this content."
|
6525 |
msgstr ""
|
6526 |
|
6527 |
+
#: includes/core/class-shortcodes.php:645
|
6528 |
msgid "You are already registered"
|
6529 |
msgstr ""
|
6530 |
|
6531 |
+
#: includes/core/class-shortcodes.php:887
|
6532 |
msgid "Default Template"
|
6533 |
msgstr ""
|
6534 |
|
6535 |
+
#: includes/core/class-uploader.php:654
|
6536 |
msgid "Your image is invalid!"
|
6537 |
msgstr ""
|
6538 |
|
6539 |
+
#: includes/core/class-uploader.php:696
|
6540 |
msgid "This media type is not recognized."
|
6541 |
msgstr ""
|
6542 |
|
6543 |
+
#: includes/core/class-uploader.php:744
|
6544 |
msgid "Your image is invalid or too large!"
|
6545 |
msgstr ""
|
6546 |
|
6547 |
+
#: includes/core/class-uploader.php:750 includes/core/class-uploader.php:752
|
6548 |
#, php-format
|
6549 |
msgid "Your photo is too small. It must be at least %spx wide."
|
6550 |
msgstr ""
|
6551 |
|
6552 |
+
#: includes/core/class-uploader.php:805
|
6553 |
msgid "This file type is not recognized."
|
6554 |
msgstr ""
|
6555 |
|
6556 |
+
#: includes/core/class-uploader.php:1071
|
6557 |
#, php-format
|
6558 |
msgid "Maximum file size allowed: %s"
|
6559 |
msgstr ""
|
6944 |
msgid "Joined %s"
|
6945 |
msgstr ""
|
6946 |
|
6947 |
+
#: includes/core/um-filters-fields.php:275
|
|
|
|
|
|
|
|
|
|
|
6948 |
msgid "Untitled photo"
|
6949 |
msgstr ""
|
6950 |
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Donate link:
|
|
6 |
Tags: community, member, membership, user-profile, user-registration
|
7 |
Requires at least: 4.7
|
8 |
Tested up to: 4.9
|
9 |
-
Stable tag: 2.0.
|
10 |
License: GNU Version 2 or Any Later Version
|
11 |
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
12 |
|
@@ -137,6 +137,22 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
|
|
137 |
|
138 |
= Important: UM2.0+ is a significant update to the code base from 1.3.88. Please make sure you take a full-site backup with restore point before updating the plugin =
|
139 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
= 2.0.29: October 8, 2018 =
|
141 |
|
142 |
* Bugfixes:
|
6 |
Tags: community, member, membership, user-profile, user-registration
|
7 |
Requires at least: 4.7
|
8 |
Tested up to: 4.9
|
9 |
+
Stable tag: 2.0.30
|
10 |
License: GNU Version 2 or Any Later Version
|
11 |
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
12 |
|
137 |
|
138 |
= Important: UM2.0+ is a significant update to the code base from 1.3.88. Please make sure you take a full-site backup with restore point before updating the plugin =
|
139 |
|
140 |
+
= 2.0.30: November 12, 2018 =
|
141 |
+
|
142 |
+
* Bugfixes:
|
143 |
+
- Fixed crop settings of the big images
|
144 |
+
- Fixed WPML integration with email notifications
|
145 |
+
- Fixed uppercase symbols using at profile page slug
|
146 |
+
- Fixed download files/images with cache
|
147 |
+
- Fixed download files/images with not closed buffers
|
148 |
+
- Fixed looping in case if set 'display_name' as custom fields for display name setting
|
149 |
+
- Fixed cover photo size
|
150 |
+
- Fixed date time internalization
|
151 |
+
- Fixed posts pagination for un-logged users
|
152 |
+
- Fixed conditional JS
|
153 |
+
- Fixed "um_" prefix for role data
|
154 |
+
- Added compatibility for upcoming User Bookmarks extension
|
155 |
+
|
156 |
= 2.0.29: October 8, 2018 =
|
157 |
|
158 |
* Bugfixes:
|
templates/message.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
<div class="um-postmessage">
|
4 |
|
5 |
-
<?php
|
6 |
|
7 |
</div>
|
8 |
|
2 |
|
3 |
<div class="um-postmessage">
|
4 |
|
5 |
+
<?php printf( __( '%s', 'ultimate-member' ), $this->custom_message ); ?>
|
6 |
|
7 |
</div>
|
8 |
|
templates/profile.php
CHANGED
@@ -192,6 +192,9 @@
|
|
192 |
|
193 |
if ( um_is_on_edit_profile() ) { ?>
|
194 |
</form>
|
195 |
-
<?php }
|
|
|
|
|
|
|
196 |
</div>
|
197 |
</div>
|
192 |
|
193 |
if ( um_is_on_edit_profile() ) { ?>
|
194 |
</form>
|
195 |
+
<?php }
|
196 |
+
|
197 |
+
|
198 |
+
do_action( 'um_profile_footer', $args ); ?>
|
199 |
</div>
|
200 |
</div>
|
templates/searchform.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<form role="search" method="get" class="search-form um-search-form" action="<?php echo esc_url( um_get_core_page( 'members' ) ); ?>">
|
2 |
<input type="hidden" name="um_search" value="1">
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
</form>
|
1 |
<form role="search" method="get" class="search-form um-search-form" action="<?php echo esc_url( um_get_core_page( 'members' ) ); ?>">
|
2 |
<input type="hidden" name="um_search" value="1">
|
3 |
+
<div class="um-search-area">
|
4 |
+
<span class="screen-reader-text"><?php echo _x( 'Search for:', 'label' ); ?></span>
|
5 |
+
<input type="search" class="um-search-field search-field" placeholder="<?php echo esc_attr_x( 'Search …', 'placeholder' ); ?>" value="<?php echo um_get_search_query(); ?>" name="search" title="<?php echo esc_attr_x( 'Search for:', 'label' ); ?>" />
|
6 |
+
<a href="javascript: void(0);" id="um-search-button" class="um-search-icon um-faicon um-faicon-search"></a>
|
7 |
+
</div>
|
8 |
</form>
|
ultimate-member.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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: 2.0.
|
7 |
Author: Ultimate Member
|
8 |
Author URI: http://ultimatemember.com/
|
9 |
Text Domain: ultimate-member
|
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: 2.0.30
|
7 |
Author: Ultimate Member
|
8 |
Author URI: http://ultimatemember.com/
|
9 |
Text Domain: ultimate-member
|