iugusdk 1.0.0.alpha.7 → 1.0.0.alpha.9
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/stylesheets/iugu-sdk.css.sass +81 -1
- data/app/controllers/iugu/omniauth_callbacks_controller.rb +4 -3
- data/app/controllers/iugu/profile_controller.rb +12 -7
- data/app/controllers/iugu/registrations_controller.rb +9 -1
- data/app/models/user.rb +2 -9
- data/app/views/iugu/confirmations/new.html.haml +28 -9
- data/app/views/iugu/mailer/reset_password_instructions.html.haml +8 -1
- data/app/views/iugu/passwords/edit.html.haml +31 -12
- data/app/views/iugu/passwords/new.html.haml +30 -9
- data/app/views/iugu/registrations/new.html.haml +55 -23
- data/app/views/iugu/sessions/new.html.haml +55 -54
- data/app/views/iugu/settings/profile.html.haml +77 -90
- data/app/views/iugu/shared/{_links.haml → _links.html.haml} +0 -0
- data/app/views/iugu/shared/_notices.html.haml +29 -0
- data/app/views/iugu/shared/_responsive-dialog.header.html.haml +1 -1
- data/app/views/iugu/shared/{_signup_fields.haml → _signup_fields.html.haml} +0 -0
- data/app/views/layouts/iugu-sdk.html.haml +2 -2
- data/app/views/layouts/settings.html.haml +54 -40
- data/config/locales/iugu.en.yml +11 -2
- data/config/locales/iugu.pt-BR.yml +24 -5
- data/config/routes.rb +12 -11
- data/lib/iugusdk.rb +3 -0
- data/lib/iugusdk/valid_tenancy_urls.rb +6 -1
- data/lib/iugusdk/version.rb +1 -1
- data/spec/dummy/app/assets/images/application_logo.png +0 -0
- data/spec/dummy/app/views/iugu/shared/_responsive-dialog.header.html.haml +3 -0
- data/spec/dummy/config/application.rb +1 -0
- data/spec/dummy/config/initializers/iugusdk.rb +5 -0
- data/spec/dummy/log/development.log +131281 -0
- data/spec/dummy/tmp/cache/assets/C48/D00/sprockets%2F4a51b39094a347e3e325005c7847551c +0 -0
- data/spec/dummy/tmp/cache/assets/C49/B90/sprockets%2F652bf28a17cb315610471da568733258 +0 -0
- data/spec/dummy/tmp/cache/assets/C4F/3A0/sprockets%2F41918e8d7b402652a5649e4b7134d620 +0 -0
- data/spec/dummy/tmp/cache/assets/C7A/F30/sprockets%2F70249181577b261a3ea8851b530f1e7c +0 -0
- data/spec/dummy/tmp/cache/assets/CA4/160/sprockets%2F4037c72091060092649afe46072ebbec +0 -0
- data/spec/dummy/tmp/cache/assets/CBB/AA0/sprockets%2F34b613f862555697eb944a2ff6ac3526 +0 -0
- data/spec/dummy/tmp/cache/assets/CC7/EB0/sprockets%2F079d3b368c9e843b78c90079f26d628b +0 -0
- data/spec/dummy/tmp/cache/assets/CCA/850/sprockets%2F1d05d32f046ec7313b0d3619a232d73f +0 -0
- data/spec/dummy/tmp/cache/assets/CDB/E30/sprockets%2F918458a88fec2cd01991c003b2318ab7 +0 -0
- data/spec/dummy/tmp/cache/assets/D08/ED0/sprockets%2Fcb1aee736d3b287a872298b7741b012b +0 -0
- data/spec/dummy/tmp/cache/assets/D18/2F0/sprockets%2Fcc2e1640b5601b34eb61a4c333a2e31b +0 -0
- data/spec/dummy/tmp/cache/assets/D1A/B70/sprockets%2F47ae92dd9d034b32098b19bf8f2475a9 +0 -0
- data/spec/dummy/tmp/cache/assets/D28/030/sprockets%2Fd94bb03644697ba99f0c548d9f732cf9 +0 -0
- data/spec/dummy/tmp/cache/assets/D3F/230/sprockets%2F6d936d416e28b6be0a95c54c24814aec +0 -0
- data/spec/dummy/tmp/cache/assets/D42/230/sprockets%2F6a13b3e67cd9823c208f14e1f62d9cd7 +0 -0
- data/spec/dummy/tmp/cache/assets/D43/040/sprockets%2Fab2e8a0c571ba239149f4655c6f7b4f9 +0 -0
- data/spec/dummy/tmp/cache/assets/D48/370/sprockets%2Fb654fd37f9f63ec202a3636e29b94ef0 +0 -0
- data/spec/dummy/tmp/cache/assets/D4A/1A0/sprockets%2Fb746360a8b3ce79c57e74a9c15309fdd +0 -0
- data/spec/dummy/tmp/cache/assets/D5C/200/sprockets%2Fcd323e6f7545cee0b3ba1e84d7520b00 +0 -0
- data/spec/dummy/tmp/cache/assets/D5E/290/sprockets%2F22fb620af04e31f058ba64ec4386bb8a +0 -0
- data/spec/dummy/tmp/cache/assets/D74/0A0/sprockets%2Fc1392b79af6b88250b634479cbf2bcfc +0 -0
- data/spec/dummy/tmp/cache/assets/D74/FC0/sprockets%2F07eb31b6b73c399fd094d9a8ac4f71c4 +0 -0
- data/spec/dummy/tmp/cache/assets/D7A/E00/sprockets%2F89e01e4f72e5c8df4c900fb6de91526b +0 -0
- data/spec/dummy/tmp/cache/assets/D9E/630/sprockets%2Fde1cf65951bf648974f4daed2bc0a502 +0 -0
- data/spec/dummy/tmp/cache/assets/DC9/630/sprockets%2Fefd128f13bd29fcd332e47b5504ea6cd +0 -0
- data/spec/dummy/tmp/cache/assets/DCA/FD0/sprockets%2F0b59a77adfc61bb863e708ba262ce6bd +0 -0
- data/spec/dummy/tmp/cache/assets/DCB/CA0/sprockets%2Fa9f4cff164613cb2ac9ad5af37d9c170 +0 -0
- data/spec/dummy/tmp/cache/assets/DD7/9B0/sprockets%2F9f2c0826bd7ae7b745ae8da6db48c26e +0 -0
- data/spec/dummy/tmp/cache/assets/DE5/390/sprockets%2F24a1cda6893cebd53997dc859def67cd +0 -0
- data/spec/dummy/tmp/cache/assets/DE5/630/sprockets%2Fb24cac157fa80acfb2e2d75b43b4b33b +0 -0
- data/spec/dummy/tmp/cache/assets/E05/2E0/sprockets%2F92ecbfa92baf6e394ce6c39d731b7cd2 +0 -0
- data/spec/dummy/tmp/cache/assets/E34/EB0/sprockets%2Ff676084fc3c5cd3de4f3f3cc6aa6c3ff +0 -0
- data/spec/dummy/tmp/cache/assets/E4E/EC0/sprockets%2Fddc0184d315cdeb94ba7cc7c7b4ab2db +0 -0
- data/spec/dummy/tmp/cache/assets/E68/4E0/sprockets%2F42e7f6fefaea5bdb264ca6e4db89e62f +0 -0
- metadata +129 -97
- data/app/views/iugu-old/account_settings.html.haml +0 -17
- data/app/views/iugu-old/login.html.haml +0 -28
- data/app/views/iugu-old/mails/confirmation_instructions.html.erb +0 -5
- data/app/views/iugu-old/mails/reset_password_instructions.html.erb +0 -8
- data/app/views/iugu-old/mails/unlock_instructions.html.erb +0 -7
- data/app/views/iugu-old/profile_settings.html.haml +0 -76
- data/app/views/iugu-old/signup.html.haml +0 -36
- data/app/views/iugu/registrations/edit.html.haml +0 -18
@@ -1,7 +1,12 @@
|
|
1
1
|
@import "iugu-ux/core"
|
2
|
+
@import "compass/utilities/general/clearfix"
|
2
3
|
|
3
4
|
.iugu-ui
|
4
|
-
.
|
5
|
+
.default-sdk-wrapper
|
6
|
+
padding: 0px
|
7
|
+
.default-optional
|
8
|
+
margin-bottom: 15px
|
9
|
+
.default-sdk-dialog
|
5
10
|
width: 320px
|
6
11
|
height: 480px
|
7
12
|
margin-left: -160px
|
@@ -47,6 +52,26 @@
|
|
47
52
|
.twitter,.twitter:visited
|
48
53
|
background: #39B6DE
|
49
54
|
color: #fff
|
55
|
+
.button:last-child
|
56
|
+
margin-bottom: 0px !important
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
&.settings .wrapper .container,.default-sdk-dialog
|
61
|
+
|
62
|
+
.social
|
63
|
+
table
|
64
|
+
tr td
|
65
|
+
width: 50%
|
66
|
+
table tr td:first-child span
|
67
|
+
display: block
|
68
|
+
font-size: 13px
|
69
|
+
text-transform: uppercase
|
70
|
+
color: #666
|
71
|
+
font-weight: bold
|
72
|
+
padding: 15px
|
73
|
+
padding-left: 10px
|
74
|
+
padding-bottom: 0px
|
50
75
|
|
51
76
|
input[type="text"],input.string,input.password,.button
|
52
77
|
width: 100%
|
@@ -72,3 +97,58 @@
|
|
72
97
|
|
73
98
|
.full-width
|
74
99
|
width: 100%
|
100
|
+
|
101
|
+
@include for-small-screens()
|
102
|
+
.iugu-ui
|
103
|
+
.default-sdk-wrapper
|
104
|
+
padding: 10px
|
105
|
+
.default-optional
|
106
|
+
margin-bottom: 0px
|
107
|
+
.default-sdk-dialog
|
108
|
+
width: 100%
|
109
|
+
height: auto
|
110
|
+
position: relative
|
111
|
+
margin-left: auto
|
112
|
+
margin-right: auto
|
113
|
+
margin-top: auto
|
114
|
+
left: auto
|
115
|
+
top: auto
|
116
|
+
|
117
|
+
|
118
|
+
.iugu-ui.settings
|
119
|
+
.wrapper
|
120
|
+
max-width: 600px
|
121
|
+
margin-left: auto
|
122
|
+
margin-right: auto
|
123
|
+
padding: 10px
|
124
|
+
|
125
|
+
.header
|
126
|
+
@include clearfix
|
127
|
+
.button
|
128
|
+
float: right
|
129
|
+
|
130
|
+
.tabbed .nav li
|
131
|
+
width: 50%
|
132
|
+
|
133
|
+
.tabbed .container
|
134
|
+
overflow: hidden
|
135
|
+
|
136
|
+
@include for-small-screens(390px)
|
137
|
+
.iugu-ui,.iugu-ui.settings
|
138
|
+
.wrapper
|
139
|
+
.header
|
140
|
+
width: 100%
|
141
|
+
margin-top: 50px
|
142
|
+
position: relative
|
143
|
+
overflow: visible
|
144
|
+
@include box-mode
|
145
|
+
a
|
146
|
+
text-align: center
|
147
|
+
display: block
|
148
|
+
img
|
149
|
+
margin-bottom: $baseLineSpacing
|
150
|
+
.button
|
151
|
+
width: 100%
|
152
|
+
float: none
|
153
|
+
position: absolute
|
154
|
+
top: -50px
|
@@ -6,15 +6,16 @@ class Iugu::OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
|
6
6
|
if current_user
|
7
7
|
raise ActionController::RoutingError.new("Not found") unless IuguSDK::enable_social_linking
|
8
8
|
current_user.find_or_create_social(env["omniauth.auth"])
|
9
|
-
|
9
|
+
flash[:group] = :social
|
10
|
+
redirect_to((env["omniauth.origin"] || root_path ) + "#social", notice: I18n.t("iugu.social_linked"))
|
10
11
|
else
|
11
12
|
raise ActionController::RoutingError.new("Not found") unless IuguSDK::enable_social_login
|
12
13
|
if user = User.find_or_create_by_social(env["omniauth.auth"])
|
13
14
|
sign_in user
|
14
15
|
select_account
|
15
|
-
redirect_to after_sign_in_path_for( user )
|
16
|
+
redirect_to after_sign_in_path_for( user ) + "#social"
|
16
17
|
else
|
17
|
-
redirect_to (env["omniauth.origin"] || root_path ), :notice => I18n.t('errors.messages.email_already_in_use')
|
18
|
+
redirect_to (env["omniauth.origin"] || root_path ) + "#social", :notice => I18n.t('errors.messages.email_already_in_use')
|
18
19
|
end
|
19
20
|
end
|
20
21
|
else
|
@@ -9,8 +9,8 @@ class Iugu::ProfileController < Iugu::SettingsController
|
|
9
9
|
def update
|
10
10
|
@user = current_user
|
11
11
|
@social_accounts = @user.social_accounts
|
12
|
-
if
|
13
|
-
flash.now[:group] = :
|
12
|
+
if params[:form_group] == "password"
|
13
|
+
flash.now[:group] = :password
|
14
14
|
else
|
15
15
|
flash.now[:group] = :profile_update
|
16
16
|
end
|
@@ -18,8 +18,6 @@ class Iugu::ProfileController < Iugu::SettingsController
|
|
18
18
|
I18n.locale = @user.locale
|
19
19
|
sign_in @user, :bypass => true if !params[:user][:password].blank?
|
20
20
|
flash.now[:notice] = I18n.t('iugu.notices.user_update')
|
21
|
-
else
|
22
|
-
flash.now[:error] = @user.errors.full_messages
|
23
21
|
end
|
24
22
|
render 'iugu/settings/profile'
|
25
23
|
end
|
@@ -27,15 +25,19 @@ class Iugu::ProfileController < Iugu::SettingsController
|
|
27
25
|
def destroy
|
28
26
|
if IuguSDK::enable_user_cancel
|
29
27
|
(user = current_user).destroy
|
30
|
-
|
28
|
+
flash[:group] = :remove_user
|
29
|
+
flash[:error] = I18n.t("iugu.user_destruction_in") + user.destruction_job.run_at.to_s
|
30
|
+
redirect_to(profile_settings_path)
|
31
31
|
else
|
32
32
|
raise ActionController::RoutingError.new("Not found")
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
36
|
def cancel_destruction
|
37
|
+
flash[:group] = :remove_user
|
38
|
+
flash[:error] = I18n.t("iugu.user_destruction_undone")
|
37
39
|
current_user.cancel_destruction
|
38
|
-
redirect_to(profile_settings_path
|
40
|
+
redirect_to(profile_settings_path)
|
39
41
|
end
|
40
42
|
|
41
43
|
def destroy_social
|
@@ -48,7 +50,8 @@ class Iugu::ProfileController < Iugu::SettingsController
|
|
48
50
|
rescue
|
49
51
|
notice = I18n.t("errors.messages.not_found")
|
50
52
|
end
|
51
|
-
flash[:
|
53
|
+
flash[:notice] = notice
|
54
|
+
flash[:group] = :social
|
52
55
|
redirect_to profile_settings_path
|
53
56
|
end
|
54
57
|
|
@@ -70,6 +73,8 @@ class Iugu::ProfileController < Iugu::SettingsController
|
|
70
73
|
def renew_token
|
71
74
|
if IuguSDK::enable_user_api
|
72
75
|
current_user.token.refresh
|
76
|
+
flash[:group] = :api
|
77
|
+
flash[:notice] = I18n.t("iugu.notices.new_token_generated")
|
73
78
|
redirect_to profile_settings_path
|
74
79
|
else
|
75
80
|
raise ActionController::RoutingError.new("Not found")
|
@@ -1,5 +1,6 @@
|
|
1
1
|
class Iugu::RegistrationsController < Devise::RegistrationsController
|
2
2
|
after_filter :select_account, :only => [:create,:update]
|
3
|
+
before_filter :verify_private_api_secret, :only => [:create]
|
3
4
|
|
4
5
|
layout IuguSDK.alternative_layout
|
5
6
|
|
@@ -36,5 +37,12 @@ class Iugu::RegistrationsController < Devise::RegistrationsController
|
|
36
37
|
def after_sign_up_path_for(resource)
|
37
38
|
IuguSDK::app_main_url
|
38
39
|
end
|
39
|
-
end
|
40
40
|
|
41
|
+
private
|
42
|
+
|
43
|
+
def verify_private_api_secret
|
44
|
+
if request.format.json?
|
45
|
+
render :json=>{:errors=>"Unauthorized"}, :status=>401 unless params[:private_api_secret] == IuguSDK::private_api_secret
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
data/app/models/user.rb
CHANGED
@@ -9,7 +9,7 @@ class User < ActiveRecord::Base
|
|
9
9
|
has_many :account_users, :dependent => :destroy
|
10
10
|
has_many :accounts, :through => :account_users
|
11
11
|
has_many :social_accounts, :dependent => :destroy
|
12
|
-
has_one :token, :as => :tokenable, :class_name => "ApiToken"
|
12
|
+
has_one :token, :as => :tokenable, :class_name => "ApiToken", :dependent => :destroy
|
13
13
|
|
14
14
|
alias :_destroy :destroy
|
15
15
|
def destroy
|
@@ -144,19 +144,12 @@ class User < ActiveRecord::Base
|
|
144
144
|
end
|
145
145
|
end
|
146
146
|
|
147
|
-
def access_token
|
148
|
-
"none"
|
149
|
-
end
|
150
|
-
|
151
|
-
# def to_json
|
152
|
-
# super(:only => [:email,:id])
|
153
|
-
# end
|
154
147
|
def as_json(options = nil)
|
155
148
|
{
|
156
149
|
id: id,
|
157
150
|
email: email,
|
158
151
|
locale: locale,
|
159
|
-
access_token:
|
152
|
+
access_token: token.token
|
160
153
|
}
|
161
154
|
end
|
162
155
|
|
@@ -1,9 +1,28 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
1
|
+
- content_for :title do I18n.t("iugu.resend_confirmation_instructions") end
|
2
|
+
|
3
|
+
.default-sdk-wrapper
|
4
|
+
.default-sdk-dialog
|
5
|
+
.container.no-padding
|
6
|
+
|
7
|
+
= render :partial => "iugu/shared/responsive-dialog.header"
|
8
|
+
|
9
|
+
.padding
|
10
|
+
|
11
|
+
= simple_form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post, :class => "no-bottom-margin" }) do |f|
|
12
|
+
|
13
|
+
|
14
|
+
- if resource.errors.size > 0
|
15
|
+
.notice.notice-red
|
16
|
+
= f.error_notification
|
17
|
+
|
18
|
+
%h6.no-bottom-margin
|
19
|
+
= I18n.t("iugu.resend_confirmation_instructions")
|
20
|
+
|
21
|
+
|
22
|
+
.inputs
|
23
|
+
= f.input :email, :required => false, :label => false, :placeholder => "E-mail"
|
24
|
+
.actions
|
25
|
+
= f.button :submit, I18n.t("iugu.resend_confirmation_instructions_action"), :class => "full-width default"
|
26
|
+
|
27
|
+
%a.button.no-bottom-margin{ :href => new_session_path(resource_name) }
|
28
|
+
= I18n.t("iugu.back")
|
@@ -3,4 +3,11 @@
|
|
3
3
|
#{@resource.email}!
|
4
4
|
%p
|
5
5
|
= I18n.t("iugu.confirm_email_through_link_below")
|
6
|
-
|
6
|
+
|
7
|
+
%p= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token)
|
8
|
+
|
9
|
+
%p
|
10
|
+
If you didn't request this, please ignore this email.
|
11
|
+
|
12
|
+
%p
|
13
|
+
Your password won't change until you access the link above and create a new one.
|
@@ -1,12 +1,31 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
- content_for :title do I18n.t("iugu.change_your_password") end
|
2
|
+
|
3
|
+
.default-sdk-wrapper
|
4
|
+
.default-sdk-dialog
|
5
|
+
.container.no-padding
|
6
|
+
|
7
|
+
= render :partial => "iugu/shared/responsive-dialog.header"
|
8
|
+
|
9
|
+
.padding
|
10
|
+
|
11
|
+
= simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put, :class => "no-bottom-margin" }) do |f|
|
12
|
+
|
13
|
+
|
14
|
+
- if resource.errors.size > 0
|
15
|
+
.notice.notice-red
|
16
|
+
= f.error_notification
|
17
|
+
|
18
|
+
%h6.no-bottom-margin
|
19
|
+
= I18n.t("iugu.change_your_password")
|
20
|
+
|
21
|
+
.inputs
|
22
|
+
= f.input :password, :label => false, :placeholder => I18n.t("iugu.new_password"), :required => true
|
23
|
+
= f.input :password_confirmation, :label => false, :placeholder => I18n.t("iugu.confirm_your_new_password"), :required => true
|
24
|
+
|
25
|
+
= f.input :reset_password_token, :as => :hidden
|
26
|
+
|
27
|
+
.actions
|
28
|
+
= f.button :submit, I18n.t("iugu.change_my_password"), :class => "full-width default"
|
29
|
+
%a.button.no-bottom-margin{ :href => new_session_path(resource_name) }
|
30
|
+
= I18n.t("iugu.back")
|
31
|
+
|
@@ -1,9 +1,30 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
1
|
+
- content_for :title do I18n.t("iugu.forgot_your_password?") end
|
2
|
+
|
3
|
+
.default-sdk-wrapper
|
4
|
+
.default-sdk-dialog
|
5
|
+
.container.no-padding
|
6
|
+
|
7
|
+
= render :partial => "iugu/shared/responsive-dialog.header"
|
8
|
+
|
9
|
+
.padding
|
10
|
+
|
11
|
+
= simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post, :class => "no-bottom-margin" }) do |f|
|
12
|
+
|
13
|
+
|
14
|
+
- if resource.errors.size > 0
|
15
|
+
.notice.notice-red
|
16
|
+
= f.error_notification
|
17
|
+
|
18
|
+
%h6.no-bottom-margin
|
19
|
+
= I18n.t("iugu.forgot_your_password?")
|
20
|
+
|
21
|
+
|
22
|
+
.inputs
|
23
|
+
= f.input :email, :required => false, :label => false, :placeholder => "E-mail"
|
24
|
+
.actions
|
25
|
+
= f.button :submit, I18n.t("iugu.send_me_reset_password_instructions"), :class => "full-width default"
|
26
|
+
|
27
|
+
%a.button.no-bottom-margin{ :href => new_session_path(resource_name) }
|
28
|
+
= I18n.t("iugu.back")
|
29
|
+
|
30
|
+
|
@@ -1,23 +1,55 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
1
|
+
- content_for :title do I18n.t("iugu.sign_up") end
|
2
|
+
|
3
|
+
.default-sdk-wrapper
|
4
|
+
.default-sdk-dialog
|
5
|
+
.container.no-padding
|
6
|
+
|
7
|
+
= render :partial => "iugu/shared/responsive-dialog.header"
|
8
|
+
|
9
|
+
.padding
|
10
|
+
|
11
|
+
= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :class => "no-bottom-margin" } ) do |f|
|
12
|
+
|
13
|
+
|
14
|
+
- if resource.errors.size > 0
|
15
|
+
.notice.notice-red
|
16
|
+
= f.error_notification
|
17
|
+
|
18
|
+
%h6.no-bottom-margin
|
19
|
+
= I18n.t("iugu.sign_up")
|
20
|
+
|
21
|
+
- if IuguSDK::enable_guest_user
|
22
|
+
.element-spacing
|
23
|
+
.text
|
24
|
+
= I18n.t "iugu.skip_and_save_later"
|
25
|
+
%a{ :href => try_first_path, :"data-method" => :post }
|
26
|
+
= I18n.t "iugu.skip_and_save_later_action"
|
27
|
+
|
28
|
+
.inputs
|
29
|
+
= f.input :email, :required => false, :autofocus => true, :placeholder => "E-Mail", :label => false
|
30
|
+
= f.input :password, :required => false, :placeholder => I18n.t("activerecord.attributes.password"), :label => false
|
31
|
+
= f.input :password_confirmation, :required => false, :placeholder => I18n.t("activerecord.attributes.password_confirmation"), :label => false
|
32
|
+
- if IuguSDK::enable_alias_on_signup
|
33
|
+
= f.input :account_alias, :label => 'Alias'
|
34
|
+
= render :partial => "iugu/shared/signup_fields", :locals => {:f => f}
|
35
|
+
= f.hidden_field :locale, :value => @matched_locale_from_browser
|
36
|
+
- if IuguSDK::enable_subscription_features
|
37
|
+
= f.hidden_field :plan_id, value: @plan_id
|
38
|
+
= f.hidden_field :price_id, value: @price_id
|
39
|
+
.actions
|
40
|
+
= f.button :submit, I18n.t("iugu.sign_up"), :class => "full-width default no-bottom-margin"
|
41
|
+
|
42
|
+
- if IuguSDK::enable_social_login
|
43
|
+
.social
|
44
|
+
.text
|
45
|
+
= I18n.t("iugu.or_sign_up_with")
|
46
|
+
- if devise_mapping.omniauthable?
|
47
|
+
- resource_class.omniauth_providers.each do |provider|
|
48
|
+
= link_to "#{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider), :class => "full-width button no-bottom-margin default #{provider.to_s}"
|
49
|
+
|
50
|
+
|
51
|
+
.container.default-optional
|
52
|
+
%a.button.no-bottom-margin{ :href => new_session_path(resource_name) }
|
53
|
+
= I18n.t "iugu.already_have_account"
|
54
|
+
%span.more-text
|
55
|
+
= I18n.t "iugu.already_have_account_action"
|
@@ -1,56 +1,57 @@
|
|
1
|
-
- content_for :title do I18n.t("iugu.sign_in")
|
2
|
-
|
3
|
-
.
|
4
|
-
.
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
- flash
|
15
|
-
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
.
|
38
|
-
|
39
|
-
|
40
|
-
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
- if
|
46
|
-
.
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
1
|
+
- content_for :title do I18n.t("iugu.sign_in") end
|
2
|
+
|
3
|
+
.default-sdk-wrapper
|
4
|
+
.default-sdk-dialog
|
5
|
+
.container.no-padding
|
6
|
+
|
7
|
+
= render :partial => "iugu/shared/responsive-dialog.header"
|
8
|
+
|
9
|
+
|
10
|
+
.padding
|
11
|
+
%h6.no-bottom-margin
|
12
|
+
= I18n.t("iugu.sign_in")
|
13
|
+
|
14
|
+
- unless flash[:social] || flash[:group]
|
15
|
+
- flash.each do |name, msg|
|
16
|
+
- if msg.is_a? String
|
17
|
+
.notice.notice-red{ :class => name }
|
18
|
+
%button.close{ :'data-dismiss' => "notice" }
|
19
|
+
×
|
20
|
+
%h4.notice-heading
|
21
|
+
= msg
|
22
|
+
|
23
|
+
- if IuguSDK::enable_signup_form
|
24
|
+
= simple_form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => "no-bottom-margin" }) do |f|
|
25
|
+
.inputs
|
26
|
+
= f.input :email, :required => false, :autofocus => true, :placeholder => "E-Mail", :label => false
|
27
|
+
|
28
|
+
= f.input :password, :required => false, :placeholder => I18n.t("activerecord.attributes.password"), :label => false
|
29
|
+
// = f.input :remember_me, :as => :boolean, :label => I18n.t("activerecord.attributes.remember_me") if devise_mapping.rememberable?
|
30
|
+
.actions
|
31
|
+
= f.button :submit, I18n.t("iugu.sign_in"), :class => "full-width default"
|
32
|
+
|
33
|
+
- if devise_mapping.recoverable? && controller_name != 'passwords'
|
34
|
+
= link_to I18n.t("iugu.forgot_your_password?"), new_password_path(resource_name), :class => "button full-width no-bottom-margin"
|
35
|
+
|
36
|
+
- if IuguSDK::enable_social_login
|
37
|
+
.social
|
38
|
+
.text
|
39
|
+
= I18n.t("iugu.or_sign_up_with")
|
40
|
+
- if devise_mapping.omniauthable?
|
41
|
+
- resource_class.omniauth_providers.each do |provider|
|
42
|
+
= link_to "#{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider), :class => "full-width button no-bottom-margin default #{provider.to_s}"
|
43
|
+
|
44
|
+
|
45
|
+
- if IuguSDK::enable_user_confirmation
|
46
|
+
- if devise_mapping.confirmable? && controller_name != 'confirmations'
|
47
|
+
.text
|
48
|
+
= link_to I18n.t("iugu.did_not_receive_confirmation_instructions?"), new_confirmation_path(resource_name)
|
49
|
+
|
50
|
+
- if IuguSDK::enable_signup_form
|
51
|
+
.container.default-optional
|
52
|
+
%a.button.no-bottom-margin{ :href => new_registration_path(resource_name) }
|
53
|
+
= I18n.t("iugu.no_account")
|
54
|
+
%span.more-text
|
55
|
+
= I18n.t("iugu.no_account_action")
|
55
56
|
|
56
57
|
|