card-mod-account 0.11.1 → 0.11.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/set/self/signin.rb +13 -20
  3. metadata +16 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8c86e418e23551b4e344d47073a5cea56789cab7a091d0ece4d6b7488bfe4fe
4
- data.tar.gz: 1a18cfb82d88f0bcca51ec77b99237bbe4c5527db7bb527fbcaeff0d87338863
3
+ metadata.gz: b83f29edd97e19f1ffa148f41b57c67f5009f421cf3266c6bf811a56231a1984
4
+ data.tar.gz: 0baee78e9eef9589305298abc04aca8f8714dfbfe8781e21b83f752fd9f74cae
5
5
  SHA512:
6
- metadata.gz: c7103bb8aea180221f488ed16dfce14862f7d4d7228110177a9d9b0423144220c383c1c4ec7b1651f07f997b5440cf49c5378cc377df8497ba6240ca38c44548
7
- data.tar.gz: 04bc2d61a8f17c24f2d6d1aa06eb7aa978afd78a70593007e27a25bfeb247e869f43f4bccd46d203ebbe93cfa08f2377864bdb7bb2c04e285e2a30a08bd32d9c
6
+ metadata.gz: f1782318b47b6e0d66830c9420e9116b3fd6bade7d3bc1366df2c8072dc87a0ce89048303afa0828ed4912f6a79676621d512ffde2f3e9e3231e9902e8144a9c
7
+ data.tar.gz: 5e2efc3bdec486d61f0ac557adc0cd9bc8ca5eb6db0f905e49a8f98d0dad61a8c68f10bd58ee7888a3a80dc235872b327794bbf0ac6ff69c6ff8eb8a83a24a4d
data/set/self/signin.rb CHANGED
@@ -47,10 +47,6 @@ def recaptcha_on?
47
47
  false
48
48
  end
49
49
 
50
- def i18n_signin key
51
- I18n.t key, scope: "mod.card-mod-account.set.self.signin"
52
- end
53
-
54
50
  def authenticate_or_abort email, pword
55
51
  abort_unless email, :email_missing
56
52
  abort_unless pword, :password_missing
@@ -69,19 +65,19 @@ def failed_signin email
69
65
  end
70
66
 
71
67
  def abort_unless value, error_key
72
- abort :failure, i18n_signin(error_key) unless value
68
+ abort :failure, tr(error_key) unless value
73
69
  end
74
70
 
75
71
  def signin_error_message account
76
72
  case
77
- when account.nil? then i18n_signin(:error_unknown_email)
78
- when !account.active? then i18n_signin(:error_not_active)
79
- else i18n_signin(:error_wrong_password)
73
+ when account.nil? then tr :error_unknown_email
74
+ when !account.active? then tr :error_not_active
75
+ else tr :error_wrong_password
80
76
  end
81
77
  end
82
78
 
83
79
  def error_on field, error_key
84
- errors.add field, i18n_signin(error_key)
80
+ errors.add field, tr(error_key)
85
81
  end
86
82
 
87
83
  def account_for email
@@ -135,7 +131,7 @@ format :html do
135
131
 
136
132
  # FIXME: need a generic solution for this
137
133
  view :title do
138
- voo.title ||= I18n.t(:sign_in_title, scope: "mod.card-mod-account.set.self.signin")
134
+ voo.title ||= tr :sign_in_title
139
135
  super()
140
136
  end
141
137
 
@@ -150,7 +146,7 @@ format :html do
150
146
 
151
147
  view :reset_password_success do
152
148
  # 'Check your email for a link to reset your password'
153
- frame { I18n.t(:check_email, scope: "mod.card-mod-account.set.self.signin") }
149
+ frame { tr :check_email }
154
150
  end
155
151
 
156
152
  view :signin_buttons do
@@ -166,14 +162,14 @@ format :html do
166
162
  end
167
163
 
168
164
  def reset_password_voo
169
- voo.title ||= card.i18n_signin(:forgot_password)
165
+ voo.title ||= tr :forgot_password
170
166
  voo.edit_structure = [signin_field(:email)]
171
167
  voo.hide :help
172
168
  end
173
169
 
174
170
  view :edit_buttons do
175
- text = I18n.t :reset_my_password, scope: "mod.card-mod-account.set.self.signin"
176
- button_tag text, situation: "primary", class: "_close-modal-on-success"
171
+ button_tag tr(:reset_my_password),
172
+ situation: "primary", class: "_close-modal-on-success"
177
173
  end
178
174
 
179
175
  def signin_success
@@ -181,18 +177,15 @@ format :html do
181
177
  end
182
178
 
183
179
  def signin_button
184
- text = I18n.t :sign_in, scope: "mod.card-mod-account.set.self.signin"
185
- button_tag text, situation: "primary"
180
+ button_tag tr(:sign_in), situation: "primary"
186
181
  end
187
182
 
188
183
  def signup_link
189
- text = I18n.t :or_sign_up, scope: "mod.card-mod-account.set.self.signin"
190
- subformat(Card[:account_links]).render! :sign_up, title: text
184
+ subformat(Card[:account_links]).render! :sign_up, title: tr(:or_sign_up)
191
185
  end
192
186
 
193
187
  def reset_password_link
194
- text = I18n.t :reset_password, scope: "mod.card-mod-account.set.self.signin"
195
- link = link_to_view :edit, text, path: { slot: { hide: :bridge_link } }
188
+ link = link_to_view :edit, tr(:reset_password), path: { slot: { hide: :bridge_link } }
196
189
  # FIXME: inline styling
197
190
  raw("<div style='float:right'>#{link}</div>")
198
191
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-account
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-03-02 00:00:00.000000000 Z
13
+ date: 2021-03-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: card
@@ -18,56 +18,56 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.101.1
21
+ version: 1.101.2
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 1.101.1
28
+ version: 1.101.2
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: card-mod-email
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.11.1
35
+ version: 0.11.2
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.11.1
42
+ version: 0.11.2
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: card-mod-permissions
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.11.1
49
+ version: 0.11.2
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - '='
55
55
  - !ruby/object:Gem::Version
56
- version: 0.11.1
56
+ version: 0.11.2
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: card-mod-list
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.11.1
63
+ version: 0.11.2
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - '='
69
69
  - !ruby/object:Gem::Version
70
- version: 0.11.1
70
+ version: 0.11.2
71
71
  description: ''
72
72
  email:
73
73
  - info@decko.org
@@ -97,10 +97,15 @@ files:
97
97
  - set/type/user.rb
98
98
  - set/type/user/setup_help.haml
99
99
  - set/type_plus_right/user/email.rb
100
- homepage: http://decko.org
100
+ homepage: https://decko.org
101
101
  licenses:
102
102
  - GPL-3.0
103
103
  metadata:
104
+ source_code_uri: https://github.com/decko-commons/decko
105
+ homepage_uri: https://decko.org
106
+ bug_tracker_uri: https://github.com/decko-commons/decko/issues
107
+ wiki_uri: https://decko.org
108
+ documentation_url: http://docs.decko.org/
104
109
  card-mod: account
105
110
  post_install_message:
106
111
  rdoc_options: []