Răsfoiți Sursa

combine pre-code-editor and code-editor settings options

CauseFX 4 ani în urmă
părinte
comite
cf6cef103a
2 a modificat fișierele cu 3 adăugiri și 2 ștergeri
  1. 2 1
      api/functions/option-functions.php
  2. 1 1
      api/homepage/html.php

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

@@ -269,6 +269,7 @@ trait OptionsFunction
 				];
 				break;
 			// HTML ITEMS
+			// precodeeditor possibly not needed anymore
 			case 'precodeeditor':
 				$settingMerge = [
 					'type' => 'textbox',
@@ -281,7 +282,7 @@ trait OptionsFunction
 					'type' => 'html',
 					'override' => 12,
 					'label' => 'Custom Code',
-					'html' => '<div id="' . $name . 'Editor" style="height:300px">' . htmlentities($this->config[$name]) . '</div>'
+					'html' => '<textarea data-changed="false" class="form-control hidden ' . $name . 'Textarea" name="' . $name . '" data-type="textbox" autocomplete="new-password"></textarea><div id="' . $name . 'Editor" style="height:300px">' . htmlentities($this->config[$name]) . '</div>'
 				];
 				break;
 			// CALENDAR ITEMS

+ 1 - 1
api/homepage/html.php

@@ -28,7 +28,7 @@ trait HTMLHomepageItem
 			$homepageSettings['settings']['Custom HTML ' . $i] = array(
 				$this->settingsOption('enable', 'homepageCustomHTML' . $i . 'Enabled'),
 				$this->settingsOption('auth', 'homepageCustomHTML' . $i . 'Auth'),
-				$this->settingsOption('pre-code-editor', 'customHTML' . $i),
+				//$this->settingsOption('pre-code-editor', 'customHTML' . $i), // possibly can remove this as we consolidated the type into one
 				$this->settingsOption('code-editor', 'customHTML' . $i, ['label' => 'Custom HTML Code']),
 			);
 		}