Make the form readonly when unregistered users can't send responses

pull/1/head
yflory 2021-08-26 11:25:51 +02:00
parent 20b0b4b9b2
commit 20e9b2ca87
1 changed files with 7 additions and 0 deletions

View File

@ -2949,6 +2949,13 @@ define([
if (infoTxt) {
$container.prepend(h('div.alert.alert-info', infoTxt));
}
if (!loggedIn && !content.answers.anonymous) {
APP.formBlocks.forEach(function (b) {
if (!b.setEditable) { return; }
b.setEditable(false);
});
}
}
// Embed mode is enforced so we add the title at the top and a CryptPad logo