1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-08 07:47:00 +02:00

Update inputfields.js dependences so that they can work with Page selection fields (PageAutocomplete, PageListSelect, etc.) when used outside of an InputfieldPage, such as in a module config, field config, etc. Related to processwire/processwire-issues#1873

This commit is contained in:
Ryan Cramer
2024-02-15 12:39:16 -05:00
parent 3ab315dca4
commit a53b4e5310
2 changed files with 3 additions and 2 deletions

View File

@@ -1359,7 +1359,8 @@ function InputfieldDependencies($target) {
} else if(typeof value == 'array') {
// array, already
values = value;
} else if(typeof value == "string" && $inputfield.hasClass('InputfieldPage') && value.indexOf(',') > -1 && value.match(/^[,0-9]+$/)) {
} else if(typeof value == "string" && $inputfield.attr('class').indexOf('InputfieldPage') > -1
&& value.indexOf(',') > -1 && value.match(/^[,0-9]+$/)) {
// CSV string of page IDs
values = value.split(',');
} else {

File diff suppressed because one or more lines are too long