From 40d92a5423e279233eb8ffbee09d74a7e89c8c2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Tue, 9 Nov 2021 15:11:43 +0000 Subject: [PATCH] Adjust UI for anon/name answer choice in forms --- customize.dist/src/less2/include/colortheme.less | 2 +- www/form/app-form.less | 7 +++---- www/form/inner.js | 4 +++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/customize.dist/src/less2/include/colortheme.less b/customize.dist/src/less2/include/colortheme.less index dd6115ea1..8817f9312 100644 --- a/customize.dist/src/less2/include/colortheme.less +++ b/customize.dist/src/less2/include/colortheme.less @@ -447,6 +447,6 @@ @cp_form-poll-yes: fade(@cryptpad_color_light_green, 75%); @cp_form-poll-maybe: @cryptpad_color_grey_300; @cp_form-poll-yes-color: @cryptpad_color_green; -@cp_form-invalid: @cryptpad_color_red; +@cp_form-invalid: @cp_alerts-danger-text; @cp_form-palette: @cp_palette; @cp_form-palette2: @cp_palette-dark; diff --git a/www/form/app-form.less b/www/form/app-form.less index d1ca4da88..4e873575e 100644 --- a/www/form/app-form.less +++ b/www/form/app-form.less @@ -477,10 +477,10 @@ .cp-form-anon-answer { text-align: center; margin: 20px 0 30px 0; + .cp-radio { + margin-top: 10px; + } .cp-form-required-radio.cp-radio-required { - background: fade(@cryptpad_text_col, 15%); - padding: 3px; - border: 2px solid @cryptpad_color_red; color: @cp_form-invalid; } .cp-form-anon-answer-input { @@ -575,7 +575,6 @@ flex: 1; } .cp-form-required-tag { - background: fade(@cryptpad_text_col, 15%); padding: 5px; margin-top: -10px; margin-right: -10px; diff --git a/www/form/inner.js b/www/form/inner.js index e6e2af133..d9e731937 100644 --- a/www/form/inner.js +++ b/www/form/inner.js @@ -3032,7 +3032,9 @@ define([ anonOffContent, false, { input: { value: 0 }, }); + Messages.form_answerChoice = "Please choose how you would like to answer this form: "; // XXX var radioContainer = h('div.cp-form-required-radio', [ + Messages.form_answerChoice, anonRadioOn, anonRadioOff, ]); @@ -3268,8 +3270,8 @@ define([ } return h('div.cp-form-send-container', [ - invalid, errors, + invalid, h('div.cp-form-anon-answer', [ radioContainer ]),