Advertisement
Guest User

Untitled

a guest
Aug 28th, 2017
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 50.23 KB | None | 0 0
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  4. <title>
  5. AdministrationSuite htmlIncludeOrString</title></head>
  6. <body>
  7.  
  8. <@dynamichtml admin_suite_system_properties_head@>
  9. <script>
  10. var data, success; // Used to send Ajax requests for services
  11. var intradocCfg; // Will be loaded with loadIntradocCfg()
  12. var localeList; // Will hold localization table data
  13. var originalLocaleList; // Will hold the localization table data that was loaded before any modifications
  14. var localizationTable; // Handle for modifying the localization table directly
  15.  
  16. $fbs(function(){
  17. // Call services to collect and populate initial values, setup the page
  18. // loadGeneralConfig();
  19. // loadLocalizationConfig();
  20. // loadConfigCfg();
  21. // loadIntradocCfg();
  22. loadLocaleTable();
  23.  
  24. // Attach handlers for Database inputs
  25. $fbs("input[name='IsJdbcCheck']").change(toggleIsJdbc);
  26. $fbs("input[name='JdbcDriverType']").change(function() { toggleDriverType(true); });
  27.  
  28. // Attach submit/reset handlers
  29. $fbs("#systemPropertiesSubmit").click(submitHandler);
  30. $fbs("#systemPropertiesReset").click(resetHandler);
  31. });
  32.  
  33. /*
  34. * Load and set general config values retrieved from GET_GEN_SYS_PROPS service.
  35. * This is restricted to certain values within the config/config.cfg file.
  36. */
  37. function loadGeneralConfig() {
  38. data = {
  39. IdcService: "GET_GEN_SYS_PROPS",
  40. IsJson: "1"
  41. };
  42. success = function(data) {
  43. // Set values for "Internet" tab
  44. if (data.LocalData.HttpServerAddress) {
  45. $fbs("input[name='HttpServerAddress']").attr("value", data.LocalData.HttpServerAddress);
  46. }
  47. if (data.LocalData.SmtpPort) {
  48. $fbs("input[name='SmtpPort']").attr("value", data.LocalData.SmtpPort);
  49. }
  50. if (data.LocalData.HttpRelativeWebRoot) {
  51. $fbs("input[name='HttpRelativeWebRoot']").attr("value", data.LocalData.HttpRelativeWebRoot);
  52. }
  53. if (data.LocalData.UseSSL && strIsTrue(data.LocalData.UseSSL)) {
  54. $fbs("input[name='UseSSLCheck").attr("checked", "checked");
  55. }
  56. // Set value for "Database" tab
  57. if (data.LocalData.DatabasePreserveCase && strIsTrue(data.LocalData.DatabasePreserveCase)) {
  58. $fbs("input[name='DatabasePreserveCaseCheck']").attr("checked", "checked");
  59. }
  60. };
  61. serviceCall(data, success, loadGeneralConfig);
  62. }
  63.  
  64. /*
  65. * Load and set localization settings using the GET_LOCALIZATION_ADMIN_PAGE service.
  66. * Since this retrieves the locale configuration loaded on server startup, it only sets
  67. * locale and timezone dropdowns, not the data for the localization table since that is
  68. * set without respect to the values loaded at server startup (see loadLocaleTable).
  69. */
  70. function loadLocalizationConfig() {
  71. data = {
  72. IdcService: "GET_LOCALIZATION_ADMIN_PAGE",
  73. IsJson: "1"
  74. };
  75. success = function(data) {
  76. var locales = data.ResultSets.LocaleConfig.rows;
  77. var timezones = data.ResultSets.SystemTimeZones.rows;
  78. var defaultTz = data.LocalData.defaultTimeZoneId;
  79.  
  80. // Add locales to "System Locale" dropdown on "Server" tab
  81. var lcSelect = $fbs("select[name='SystemLocale']");
  82. lcSelect.append('<option value=""><$lc("wwServerUnspecifiedLocale")$></option>')
  83. for (var i=0; i < locales.length; i++) {
  84. var lc = locales[i];
  85. var isEnabled = strIsTrue(lc[1]);
  86. var id = lc[0];
  87. var native = lc[11];
  88. // Add only enabled locales to the dropdown
  89. if (isEnabled) {
  90. lcSelect.append('<option value="' + id + '">' + native + '</option>');
  91. }
  92. }
  93. // Add timezones to the "System Timezone" dropdown on the "Server" tab
  94. // and the "Time Zone" dropdown on the "Localization" tab's Add/Edit form
  95. var serverTzSelect = $fbs("select[name='SystemTimeZone']");
  96. var localizationTzSelect = $fbs("#configureLocaleForm").find("select[name='lcTimeZone']");
  97. serverTzSelect.append('<option value=""><$lc("wwServerUnspecifiedTimezone")$> (' + defaultTz + ')</option>');
  98. for (var i=0; i < timezones.length; i++) {
  99. var tz = timezones[i];
  100. var id = tz[0];
  101. var offset = tz[1];
  102. var option = '<option value="' + id + '">' + offset + " " + id + '</option>';
  103. serverTzSelect.append(option);
  104. localizationTzSelect.append(option);
  105. }
  106. };
  107. serviceCall(data, success, loadLocalizationConfig);
  108. }
  109.  
  110. /*
  111. * Load and set values stored in config/config.cfg file using LOAD_CONFIG_FILE service.
  112. * This sets the remaining fields for the "Database" (except "Database Driver Classpath")
  113. * and "Server" tabs that weren't set using loadGeneralConfig() and loadLocalizationConfig().
  114. */
  115. function loadConfigCfg() {
  116. data = {
  117. IdcService: "LOAD_CONFIG_FILE",
  118. IsJson: "1",
  119. ConfigFileName: "config/config.cfg"
  120. };
  121. success = function(data) {
  122. // Grab config file
  123. var configCfg = data.ResultSets.FileInfo.rows[0][0];
  124.  
  125. // Grab variables for "Database" tab using regular expressions
  126. var isJdbc = configCfg.match(/\nIsJdbc=(.*)\n/);
  127. var jdbcDriver = configCfg.match(/\nJdbcDriver=(.*)\n/);
  128. var jdbcConnectionString = configCfg.match(/\nJdbcConnectionString=(.*)\n/);
  129. var jdbcUser = configCfg.match(/\nJdbcUser=(.*)\n/);
  130. // Set values for "Database" tab
  131. if (!isJdbc || strIsTrue(isJdbc[1])) {
  132. $fbs("input[name='IsJdbcCheck']").attr("checked", "checked");
  133. }
  134. if (jdbcDriver) {
  135. $fbs("input[name='JdbcDriver']").attr("value", jdbcDriver[1]);
  136. }
  137. if (jdbcConnectionString) {
  138. $fbs("input[name='JdbcConnectionString']").attr("value", jdbcConnectionString[1]);
  139. }
  140. if (jdbcUser) {
  141. $fbs("input[name='JdbcUser']").attr("value", jdbcUser[1]);
  142. }
  143. switch (jdbcDriver[1]) {
  144. case "weblogic.jdbc.sqlserver.SQLServerDriver":
  145. $fbs("input[name='JdbcDriverType'][value='SQL']").attr("checked", "checked");
  146. break;
  147. case "weblogic.jdbc.db2.DB2Driver":
  148. $fbs("input[name='JdbcDriverType'][value='DB2']").attr("checked", "checked");
  149. break;
  150. case "oracle.jdbc.OracleDriver":
  151. // OCI and Thin use the same driver, so we have to check the connection string
  152. // to see which one is being used
  153. if (jdbcConnectionString[1].match(/oci/)) {
  154. $fbs("input[name='JdbcDriverType'][value='OCI']").attr("checked", "checked");
  155. }
  156. else {
  157. $fbs("input[name='JdbcDriverType'][value='Thin']").attr("checked", "checked");
  158. }
  159. break;
  160. default:
  161. $fbs("input[name='JdbcDriverType'][value='Other']").attr("checked", "checked");
  162. break;
  163. }
  164. // Disable "Database" tab fields according to the values that are loaded
  165. toggleIsJdbc();
  166.  
  167. // Grab variables for "Server" tab using regular expressions
  168. var instanceMenuLabel = configCfg.match(/\nInstanceMenuLabel=(.*)\n/);
  169. var instanceDescription = configCfg.match(/\nInstanceDescription=(.*)\n/);
  170. var systemLocale = configCfg.match(/\nSystemLocale=(.*)\n/);
  171. var systemTimeZone = configCfg.match(/\nSystemTimeZone=(.*)\n/);
  172. // Set values for "Server" tab
  173. if (instanceMenuLabel) {
  174. $fbs("input[name='InstanceMenuLabel']").attr("value", instanceMenuLabel[1]);
  175. }
  176. if (instanceDescription) {
  177. $fbs("input[name='InstanceDescription']").attr("value", instanceDescription[1]);
  178. }
  179. // If System Locale is specified in config.cfg, wait until "System Locale" dropdown is populated
  180. // by loadLocalizationConfig(), then set its value
  181. if (systemLocale) {
  182. var localeTimer = setInterval(function() {
  183. var localeOption = $fbs("select[name='SystemLocale']").find("option[value='" + systemLocale[1] + "']");
  184. if (localeOption) {
  185. clearInterval(localeTimer);
  186. localeOption.attr("selected", "selected");
  187. }
  188. }, 50);
  189. }
  190. // If System Timezone is specified in config.cfg, wait until "System Timezone" dropdown is populated
  191. // by loadLocalizationConfig(), then set its value
  192. if (systemTimeZone) {
  193. var tzTimer = setInterval(function() {
  194. var tzOption = $fbs("select[name='SystemTimeZone']").find("option[value='" + systemTimeZone[1] + "']");
  195. if (tzOption) {
  196. clearInterval(tzTimer);
  197. tzOption.attr("selected", "selected");
  198. }
  199. }, 50);
  200. }
  201. };
  202. serviceCall(data, success, loadConfigCfg);
  203. }
  204.  
  205. /*
  206. * Load and set values stored in bin/intradoc.cfg file using LOAD_CONFIG_FILE service.
  207. * This sets the last "Database" tab field and all of the "Paths" tab fields. Since these
  208. * values are updated by manually entering them in the file, this function sets the intradocCfg
  209. * variable to the file as a string so it can be manipulated and written back to the server later.
  210. */
  211. function loadIntradocCfg() {
  212. data = {
  213. IdcService: "LOAD_CONFIG_FILE",
  214. IsJson: "1",
  215. ConfigFileName: "bin/intradoc.cfg"
  216. };
  217. success = function(data) {
  218. // Grab config file
  219. intradocCfg = data.ResultSets.FileInfo.rows[0][0];
  220.  
  221. // Grab and set "Database Driver Classpath" variable for "Database" tab
  222. var JDBC_JAVA_CLASSPATH_custom = intradocCfg.match(/\nJDBC_JAVA_CLASSPATH_custom=(.*)\n/);
  223. if (JDBC_JAVA_CLASSPATH_custom) {
  224. $fbs("input[name='JDBC_JAVA_CLASSPATH_custom']").attr("value", JDBC_JAVA_CLASSPATH_custom[1]);
  225. }
  226.  
  227. // Grab variables for "Paths" tab
  228. var WebBrowserPath = intradocCfg.match(/\nWebBrowserPath=(.*)\n/);
  229. var BASE_JAVA_CLASSPATH_custom = intradocCfg.match(/\nBASE_JAVA_CLASSPATH_custom=(.*)\n/);
  230. var IdcHomeDir = intradocCfg.match(/\nIdcHomeDir=(.*)\n/);
  231. // Set variables for "Paths" tab
  232. if (WebBrowserPath) {
  233. $fbs("input[name='WebBrowserPath']").attr("value", WebBrowserPath[1]);
  234. }
  235. if (BASE_JAVA_CLASSPATH_custom) {
  236. $fbs("input[name='BASE_JAVA_CLASSPATH_custom']").attr("value", BASE_JAVA_CLASSPATH_custom[1]);
  237. }
  238. if (IdcHomeDir) {
  239. $fbs("input[name='IdcHomeDir']").attr("value", IdcHomeDir[1]);
  240. }
  241. };
  242. serviceCall(data, success, loadIntradocCfg);
  243. }
  244.  
  245. /*
  246. * Load and set values for the "Localization" tab using the custom service ADMIN_SUITE_LOAD_LOCALIZATION_CONFIG.
  247. * This service loads the default locale configuration from the LocaleConfig system table, as well as deviations
  248. * from the default locale configuration as specified in the data/locale/locale_config.hda file (these two together
  249. * specify the current locale configuration that is displayed in the Localization table). This service also loads
  250. * the SearchLocaleConfig and IsoJavaEncodingMap system tables to be used in configuration. When the service returns,
  251. * this function sets up the localization table with all of its data, buttons, dialogs, and other functionality.
  252. */
  253. function loadLocaleTable() {
  254. data = {
  255. IdcService: "ADMIN_SUITE_LOAD_LOCALIZATION_CONFIG",
  256. <$if getVersion() < 110$> IsSoap: "1" <$else$> IsJson: "1" <$endif$>
  257. };
  258. success = function(data) {
  259. console.log(data);
  260. // Filter out non-locale result sets
  261. var localeConfig = {};
  262. "<$if getVersion() < 110$>";
  263. // 10g or lower
  264. var allRs = data.getElementsByTagName("idc:resultset");
  265. for (var i=0; i < allRs.length; i++) {
  266. var name = allRs[i].attributes[0].value;
  267. if (name.indexOf("Locale") !== -1) {
  268. // Convert from XML to JS array
  269. var rsArray = [];
  270. var rows = allRs[i].getElementsByTagName("idc:row");
  271. for (var j=0; j < rows.length; j++) {
  272. var rowArray = [];
  273. var fields = rows[j].getElementsByTagName("idc:field");
  274. for (var k=0; k < fields.length; k++) {
  275. rowArray.push(fields[k].textContent);
  276. }
  277. rsArray.push(rowArray);
  278. }
  279. localeConfig[name] = {};
  280. localeConfig[name]["rows"] = rsArray;
  281. }
  282. }
  283. console.log(localeConfig);
  284. "<$else$>";
  285. // 11g or higher
  286. for (var key in data.ResultSets) {
  287. if (key.includes("Locale")) {
  288. localeConfig[key] = data.ResultSets[key];
  289. }
  290. }
  291. "<$endif$>";
  292.  
  293. // Set initial values that will be used to generate the table
  294. localeList = localeConfig.DefaultLocaleConfig.rows;
  295. var fields = localeConfig.DefaultLocaleConfig.fields;
  296. var customLocales = localeConfig.LocaleConfig ? localeConfig.LocaleConfig.rows : null;
  297. var searchLocales = localeConfig.SearchLocales.rows;
  298. var encodings = localeConfig.LocaleEncodings.rows;
  299.  
  300. // Add any custom locales that are not yet in the locale list
  301. // Also update values for custom locales that are already in the locale list
  302. if (customLocales) {
  303. for (var i=0; i < customLocales.length; i++) {
  304. var customLocale = customLocales[i];
  305. // Search through locale list to see if the custom locale already exists
  306. var exists = false;
  307. for (var j=0; j < localeList.length; j++) {
  308. var existingLocale = localeList[j];
  309. if (customLocale[0] === existingLocale[0]) {
  310. // Update locale to reflect any changes
  311. // Can start loop at 1 since the locale name (0) is the same
  312. for (var k=1; k < customLocale.length; k++) {
  313. existingLocale[k] = customLocale[k];
  314. }
  315. existingLocale.push(""); // Element at [13] will store the search locale
  316. existingLocale.push("custom"); // Element at [14] === "custom" indicates that the locale can be deleted
  317. exists = true;
  318. break;
  319. }
  320. }
  321. // Otherwise add it as new
  322. if (!exists) {
  323. var newLocale = customLocale;
  324. newLocale.push("ltr"); // New locales are always left-to-right
  325. newLocale.push(""); // Element at [13] will store the search locale
  326. newLocale.push("custom"); // Element at [14] === "custom" indicates that the locale can be deleted
  327. localeList.push(newLocale);
  328. }
  329. }
  330. }
  331.  
  332. // Set default Search Locales for all locales in the locale list
  333. for (var i=0; i < localeList.length; i++) {
  334. var locale = localeList[i];
  335. var found = false;
  336. // Look for matching locale in the search locale list
  337. for (var j=0; j < searchLocales.length; j++) {
  338. var searchLocale = searchLocales[j];
  339. if (locale[0] === searchLocale[0]) {
  340. locale[13] = searchLocale[1]; // Set Search Locale for matching locale
  341. found = true;
  342. break;
  343. }
  344. }
  345. // If no matching search locale was found, set the search locale as empty
  346. if (!found) {
  347. locale[13] = "";
  348. }
  349. }
  350.  
  351. // Update locales in the locale list to reflect the configured values from data/locale/locale_config.hda
  352. // At indexes 9, 10, and 12 are currency format, number format and left-to-right/right-to-left respectively, which can't be modified using the localization table
  353. updateLocales("LocaleConfig_lcIsEnabled", 1);
  354. updateLocales("LocaleConfig_lcLanguageId", 2);
  355. updateLocales("LocaleConfig_lcIsoEncoding", 3);
  356. updateLocales("LocaleConfig_lcDateTimeFormat", 4);
  357. updateLocales("LocaleConfig_lcDisplayDateFormat", 5);
  358. updateLocales("LocaleConfig_lcAlternateParseDateFormats", 6);
  359. updateLocales("LocaleConfig_lcTimeZone", 7);
  360. updateLocales("LocaleConfig_lcWeekdayOffset", 8);
  361. updateLocales("LocaleConfig_lcLocaleNativeName", 11);
  362. updateLocales("SearchLocaleConfig_lcSearchLocale", 13);
  363.  
  364. // Deep clone the locale list so we have a copy of it for resetting and comparing changes
  365. originalLocaleList = JSON.parse(JSON.stringify(localeList));
  366.  
  367. // Set the options for the Search Locale and Encoding select lists on the "Configure Locale" form
  368. addToSelect("lcSearchLocale", searchLocales, 1);
  369. addToSelect("lcIsoEncoding", encodings, 0);
  370.  
  371. // Create Localization table from the locale list
  372. localizationTable = initLocalizationTable();
  373. initLocalizationButtons();
  374.  
  375. /*
  376. * Helper function for updating the locale list by grabbing data from the specified ResultSet name (rsName)
  377. * in the locale_config.hda file and modifying the specified index for matching locales in the locale list.
  378. */
  379. function updateLocales(rsName, index) {
  380. if (!localeConfig[rsName]) return; // If RS doesn't exist, just exit
  381. var rs = localeConfig[rsName].rows;
  382. // Loop through each name/value pair in the result set
  383. for (var i=0; i < rs.length; i++) {
  384. var rsRow = rs[i];
  385. // Search locale list for matching locale name
  386. for (var j=0; j < localeList.length; j++) {
  387. var locale = localeList[j];
  388. if (rsRow[0] === locale[0]) {
  389. locale[index] = rsRow[1]; // Set value at the specified index
  390. break; // Move onto next name/value pair
  391. }
  392. }
  393. }
  394. }
  395.  
  396. /*
  397. * Helper function that adds all values at index for each item in the specified array to the select specified by selectName
  398. */
  399. function addToSelect(selectName, array, index) {
  400. var select = $fbs("#configureLocaleForm").find("select[name='" + selectName + "']");
  401. for (var i=0; i < array.length; i++) {
  402. var name = array[i][index];
  403. // Prevent duplication by skipping if search locale was already added
  404. if (select.find("option[name='" + name + "']").length > 0) {
  405. continue;
  406. }
  407. else {
  408. select.append('<option name="' + name + '">' + name + '</option>');
  409. }
  410. }
  411. }
  412.  
  413. /*
  414. * Helper function that initializes and returns the localization table
  415. */
  416. function initLocalizationTable() {
  417. // Create table on page
  418. var table = $fbs("#localizationTable");
  419. var columnTitles = {
  420. 'lcLocaleId': '<$lc("csLabelLocale")$>',
  421. 'lcIsEnabled': '<$lc("csEditLabelLocaleEnabled")$>',
  422. 'lcLanguageId': '<$lc("csLabelLanguageId")$>',
  423. 'lcIsoEncoding': '<$lc("csLabelEncoding")$>',
  424. 'lcDateTimeFormat': '<$lc("csLabelDateTimeFormat")$>',
  425. 'lcDisplayDateFormat': '<$lc("csLabelDisplayDateFormat")$>',
  426. 'lcAlternateParseDateFormats': '<$lc("csLabelAlternateParseDateFormats")$>',
  427. 'lcTimeZone': '<$lc("csLabelTimeZone")$>'
  428. };
  429. var columns = [];
  430. for (i=0; i < 8; i++) { // We only display the first 8 columns on the table (same as built-in applet)
  431. var name = fields[i].name;
  432. var columnData = {
  433. name: name,
  434. title: columnTitles[name]
  435. };
  436. // lcIsEnabled for locales is sometimes "0" or "1", we want to make sure they display as "true" or "false"
  437. if (name === "lcIsEnabled") {
  438. columnData.render = function(data) {
  439. if (data === "0") {
  440. data = "false";
  441. }
  442. else if (data === "1") {
  443. data = "true";
  444. }
  445. return data;
  446. };
  447. }
  448. columns.push(columnData);
  449. }
  450. return initDataTable(table, localeList, columns, "os");
  451. }
  452.  
  453. /*
  454. * Helper function that initializes the buttons for the localization table
  455. */
  456. function initLocalizationButtons() {
  457. // Add buttons to Localization table
  458. addFooterButtons("#localizationTable", [
  459. {id: "localeAdd", label: "<$lc('apDlgButtonAdd')$>"},
  460. {id: "localeEdit", label: "<$lc('wwEdit')$>", reqSelection: true},
  461. {id: "localeDelete", label: "<$lc('wwDelete')$>", reqSelection: true},
  462. {id: "localeEnable", label: "<$lc('wwEnable')$>", reqSelection: true},
  463. {id: "localeDisable", label: "<$lc('wwDisable')$>", reqSelection: true}
  464. ]);
  465. // Disable buttons when certain rows are selected (same as built-in applet)
  466. $fbs("#localizationTable").on("click", function() {
  467. var numSelected = localizationTable.rows(".selected")[0].length;
  468. // Disable Edit button if multiple or no locales are selected
  469. if (numSelected > 1 || numSelected === 0) {
  470. $fbs("#localeEdit").prop("disabled", true);
  471. }
  472. else {
  473. $fbs("#localeEdit").prop("disabled", false);
  474. }
  475. // Search through selected locales, disable Delete button if any are not deletable/custom locales
  476. for (var i=0; i < numSelected; i++) {
  477. var data = localizationTable.rows(".selected").data()[i];
  478. if (data[data.length-1] !== "custom") {
  479. $fbs("#localeDelete").prop("disabled", true);
  480. break;
  481. }
  482. else {
  483. $fbs("#localeDelete").prop("disabled", false);
  484. }
  485. }
  486. });
  487. // Attach handlers
  488. $fbs("#localeAdd").off("click").on("click", function() { openDialog(false); });
  489. $fbs("#localeEdit").off("click").on("click", function() { openDialog(true); });
  490. $fbs("#localeEnable").on("click", function() { setEnabledRows("true"); });
  491. $fbs("#localeDisable").on("click", function() { setEnabledRows("false"); });
  492. $fbs("#localeDelete").on("click", function() {
  493. localizationTable.rows(".selected").remove().draw(false);
  494. });
  495.  
  496. /*
  497. * Function that's attached as a handler to the Add and Edit buttons to open the "Configure Locale" dialog window.
  498. * If isEdit is true, the values from the currently selected locale are loaded to pre-populate the fields and when
  499. * the "OK" button is clicked the selected locale will be updated. If isEdit is false, the form is left blank and
  500. * the "OK" button will add a new locale to the table with the user's configured values, unless a locale with the
  501. * same name already exists, in which case its values are set to those on the form. Same as built-in applet.
  502. */
  503. function openDialog(isEdit) {
  504. var dialog = $fbs("#configureLocaleDialog");
  505. var form = $fbs("#configureLocaleForm");
  506. // Pre-populate fields if the selected locale is being edited
  507. if (isEdit) {
  508. var localeData = localizationTable.row(".selected").data();
  509. if (strIsTrue(localeData[1])) {
  510. form.find("input[name='lcIsEnabled']").prop("checked", true);
  511. }
  512. form.find("input[name='lcLocaleId']").val(localeData[0]);
  513. // Disable locale name since this cannot be modified (same as built-in applet)
  514. form.find("input[name='lcLocaleId']").prop("readonly", "readonly");
  515. form.find("input[name='lcLanguageId']").val(localeData[2]);
  516. // If no search locale, set to arabic since it's first alphabetically (same as built-in applet)
  517. if (localeData[13] === "") {
  518. form.find("select[name='lcSearchLocale']").val("arabic");
  519. }
  520. else {
  521. form.find("select[name='lcSearchLocale']").val(localeData[13]);
  522. }
  523. form.find("input[name='lcLocaleNativeName']").val(localeData[11]);
  524. form.find("select[name='lcIsoEncoding']").val(localeData[3]);
  525. form.find("input[name='lcDateTimeFormat']").val(localeData[4]);
  526. form.find("input[name='lcDisplayDateFormat']").val(localeData[5]);
  527. form.find("input[name='lcAlternateParseDateFormats']").val(localeData[6]);
  528. form.find("select[name='lcTimeZone']").val(localeData[7]);
  529. form.find("select[name='lcWeekdayOffset']").val(localeData[8]);
  530. }
  531. // Use jQuery to open dialog window
  532. dialog.dialog({
  533. autoOpen: true,
  534. modal: true,
  535. width: 800,
  536. title: "<$lc('csTitleConfigureLocale')$>",
  537. buttons: {
  538. "<$lc('wwOK')$>": verifyFields, // We must first verify the input fields, then we can submit
  539. "<$lc('wwCancel')$>": exitDialog
  540. }
  541. });
  542.  
  543. /*
  544. * Check that all required fields are set and date/time format fields are valid. If all fields are
  545. * valid, call submitLocale() to submit the form.
  546. */
  547. function verifyFields() {
  548. var localeName = form.find("input[name='lcLocaleId']").val();
  549. var dateTimeFormat = form.find("input[name='lcDateTimeFormat']").val();
  550. var displayDateFormat = form.find("input[name='lcDisplayDateFormat']").val();
  551. var alternateParseDateFormats = form.find("input[name='lcAlternateParseDateFormats']").val();
  552.  
  553. // Verify that required fields are set
  554. if (localeName === "") {
  555. alert("<$lc('csLocaleIdMustBeSpecified')$>");
  556. return;
  557. }
  558. if (dateTimeFormat === "") {
  559. alert("<$lc('csDateFormatMustBeSpecified')$>");
  560. return;
  561. }
  562.  
  563. // Verify that date/time format fields are valid
  564. var subData = {
  565. IdcService: "ADMIN_SUITE_VERIFY_DATE_FORMATS",
  566. IsJson: "1",
  567. DateTimeFormat: dateTimeFormat,
  568. DisplayDateFormat: displayDateFormat,
  569. AlternateParseDateFormats: alternateParseDateFormats
  570. };
  571. subSuccess = function(data) {
  572. // If an error is found, display the proper error message for the problematic date/time format
  573. if (data.LocalData.ParseError) {
  574. switch (data.LocalData.ParseError) {
  575. case "DateTimeFormat":
  576. alert("<$lc('csDateUnableToParseDateTimeFormat')$>");
  577. break;
  578. case "DisplayDateFormat":
  579. alert("<$lc('csDateUnableToParseDisplayDateFormat')$>");
  580. break;
  581. case "AlternateParseDateFormats":
  582. alert("<$lc('csDateUnableToParseAlternateParseDateFormats')$>");
  583. break;
  584. }
  585. }
  586. // Otherwise submit the locale to the DataTable
  587. else {
  588. submitLocale();
  589. }
  590. }
  591. serviceCall(subData, subSuccess);
  592. }
  593.  
  594. /*
  595. * Edit existing locale if "Edit" button is selected or specified locale name is already in the table,
  596. * otherwise add locale as new.
  597. */
  598. function submitLocale() {
  599. // A locale is being edited if a locale with the same name already exists
  600. // Try to find a row in the table with a matching locale name
  601. var existingLocale = localizationTable.row(function(index, data, node) {
  602. return data[0] === form.find("input[name='lcLocaleId']").val() ? true : false;
  603. });
  604. var localeExists = existingLocale[0].length > 0;
  605. var isEdit = localeExists;
  606.  
  607. // Gather data from form (assuming locale isn't being edited)
  608. var editedLocaleData = [
  609. form.find("input[name='lcLocaleId']").val(),
  610. form.find("input[name='lcIsEnabled']").is(":checked") ? "true" : "false",
  611. form.find("input[name='lcLanguageId']").val(),
  612. form.find("select[name='lcIsoEncoding']").val(),
  613. form.find("input[name='lcDateTimeFormat']").val(),
  614. form.find("input[name='lcDisplayDateFormat']").val(),
  615. form.find("input[name='lcAlternateParseDateFormats']").val(),
  616. form.find("select[name='lcTimeZone']").val(),
  617. form.find("select[name='lcWeekdayOffset']").val(),
  618. "", "", // Currency and number formats aren't set using localization table
  619. form.find("input[name='lcLocaleNativeName']").val(),
  620. "ltr", // Default is ltr (same as built-in applet)
  621. form.find("select[name='lcSearchLocale']").val(),
  622. "custom"
  623. ];
  624.  
  625. // If locale is being edited, set currency format, number format, ltr/rtl, and custom as necessary
  626. // Then update the locale in the table
  627. if (isEdit) {
  628. var existingLocaleData = existingLocale.data();
  629. editedLocaleData[9] = existingLocaleData[9]; // Set currency format
  630. editedLocaleData[10] = existingLocaleData[10]; // Set number format
  631. editedLocaleData[12] = existingLocaleData[12]; // Set ltr/rtl
  632. // Remove custom if locale being edited is not custom
  633. if (!existingLocaleData[existingLocaleData.length-1] === "custom") {
  634. editedLocaleData.splice(14, 1);
  635. }
  636. // Update locale
  637. existingLocale.data(editedLocaleData);
  638. }
  639. // Else add the new locale to the table
  640. else {
  641. localizationTable.row.add(editedLocaleData).draw("false");
  642. }
  643. exitDialog();
  644. }
  645.  
  646. /*
  647. * Clear dialog's form, ensure Locale name field isn't read-only, and close dialog
  648. */
  649. function exitDialog() {
  650. form[0].reset();
  651. form.find("input[name='lcLocaleId']").removeProp("readonly"); // Make sure Locale name isn't read-only anymore
  652. dialog.dialog('close');
  653. }
  654. }
  655.  
  656. /*
  657. * Function that's attached as a handler to the Enable and Disable buttons, sets as "Enabled" field for each
  658. * selected locale to "true" or "false".
  659. */
  660. function setEnabledRows(bool) {
  661. var selectedRows = localizationTable.rows(".selected")[0];
  662. for (var i=0; i < selectedRows.length; i++) {
  663. var rowIndex = selectedRows[i];
  664. var rowData = localizationTable.row(rowIndex).data();
  665. rowData[1] = bool;
  666. localizationTable.row(rowIndex).data(rowData);
  667. }
  668. }
  669. }
  670. };
  671. serviceCall(data, success, loadLocaleTable);
  672. }
  673.  
  674. /*
  675. * If the "Use Java Database Connectivity" checkbox on the "Database" tab is checked,
  676. * enable the other "Database" tab fields (except if they're disabled by the driver
  677. * type, same as built-in applet), otherwise it disables the other "Database" tab
  678. * fields (except "Database Driver Classpath", same as built-in applet).
  679. */
  680. function toggleIsJdbc() {
  681. if ($fbs("input[name='IsJdbcCheck']").is(":checked")) {
  682. // Enable all other "Database" tab fields
  683. $fbs(".databaseInput").prop("disabled", false);
  684. // Disable certain fields according to which driver type is selected
  685. toggleDriverType(false);
  686. }
  687. else {
  688. // Disable all other "Database" tab fields except Classpath (same as built-in applet)
  689. $fbs(".databaseInput").prop("disabled", true);
  690. // Set preserve case off (same as built-in applet)
  691. $fbs("input[name='DatabasePreserveCaseCheck']").prop("checked", false);
  692. }
  693. }
  694.  
  695. /*
  696. * Set the "Database" tab fields according to the current value of the JdbcDriverType radio buttons.
  697. * If setConnectionString is true, the JDBC Connection String will be updated, otherwise it will be
  698. * unchanged. If the selected driver type is the type that was loaded initially, the connection string
  699. * will be reset the initial value (same as built-in applet).
  700. */
  701. function toggleDriverType(setConnectionString) {
  702. var driverType = $fbs("input[name='JdbcDriverType']:checked", "#databaseUpdateForm").val();
  703. // If the driver type is "Other", enable "Enable Database Preserve Case" and "JDBC Driver"
  704. // inputs, otherwise disable them (same as built-in applet)
  705. if (driverType === "Other") {
  706. $fbs("input[name='DatabasePreserveCaseCheck']").prop("disabled", false);
  707. $fbs("input[name='JdbcDriver']").prop("disabled", false);
  708. }
  709. else {
  710. $fbs("input[name='DatabasePreserveCaseCheck']").prop("disabled", true);
  711. $fbs("input[name='JdbcDriver']").prop("disabled", true);
  712. }
  713. // If the driver type is the one that was initially loaded, reset "JDBC Connection String"
  714. // field to the initial value (same as built-in applet)
  715. var isInitial = $fbs("input[name='JdbcDriverType'][value='"+driverType+"']").attr("checked") === "checked";
  716. if (setConnectionString && isInitial) {
  717. $fbs("input[name='JdbcConnectionString']").val(function() { return this.defaultValue; });
  718. setConnectionString = false; // No need to update the connection string anymore
  719. }
  720. // Set "Enable Database Preserve Case", "JDBC Driver", and "JDBC Connection Strings"
  721. switch (driverType) {
  722. case "SQL":
  723. setDatabaseFields(
  724. false,
  725. "weblogic.jdbc.sqlserver.SQLServerDriver",
  726. "jdbc:weblogic:sqlserver://host_name:port_number;DatabaseName=database_name"
  727. );
  728. break;
  729. case "DB2":
  730. setDatabaseFields(
  731. false,
  732. "weblogic.jdbc.db2.DB2Driver",
  733. "jdbc:weblogic:db2://host_name:port_number;DatabaseName=database_name"
  734. );
  735. break;
  736. case "OCI":
  737. setDatabaseFields(
  738. true,
  739. "oracle.jdbc.OracleDriver",
  740. "jdbc:oracle:oci:@host_name:port_number:instance_name"
  741. );
  742. break;
  743. case "Thin":
  744. setDatabaseFields(
  745. true,
  746. "oracle.jdbc.OracleDriver",
  747. "jdbc:oracle:thin:@host_name:port_number:instance_name"
  748. );
  749. break;
  750. }
  751.  
  752. /*
  753. * Helper functions for setting the three database fields that change with each driver type
  754. */
  755. function setDatabaseFields(preserveCase, driver, connectionString) {
  756. $fbs("input[name='DatabasePreserveCaseCheck']").prop("checked", preserveCase);
  757. $fbs("input[name='JdbcDriver']").val(driver);
  758. if (setConnectionString) {
  759. $fbs("input[name='JdbcConnectionString']").val(connectionString);
  760. }
  761. }
  762. }
  763.  
  764. /*
  765. * Check that all fields have legal vales and submit the data in all tabs.
  766. */
  767. function submitHandler() {
  768. // Verify all fields
  769. var match;
  770. var msg = "";
  771. // SMTP Port field should contain only numeric characters
  772. var port = $fbs("input[name='SmtpPort']", "#internetUpdateForm").val();
  773. if (port.match(/\D/)) {
  774. msg = "<$lc('csInternetPanelSMTPPortError')$>";
  775. }
  776. // Database connection string should start with the appropriate string for the selected driver type
  777. var driverType = $fbs("input[name='JdbcDriverType']:checked", "#databaseUpdateForm").val();
  778. var connString = $fbs("input[name='JdbcConnectionString']", "#databaseUpdateForm").val();
  779. switch (driverType) {
  780. case "SQL":
  781. if (!connString.match(/^jdbc:weblogic:sqlserver:\/\//)) {
  782. msg = "<$lc('csDBPanelJDBCConnectionStringMsg', eval(lc('csDBPanelDriverDesc_dd_mssql')), 'jdbc:weblogic:sqlserver://')$>";
  783. }
  784. break;
  785. case "DB2":
  786. if (!connString.match(/^jdbc:weblogic:db2:\/\//)) {
  787. msg = "<$lc('csDBPanelJDBCConnectionStringMsg', eval(lc('csDBPanelDriverDesc_dd_db2')), 'jdbc:weblogic:db2://')$>";
  788. }
  789. break;
  790. case "OCI":
  791. if (!connString.match(/^jdbc:oracle:oci:@/)) {
  792. msg = "<$lc('csDBPanelJDBCConnectionStringMsg', eval(lc('csDBPanelOracleOCIDriverDesc')), 'jdbc:oracle:oci:@')$>";
  793. }
  794. break;
  795. case "Thin":
  796. if (!connString.match(/^jdbc:oracle:thin:@/)) {
  797. msg = "<$lc('csDBPanelJDBCConnectionStringMsg', eval(lc('csDBPanelOracleThinDriverDesc')), 'jdbc:oracle:thin:@')$>";
  798. }
  799. break;
  800. }
  801. // Browser executable file should exist, use custom service to check
  802. var filePath = $fbs("input[name='WebBrowserPath']", "#pathsUpdateForm").val();
  803. data = {
  804. IdcService: "ADMIN_SUITE_VERIFY_FILE_EXISTS",
  805. IsJson: "1",
  806. FilePath: filePath
  807. };
  808. success = function(data) {
  809. if (!strIsTrue(data.LocalData.FileExists)) {
  810. msg = "<$lc('wwServerNoFile1')$> '" + filePath + "' <$lc('wwServerNoFile2')$>";
  811. }
  812. if (msg === "") {
  813. // All checks have passed, we can submit
  814. submitAll();
  815. }
  816. else {
  817. window.alert(msg);
  818. }
  819. };
  820. serviceCall(data, success);
  821.  
  822. /*
  823. * Performs submission processes.
  824. */
  825. function submitAll() {
  826. var combinedForm = $fbs("#systemPropertiesForm");
  827.  
  828. // Add Internet form fields
  829. setCheckbox("UseSSL");
  830. addForm("internetUpdateForm");
  831.  
  832. // Add Database form fields
  833. setCheckbox("IsJdbc");
  834. setCheckbox("DatabasePreserveCase");
  835. // Enable DatbasePreserveCase and JdbcDriver fields so they aren't excluded
  836. $fbs("input[name='DatabasePreserveCase']").removeAttr("disabled");
  837. $fbs("input[name='JdbcDriver']").removeAttr("disabled");
  838. // Update intradoc.cfg to reflect Database Driver Classpath field
  839. updateIntradocCfg("JDBC_JAVA_CLASSPATH_custom", "#Server Classpath variables", "#Server Directory Variables");
  840. addForm("databaseUpdateForm");
  841.  
  842. // Add Server form fields
  843. addForm("serverUpdateForm");
  844.  
  845. // Update intradoc.cfg to reflect path form fields
  846. updateIntradocCfg("WebBrowserPath", "#Server Directory Variables", null);
  847. updateIntradocCfg("BASE_JAVA_CLASSPATH_custom", "#Server Classpath variables", "#Server Directory Variables");
  848. updateIntradocCfg("IdcHomeDir", "#Server Directory Variables", null);
  849.  
  850. // Write intradoc.cfg, update localiation data, update JDBC Password, and submit combined form
  851. writeToIntradocCfg();
  852. updateLocalizationHda();
  853. updateJdbcPassword();
  854. combinedForm.submit();
  855.  
  856. /*
  857. * Set the given hidden input according to its corresponding checkbox's value, then remove the checkbox.
  858. * Checkbox/hidden input pairs are used to make arguments to GEN_SYS_PROPS correctly formatted.
  859. */
  860. function setCheckbox(name) {
  861. var checkbox = $fbs("input[name='" + name + "Check']");
  862. var input = $fbs("input[name='" + name + "']");
  863. if (checkbox.is(":checked"))
  864. input.val("true");
  865. else
  866. input.val("false");
  867. checkbox.remove();
  868. }
  869.  
  870. /*
  871. * Loop through inputs/selects in the given form and add them to the combined form.
  872. */
  873. function addForm(name) {
  874. $fbs("#" + name + " input, #" + name + " select").each(function() {
  875. if ($fbs(this).attr("type") === "radio") return; // Ignore the Database driver type radio buttons
  876. var input = '<input type="hidden" name="' + $fbs(this).attr("name") + '" value="' + $fbs(this).val() + '">';
  877. combinedForm.append(input);
  878. });
  879. }
  880.  
  881. /*
  882. * Use regular expressions to update the intradocCfg string for the given variable. If variable is already present
  883. * in intradocCfg, it will be updated. If not, look for specified section of intradocCfg and insert the variable
  884. * at the end of the section. Otherwise if section doesn't exist, create it by inserting it after the prev. section.
  885. */
  886. function updateIntradocCfg(variable, section, prevSection) {
  887. // Remove field from form since we're updating the variable manually
  888. var field = $fbs("input[name='" + variable + "']");
  889. var value = field.val();
  890. field.remove();
  891. // Match RE for the variable itself
  892. var reVariable = new RegExp("(\n" + variable + "=)(.*\n)");
  893. var variableExists = intradocCfg.match(reVariable);
  894. // Match RE for the section the variable should be in
  895. var reSection = new RegExp("(\n" + section + "(?:(?:\n(?!\n))|.)*)");
  896. var sectionExists = intradocCfg.match(reSection);
  897. // Match RE for the section before the section the variable should be in if it's specified
  898. // This is used to create the variable's section if it's not already present in the cfg
  899. var prevSectionExists = null;
  900. if (prevSection) {
  901. var rePrevSection = new RegExp("(\n" + prevSection + "(?:(?:\n(?!\n))|.)*)");
  902. prevSectionExists = intradocCfg.match(rePrevSection);
  903. }
  904. // If variable already exists, update it
  905. if (variableExists) {
  906. intradocCfg = intradocCfg.replace(reVariable, "$1" + value + "\n");
  907. }
  908. // Otherwise if section exists, insert variable after the section
  909. else if (sectionExists) {
  910. intradocCfg = intradocCfg.replace(reSection, "$1\n" + variable + "=" + value);
  911. }
  912. // Otherwise if this section doesn't exist but the previous one does, create this section and insert the variable
  913. else if (prevSection && prevSectionExists) {
  914. intradocCfg = intradocCfg.replace(rePrevSection, "$1" + "\n\n" + section + "\n" + variable + "=" + value);
  915. }
  916. }
  917.  
  918. /*
  919. * Write the updated intradocCfg string back to the bin/intradoc.cfg file using the UPDATE_CONFIG_FILE service.
  920. */
  921. function writeToIntradocCfg() {
  922. data = {
  923. IdcService: "UPDATE_CONFIG_FILE",
  924. IDC_Id: "<$IDC_Id$>",
  925. IsJson: "1",
  926. ConfigFileName: "bin/intradoc.cfg",
  927. configFileInfo: intradocCfg
  928. };
  929. serviceCall(data, null, function(){});
  930. }
  931.  
  932. /*
  933. * Send localization table data as a JSON string to the content server using the ADMIN_SUITE_SAVE_LOCALIZATION_CONFIG
  934. * service where it will be processed and written to the data/locale/locale_config.hda file.
  935. */
  936. function updateLocalizationHda() {
  937. data = {
  938. IdcService: "ADMIN_SUITE_SAVE_LOCALIZATION_CONFIG",
  939. IsJson: "1",
  940. TableData: JSON.stringify(Array.prototype.slice.call(localizationTable.rows().data())), // Slice so we get only the data itself
  941. OriginalTableData: JSON.stringify(originalLocaleList)
  942. };
  943. serviceCall(data, null, function(){});
  944. }
  945.  
  946. /*
  947. * Update JDBC password using custom service ADMIN_SUITE_UPDATE_JDBC_PASSWORD, which writes an encrypted
  948. * password to config/private/passwords.hda. Also set JdbcPassword field to "managed" (same as built-in).
  949. */
  950. function updateJdbcPassword() {
  951. var input = $fbs("input[name='JdbcPassword']");
  952. var password = input.val();
  953. input.val("managed");
  954. if (password === "") { return; } // If no value was entered, don't do anything
  955. data = {
  956. IdcService: "ADMIN_SUITE_UPDATE_JDBC_PASSWORD",
  957. IsJson: "1",
  958. JdbcPassword: password
  959. };
  960. serviceCall(data);
  961. }
  962. }
  963. }
  964.  
  965. /*
  966. * Reset the data in all tabs to the data that was initially loaded by the page. This function is attached as a
  967. * handler for the page's reset button.
  968. */
  969. function resetHandler() {
  970. $fbs("#internetUpdateForm")[0].reset();
  971. $fbs("#databaseUpdateForm")[0].reset();
  972. $fbs("#serverUpdateForm")[0].reset();
  973. $fbs("#pathsUpdateForm")[0].reset();
  974. // Enable "Database" tab fields that should be enabled
  975. toggleIsJdbc();
  976. // Reset Localization table by copying all values in original locale list back and removing/restoring the data
  977. localeList = JSON.parse(JSON.stringify(originalLocaleList));
  978. localizationTable.rows().remove();
  979. for (var i=0; i < localeList.length; i++) {
  980. localizationTable.row.add(localeList[i]);
  981. }
  982. localizationTable.draw();
  983. }
  984.  
  985. /*
  986. * Helper function to easily determine if a value is "yes" or "true" or "1" regardless of case.
  987. */
  988. function strIsTrue(string) {
  989. var upper = string.toUpperCase();
  990. if (upper === "YES" || upper === "TRUE" || upper === "1") {
  991. return true;
  992. }
  993. else {
  994. return false;
  995. }
  996. }
  997. </script>
  998. <@end@>
  999.  
  1000. <@dynamichtml admin_suite_system_properties_page@>
  1001. <div class="adminSuiteTabs">
  1002. <ul>
  1003. <li><a href="#tabInternet"><$lc("csSysPropsFrameTabNameInternet")$></a></li>
  1004. <li><a href="#tabDatabase"><$lc("csSysPropsFrameTabNameDB")$></a></li>
  1005. <li><a href="#tabServer"><$lc("csSysPropsFrameTabNameServer")$></a></li>
  1006. <li><a href="#tabLocalization"><$lc("csSysPropsFrameTabNameLocalization")$></a></li>
  1007. <li><a href="#tabPaths"><$lc("csSysPropsFrameTabNamePaths")$></a></li>
  1008. </ul>
  1009. <div id="tabInternet" class="adminSuiteTab">
  1010. <$include admin_suite_system_properties_tab_internet$>
  1011. </div>
  1012. <div id="tabDatabase" class="adminSuiteTab">
  1013. <$include admin_suite_system_properties_tab_database$>
  1014. </div>
  1015. <div id="tabServer" class="adminSuiteTab">
  1016. <$include admin_suite_system_properties_tab_server$>
  1017. </div>
  1018. <div id="tabLocalization" class="adminSuiteTab">
  1019. <$include admin_suite_system_properties_tab_localization$>
  1020. </div>
  1021. <div id="tabPaths" class="adminSuiteTab">
  1022. <$include admin_suite_system_properties_tab_paths$>
  1023. </div>
  1024. </div>
  1025. <form id="systemPropertiesForm" method="post" action="<$HttpCgiPath$>">
  1026. <$include idc_token_form_field$>
  1027. <input type="hidden" name="IdcService" value="SET_SYS_PROPS">
  1028. <input type="hidden" name="IDC_Id" value="<$IDC_Id$>">
  1029. <input type="hidden" name="BackUrl" value="<$HttpCgiPath$>?IdcService=ADMIN_SUITE_SYSTEM_PROPERTIES">
  1030. </form>
  1031. <div id="adminSuiteButtons">
  1032. <input class="adminSuiteButton" id="systemPropertiesSubmit" type="button" value="<$lc('wwSave')$>">
  1033. <input class="adminSuiteButton" id="systemPropertiesReset" type="button" value="<$lc('wwReset')$>">
  1034. </div>
  1035. <@end@>
  1036.  
  1037. <@dynamichtml admin_suite_system_properties_tab_internet@>
  1038. <div class="adminSuiteForm">
  1039. <form id="internetUpdateForm">
  1040. <table>
  1041. <tr>
  1042. <td><$lcCaption("wwHttpAddress")$></td>
  1043. <td><input type="text" name="HttpServerAddress"></td>
  1044. </tr>
  1045. <tr>
  1046. <td><$lc("wwSMTPPort")$></td>
  1047. <td><input type="text" name="SmtpPort"></td>
  1048. </tr>
  1049. <tr>
  1050. <td><$lcCaption("wwHttpRelativeWebRoot")$></td>
  1051. <td><input type="text" name="HttpRelativeWebRoot"></td>
  1052. </tr>
  1053. <tr>
  1054. <td><$lc("wwUseSSL")$></td>
  1055. <td>
  1056. <input type="hidden" name="UseSSL">
  1057. <input type="checkbox" name="UseSSLCheck">
  1058. </td>
  1059. </tr>
  1060. </table>
  1061. </form>
  1062. </div>
  1063. <@end@>
  1064.  
  1065. <@dynamichtml admin_suite_system_properties_tab_database@>
  1066. <div class="adminSuiteForm">
  1067. <form id="databaseUpdateForm">
  1068. <table>
  1069. <tr>
  1070. <td><$lc("csDBPanelJDBCCheckboxDesc")$></td>
  1071. <td>
  1072. <input type="hidden" name="IsJdbc">
  1073. <input type="checkbox" name="IsJdbcCheck">
  1074. </td>
  1075. </tr>
  1076. <tr>
  1077. <td><$lc("csDBPanelDriverDesc_dd_mssql")$></td>
  1078. <td><input type="radio" name="JdbcDriverType" class="databaseInput" value="SQL"></td>
  1079. </tr>
  1080. <tr>
  1081. <td><$lc("csDBPanelDriverDesc_dd_db2")$></td>
  1082. <td><input type="radio" name="JdbcDriverType" class="databaseInput" value="DB2"></td>
  1083. </tr>
  1084. <tr>
  1085. <td><$lc("csDBPanelOracleOCIDriverDesc")$></td>
  1086. <td><input type="radio" name="JdbcDriverType" class="databaseInput" value="OCI"></td>
  1087. </tr>
  1088. <tr>
  1089. <td><$lc("csDBPanelOracleThinDriverDesc")$></td>
  1090. <td><input type="radio" name="JdbcDriverType" class="databaseInput" value="Thin"></td>
  1091. </tr>
  1092. <tr>
  1093. <td><$lc("csDBPanelOtherJDBCDriverDesc")$></td>
  1094. <td><input type="radio" name="JdbcDriverType" class="databaseInput" value="Other"></td>
  1095. </tr>
  1096. <tr>
  1097. <td><$lc("csDBPanelDBPreserveCaseCheckBoxDesc")$></td>
  1098. <td>
  1099. <input type="hidden" name="DatabasePreserveCase">
  1100. <input type="checkbox" name="DatabasePreserveCaseCheck" class="databaseInput">
  1101. </td>
  1102. </tr>
  1103. <tr>
  1104. <td><$lc("csDBPanelDBClasspath")$></td>
  1105. <td><input type="text" name="JDBC_JAVA_CLASSPATH_custom"></td>
  1106. </tr>
  1107. <tr>
  1108. <td><$lc("csDBPanelJDBCDriverLabel")$></td>
  1109. <td><input type="text" name="JdbcDriver" class="databaseInput"></td>
  1110. </tr>
  1111. <tr>
  1112. <td><$lc("csDBPanelJDBCConnectionString")$></td>
  1113. <td><input type="text" name="JdbcConnectionString" class="databaseInput"></td>
  1114. </tr>
  1115. <tr>
  1116. <td><$lc("csDBPanelJDBCUsername")$></td>
  1117. <td><input type="text" name="JdbcUser" class="databaseInput"></td>
  1118. </tr>
  1119. <tr>
  1120. <td><$lc("csDBPanelJDBCPassword")$></td>
  1121. <td><input type="password" name="JdbcPassword" class="databaseInput"></td>
  1122. </tr>
  1123. </table>
  1124. </form>
  1125. </div>
  1126. <@end@>
  1127.  
  1128. <@dynamichtml admin_suite_system_properties_tab_server@>
  1129. <div class="adminSuiteForm">
  1130. <form id="serverUpdateForm">
  1131. <table>
  1132. <tr>
  1133. <td><$lc("csServerPanelLabelSystemLocale")$></td>
  1134. <td><select name="SystemLocale"></select></td>
  1135. </tr>
  1136. <tr>
  1137. <td><$lc("csServerPanelLabelSystemTimeZone")$></td>
  1138. <td><select name="SystemTimeZone"></select></td>
  1139. </tr>
  1140. <tr>
  1141. <td><$lc("csServerPanelLabelInstanceMenu")$></td>
  1142. <td><input type="text" name="InstanceMenuLabel"></td>
  1143. </tr>
  1144. <tr>
  1145. <td><$lc("csServerPanelLabelInstanceDesc")$></td>
  1146. <td><input type="text" name="InstanceDescription"></td>
  1147. </tr>
  1148. </table>
  1149. </form>
  1150. </div>
  1151. <@end@>
  1152.  
  1153. <@dynamichtml admin_suite_system_properties_tab_localization@>
  1154. <div id="localizationTable" class="adminSuiteDataTable"><table></table></div>
  1155. <div id="configureLocaleDialog" class="adminSuiteDialog">
  1156. <$include admin_suite_system_properties_configure_locale_dialog$>
  1157. </div>
  1158. <@end@>
  1159.  
  1160. <@dynamichtml admin_suite_system_properties_configure_locale_dialog@>
  1161. <div class="adminSuiteForm">
  1162. <form id="configureLocaleForm">
  1163. <table>
  1164. <tr>
  1165. <td><$lc("csEditLabelLocaleEnabled")$></td>
  1166. <td><input type="checkbox" name="lcIsEnabled"></td>
  1167. </tr>
  1168. <tr>
  1169. <td><$lc("csEditLabelLocaleId")$></td>
  1170. <td><input type="text" name="lcLocaleId"></td>
  1171. </tr>
  1172. <tr>
  1173. <td><$lc("csEditLabelLanguageId")$></td>
  1174. <td><input type="text" name="lcLanguageId"></td>
  1175. </tr>
  1176. <tr>
  1177. <td><$lc("csEditLabelSearchLocale")$></td>
  1178. <td><select name="lcSearchLocale"></select></td>
  1179. </tr>
  1180. <tr>
  1181. <td><$lc("csEditLabelNativeName")$></td>
  1182. <td><input type="text" name="lcLocaleNativeName"></td>
  1183. </tr>
  1184. <tr>
  1185. <td><$lc("csEditLabelEncoding")$></td>
  1186. <td><select name="lcIsoEncoding"></select></td>
  1187. </tr>
  1188. <tr>
  1189. <td><$lc("csEditLabelDateFormat")$></td>
  1190. <td><input type="text" name="lcDateTimeFormat"></td>
  1191. </tr>
  1192. <tr>
  1193. <td><$lc("csEditLabelDisplayDateFormat")$></td>
  1194. <td><input type="text" name="lcDisplayDateFormat"></td>
  1195. </tr>
  1196. <tr>
  1197. <td><$lc("csEditLabelAlternateParseDateFormats")$></td>
  1198. <td><input type="text" name="lcAlternateParseDateFormats"></td>
  1199. </tr>
  1200. <tr>
  1201. <td><$lc("csEditLabelTimeZone")$></td>
  1202. <td><select name="lcTimeZone"></select></td>
  1203. </tr>
  1204. <tr>
  1205. <td><$lc("csEditLabelWeekdayOffset")$></td>
  1206. <td>
  1207. <select name="lcWeekdayOffset">
  1208. <option value="0"><$lc("wwWeekdayOffset0")$></option>
  1209. <option value="1"><$lc("wwWeekdayOffset1")$></option>
  1210. </select>
  1211. </td>
  1212. </tr>
  1213. </table>
  1214. </form>
  1215. </div>
  1216. <@end@>
  1217.  
  1218. <@dynamichtml admin_suite_system_properties_tab_paths@>
  1219. <div class="adminSuiteForm">
  1220. <form id="pathsUpdateForm">
  1221. <table>
  1222. <tr>
  1223. <td><$lc("csPathsPanelLabelBrowserPath")$></td>
  1224. <td><input type="text" name="WebBrowserPath"></td>
  1225. </tr>
  1226. <tr>
  1227. <td><$lc("csPathsPanelLabelJavaClasspath")$></td>
  1228. <td><input type="text" name="BASE_JAVA_CLASSPATH_custom"></td>
  1229. </tr>
  1230. <tr>
  1231. <td><$lc("csPathsPanelIdcHomeDir")$></td>
  1232. <td><input type="text" name="IdcHomeDir"></td>
  1233. </tr>
  1234. </table>
  1235. </form>
  1236. </div>
  1237. <@end@>
  1238.  
  1239. </body>
  1240. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement