diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a63a8b3..430582f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Change Log +## 2.3.0 +## Added +- editor customization + +## Changed +- the settings page is splitted into two sections +- support master key encryption +- fix getting domain for desktop +- title in the convertation request + ## 2.1.10 ## Changed - compatible with Nextcloud 16 diff --git a/README.md b/README.md index bf7bc632..aee82bda 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,14 @@ -# ![](screenshots/icon.png) Nextcloud ONLYOFFICE integration app +# ![](screenshots/icon.png) Nextcloud-ONLYOFFICE integration app + +* [Overview](#overview) +* [Installing ONLYOFFICE Document Server](#installing-onlyoffice-document-server) +* [ONLYOFFICE Document Server editions](#onlyoffice-document-server-editions) +* [Installing Nextcloud-ONLYOFFICE integration app](#installing-nextcloud-onlyoffice-integration-app) +* [Configuring Nextcloud-ONLYOFFICE integration app](#configuring-nextcloud-onlyoffice-integration-app) +* [How it works](#how-it-works) +* [Known issues](#known-issues) + +# Overview This app enables users to edit office documents from [Nextcloud](https://nextcloud.com) using ONLYOFFICE Document Server. Currently the following document formats can be edited with this app: csv, docx, pptx, txt, xlsx. @@ -23,8 +33,69 @@ Or you can use Document Server behind a proxy, please refer to [this article](ht The easiest way to start an instance of ONLYOFFICE Document Server is to use [Docker](https://github.com/ONLYOFFICE/Docker-DocumentServer). - -## Installing Nextcloud ONLYOFFICE integration app +## ONLYOFFICE Document Server editions + +ONLYOFFICE offers different versions of its online document editors that can be deployed on your own servers. + +ONLYOFFICE Document Server: +* Community Edition (`onlyoffice-documentserver` package) + +* Integration Edition (`onlyoffice-documentserver-ie` package) + +The table below will help you to make the right choice. + +| Pricing and licensing | Community Edition | Integration Edition | +| ------------- | ------------- | ------------- | +| | [Get it now](https://www.onlyoffice.com/download.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) | [Start Free Trial](https://www.onlyoffice.com/connectors-request.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) | +| Cost | FREE | [Go to the pricing page](https://www.onlyoffice.com/integration-edition-prices.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) | +| Simultaneous connections | up to 20 maximum | As in chosen pricing plan | +| Number of users | up to 20 recommended | As in chosen pricing plan | +| License | GNU AGPL v.3 | Proprietary | +| **Support** | **Community Edition** | **Integration Edition** | +| Documentation | [Help Center](https://helpcenter.onlyoffice.com/server/docker/opensource/index.aspx) | [Help Center](https://helpcenter.onlyoffice.com/server/integration-edition/index.aspx) | +| Standard support | [GitHub](https://github.com/ONLYOFFICE/DocumentServer/issues) or paid | One year support included | +| Premium support | [Buy Now](https://www.onlyoffice.com/support.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) | [Buy Now](https://www.onlyoffice.com/support.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) | +| **Services** | **Community Edition** | **Integration Edition** | +| Conversion Service | + | + | +| Document Builder Service | - | + | +| **Interface** | **Community Edition** | **Integration Edition** | +| Tabbed interface | - | + | +| White Label | - | - | +| Integrated test example (node.js)* | - | + | +| **Plugins & Macros** | **Community Edition** | **Integration Edition** | +| Plugins | + | + | +| Macros | + | + | +| **Collaborative capabilities** | **Community Edition** | **Integration Edition** | +| Two co-editing modes | + | + | +| Comments | + | + | +| Built-in chat | + | + | +| Review and tracking changes | + | + | +| Display modes of tracking changes | - | + | +| Version history | + | + | +| **Document Editor features** | **Community Edition** | **Integration Edition** | +| Font and paragraph formatting | + | + | +| Object insertion | + | + | +| Content control | - | + | +| Layout tools | + | + | +| Table of contents | + | + | +| Navigation panel | - | + | +| Mail Merge | + | + | +| **Spreadsheet Editor features** | **Community Edition** | **Integration Edition** | +| Font and paragraph formatting | + | + | +| Object insertion | + | + | +| Functions, formulas, equations | + | + | +| Table templates | + | + | +| Pivot tables | - | +** | +| **Presentation Editor features** | **Community Edition** | **Integration Edition** | +| Font and paragraph formatting | + | + | +| Object insertion | + | + | +| Animations | + | + | +| Presenter mode | - | + | +| Notes | + | + | +| | [Get it now](https://www.onlyoffice.com/download.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) | [Start Free Trial](https://www.onlyoffice.com/connectors-request.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubNextcloud) | + + +## Installing Nextcloud-ONLYOFFICE integration app The Nextcloud administrator can install the integration app from the in-built application market. For that go to the user name and select **Apps**. @@ -58,7 +129,7 @@ There are several ways to do that: 3. In Nextcloud open the `~/index.php/settings/apps?category=disabled` page with _Not enabled_ apps by administrator and click _Enable_ for the **ONLYOFFICE** application. -## Configuring Nextcloud ONLYOFFICE integration app +## Configuring Nextcloud-ONLYOFFICE integration app In Nextcloud open the `~/index.php/settings/admin/onlyoffice` page with administrative settings for **ONLYOFFICE** section. Enter the following address to connect ONLYOFFICE Document Server: diff --git a/appinfo/info.xml b/appinfo/info.xml index 1f7dd2bb..9ae2f94a 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -1,13 +1,12 @@  onlyoffice - 174798 ONLYOFFICE ONLYOFFICE connector ONLYOFFICE connector enables you to edit Office documents within ONLYOFFICE from the familiar web interface. This will create a new Open in ONLYOFFICE action within the document library for Office documents. This allows multiple users to collaborate in real time and to save back those changes to your file storage. agpl Ascensio System SIA - 2.1.10 + 2.3.0 Onlyoffice @@ -22,6 +21,7 @@ office tools https://www.onlyoffice.com + https://dev.onlyoffice.org/ https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues https://github.com/ONLYOFFICE/onlyoffice-nextcloud.git https://raw.githubusercontent.com/ONLYOFFICE/onlyoffice-nextcloud/master/screenshots/main.png diff --git a/appinfo/routes.php b/appinfo/routes.php index 4accc964..c5d16c15 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -37,7 +37,8 @@ ["name" => "editor#config", "url" => "/ajax/config/{fileId}", "verb" => "GET"], ["name" => "editor#create", "url" => "/ajax/new", "verb" => "POST"], ["name" => "editor#convert", "url" => "/ajax/convert", "verb" => "POST"], - ["name" => "settings#save_settings", "url" => "/ajax/settings", "verb" => "PUT"], + ["name" => "settings#save_address", "url" => "/ajax/settings/address", "verb" => "PUT"], + ["name" => "settings#save_common", "url" => "/ajax/settings/common", "verb" => "PUT"], ["name" => "settings#get_settings", "url" => "/ajax/settings", "verb" => "GET"], ] ]; \ No newline at end of file diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index dccb139d..7f1a6acb 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -363,7 +363,7 @@ public function track($doc, $users, $key, $status, $url, $token) { $trackerStatus = $this->_trackerStatus[$status]; - $error = 1; + $result = 1; switch ($trackerStatus) { case "MustSave": case "Corrupted": @@ -373,26 +373,34 @@ public function track($doc, $users, $key, $status, $url, $token) { } try { + $ownerId = $hashData->ownerId; + $token = isset($hashData->token) ? $hashData->token : NULL; + if (empty($ownerId) && empty($token)) { + $this->logger->error("Track without owner: " . $fileId . " status " . $trackerStatus, array("app" => $this->appName)); + return new JSONResponse(["message" => $this->trans->t("File owner is empty")], Http::STATUS_BAD_REQUEST); + } + $userId = $users[0]; $user = $this->userManager->get($userId); if (!empty($user)) { - \OC_Util::tearDownFS(); - \OC_Util::setupFS($userId); - $this->userSession->setUser($user); } else { - $ownerId = $hashData->ownerId; + $this->logger->debug("Track by anonymous " . $userId, array("app" => $this->appName)); + } - \OC_Util::tearDownFS(); - if (!empty($ownerId)) { - \OC_Util::setupFS($ownerId); - } + if ($this->config->checkEncryptionModule() === "master") { + \OC_User::setIncognitoMode(true); } - $token = isset($hashData->token) ? $hashData->token : NULL; - list ($file, $error) = empty($token) ? $this->getFile($userId, $fileId) : $this->getFileByToken($fileId, $token); + \OC_Util::tearDownFS(); + if (!empty($ownerId)) { + \OC_Util::setupFS($ownerId); + } + + list ($file, $error) = !empty($ownerId) ? $this->getFile($ownerId, $fileId) : $this->getFileByToken($fileId, $token); if (isset($error)) { + $this->logger->error("track error" . $fileId ." " . $error, array("app" => $this->appName)); return $error; } @@ -430,8 +438,10 @@ public function track($doc, $users, $key, $status, $url, $token) { } $newData = $documentService->Request($url); + + $this->logger->debug("Track put content " . $file->getPath(), array("app" => $this->appName)); $file->putContent($newData); - $error = 0; + $result = 0; } catch (\Exception $e) { $this->logger->error("Track " . $trackerStatus . " error: " . $e->getMessage(), array("app" => $this->appName)); } @@ -439,13 +449,13 @@ public function track($doc, $users, $key, $status, $url, $token) { case "Editing": case "Closed": - $error = 0; + $result = 0; break; } $this->logger->debug("Track: " . $fileId . " status " . $status . " result " . $error, array("app" => $this->appName)); - return new JSONResponse(["error" => $error], Http::STATUS_OK); + return new JSONResponse(["error" => $result], Http::STATUS_OK); } diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 9f282236..4c0c9acc 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -485,6 +485,7 @@ public function config($fileId, $filePath = NULL, $token = NULL, $desktop = fals "document" => [ "fileType" => $ext, "key" => DocumentService::GenerateRevisionId($key), + "permissions" => [], "title" => $fileName, "url" => $fileUrl, ], @@ -494,8 +495,9 @@ public function config($fileId, $filePath = NULL, $token = NULL, $desktop = fals ] ]; - if (\OC::$server->getRequest()->isUserAgent([$this::USER_AGENT_MOBILE])) { - $params["type"] = "mobile"; + $permissions_modifyFilter = $this->config->getSystemValue($this->config->_permissions_modifyFilter); + if (isset($permissions_modifyFilter)) { + $params["document"]["permissions"]["modifyFilter"] = $permissions_modifyFilter; } $canEdit = isset($format["edit"]) && $format["edit"]; @@ -520,6 +522,10 @@ public function config($fileId, $filePath = NULL, $token = NULL, $desktop = fals $params["editorConfig"]["mode"] = "view"; } + if (\OC::$server->getRequest()->isUserAgent([$this::USER_AGENT_MOBILE])) { + $params["type"] = "mobile"; + } + if (!empty($userId)) { $params["editorConfig"]["user"] = [ "id" => $userId, @@ -530,7 +536,7 @@ public function config($fileId, $filePath = NULL, $token = NULL, $desktop = fals $folderLink = NULL; if (!empty($token)) { - if (method_exists($share, getHideDownload) && $share->getHideDownload()) { + if (method_exists($share, "getHideDownload") && $share->getHideDownload()) { $params["document"]["permissions"] = [ "download" => false, "print" => false @@ -576,14 +582,6 @@ public function config($fileId, $filePath = NULL, $token = NULL, $desktop = fals $params = $this->setCustomization($params); - $permissions_modifyFilter = $this->config->getSystemValue($this->config->_permissions_modifyFilter); - if (isset($permissions_modifyFilter)) { - if (!array_key_exists("permissions", $params["document"])) { - $params["document"]["permissions"] = []; - } - $params["document"]["permissions"]["modifyFilter"] = $permissions_modifyFilter; - } - if (!empty($this->config->GetDocumentServerSecret())) { $token = \Firebase\JWT\JWT::encode($params, $this->config->GetDocumentServerSecret()); $params["token"] = $token; @@ -776,6 +774,34 @@ private function getUrl($fileId, $token = NULL) { * @return array */ private function setCustomization($params) { + //default is true + if ($this->config->GetCustomizationChat() === false) { + $params["editorConfig"]["customization"]["chat"] = false; + } + + //default is false + if ($this->config->GetCustomizationCompactHeader() === true) { + $params["editorConfig"]["customization"]["compactHeader"] = true; + } + + //default is false + if ($this->config->GetCustomizationFeedback() === true) { + $params["editorConfig"]["customization"]["feedback"] = true; + } + + //default is true + if ($this->config->GetCustomizationHelp() === false) { + $params["editorConfig"]["customization"]["help"] = false; + } + + //default is false + if ($this->config->GetCustomizationToolbarNoTabs() === true) { + $params["editorConfig"]["customization"]["toolbarNoTabs"] = true; + } + + + /* from system config */ + $customer = $this->config->getSystemValue($this->config->_customization_customer); if (isset($customer)) { $params["editorConfig"]["customization"]["customer"] = $customer; diff --git a/controller/settingscontroller.php b/controller/settingscontroller.php index 1acd11a5..a45b38eb 100644 --- a/controller/settingscontroller.php +++ b/controller/settingscontroller.php @@ -29,7 +29,6 @@ namespace OCA\Onlyoffice\Controller; -use OCP\App; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\TemplateResponse; use OCP\IL10N; @@ -121,34 +120,32 @@ public function index() { "currentServer" => $this->urlGenerator->getAbsoluteURL("/"), "formats" => $this->config->FormatsSetting(), "sameTab" => $this->config->GetSameTab(), - "encryption" => $this->checkEncryptionModule(), - "limitGroups" => $this->config->GetLimitGroups() + "encryption" => ($this->config->checkEncryptionModule() === true), + "limitGroups" => $this->config->GetLimitGroups(), + "chat" => $this->config->GetCustomizationChat(), + "compactHeader" => $this->config->GetCustomizationCompactHeader(), + "feedback" => $this->config->GetCustomizationFeedback(), + "help" => $this->config->GetCustomizationHelp(), + "toolbarNoTabs" => $this->config->GetCustomizationToolbarNoTabs(), + "successful" => $this->config->SettingsAreSuccessful() ]; return new TemplateResponse($this->appName, "settings", $data, "blank"); } /** - * Save app settings + * Save address settings * * @param string $documentserver - document service address * @param string $documentserverInternal - document service address available from Nextcloud * @param string $storageUrl - Nextcloud address available from document server * @param string $secret - secret key for signature - * @param array $defFormats - formats array with default action - * @param array $editFormats - editable formats array - * @param bool $sameTab - open in same tab - * @param array $limitGroups - list of groups * * @return array */ - public function SaveSettings($documentserver, + public function SaveAddress($documentserver, $documentserverInternal, $storageUrl, - $secret, - $defFormats, - $editFormats, - $sameTab, - $limitGroups + $secret ) { $this->config->SetDocumentServerUrl($documentserver); $this->config->SetDocumentServerInternalUrl($documentserverInternal); @@ -162,12 +159,7 @@ public function SaveSettings($documentserver, $this->config->SetSettingsError($error); } - $this->config->SetDefaultFormats($defFormats); - $this->config->SetEditableFormats($editFormats); - $this->config->SetSameTab($sameTab); - $this->config->SetLimitGroups($limitGroups); - - if ($this->checkEncryptionModule()) { + if ($this->config->checkEncryptionModule() === true) { $this->logger->info("SaveSettings when encryption is enabled", array("app" => $this->appName)); } @@ -180,6 +172,46 @@ public function SaveSettings($documentserver, ]; } + /** + * Save common settings + * + * @param array $defFormats - formats array with default action + * @param array $editFormats - editable formats array + * @param bool $sameTab - open in the same tab + * @param array $limitGroups - list of groups + * @param bool $chat - display chat + * @param bool $compactHeader - display compact header + * @param bool $feedback - display feedback + * @param bool $help - display help + * @param bool $toolbarNoTabs - display toolbar tab + * + * @return array + */ + public function SaveCommon($defFormats, + $editFormats, + $sameTab, + $limitGroups, + $chat, + $compactHeader, + $feedback, + $help, + $toolbarNoTabs + ) { + + $this->config->SetDefaultFormats($defFormats); + $this->config->SetEditableFormats($editFormats); + $this->config->SetSameTab($sameTab); + $this->config->SetLimitGroups($limitGroups); + $this->config->SetCustomizationChat($chat); + $this->config->SetCustomizationCompactHeader($compactHeader); + $this->config->SetCustomizationFeedback($feedback); + $this->config->SetCustomizationHelp($help); + $this->config->SetCustomizationToolbarNoTabs($toolbarNoTabs); + + return [ + ]; + } + /** * Get app settings * @@ -276,26 +308,4 @@ private function checkDocServiceUrl() { return ""; } - - /** - * Checking encryption enabled - * - * @return bool - */ - private function checkEncryptionModule() { - if (!App::isEnabled("encryption")) { - return false; - } - if (!\OC::$server->getEncryptionManager()->isEnabled()) { - return false; - } - - $crypt = new \OCA\Encryption\Crypto\Crypt(\OC::$server->getLogger(), \OC::$server->getUserSession(), \OC::$server->getConfig(), \OC::$server->getL10N("encryption")); - $util = new \OCA\Encryption\Util(new \OC\Files\View(), $crypt, \OC::$server->getLogger(), \OC::$server->getUserSession(), \OC::$server->getConfig(), \OC::$server->getUserManager()); - if ($util->isMasterKeyEnabled()) { - return false; - } - - return true; - } } diff --git a/css/settings.css b/css/settings.css index ca224136..d2f1c0d5 100644 --- a/css/settings.css +++ b/css/settings.css @@ -26,8 +26,12 @@ * */ -.section-onlyoffice h2 { - display: inline; + #content .section-onlyoffice .icon-info { + box-sizing: content-box; + padding-top: 6px; +} +.onlyoffice-error { + color: red; } .onlyoffice-header { display: inline-block; @@ -35,19 +39,21 @@ } .section-onlyoffice input { display: block; - margin: 6px 0 4px; width: 250px; } .onlyoffice-hide { display: none; } -.onlyoffice-link-action { - border-bottom: 1px dotted; +#onlyofficeAdv { cursor: pointer; text-decoration: none; } -.onlyoffice-error { - color: red; +#onlyofficeAdv .icon { + display: inline-block; + margin-bottom: -3px; +} +#s2id_onlyofficeLimitGroups { + margin-bottom: 16px; } .onlyoffice-exts { column-width: 100px; diff --git a/js/desktop.js b/js/desktop.js index 34433b73..62898977 100644 --- a/js/desktop.js +++ b/js/desktop.js @@ -37,7 +37,8 @@ OCA.Onlyoffice.Desktop = true; $("html").addClass("AscDesktopEditor"); - var domain = location.href.split(OC.generateUrl(""))[0]; + var domain = new RegExp("^http(s)?:\/\/[^\/]+").exec(location)[0]; + domain += + OC.getRootPath(); var data = { displayName: oc_current_user, diff --git a/js/main.js b/js/main.js index 7b3825c0..d964209b 100644 --- a/js/main.js +++ b/js/main.js @@ -168,28 +168,28 @@ var register = function() { var formats = OCA.Onlyoffice.setting.formats; - $.each(formats, function (ext, attr) { - if (!attr.mime) { + $.each(formats, function (ext, config) { + if (!config.mime) { return true; } fileList.fileActions.registerAction({ name: "onlyofficeOpen", displayName: t(OCA.Onlyoffice.AppName, "Open in ONLYOFFICE"), - mime: attr.mime, + mime: config.mime, permissions: OC.PERMISSION_READ, iconClass: "icon-onlyoffice-open", actionHandler: OCA.Onlyoffice.FileClick }); - if (attr.def) { - fileList.fileActions.setDefault(attr.mime, "onlyofficeOpen"); + if (config.def) { + fileList.fileActions.setDefault(config.mime, "onlyofficeOpen"); } - if (attr.conv) { + if (config.conv) { fileList.fileActions.registerAction({ name: "onlyofficeConvert", displayName: t(OCA.Onlyoffice.AppName, "Convert with ONLYOFFICE"), - mime: attr.mime, + mime: config.mime, permissions: ($("#isPublic").val() ? OC.PERMISSION_UPDATE : OC.PERMISSION_READ), iconClass: "icon-onlyoffice-convert", actionHandler: OCA.Onlyoffice.FileConvertClick @@ -245,27 +245,34 @@ } }; - var initPage = function(){ + var getFileExtension = function (fileName) { + var extension = fileName.substr(fileName.lastIndexOf(".") + 1).toLowerCase(); + return extension; + } + + var initPage = function () { if ($("#isPublic").val() === "1" && !$("#filestable").length) { var fileName = $("#filename").val(); - var extension = fileName.substr(fileName.lastIndexOf(".") + 1).toLowerCase(); + var extension = getFileExtension(fileName); var initSharedButton = function() { var formats = OCA.Onlyoffice.setting.formats; - var conf = formats[extension]; - if (conf) { - var button = document.createElement("a"); - button.href = OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/s/" + encodeURIComponent($("#sharingToken").val())); - button.className = "button"; - button.innerText = t(OCA.Onlyoffice.AppName, "Open in ONLYOFFICE") + var config = formats[extension]; + if (!config) { + return; + } - if (!OCA.Onlyoffice.setting.sameTab) { - button.target = "_blank"; - } + var button = document.createElement("a"); + button.href = OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/s/" + encodeURIComponent($("#sharingToken").val())); + button.className = "button"; + button.innerText = t(OCA.Onlyoffice.AppName, "Open in ONLYOFFICE") - $("#preview").append(button); + if (!OCA.Onlyoffice.setting.sameTab) { + button.target = "_blank"; } + + $("#preview").append(button); }; OCA.Onlyoffice.GetSettings(initSharedButton); diff --git a/js/settings.js b/js/settings.js index a8b48cb1..052a3218 100644 --- a/js/settings.js +++ b/js/settings.js @@ -37,11 +37,11 @@ } var advToogle = function () { - $("#onlyofficeSecretPanel, #onlyofficeSaveBreak").toggleClass("onlyoffice-hide"); + $("#onlyofficeSecretPanel").toggleClass("onlyoffice-hide"); + $("#onlyofficeAdv .icon").toggleClass("icon-triangle-s icon-triangle-n"); }; if ($("#onlyofficeInternalUrl").val().length - || $("#onlyofficeSecret").val().length || $("#onlyofficeStorageUrl").val().length) { advToogle(); } @@ -64,7 +64,7 @@ groupListToggle(); - $("#onlyofficeSave").click(function () { + $("#onlyofficeAddrSave").click(function () { $(".section-onlyoffice").addClass("icon-loading"); var onlyofficeUrl = $("#onlyofficeUrl").val().trim(); @@ -76,6 +76,41 @@ var onlyofficeStorageUrl = ($("#onlyofficeStorageUrl:visible").val() || "").trim(); var onlyofficeSecret = $("#onlyofficeSecret:visible").val() || ""; + $.ajax({ + method: "PUT", + url: OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/settings/address"), + data: { + documentserver: onlyofficeUrl, + documentserverInternal: onlyofficeInternalUrl, + storageUrl: onlyofficeStorageUrl, + secret: onlyofficeSecret + }, + success: function onSuccess(response) { + $(".section-onlyoffice").removeClass("icon-loading"); + if (response && response.documentserver != null) { + $("#onlyofficeUrl").val(response.documentserver); + $("#onlyofficeInternalUrl").val(response.documentserverInternal); + $("#onlyofficeStorageUrl").val(response.storageUrl); + $("#onlyofficeSecret").val(response.secret); + + $(".section-onlyoffice-2").toggleClass("onlyoffice-hide", !response.documentserver.length || !!response.error.length); + + var message = + response.error + ? (t(OCA.Onlyoffice.AppName, "Error when trying to connect") + " (" + response.error + ")") + : t(OCA.Onlyoffice.AppName, "Settings have been successfully updated"); + OC.Notification.show(message, { + type: response.error ? "error" : null, + timeout: 3 + }); + } + } + }); + }); + + $("#onlyofficeSave").click(function () { + $(".section-onlyoffice").addClass("icon-loading"); + var defFormats = {}; $("input[id^=\"onlyofficeDefFormat\"]").each(function() { defFormats[this.name] = this.checked; @@ -91,33 +126,31 @@ var limitGroupsString = $("#onlyofficeGroups").prop("checked") ? $("#onlyofficeLimitGroups").val() : ""; var limitGroups = limitGroupsString ? limitGroupsString.split("|") : []; + var chat = $("#onlyofficeChat").is(":checked"); + var compactHeader = $("#onlyofficeCompactHeader").is(":checked"); + var feedback = $("#onlyofficeFeedback").is(":checked"); + var help = $("#onlyofficeHelp").is(":checked"); + var toolbarNoTabs = !$("#onlyofficeToolbarNoTabs").is(":checked"); + $.ajax({ method: "PUT", - url: OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/settings"), + url: OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/settings/common"), data: { - documentserver: onlyofficeUrl, - documentserverInternal: onlyofficeInternalUrl, - storageUrl: onlyofficeStorageUrl, - secret: onlyofficeSecret, defFormats: defFormats, editFormats: editFormats, sameTab: sameTab, - limitGroups: limitGroups + limitGroups: limitGroups, + chat: chat, + compactHeader: compactHeader, + feedback: feedback, + help: help, + toolbarNoTabs: toolbarNoTabs }, success: function onSuccess(response) { $(".section-onlyoffice").removeClass("icon-loading"); - if (response && response.documentserver != null) { - $("#onlyofficeUrl").val(response.documentserver); - $("#onlyofficeInternalUrl").val(response.documentserverInternal); - $("#onlyofficeStorageUrl").val(response.storageUrl); - $("#onlyofficeSecret").val(response.secret); - - var message = - response.error - ? (t(OCA.Onlyoffice.AppName, "Error when trying to connect") + " (" + response.error + ")") - : t(OCA.Onlyoffice.AppName, "Settings have been successfully updated"); + if (response) { + var message = t(OCA.Onlyoffice.AppName, "Settings have been successfully updated"); OC.Notification.show(message, { - type: "error", timeout: 3 }); } @@ -128,7 +161,7 @@ $(".section-onlyoffice input").keypress(function (e) { var code = e.keyCode || e.which; if (code === 13) { - $("#onlyofficeSave").click(); + $("#onlyofficeAddrSave").click(); } }); }); diff --git a/l10n/de.js b/l10n/de.js index b578c2c8..daf392b7 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -45,6 +45,15 @@ OC.L10N.register( "View details" : "Details anzeigen", "Save" : "Speichern", "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Mixed Active Content ist nicht möglich. HTTPS-Adresse für Document Server ist erforderlich.", - "Restrict access to editors to following groups" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren" + "Restrict access to editors to following groups" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren", + "Server settings" : "Servereinstellungen", + "Common settings" : "Allgemeine Einstellungen", + "Editor customization settings" : "Editor-Einstellungen", + "The customization section allows to customize the editor interface" : "Die Anpassungssektion ermöglicht die Anpassung der Editoroberfläche", + "Display Chat menu button" : "Chat-Taste anzeigen", + "Display the header more compact" : "Kompakten Header anzeigen", + "Display Feedback & Support menu button" : "Feedback-& Support-Taste anzeigen", + "Display Help menu button" : "Hilfetaste anzeigen", + "Display toolbar tabs" : "Symbolleiste-Registerkarten anzeigen" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de.json b/l10n/de.json index e29b9cef..1d6d3153 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -43,6 +43,15 @@ "View details" : "Details anzeigen", "Save" : "Speichern", "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Mixed Active Content ist nicht möglich. HTTPS-Adresse für Document Server ist erforderlich.", - "Restrict access to editors to following groups" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren" + "Restrict access to editors to following groups" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren", + "Server settings" : "Servereinstellungen", + "Common settings" : "Allgemeine Einstellungen", + "Editor customization settings" : "Editor-Einstellungen", + "The customization section allows to customize the editor interface" : "Die Anpassungssektion ermöglicht die Anpassung der Editoroberfläche", + "Display Chat menu button" : "Chat-Taste anzeigen", + "Display the header more compact" : "Kompakten Header anzeigen", + "Display Feedback & Support menu button" : "Feedback-& Support-Taste anzeigen", + "Display Help menu button" : "Hilfetaste anzeigen", + "Display toolbar tabs" : "Symbolleiste-Registerkarten anzeigen" },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/de_DE.js b/l10n/de_DE.js index 05c90da6..9fbbd91d 100644 --- a/l10n/de_DE.js +++ b/l10n/de_DE.js @@ -45,6 +45,15 @@ OC.L10N.register( "View details" : "Details anzeigen", "Save" : "Speichern", "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Mixed Active Content ist nicht möglich. HTTPS-Adresse für Document Server ist erforderlich.", - "Restrict access to editors to following groups" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren" + "Restrict access to editors to following groups" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren", + "Server settings" : "Servereinstellungen", + "Common settings" : "Allgemeine Einstellungen", + "Editor customization settings" : "Editor-Einstellungen", + "The customization section allows to customize the editor interface" : "Die Anpassungssektion ermöglicht die Anpassung der Editoroberfläche", + "Display Chat menu button" : "Chat-Taste anzeigen", + "Display the header more compact" : "Kompakten Header anzeigen", + "Display Feedback & Support menu button" : "Feedback-& Support-Taste anzeigen", + "Display Help menu button" : "Hilfetaste anzeigen", + "Display toolbar tabs" : "Symbolleiste-Registerkarten anzeigen" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de_DE.json b/l10n/de_DE.json index 6cf04f71..4ec1dc8f 100644 --- a/l10n/de_DE.json +++ b/l10n/de_DE.json @@ -43,6 +43,15 @@ "View details" : "Details anzeigen", "Save" : "Speichern", "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Mixed Active Content ist nicht möglich. HTTPS-Adresse für Document Server ist erforderlich.", - "Restrict access to editors to following groups" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren" + "Restrict access to editors to following groups" : "Den Zugriff auf Editoren auf folgende Gruppen gewähren", + "Server settings" : "Servereinstellungen", + "Common settings" : "Allgemeine Einstellungen", + "Editor customization settings" : "Editor-Einstellungen", + "The customization section allows to customize the editor interface" : "Die Anpassungssektion ermöglicht die Anpassung der Editoroberfläche", + "Display Chat menu button" : "Chat-Taste anzeigen", + "Display the header more compact" : "Kompakten Header anzeigen", + "Display Feedback & Support menu button" : "Feedback-& Support-Taste anzeigen", + "Display Help menu button" : "Hilfetaste anzeigen", + "Display toolbar tabs" : "Symbolleiste-Registerkarten anzeigen" },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/es.js b/l10n/es.js index e22b794c..fb30dcf8 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -45,6 +45,15 @@ OC.L10N.register( "View details" : "Ver detalles", "Save" : "Guardar", "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Contenido Mixto Activo no está permitido. Se requiere la dirección HTTPS para Servidor de Documentos.", - "Restrict access to editors to following groups" : "Restringir el acceso a editores a siguientes grupos" + "Restrict access to editors to following groups" : "Restringir el acceso a editores a siguientes grupos", + "Server settings" : "Ajustes de servidor", + "Common settings" : "Ajustes comunes", + "Editor customization settings" : "Ajustes del editor", + "The customization section allows to customize the editor interface" : "La sección de personalización permite customizar la interfaz del editor", + "Display Chat menu button" : "Mostrar el botón de Chat", + "Display the header more compact" : "Mostrar el encabezado más compacto", + "Display Feedback & Support menu button" : "Mostrar el botón de Feedback y Soporte", + "Display Help menu button" : "Mostrar el botón de Ayuda", + "Display toolbar tabs" : "Mostrar pestañas de barra de herramientas" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/es.json b/l10n/es.json index 9c0922a4..4d9ccf38 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -43,6 +43,15 @@ "View details" : "Ver detalles", "Save" : "Guardar", "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Contenido Mixto Activo no está permitido. Se requiere la dirección HTTPS para Servidor de Documentos.", - "Restrict access to editors to following groups" : "Restringir el acceso a editores a siguientes grupos" + "Restrict access to editors to following groups" : "Restringir el acceso a editores a siguientes grupos", + "Server settings" : "Ajustes de servidor", + "Common settings" : "Ajustes comunes", + "Editor customization settings" : "Ajustes del editor", + "The customization section allows to customize the editor interface" : "La sección de personalización permite customizar la interfaz del editor", + "Display Chat menu button" : "Mostrar el botón de Chat", + "Display the header more compact" : "Mostrar el encabezado más compacto", + "Display Feedback & Support menu button" : "Mostrar el botón de Feedback y Soporte", + "Display Help menu button" : "Mostrar el botón de Ayuda", + "Display toolbar tabs" : "Mostrar pestañas de barra de herramientas" },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/fr.js b/l10n/fr.js index 6adddb8b..7d1f9c94 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -45,6 +45,15 @@ OC.L10N.register( "View details" : "Voir les détails", "Save" : "Enregistrer", "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Le contenu mixte actif n'est pas autorisé. Une adresse HTTPS pour le serveur de document est requise", - "Restrict access to editors to following groups" : "Restreindre l'accès aux éditeurs pour les groupes suivants" + "Restrict access to editors to following groups" : "Restreindre l'accès aux éditeurs pour les groupes suivants", + "Server settings" : "Paramètres du serveur", + "Common settings" : "Paramètres communs", + "Editor customization settings" : "Paramètres de personnalisation de l'éditeur", + "The customization section allows to customize the editor interface" : "La section de personnalisation permet de personnaliser l'interface de l'éditeur", + "Display Chat menu button" : "Afficher le bouton du menu du chat", + "Display the header more compact" : "Afficher l'en-tête plus compact", + "Display Feedback & Support menu button" : "Afficher le bouton du menu 'Feedback & Support'", + "Display Help menu button" : "Afficher le bouton du menu 'Aide'", + "Display toolbar tabs" : "Afficher les onglets de la barre d'outils" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/fr.json b/l10n/fr.json index b129788e..c7ac1466 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -43,6 +43,15 @@ "View details" : "Voir les détails", "Save" : "Enregistrer", "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Le contenu mixte actif n'est pas autorisé. Une adresse HTTPS pour le serveur de document est requise", - "Restrict access to editors to following groups" : "Restreindre l'accès aux éditeurs pour les groupes suivants" + "Restrict access to editors to following groups" : "Restreindre l'accès aux éditeurs pour les groupes suivants", + "Server settings" : "Paramètres du serveur", + "Common settings" : "Paramètres communs", + "Editor customization settings" : "Paramètres de personnalisation de l'éditeur", + "The customization section allows to customize the editor interface" : "La section de personnalisation permet de personnaliser l'interface de l'éditeur", + "Display Chat menu button" : "Afficher le bouton du menu du chat", + "Display the header more compact" : "Afficher l'en-tête plus compact", + "Display Feedback & Support menu button" : "Afficher le bouton du menu 'Feedback & Support'", + "Display Help menu button" : "Afficher le bouton du menu 'Aide'", + "Display toolbar tabs" : "Afficher les onglets de la barre d'outils" },"pluralForm" :"nplurals=2; plural=(n != 1);" } diff --git a/l10n/ru.js b/l10n/ru.js index b6ddd3e9..03edecda 100644 --- a/l10n/ru.js +++ b/l10n/ru.js @@ -45,6 +45,15 @@ OC.L10N.register( "View details" : "Подробнее", "Save" : "Сохранить", "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Смешанное активное содержимое запрещено. Для Сервера документов необходимо использовать HTTPS-адрес.", - "Restrict access to editors to following groups" : "Дать доступ к редакторам только следующим группам" + "Restrict access to editors to following groups" : "Дать доступ к редакторам только следующим группам", + "Server settings" : "Настройки сервера", + "Common settings" : "Общие настройки", + "Editor customization settings" : "Настройка редактора", + "The customization section allows to customize the editor interface" : "Раздел настройки позволяет изменить интерфейс редактора", + "Display Chat menu button" : "Отображать кнопку чата", + "Display the header more compact" : "Отображать заголовок компактным", + "Display Feedback & Support menu button" : "Отображать кнопку Обратной связи и поддержки", + "Display Help menu button" : "Отображать кнопку справки", + "Display toolbar tabs" : "Отображать вкладки панели инструментов" }, "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); diff --git a/l10n/ru.json b/l10n/ru.json index 58a53d24..c6f751c9 100644 --- a/l10n/ru.json +++ b/l10n/ru.json @@ -43,6 +43,15 @@ "View details" : "Подробнее", "Save" : "Сохранить", "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Смешанное активное содержимое запрещено. Для Сервера документов необходимо использовать HTTPS-адрес.", - "Restrict access to editors to following groups" : "Дать доступ к редакторам только следующим группам" + "Restrict access to editors to following groups" : "Дать доступ к редакторам только следующим группам", + "Server settings" : "Настройки сервера", + "Common settings" : "Общие настройки", + "Editor customization settings" : "Настройка редактора", + "The customization section allows to customize the editor interface" : "Раздел настройки позволяет изменить интерфейс редактора", + "Display Chat menu button" : "Отображать кнопку чата", + "Display the header more compact" : "Отображать заголовок компактным", + "Display Feedback & Support menu button" : "Отображать кнопку Обратной связи и поддержки", + "Display Help menu button" : "Отображать кнопку справки", + "Display toolbar tabs" : "Отображать вкладки панели инструментов" },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" } \ No newline at end of file diff --git a/lib/appconfig.php b/lib/appconfig.php index 52a68123..7d37ecf5 100644 --- a/lib/appconfig.php +++ b/lib/appconfig.php @@ -109,6 +109,41 @@ class AppConfig { */ private $_sameTab = "sameTab"; + /** + * The config key for the chat display setting + * + * @var string + */ + private $_customizationChat = "customizationChat"; + + /** + * The config key for display the header more compact setting + * + * @var string + */ + private $_customizationCompactHeader = "customizationCompactHeader"; + + /** + * The config key for the feedback display setting + * + * @var string + */ + private $_customizationFeedback = "customizationFeedback"; + + /** + * The config key for the help display setting + * + * @var string + */ + private $_customizationHelp = "customizationHelp"; + + /** + * The config key for the no tabs setting + * + * @var string + */ + private $_customizationToolbarNoTabs = "customizationToolbarNoTabs"; + /** * The config key for the setting limit groups * @@ -430,6 +465,106 @@ public function GetSameTab() { return $this->config->getAppValue($this->appName, $this->_sameTab, "false") === "true"; } + /** + * Save chat display setting + * + * @param bool $value - display chat + */ + public function SetCustomizationChat($value) { + $this->logger->info("Set chat display: " . json_encode($value), array("app" => $this->appName)); + + $this->config->setAppValue($this->appName, $this->_customizationChat, json_encode($value)); + } + + /** + * Get chat display setting + * + * @return bool + */ + public function GetCustomizationChat() { + return $this->config->getAppValue($this->appName, $this->_customizationChat, "true") === "true"; + } + + /** + * Save compact header setting + * + * @param bool $value - display compact header + */ + public function SetCustomizationCompactHeader($value) { + $this->logger->info("Set compact header display: " . json_encode($value), array("app" => $this->appName)); + + $this->config->setAppValue($this->appName, $this->_customizationCompactHeader, json_encode($value)); + } + + /** + * Get compact header setting + * + * @return bool + */ + public function GetCustomizationCompactHeader() { + return $this->config->getAppValue($this->appName, $this->_customizationCompactHeader, "true") === "true"; + } + + /** + * Save feedback display setting + * + * @param bool $value - display feedback + */ + public function SetCustomizationFeedback($value) { + $this->logger->info("Set feedback display: " . json_encode($value), array("app" => $this->appName)); + + $this->config->setAppValue($this->appName, $this->_customizationFeedback, json_encode($value)); + } + + /** + * Get feedback display setting + * + * @return bool + */ + public function GetCustomizationFeedback() { + return $this->config->getAppValue($this->appName, $this->_customizationFeedback, "true") === "true"; + } + + /** + * Save help display setting + * + * @param bool $value - display help + */ + public function SetCustomizationHelp($value) { + $this->logger->info("Set help display: " . json_encode($value), array("app" => $this->appName)); + + $this->config->setAppValue($this->appName, $this->_customizationHelp, json_encode($value)); + } + + /** + * Get help display setting + * + * @return bool + */ + public function GetCustomizationHelp() { + return $this->config->getAppValue($this->appName, $this->_customizationHelp, "true") === "true"; + } + + /** + * Save without tabs setting + * + * @param bool $value - without tabs + */ + public function SetCustomizationToolbarNoTabs($value) { + $this->logger->info("Set without tabs: " . json_encode($value), array("app" => $this->appName)); + + $this->config->setAppValue($this->appName, $this->_customizationToolbarNoTabs, json_encode($value)); + } + + /** + * Get without tabs setting + * + * @return bool + */ + public function GetCustomizationToolbarNoTabs() { + return $this->config->getAppValue($this->appName, $this->_customizationToolbarNoTabs, "true") === "true"; + } + /** * Save the list of groups * @@ -538,6 +673,28 @@ public function SettingsAreSuccessful() { return empty($this->config->getAppValue($this->appName, $this->_settingsError, "")); } + /** + * Checking encryption enabled + * + * @return string|bool + */ + public function checkEncryptionModule() { + if (!\OC::$server->getAppManager()->isInstalled("encryption")) { + return false; + } + if (!\OC::$server->getEncryptionManager()->isEnabled()) { + return false; + } + + $crypt = new \OCA\Encryption\Crypto\Crypt(\OC::$server->getLogger(), \OC::$server->getUserSession(), \OC::$server->getConfig(), \OC::$server->getL10N("encryption")); + $util = new \OCA\Encryption\Util(new \OC\Files\View(), $crypt, \OC::$server->getLogger(), \OC::$server->getUserSession(), \OC::$server->getConfig(), \OC::$server->getUserManager()); + if ($util->isMasterKeyEnabled()) { + return "master"; + } + + return true; + } + /** * Get supported formats * diff --git a/lib/documentservice.php b/lib/documentservice.php index ea14002a..ba9507ad 100644 --- a/lib/documentservice.php +++ b/lib/documentservice.php @@ -118,36 +118,32 @@ function GetConvertedUri($document_uri, $from_extension, $to_extension, $documen * @return array */ function SendRequestToConvertService($document_uri, $from_extension, $to_extension, $document_revision_id, $is_async) { - if (empty($from_extension)) { - $path_parts = pathinfo($document_uri); - $from_extension = $path_parts["extension"]; - } + $documentServerUrl = $this->config->GetDocumentServerInternalUrl(false); - $title = basename($document_uri); - if (empty($title)) { - $title = $document_revision_id . $from_extension; + if (empty($documentServerUrl)) { + throw new \Exception($this->trans->t("ONLYOFFICE app is not configured. Please contact admin")); } + $urlToConverter = $documentServerUrl . "ConvertService.ashx"; + if (empty($document_revision_id)) { $document_revision_id = $document_uri; } $document_revision_id = self::GenerateRevisionId($document_revision_id); - $documentServerUrl = $this->config->GetDocumentServerInternalUrl(false); - - if (empty($documentServerUrl)) { - throw new \Exception($this->trans->t("ONLYOFFICE app is not configured. Please contact admin")); + if (empty($from_extension)) { + $from_extension = pathinfo($document_uri)["extension"]; + } else { + $from_extension = trim($from_extension, "."); } - $urlToConverter = $documentServerUrl . "ConvertService.ashx"; - $data = [ "async" => $is_async, "url" => $document_uri, "outputtype" => trim($to_extension, "."), - "filetype" => trim($from_extension, "."), - "title" => $title, + "filetype" => $from_extension, + "title" => $document_revision_id . "." . $from_extension, "key" => $document_revision_id ]; @@ -347,7 +343,6 @@ function ProcessCommandServResponceError($errorCode) { * * @return string */ - public function Request($url, $method = "get", $opts = NULL) { $httpClientService = \OC::$server->getHTTPClientService(); $client = $httpClientService->newClient(); diff --git a/settings.php b/settings.php deleted file mode 100644 index 802d01fb..00000000 --- a/settings.php +++ /dev/null @@ -1,43 +0,0 @@ -getContainer(); -$response = $container->query(SettingsController::class)->index(); - -return $response->render(); diff --git a/templates/settings.php b/templates/settings.php index b7b567a3..395705c8 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -31,50 +31,65 @@ script("onlyoffice", "settings"); ?>
-

