user_plane 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +30 -0
- data/app/assets/javascripts/user_plane/application.js +13 -0
- data/app/assets/stylesheets/user_plane/application.css +15 -0
- data/app/concerns/null_object_persistable.rb +62 -0
- data/app/controllers/user/confirm_email_addresses_controller.rb +17 -0
- data/app/controllers/user/details_controller.rb +48 -0
- data/app/controllers/user/invites_controller.rb +69 -0
- data/app/controllers/user/reset_passwords_controller.rb +50 -0
- data/app/controllers/user/sign_ins_controller.rb +53 -0
- data/app/controllers/user/sign_ups_controller.rb +47 -0
- data/app/controllers/user_plane/application_controller.rb +5 -0
- data/app/helpers/user_plane/application_helper.rb +4 -0
- data/app/mailers/user_plane/application_mailer.rb +8 -0
- data/app/mailers/user_plane/invite_mailer.rb +14 -0
- data/app/mailers/user_plane/verification_mailer.rb +25 -0
- data/app/models/session_manager.rb +100 -0
- data/app/models/user.rb +5 -0
- data/app/models/user/account.rb +26 -0
- data/app/models/user/confirm_email_address.rb +55 -0
- data/app/models/user/guest.rb +18 -0
- data/app/models/user/identities.rb +5 -0
- data/app/models/user/identities/email.rb +98 -0
- data/app/models/user/identities/email_verification.rb +70 -0
- data/app/models/user/identities/facebook.rb +5 -0
- data/app/models/user/identities/github.rb +5 -0
- data/app/models/user/identities/id_token.rb +7 -0
- data/app/models/user/identities/o_auth.rb +67 -0
- data/app/models/user/identities/o_auth_endpoint.rb +28 -0
- data/app/models/user/identities/twitter.rb +5 -0
- data/app/models/user/identity.rb +26 -0
- data/app/models/user/reset_password.rb +59 -0
- data/app/models/user/send_password_reset.rb +25 -0
- data/app/models/user/send_sign_up_invite.rb +27 -0
- data/app/models/user/sign_in.rb +42 -0
- data/app/models/user/sign_up.rb +47 -0
- data/app/models/user/sign_up_invites.rb +5 -0
- data/app/models/user/sign_up_invites/invite.rb +46 -0
- data/app/models/user/sign_up_invites/stack.rb +22 -0
- data/app/models/user/sign_up_with_invite.rb +45 -0
- data/app/models/user/suspension.rb +7 -0
- data/app/models/user/update_details.rb +103 -0
- data/app/views/layouts/user_plane/application.html.erb +14 -0
- data/app/views/user/details/edit.html.erb +37 -0
- data/app/views/user/invites/edit.html.erb +34 -0
- data/app/views/user/invites/new.html.erb +21 -0
- data/app/views/user/reset_passwords/edit.html.erb +26 -0
- data/app/views/user/reset_passwords/new.html.erb +21 -0
- data/app/views/user/sign_ins/new.html.erb +25 -0
- data/app/views/user/sign_ups/new.html.erb +33 -0
- data/app/views/user_plane/invite_mailer/invite.html.erb +2 -0
- data/app/views/user_plane/invite_mailer/invite.text.erb +3 -0
- data/app/views/user_plane/verification_mailer/address_verification.html.erb +2 -0
- data/app/views/user_plane/verification_mailer/address_verification.text.erb +4 -0
- data/app/views/user_plane/verification_mailer/password_reset.html.erb +2 -0
- data/app/views/user_plane/verification_mailer/password_reset.text.erb +4 -0
- data/config/initializers/inflections.rb +3 -0
- data/config/locales/en.yml +63 -0
- data/config/locales/it.yml +62 -0
- data/config/routes.rb +5 -0
- data/db/migrate/20121128143404_create_user_accounts.rb +11 -0
- data/db/migrate/20121226202553_create_user_identities_o_auths.rb +12 -0
- data/db/migrate/20121226203032_create_user_identities_emails.rb +13 -0
- data/db/migrate/20121227144617_create_user_identities_email_verifications.rb +15 -0
- data/db/migrate/20130113120152_create_user_identities_id_tokens.rb +12 -0
- data/db/migrate/20141025230304_create_user_sign_up_invites_stacks.rb +10 -0
- data/db/migrate/20141025230500_create_user_sign_up_invites_invites.rb +13 -0
- data/db/migrate/20141026230208_create_user_suspensions.rb +13 -0
- data/lib/generators/user_plane/view/details_generator.rb +22 -0
- data/lib/generators/user_plane/view/helpers.rb +68 -0
- data/lib/generators/user_plane/view/invites_generator.rb +23 -0
- data/lib/generators/user_plane/view/reset_passwords_generator.rb +22 -0
- data/lib/generators/user_plane/view/sign_ins_generator.rb +18 -0
- data/lib/generators/user_plane/view/sign_ups_generator.rb +22 -0
- data/lib/generators/user_plane/views_generator.rb +32 -0
- data/lib/tasks/user_plane_tasks.rake +4 -0
- data/lib/user_plane.rb +43 -0
- data/lib/user_plane/command.rb +24 -0
- data/lib/user_plane/engine.rb +27 -0
- data/lib/user_plane/fresh_validator.rb +9 -0
- data/lib/user_plane/omniauth.rb +50 -0
- data/lib/user_plane/redirect_to_sign_in.rb +22 -0
- data/lib/user_plane/route_concerns.rb +167 -0
- data/lib/user_plane/session_manager_concern.rb +9 -0
- data/lib/user_plane/signed_in_constraint.rb +11 -0
- data/lib/user_plane/token_segment.rb +52 -0
- data/lib/user_plane/version.rb +3 -0
- data/spec/controllers/user/confirm_email_addresses_controller_spec.rb +5 -0
- data/spec/controllers/user/details_controller_spec.rb +5 -0
- data/spec/controllers/user/invites_controller_spec.rb +19 -0
- data/spec/controllers/user/reset_passwords_controller_spec.rb +5 -0
- data/spec/controllers/user/sign_ins_controller_spec.rb +34 -0
- data/spec/controllers/user/sign_ups_controller_spec.rb +5 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/application_controller.rb +7 -0
- data/spec/dummy/app/controllers/welcome_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +30 -0
- data/spec/dummy/app/views/welcome/index.html.erb +1 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +30 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +49 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +78 -0
- data/spec/dummy/config/environments/test.rb +39 -0
- data/spec/dummy/config/initializers/assets.rb +8 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/user_plane.rb +5 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +43 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/db/schema.rb +101 -0
- data/spec/dummy/log/development.log +0 -0
- data/spec/dummy/log/test.log +20185 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/-pOuxJZhYk_qXqMNKgm23KfvzyUW71NynNLlcNBOubE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/3AV9ywHBH56Leqey5LeznxK9vu4HD8fF3zSTk4MiDJA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/5fzR1G0D8ukHkPkLXsUu6rP6qV82aIdx3hugKkDy6nM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/9bKtJ2lkHPqtboGfbyknZ1OyH4xYO-aml7U3qhv-3kk.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/HjDmE9SFP2wimdNHU8Nff9cm3vFZ5soO1iw7Jdlb6z8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/J9j6OdatarYW7VzVCVttmGphOhJKL0QXasdheyrgsTE.cache +2 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/KqrOQSlg0Th0N3XXx-h4p5BVJCfN0D8rRLoA9VxvXrc.cache +1 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/UCB1W65KwVU8ttOY8jnPRDp8HyyYYEjeTwwPD6R4qy8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/YmMSaaBmIcNZWPVF9jXcGBi-kwEzMuxzwPT_Zrcj1Bo.cache +2 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/g3wU8ajFWb5ZLPvujEt5l9DesbFCiAwqjx1WQgwTtHA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/i5pp88VHKoqlxQJdgmQd_lkgX1-4em_uHqNDjQ4nyHA.cache +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/jL74yXjxf8cb6Olkjbw1C28MH_HbZe221l8AI6WVeH0.cache +3 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/puh7X4rfS3eDN9oHTXoQdAgqxivonrwAAdYZ4UB3GIg.cache +1 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/qxPWFIWnE6gOCY-SsdBJe7Cgm5D3YUwaEne78Y7XdRg.cache +1 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/rM9s67WgzKMZ1bRhUdA0yhPZDlyRE5a1kmdt7cS6m4c.cache +3 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/v3.0/rVoG8EHlrCOgY4ZkzOj64f0jiTcbteQ_SYNzq9RqY0I.cache +0 -0
- data/spec/fabricators/user_account_fabricator.rb +11 -0
- data/spec/fabricators/user_guest_fabricator.rb +2 -0
- data/spec/fabricators/user_identities_email_fabricator.rb +8 -0
- data/spec/fabricators/user_identities_email_verification_fabricator.rb +5 -0
- data/spec/fabricators/user_identities_id_token_fabricator.rb +2 -0
- data/spec/fabricators/user_sign_up_fabricator.rb +51 -0
- data/spec/fabricators/user_sign_up_invites_invite_fabricator.rb +3 -0
- data/spec/fabricators/user_sign_up_invites_stack_fabricator.rb +4 -0
- data/spec/fabricators/user_suspension_fabricator.rb +4 -0
- data/spec/fabricators/user_update_detail_fabricator.rb +2 -0
- data/spec/features/user_plane/user_plane_invites_spec.rb +31 -0
- data/spec/features/user_plane/user_plane_reset_passwords_spec.rb +31 -0
- data/spec/features/user_plane/user_plane_sign_ins_spec.rb +44 -0
- data/spec/features/user_plane/user_plane_signed_in_only_spec.rb +31 -0
- data/spec/features/user_plane/user_plane_update_details_spec.rb +43 -0
- data/spec/fixtures/user_plane/invite_mailer/invite +3 -0
- data/spec/fixtures/user_plane/verification_mailer/address_verification +3 -0
- data/spec/fixtures/user_plane/verification_mailer/password_reset +3 -0
- data/spec/lib/generators/views_generator_spec.rb +16 -0
- data/spec/lib/route_concerns_spec.rb +54 -0
- data/spec/mailers/previews/user_plane/invite_mailer_preview.rb +11 -0
- data/spec/mailers/previews/user_plane/verification_mailer_preview.rb +16 -0
- data/spec/mailers/user_plane/invite_mailer_spec.rb +25 -0
- data/spec/mailers/user_plane/verification_mailer_spec.rb +52 -0
- data/spec/models/session_manager_spec.rb +28 -0
- data/spec/models/user/account_spec.rb +26 -0
- data/spec/models/user/confirm_email_address_spec.rb +101 -0
- data/spec/models/user/guest_spec.rb +5 -0
- data/spec/models/user/identities/email_spec.rb +5 -0
- data/spec/models/user/identities/email_verification_spec.rb +42 -0
- data/spec/models/user/identities/facebook_spec.rb +5 -0
- data/spec/models/user/identities/github_spec.rb +5 -0
- data/spec/models/user/identities/id_token_spec.rb +5 -0
- data/spec/models/user/identities/o_auth_spec.rb +12 -0
- data/spec/models/user/identities/twitter_spec.rb +5 -0
- data/spec/models/user/reset_password_spec.rb +141 -0
- data/spec/models/user/send_password_reset_spec.rb +44 -0
- data/spec/models/user/send_sign_up_invite_spec.rb +30 -0
- data/spec/models/user/sign_in_spec.rb +31 -0
- data/spec/models/user/sign_up_invites/invite_spec.rb +13 -0
- data/spec/models/user/sign_up_invites/stack_spec.rb +21 -0
- data/spec/models/user/sign_up_spec.rb +58 -0
- data/spec/models/user/sign_up_with_invite_spec.rb +83 -0
- data/spec/models/user/suspension_spec.rb +5 -0
- data/spec/models/user/update_details_spec.rb +98 -0
- data/spec/routing/invites_spec.rb +49 -0
- data/spec/routing/reset_passwords_spec.rb +31 -0
- data/spec/routing/sign_ins_spec.rb +36 -0
- data/spec/routing/update_details_spec.rb +30 -0
- data/spec/shared_contexts/feature_helpers.rb +12 -0
- data/spec/shared_contexts/routing.rb +8 -0
- data/spec/shared_contexts/user.rb +67 -0
- data/spec/spec_helper.rb +38 -0
- data/spec/support/fabrication.rb +7 -0
- data/spec/support/omniauth.rb +4 -0
- metadata +770 -0
@@ -0,0 +1,103 @@
|
|
1
|
+
module User
|
2
|
+
class UpdateDetails < UserPlane::Command
|
3
|
+
include ActiveModel::Validations::Callbacks
|
4
|
+
|
5
|
+
# Setting the plural route key won't work, polymorphic_url will still
|
6
|
+
# generate a path key with the singular name, so the inflector was updated
|
7
|
+
# in this case.
|
8
|
+
# model_name.instance_variable_set(:@singular_route_key, 'update_details')
|
9
|
+
|
10
|
+
PasswordDetails = Struct.new(:current_password, :password, :password_confirmation) do
|
11
|
+
def changed?
|
12
|
+
has_passwords = password || password_confirmation
|
13
|
+
has_passwords && (!password.empty? || !password_confirmation.empty?)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
attribute :account
|
18
|
+
|
19
|
+
%w(password password_confirmation current_password).each do |attribute|
|
20
|
+
delegate attribute.to_sym, "#{attribute}=".to_sym, to: :password_details
|
21
|
+
end
|
22
|
+
|
23
|
+
delegate :name, :name=, to: :account
|
24
|
+
|
25
|
+
validates :email_identity, receiver: {map_attributes: {address: :email,
|
26
|
+
password: :password,
|
27
|
+
password_confirmation: :password_confirmation}}
|
28
|
+
validates :account, receiver: {map_attributes: {name: :user_name,
|
29
|
+
identities: :email_or_omniauth}}
|
30
|
+
|
31
|
+
validate do |record|
|
32
|
+
record.errors.add(:current_password, 'is not correct') if record.failed_password_change?
|
33
|
+
if new_address = email_identity.unverified_address
|
34
|
+
existing_identity = User::Identities::Email.where(address: new_address).first
|
35
|
+
record.errors.add(:email, :taken, value: new_address) if existing_identity
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
before_validation do
|
40
|
+
if password_details.changed? && current_password_is_valid?
|
41
|
+
email_identity.password = password_details.password
|
42
|
+
email_identity.password_confirmation = password_details.password_confirmation
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Ensures that polymorphic_url treats this as a singular resource
|
47
|
+
def persisted?
|
48
|
+
true
|
49
|
+
end
|
50
|
+
|
51
|
+
|
52
|
+
# Ensures that polymorphic_url treats this as a singular resource
|
53
|
+
def to_param
|
54
|
+
nil
|
55
|
+
end
|
56
|
+
|
57
|
+
action do
|
58
|
+
@account.save
|
59
|
+
end
|
60
|
+
|
61
|
+
def email
|
62
|
+
email_identity && email_identity.address
|
63
|
+
end
|
64
|
+
|
65
|
+
def email= address
|
66
|
+
unless address == email
|
67
|
+
if email_identity.new_record?
|
68
|
+
email_identity.address = address
|
69
|
+
else
|
70
|
+
email_identity.unverified_address = address
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def email_verification
|
76
|
+
email_identity.address_change_verification if email_identity.unverified_address_changed?
|
77
|
+
end
|
78
|
+
|
79
|
+
# Returns ture if a new password was set, but the change was rejected.
|
80
|
+
def failed_password_change?
|
81
|
+
password_details.changed? && !email_identity.password_digest_changed? ? true : false
|
82
|
+
end
|
83
|
+
|
84
|
+
def email_identity
|
85
|
+
@account.email || @account.build_email
|
86
|
+
end
|
87
|
+
|
88
|
+
def password_details
|
89
|
+
@password_details ||= PasswordDetails.new()
|
90
|
+
end
|
91
|
+
|
92
|
+
private
|
93
|
+
|
94
|
+
def current_password_is_valid?
|
95
|
+
unless email_identity.new_record?
|
96
|
+
email_identity.authenticate(password_details.current_password) ? true : false
|
97
|
+
else
|
98
|
+
false
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
end
|
103
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>UserPlane</title>
|
5
|
+
<%= stylesheet_link_tag "user_plane/application", media: "all" %>
|
6
|
+
<%= javascript_include_tag "user_plane/application" %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<%= form_for(@update_details) do |f| %>
|
2
|
+
<% if @update_details.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%= pluralize(@update_details.errors.count, "error") %> prohibited this update_details from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% @update_details.errors.full_messages.each do |message| %>
|
8
|
+
<li><%= message %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<div class="field">
|
15
|
+
<%= f.label :name %><br>
|
16
|
+
<%= f.text_field :name %>
|
17
|
+
</div>
|
18
|
+
<div class="field">
|
19
|
+
<%= f.label :email %><br>
|
20
|
+
<%= f.text_field :email %>
|
21
|
+
</div>
|
22
|
+
<div class="field">
|
23
|
+
<%= f.label :current_password %><br>
|
24
|
+
<%= f.text_field :current_password %>
|
25
|
+
</div>
|
26
|
+
<div class="field">
|
27
|
+
<%= f.label :password %><br>
|
28
|
+
<%= f.text_field :password %>
|
29
|
+
</div>
|
30
|
+
<div class="field">
|
31
|
+
<%= f.label :password_confirmation %><br>
|
32
|
+
<%= f.text_field :password_confirmation %>
|
33
|
+
</div>
|
34
|
+
<div class="actions">
|
35
|
+
<%= f.submit %>
|
36
|
+
</div>
|
37
|
+
<% end %>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<%= link_to t(:'helpers.submit.user_sign_up_with_invite.update_with_facebook'), polymorphic_path([@sign_up_with_invite, User::Identities::OAuthEndpoint.new(:facebook)])%>
|
2
|
+
<%= form_for(@sign_up_with_invite) do |f| %>
|
3
|
+
<% if @sign_up_with_invite.errors.any? %>
|
4
|
+
<div id="error_explanation">
|
5
|
+
<h2><%= pluralize(@sign_up_with_invite.errors.count, "error") %> prohibited this sign_up_with_invite from being saved:</h2>
|
6
|
+
|
7
|
+
<ul>
|
8
|
+
<% @sign_up_with_invite.errors.full_messages.each do |message| %>
|
9
|
+
<li><%= message %></li>
|
10
|
+
<% end %>
|
11
|
+
</ul>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
14
|
+
<%= f.hidden_field :code %>
|
15
|
+
<div class="field">
|
16
|
+
<%= f.label :user_name %><br>
|
17
|
+
<%= f.text_field :user_name %>
|
18
|
+
</div>
|
19
|
+
<div class="field">
|
20
|
+
<%= f.label :email %><br>
|
21
|
+
<%= f.text_field :email %>
|
22
|
+
</div>
|
23
|
+
<div class="field">
|
24
|
+
<%= f.label :password %><br>
|
25
|
+
<%= f.text_field :password %>
|
26
|
+
</div>
|
27
|
+
<div class="field">
|
28
|
+
<%= f.label :password_confirmation %><br>
|
29
|
+
<%= f.text_field :password_confirmation %>
|
30
|
+
</div>
|
31
|
+
<div class="actions">
|
32
|
+
<%= f.submit %>
|
33
|
+
</div>
|
34
|
+
<% end %>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<%= form_for(@send_sign_up_invite) do |f| %>
|
2
|
+
<% if @send_sign_up_invite.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%= pluralize(@send_sign_up_invite.errors.count, "error") %> prohibited this send_sign_up_invite from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% @send_sign_up_invite.errors.full_messages.each do |message| %>
|
8
|
+
<li><%= message %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<div class="field">
|
15
|
+
<%= f.label :recipient %><br>
|
16
|
+
<%= f.text_field :recipient %>
|
17
|
+
</div>
|
18
|
+
<div class="actions">
|
19
|
+
<%= f.submit %>
|
20
|
+
</div>
|
21
|
+
<% end %>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<h2>Reset Password</h2>
|
2
|
+
<%= form_for(@reset_password) do |f| %>
|
3
|
+
<% if @reset_password.errors.any? %>
|
4
|
+
<div id="error_explanation">
|
5
|
+
<h2><%= pluralize(@reset_password.errors.count, "error") %> prohibited this reset_password from being saved:</h2>
|
6
|
+
|
7
|
+
<ul>
|
8
|
+
<% @reset_password.errors.full_messages.each do |message| %>
|
9
|
+
<li><%= message %></li>
|
10
|
+
<% end %>
|
11
|
+
</ul>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
14
|
+
<%= f.hidden_field :code %>
|
15
|
+
<div class="field">
|
16
|
+
<%= f.label :password %><br>
|
17
|
+
<%= f.text_field :password %>
|
18
|
+
</div>
|
19
|
+
<div class="field">
|
20
|
+
<%= f.label :password_confirmation %><br>
|
21
|
+
<%= f.text_field :password_confirmation %>
|
22
|
+
</div>
|
23
|
+
<div class="actions">
|
24
|
+
<%= f.submit %>
|
25
|
+
</div>
|
26
|
+
<% end %>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<%= form_for(@send_password_reset) do |f| %>
|
2
|
+
<% if @send_password_reset.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%= pluralize(@send_password_reset.errors.count, "error") %> prohibited this send_password_reset from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% @send_password_reset.errors.full_messages.each do |message| %>
|
8
|
+
<li><%= message %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<div class="field">
|
15
|
+
<%= f.label :email %><br>
|
16
|
+
<%= f.text_field :email %>
|
17
|
+
</div>
|
18
|
+
<div class="actions">
|
19
|
+
<%= f.submit %>
|
20
|
+
</div>
|
21
|
+
<% end %>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<%= form_for(@sign_in) do |f| %>
|
2
|
+
<% if @sign_in.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2>Sign in failed:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% @sign_in.errors.full_messages.each do |message| %>
|
8
|
+
<li><%= message %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<div class="field">
|
15
|
+
<%= f.label :email %><br>
|
16
|
+
<%= f.text_field :email %>
|
17
|
+
</div>
|
18
|
+
<div class="field">
|
19
|
+
<%= f.label :password %><br>
|
20
|
+
<%= f.text_field :password %>
|
21
|
+
</div>
|
22
|
+
<div class="actions">
|
23
|
+
<%= f.submit %>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<%= form_for(@sign_up) do |f| %>
|
2
|
+
<% if @sign_up.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%= pluralize(@sign_up.errors.count, "error") %> prohibited this sign_up from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% @sign_up.errors.full_messages.each do |message| %>
|
8
|
+
<li><%= message %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<div class="field">
|
15
|
+
<%= f.label :user_name %><br>
|
16
|
+
<%= f.text_field :user_name %>
|
17
|
+
</div>
|
18
|
+
<div class="field">
|
19
|
+
<%= f.label :email %><br>
|
20
|
+
<%= f.text_field :email %>
|
21
|
+
</div>
|
22
|
+
<div class="field">
|
23
|
+
<%= f.label :password %><br>
|
24
|
+
<%= f.text_field :password %>
|
25
|
+
</div>
|
26
|
+
<div class="field">
|
27
|
+
<%= f.label :password_confirmation %><br>
|
28
|
+
<%= f.text_field :password_confirmation %>
|
29
|
+
</div>
|
30
|
+
<div class="actions">
|
31
|
+
<%= f.submit %>
|
32
|
+
</div>
|
33
|
+
<% end %>
|
@@ -0,0 +1,63 @@
|
|
1
|
+
en:
|
2
|
+
activemodel:
|
3
|
+
attributes:
|
4
|
+
user/send_password_reset: &user_send_password_reset_attributes
|
5
|
+
email: "Email"
|
6
|
+
errors:
|
7
|
+
models:
|
8
|
+
user/sign_in:
|
9
|
+
attributes:
|
10
|
+
base:
|
11
|
+
unknown_user_identities_email: "Unknown email/password combination."
|
12
|
+
unknown_user_identities_o_auth: "Unknown account, please sign up."
|
13
|
+
|
14
|
+
helpers:
|
15
|
+
submit:
|
16
|
+
user_sign_in:
|
17
|
+
create: "Sign In"
|
18
|
+
user_sign_up:
|
19
|
+
create: "Sign Up"
|
20
|
+
create_with_facebook: "Sign Up with Facebook"
|
21
|
+
user_send_password_reset:
|
22
|
+
create: "Send"
|
23
|
+
user_reset_password:
|
24
|
+
update: "Reset Password"
|
25
|
+
user_send_sign_up_invite:
|
26
|
+
create: "Send"
|
27
|
+
user_sign_up_with_invite:
|
28
|
+
update: "Sign Up"
|
29
|
+
update_with_facebook: "Sign Up with Facebook"
|
30
|
+
user_update_details:
|
31
|
+
update: "Update"
|
32
|
+
label:
|
33
|
+
user_send_password_reset:
|
34
|
+
<<: *user_send_password_reset_attributes
|
35
|
+
user:
|
36
|
+
details:
|
37
|
+
update:
|
38
|
+
success: "Your details were succesfully updated."
|
39
|
+
address_change_warning: "To comlpete your email address change, please confirm the new email address by clicking the verification link that was just sent to %{address}."
|
40
|
+
sign_ins:
|
41
|
+
create:
|
42
|
+
success: "You are successfully signed in."
|
43
|
+
oauth_callback:
|
44
|
+
success: "You are successfully signed in."
|
45
|
+
destroy:
|
46
|
+
success: "You are signed out"
|
47
|
+
sign_ups:
|
48
|
+
create:
|
49
|
+
success: "Welcome, you are successfully signed up."
|
50
|
+
oauth_callback:
|
51
|
+
success: "Welcome, you are successfully signed up."
|
52
|
+
invites:
|
53
|
+
create:
|
54
|
+
success: "Invite sent."
|
55
|
+
update:
|
56
|
+
success: "Welcome, you are successfully signed up."
|
57
|
+
oauth_callback:
|
58
|
+
success: "Welcome, you are successfully signed up."
|
59
|
+
reset_passwords:
|
60
|
+
create:
|
61
|
+
success: "Your password reset code is being sent."
|
62
|
+
update:
|
63
|
+
success: "Your password has been reset."
|
@@ -0,0 +1,62 @@
|
|
1
|
+
it:
|
2
|
+
activemodel:
|
3
|
+
attributes:
|
4
|
+
user/send_password_reset: &user_send_password_reset_attributes
|
5
|
+
email: "Email"
|
6
|
+
errors:
|
7
|
+
models:
|
8
|
+
user/sign_in:
|
9
|
+
attributes:
|
10
|
+
base:
|
11
|
+
unknown_user_identities_email: "Combinazione di email/password sconosciuta."
|
12
|
+
unknown_user_identities_o_auth: "Account sconosciuto, registrati per accedere."
|
13
|
+
helpers:
|
14
|
+
submit:
|
15
|
+
user_sign_in:
|
16
|
+
create: "Accedi"
|
17
|
+
user_sign_up:
|
18
|
+
create: "Registrati"
|
19
|
+
create_with_facebook: "Registrati via Facebook"
|
20
|
+
user_send_password_reset:
|
21
|
+
create: "Invia"
|
22
|
+
user_reset_password:
|
23
|
+
update: "Cambia Password"
|
24
|
+
user_send_sign_up_invite:
|
25
|
+
create: "Invia"
|
26
|
+
user_sign_up_with_invite:
|
27
|
+
update: "Registrati"
|
28
|
+
update_with_facebook: "Registrati via Facebook"
|
29
|
+
user_update_details:
|
30
|
+
update: "Aggiorna"
|
31
|
+
label:
|
32
|
+
user_send_password_reset:
|
33
|
+
<<: *user_send_password_reset_attributes
|
34
|
+
user:
|
35
|
+
details:
|
36
|
+
update:
|
37
|
+
success: "Your details were succesfully updated."
|
38
|
+
address_change_warning: "Per completare il cambio di indirizzo email clicca il link di comferma che è stato appena inviato a %{address}."
|
39
|
+
sign_ins:
|
40
|
+
create:
|
41
|
+
success: "Accesso effettuato."
|
42
|
+
oauth_callback:
|
43
|
+
success: "Accesso effettuato."
|
44
|
+
destroy:
|
45
|
+
success: "Disconnessione effettuata."
|
46
|
+
sign_ups:
|
47
|
+
create:
|
48
|
+
success: "Registrazione completata con successo."
|
49
|
+
oauth_callback:
|
50
|
+
success: "Registrazione completata con successo."
|
51
|
+
invites:
|
52
|
+
create:
|
53
|
+
success: "Invito inviato."
|
54
|
+
update:
|
55
|
+
success: "Registrazione completata con successo."
|
56
|
+
oauth_callback:
|
57
|
+
success: "Registrazione completata con successo."
|
58
|
+
reset_passwords:
|
59
|
+
create:
|
60
|
+
success: "Il tuo codice per il cambio password sarà inviato."
|
61
|
+
update:
|
62
|
+
success: "La tua password è stata cambiata."
|