diff --git a/CHANGELOG.md b/CHANGELOG.md
index 508841f6d..02d98e5b1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,37 @@
+# 5.2.1
+
+## Goals
+
+This minor releases fixes a bug with one of the Form features introduced in 5.2.0.
+
+We took the opportunity to include two other fixes for older issues.
+
+## Bug Fixes
+
+- The option to delete all responses to a form was not available to form authors when the form had been created in a drive (user or team) using the **+ NEW** button
+
+- Drag & drop from a shared folder into the Templates folder made documents "disappear". They would reappear in the root of the drive when using a new worker (after all CryptPad tabs had been closed)
+
+- Clicking a link in a Calendar event location field failed to open
+
+## Update notes
+
+Our `5.2.0` release introduced some changes to the Nginx configuration. If you are not already running `5.2.0` we recommend following the upgrade notes for that version first, and then updating to `5.2.1`
+
+To do so:
+
+1. Stop your server
+2. Get the latest code with git
+
+```bash
+git fetch origin --tags
+git checkout 5.2.1
+```
+
+1. Install the latest dependencies with `bower update`
+2. Restart your server
+3. Review your instance's checkup page to ensure that you are passing all tests
+
# 5.2.0
## Goals
diff --git a/customize.dist/pages.js b/customize.dist/pages.js
index eb3751436..10030cc25 100644
--- a/customize.dist/pages.js
+++ b/customize.dist/pages.js
@@ -95,7 +95,7 @@ define([
return h('a', attrs, [icon, text]);
};
- Pages.versionString = "5.2.0";
+ Pages.versionString = "5.2.1";
var customURLs = Pages.customURLs = {};
(function () {
diff --git a/package-lock.json b/package-lock.json
index b5a578f7d..fb239fb3f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "cryptpad",
- "version": "5.2.0",
+ "version": "5.2.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "cryptpad",
- "version": "5.2.0",
+ "version": "5.2.1",
"license": "AGPL-3.0+",
"dependencies": {
"@mcrowe/minibloom": "^0.2.0",
diff --git a/package.json b/package.json
index b3a723eba..e4b78eb94 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "cryptpad",
"description": "realtime collaborative visual editor with zero knowlege server",
- "version": "5.2.0",
+ "version": "5.2.1",
"license": "AGPL-3.0+",
"repository": {
"type": "git",
diff --git a/www/calendar/inner.js b/www/calendar/inner.js
index 90262ea4d..14a6c2333 100644
--- a/www/calendar/inner.js
+++ b/www/calendar/inner.js
@@ -2085,12 +2085,6 @@ APP.recurrenceRule = {
}, function () {
$del.click();
});
- var $section = $el.find('.tui-full-calendar-section-button');
- var ev = APP.editModalData;
- var data = ev.schedule || {};
- var id = data.id;
- if (!id) { return; }
- if (id.indexOf('|') === -1) { return; } // Original event ID doesn't contain |
if (APP.nextLocationUid) {
var uid = APP.nextLocationUid;
@@ -2102,6 +2096,15 @@ APP.recurrenceRule = {
common.openUnsafeURL($a.attr('href'));
});
}
+
+ var $section = $el.find('.tui-full-calendar-section-button');
+ var ev = APP.editModalData;
+ var data = ev.schedule || {};
+ var id = data.id;
+
+ if (!id) { return; }
+ if (id.indexOf('|') === -1) { return; } // Original event ID doesn't contain |
+
// This is a recurring event, add button to stop recurrence now
var $b = $(h('button.btn.btn-default', [
h('i.fa.fa-times'),
diff --git a/www/checkup/main.js b/www/checkup/main.js
index 2b5582a33..1b6e69687 100644
--- a/www/checkup/main.js
+++ b/www/checkup/main.js
@@ -1579,8 +1579,7 @@ define([
var HSTS = H['strict-transport-security'];
// check for a numerical value of max-age
- // and the use of includeSubDomains
- if (/max\-age=\d+/.test(HSTS) && /includeSubDomains/.test(HSTS)) {
+ if (/max\-age=\d+/.test(HSTS)) {
return void cb(true);
}
diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js
index 75db2ed69..018503259 100644
--- a/www/common/cryptpad-common.js
+++ b/www/common/cryptpad-common.js
@@ -571,8 +571,8 @@ define([
}, todo);
};
- common.clearOwnedChannel = function (channel, cb) {
- postMessage("CLEAR_OWNED_CHANNEL", channel, cb);
+ common.clearOwnedChannel = function (data, cb) {
+ postMessage("CLEAR_OWNED_CHANNEL", data, cb);
};
// "force" allows you to delete your drive ID
common.removeOwnedChannel = function (data, cb) {
diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js
index bf518de99..327309f20 100644
--- a/www/common/outer/async-store.js
+++ b/www/common/outer/async-store.js
@@ -342,10 +342,11 @@ define([
cb(account);
};
- // clearOwnedChannel is only used for private chat at the moment
+ // clearOwnedChannel is only used for private chat and forms
Store.clearOwnedChannel = function (clientId, data, cb) {
- if (!store.rpc) { return void cb({error: 'RPC_NOT_READY'}); }
- store.rpc.clearOwnedChannel(data, function (err) {
+ var s = getStore(data && data.teamId);
+ if (!s.rpc) { return void cb({error: 'RPC_NOT_READY'}); }
+ s.rpc.clearOwnedChannel(data.channel, function (err) {
cb({error:err});
});
};
diff --git a/www/common/translations/messages.ru.json b/www/common/translations/messages.ru.json
index 221f2bf59..d6066aa79 100644
--- a/www/common/translations/messages.ru.json
+++ b/www/common/translations/messages.ru.json
@@ -88,14 +88,14 @@
"newButton": "Создать",
"uploadButton": "Загрузить файлы",
"uploadButtonTitle": "Загрузить новый файл в ваш CryptDrive",
- "saveTemplateButton": "Сохранить как образец",
- "saveTemplatePrompt": "Выбрать название для образца",
- "templateSaved": "Образец сохранен!",
- "selectTemplate": "Выберите образец или нажмите Esc",
- "useTemplate": "Начать с образца?",
- "useTemplateOK": "Выбрать образец (Enter)",
- "template_import": "Импортировать образец",
- "template_empty": "Образцы отсутствуют",
+ "saveTemplateButton": "Сохранить как шаблон",
+ "saveTemplatePrompt": "Выберите название для шаблона",
+ "templateSaved": "Шаблон сохранен!",
+ "selectTemplate": "Выберите шаблон или нажмите Esc",
+ "useTemplate": "Использовать шаблон?",
+ "useTemplateOK": "Выбрать шаблон (Enter)",
+ "template_import": "Импортировать шаблон",
+ "template_empty": "Шаблоны отсутствуют",
"presentButtonTitle": "Начать режим презентации",
"backgroundButtonTitle": "Изменить фоновый цвет в презентации",
"colorButtonTitle": "Изменить цвет шрифта в презентации",
@@ -1564,7 +1564,7 @@
"support_warning_bug": "Пожалуйста, укажите, в каком браузере возникает проблема и установлены ли какие-либо расширения. Пожалуйста, предоставьте как можно больше подробностей о проблеме и шагах, необходимых для ее воспроизведения",
"support_warning_document": "Пожалуйста, укажите, какой тип документа вызывает проблему, и укажите идентификатор документа или ссылку на документ",
"support_warning_drives": "Обратите внимание, что у администраторов нет возможности находить папки и документы по имени. Для общих папок, пожалуйста, укажите идентификатор документа",
- "support_warning_account": "Пожалуйста, обратите внимание, что администраторы не могут сменить Ваш пароль. Если вы потеряли учетные данные для своей учетной записи, но всё ещё авторизованы в системе, вы можете перенести свои данные в новую учетную запись",
+ "support_warning_account": "Пожалуйста, обратите внимание, что администраторы не могут сменить Ваш пароль. Если Вы потеряли учетные данные для своей учетной записи, но всё ещё авторизованы в системе, Вы можете перенести свои данные в новую учетную запись",
"support_warning_prompt": "Пожалуйста, выберите наиболее подходящую категорию для вашего вопроса. Это помогает администраторам определять срочность и сложность проблемы, и дает дополнительные рекомендации относительно того, какую информацию следует предоставлять",
"info_sourceFlavour": "Исходный код CryptPad",
"info_termsFlavour": "Условия обслуживания в этом экземпляре CryptPad",
@@ -1576,5 +1576,6 @@
"ui_saved": "{0} сохранено",
"admin_nameHint": "Имя, отображаемое для этого экземпляра в списке общедоступных экземпляров на cryptpad.org",
"admin_nameTitle": "Имя экземпляря CryptPad",
- "admin_archiveNote": "Заметка"
+ "admin_archiveNote": "Заметка",
+ "form_editable_on": "Один раз и отредактировать"
}
diff --git a/www/form/inner.js b/www/form/inner.js
index 755b9964e..11f29ba20 100644
--- a/www/form/inner.js
+++ b/www/form/inner.js
@@ -2752,7 +2752,8 @@ define([
UI.confirmButton(button, {classes:'danger'}, function () {
var sframeChan = framework._.sfCommon.getSframeChannel();
sframeChan.query('Q_FORM_DELETE_ALL_ANSWERS', {
- channel: content.answers.channel
+ channel: content.answers.channel,
+ teamId: typeof(owned) === "number" ? owned : undefined
}, function (err, obj) {
if (err || (obj && obj.error)) { return void UI.warn(Messages.error); }
APP.getResults();
diff --git a/www/form/main.js b/www/form/main.js
index 57a3d97cd..4ef169869 100644
--- a/www/form/main.js
+++ b/www/form/main.js
@@ -147,7 +147,7 @@ define([
accessKeys = _keys;
_keys.some(function (_k) {
- if ((personalDrive && !_k.id) || Cryptpad.initialTeam === _k.id) {
+ if ((personalDrive && !_k.id) || Cryptpad.initialTeam === Number(_k.id)) {
myKeys = _k;
return true;
}
@@ -412,7 +412,7 @@ define([
});
sframeChan.on("Q_FORM_DELETE_ALL_ANSWERS", function (data, cb) {
if (!data || !data.channel) { return void cb({error: 'EINVAL'}); }
- Cryptpad.clearOwnedChannel(data.channel, cb);
+ Cryptpad.clearOwnedChannel(data, cb);
});
sframeChan.on("Q_FORM_DELETE_ANSWER", function (data, cb) {
if (!deleteLines) {