ONLYOFFICE

- "> +

+ ONLYOFFICE + "> +

-

t("ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line.")) ?>

+

t("Server settings")) ?>

t("Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key.")) ?>

+
-

t("Document Editing Service address")) ?>

- " placeholder="https:///" type="text"> +

t("ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line.")) ?>

+ +

t("Document Editing Service address")) ?>

+

" placeholder="https:///" type="text">

- t("Advanced server settings")) ?> +

t("Secret key (leave blank to disable)")) ?>

+

" placeholder="secret" type="text">

+ +

+ + t("Advanced server settings")) ?> + + +

t("Document Editing Service address for internal requests from the server")) ?>

- " placeholder="https:///" type="text"> +

" placeholder="https:///" type="text">

t("Server address for internal requests from the Document Editing Service")) ?>

- " placeholder="" type="text"> - -

t("Secret key (leave blank to disable)")) ?>

- " placeholder="secret" type="text"> +

" placeholder="" type="text">

-
+
-

+

+ +
+ +
onlyoffice-hide"> +

t("Common settings")) ?>

+ +

0) { ?>checked="checked" /> " style="display: block; margin-top: 6px; width: 250px;" />

-
-

+

checked="checked" />

-
-

t("The default application for opening the format")) ?>

+

t("The default application for opening the format")) ?>

$setting) { ?> @@ -89,8 +104,10 @@
-

t("Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)")) ?>

- "> +

+ t("Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)")) ?> + "> +

$setting) { ?> @@ -104,6 +121,45 @@
+
+ +

+ t("Editor customization settings")) ?> + "> +

+ +

t("The customization section allows to customize the editor interface")) ?>

+ +

+ checked="checked" /> + +

+ +

+ checked="checked" /> + +

+ +

+ checked="checked" /> + +

+ +

+ checked="checked" /> + +

+ +

+ checked="checked" /> + +

+
- t("Save")) ?> +

\ No newline at end of file