Browse Source

use function random_ascii_string on select2 items

CauseFX 4 years ago
parent
commit
f040b86608

+ 2 - 2
api/classes/organizr.class.php

@@ -2575,7 +2575,7 @@ class Organizr
 				array(
 					'type' => 'select2',
 					'class' => 'select2-multiple',
-					'id' => 'sandbox-select',
+					'id' => 'sandbox-select-' . $this->random_ascii_string(6),
 					'name' => 'sandbox',
 					'label' => 'iFrame Sandbox',
 					'value' => $this->config['sandbox'],
@@ -2634,7 +2634,7 @@ class Organizr
 				array(
 					'type' => 'select2',
 					'class' => 'select2-multiple',
-					'id' => 'blacklisted-select',
+					'id' => 'blacklisted-select-' . $this->random_ascii_string(6),
 					'name' => 'blacklisted',
 					'label' => 'Blacklisted IP\'s',
 					'value' => $this->config['blacklisted'],

+ 5 - 5
api/functions/option-functions.php

@@ -73,7 +73,7 @@ trait OptionsFunction
 				$settingMerge = [
 					'type' => 'select2',
 					'class' => 'select2-multiple',
-					'id' => $name . '-select',
+					'id' => $name . '-select-' . $this->random_ascii_string(6),
 					'label' => 'Multiple URL\'s',
 					'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
 					'placeholder' => 'http(s)://hostname:port',
@@ -85,7 +85,7 @@ trait OptionsFunction
 				$settingMerge = [
 					'type' => 'select2',
 					'class' => 'select2-multiple',
-					'id' => $name . '-select',
+					'id' => $name . '-select-' . $this->random_ascii_string(6),
 					'label' => 'Multiple Values\'s',
 					'options' => $this->makeOptionsFromValues($this->config[$name]),
 					'settings' => '{tags: true, selectOnClose: true, closeOnSelect: true, allowClear: true}',
@@ -121,7 +121,7 @@ trait OptionsFunction
 				$settingMerge = [
 					'type' => 'select2',
 					'class' => 'select2-multiple',
-					'id' => $name . '-select',
+					'id' => $name . '-select-' . $this->random_ascii_string(6),
 					'label' => 'Multiple API Key/Token\'s',
 					'options' => $this->makeOptionsFromValues($this->config[$name]),
 					'settings' => '{tags: true, theme: "default", selectionCssClass: "password-alt", selectOnClose: true, closeOnSelect: true, allowClear: true}',
@@ -264,7 +264,7 @@ trait OptionsFunction
 				$settingMerge = [
 					'type' => 'select2',
 					'class' => 'select2-multiple',
-					'id' => $name . '-exclude-select',
+					'id' => $name . '-exclude-select-' . $this->random_ascii_string(6),
 					'label' => 'Libraries to Exclude',
 					'options' => $extras['options']
 				];
@@ -273,7 +273,7 @@ trait OptionsFunction
 				$settingMerge = [
 					'type' => 'select2',
 					'class' => 'select2-multiple',
-					'id' => $name . '-include-select',
+					'id' => $name . '-include-select-' . $this->random_ascii_string(6),
 					'label' => 'Libraries to Include',
 					'options' => $extras['options']
 				];

+ 1 - 1
api/plugins/invites/plugin.php

@@ -292,7 +292,7 @@ class Invites extends Organizr
 				array(
 					'type' => 'select2',
 					'class' => 'select2-multiple',
-					'id' => 'invite-select',
+					'id' => 'invite-select-' . $this->random_ascii_string(6),
 					'name' => 'INVITES-plexLibraries',
 					'label' => 'Libraries',
 					'value' => $this->config['INVITES-plexLibraries'],