4
0
Эх сурвалжийг харах

added passwordaltcopy option to settingsOptions function
added function sandboxOptions for options
edited test button to include help text

CauseFX 4 жил өмнө
parent
commit
c37e660670

+ 63 - 2
api/functions/option-functions.php

@@ -54,11 +54,12 @@ trait OptionsFunction
 			case 'test':
 				$settingMerge = [
 					'type' => 'button',
-					'label' => '',
+					'label' => 'Test Connection',
 					'icon' => 'fa fa-flask',
 					'class' => 'pull-right',
 					'text' => 'Test Connection',
-					'attr' => 'onclick="testAPIConnection(\'' . $name . '\')"'
+					'attr' => 'onclick="testAPIConnection(\'' . $name . '\')"',
+					'help' => 'Remember! Please save before using the test button!'
 				];
 				break;
 			case 'url':
@@ -109,6 +110,12 @@ trait OptionsFunction
 					'label' => 'Password',
 				];
 				break;
+			case 'passwordaltcopy':
+				$settingMerge = [
+					'type' => 'password-alt-copy',
+					'label' => 'Password',
+				];
+				break;
 			case 'apikey':
 			case 'token':
 				$settingMerge = [
@@ -453,6 +460,60 @@ trait OptionsFunction
 		];
 	}
 	
+	public function sandboxOptions()
+	{
+		return [
+			[
+				'name' => 'Allow Presentation',
+				'value' => 'allow-presentation'
+			],
+			[
+				'name' => 'Allow Forms',
+				'value' => 'allow-forms'
+			],
+			[
+				'name' => 'Allow Same Origin',
+				'value' => 'allow-same-origin'
+			],
+			[
+				'name' => 'Allow Orientation Lock',
+				'value' => 'allow-orientation-lock'
+			],
+			[
+				'name' => 'Allow Pointer Lock',
+				'value' => 'allow-pointer-lock'
+			],
+			[
+				'name' => 'Allow Scripts',
+				'value' => 'allow-scripts'
+			],
+			[
+				'name' => 'Allow Popups',
+				'value' => 'allow-popups'
+			],
+			[
+				'name' => 'Allow Popups To Escape Sandbox',
+				'value' => 'allow-popups-to-escape-sandbox'
+			],
+			[
+				'name' => 'Allow Modals',
+				'value' => 'allow-modals'
+			],
+			[
+				'name' => 'Allow Top Navigation',
+				'value' => 'allow-top-navigation'
+			],
+			[
+				'name' => 'Allow Top Navigation By User Activation',
+				'value' => 'allow-top-navigation-by-user-activation'
+			],
+			[
+				'name' => 'Allow Downloads',
+				'value' => 'allow-downloads'
+			],
+		];
+	}
+	
 	public function calendarLocaleOptions()
 	{
 		return [