#1040 Show email in public option

This commit is contained in:
JewelSam 2017-02-14 17:54:31 +03:00
parent a0120734e3
commit 56c69f51b7
5 changed files with 10 additions and 4 deletions

View file

@ -24,7 +24,7 @@ class RegistrationsController < Devise::RegistrationsController
def configure_permitted_parameters
devise_parameter_sanitizer.for(:account_update) do |u|
u.
permit(:email, :password, :password_confirmation, :current_password, :username)
permit(:email, :password, :password_confirmation, :current_password, :username, :email_public)
end
devise_parameter_sanitizer.for(:sign_up) do |u|
u.

View file

@ -8,6 +8,7 @@
= semantic_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
= f.input :username, required: false, input_html: { autocomplete: 'off' }
= f.input :email, required: false, input_html: { autocomplete: 'off' }
= f.input :email_public
= f.input :password, hint: "(Leave blank if you don't want to change it)", input_html: { autocomplete: 'off' }
= f.input :password_confirmation, input_html: { autocomplete: 'off' }
= f.inputs name: 'OpenID' do

View file

@ -32,7 +32,7 @@
%h3
by
= link_to @speaker.name, user_path(@speaker.id)
= "(#{@speaker.email})"
= "(#{@speaker.email})" if @speaker.email_public
- if @speaker.affiliation?
%br
%span.muted