diff options
author | ThibG <thib@sitedethib.com> | 2020-02-16 12:38:22 +0100 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-21 02:43:29 -0600 |
commit | e94fcf4351f9105cc38726fe4f4f6220c1820132 (patch) | |
tree | 15729b8308d291c3244ffbaabb84e04a8cdbd9bd /app/views/auth | |
parent | 656091f164a07d6c901b7bf20adca168085ee777 (diff) |
Fix invite request input not being shown on sign-up error if left empty (#13089)
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.
Diffstat (limited to 'app/views/auth')
-rw-r--r-- | app/views/auth/registrations/new.html.haml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/auth/registrations/new.html.haml b/app/views/auth/registrations/new.html.haml index 83384d737..021af3720 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 |