From ff70abae11785b2a5064a921ac593d4eb857fa2c Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 7 Sep 2021 11:54:49 +0200 Subject: [PATCH] Improve UI --- www/form/inner.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/www/form/inner.js b/www/form/inner.js index 8c41caa48..8b19f575c 100644 --- a/www/form/inner.js +++ b/www/form/inner.js @@ -3052,8 +3052,13 @@ define([ $anonBox.attr('disabled', 'disabled').prop('checked', false); setTimeout(function () { // We need to wait for cbox to be added into the DOM before using .after() + if (content.answers.cantEdit) { return; } $cbox.after(h('div.alert.alert-info', Messages.form_authAnswer)); }); + anonName = h('div.cp-form-anon-answer-input', [ + Messages.form_answerAs, + h('span.cp-form-anon-answer-registered', user.nameĀ || Messages.anonymous) + ]); } if (APP.hasAnswered && content.answers.cantEdit || APP.isClosed) { $cbox.hide(); @@ -3857,7 +3862,7 @@ define([ var loggedIn = framework._.sfCommon.isLoggedIn(); if (content.answers.makeAnonymous) { infoTxt = Messages.form_anonAnswer; - } else if (!content.answers.anonymous && loggedIn) { + } else if (!content.answers.anonymous && loggedIn && !content.answers.cantEdit) { infoTxt = Messages.form_authAnswer; } if (infoTxt) {