From cb28f61a6cf80dd461852b821d1ed3b3467fa89e Mon Sep 17 00:00:00 2001 From: ThibG Date: Sun, 16 Feb 2020 12:38:22 +0100 Subject: Fix invite request input not being shown on sign-up error if left empty (#13089) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the “Why do you want to join?” textarea is left empty and the entered params do not validate, the textarea isn't shown again, unlike other fields. This commit fixes that by populating an empty `UserInviteRequest` when needed. --- app/views/auth/registrations/new.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/auth/registrations/new.html.haml b/app/views/auth/registrations/new.html.haml index e807c8d86..bcd66fb8a 100644 --- a/app/views/auth/registrations/new.html.haml +++ b/app/views/auth/registrations/new.html.haml @@ -27,7 +27,7 @@ - if approved_registrations? && !@invite.present? .fields-group - = f.simple_fields_for :invite_request do |invite_request_fields| + = f.simple_fields_for :invite_request, resource.invite_request || resource.build_invite_request do |invite_request_fields| = invite_request_fields.input :text, as: :text, wrapper: :with_block_label, required: false = f.input :invite_code, as: :hidden -- cgit From 4dec392ea85091be4c589aa213f7bb02c1d105ab Mon Sep 17 00:00:00 2001 From: ThibG Date: Mon, 17 Feb 2020 16:38:59 +0100 Subject: Fix account's bio not being shown if there are no proofs/fields in admin UI (#13075) --- app/views/admin/accounts/show.html.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml index a83f77134..a30b78db2 100644 --- a/app/views/admin/accounts/show.html.haml +++ b/app/views/admin/accounts/show.html.haml @@ -27,9 +27,9 @@ = fa_icon 'check' = Formatter.instance.format_field(account, field.value, custom_emojify: true) - - if account.note.present? - %div - .account__header__content.emojify= Formatter.instance.simplified_format(account, custom_emojify: true) + - if account.note.present? + %div + .account__header__content.emojify= Formatter.instance.simplified_format(account, custom_emojify: true) .dashboard__counters{ style: 'margin-top: 10px' } %div -- cgit