logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 433cb198fa930344c7352250dfaae9857f7ba471
parent: 3ffa27e8129ade27f4f02d462aeab366a1e06b0b
Author: Eugen Rochko <eugen@zeonfederated.com>
Date:   Sun,  2 Apr 2017 04:10:22 +0200

Fix landing page sign up form ignoring username field

Diffstat:

Mapp/controllers/about_controller.rb3+++
Mapp/views/about/index.html.haml2+-
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/controllers/about_controller.rb b/app/controllers/about_controller.rb @@ -5,6 +5,9 @@ class AboutController < ApplicationController def index @description = Setting.site_description + + @user = User.new + @user.build_account end def more diff --git a/app/views/about/index.html.haml b/app/views/about/index.html.haml @@ -24,7 +24,7 @@ .screenshot-with-signup .mascot= image_tag 'fluffy-elephant-friend.png' - = simple_form_for(:user, url: user_registration_path) do |f| + = simple_form_for(@user, url: user_registration_path) do |f| = f.simple_fields_for :account do |ff| = ff.input :username, autofocus: true, placeholder: t('simple_form.labels.defaults.username'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.username') }