decidim-friendly_signup 0.4.1 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,6 +14,8 @@ module Decidim
14
14
  def valid?
15
15
  @valid ||= begin
16
16
  form.validate
17
+ # Check if the password isn't empty, if it is, add it to form errors
18
+ form.errors.add(:password, :password_blank) if attribute == "password" && form.password.blank?
17
19
  # we don't validate the form but the attribute alone
18
20
  errors.blank?
19
21
  end
@@ -60,7 +62,8 @@ module Decidim
60
62
  :password_not_allowed,
61
63
  :password_too_common,
62
64
  :password_too_long,
63
- :password_too_short].find { |key| msg == I18n.t(key, scope: "password_validator") }
65
+ :password_too_short,
66
+ :password_blank].find { |key| msg == I18n.t(key, scope: "password_validator") }
64
67
  else
65
68
  [:blank, :invalid, :taken].find { |key| msg == I18n.t(key, scope: "errors.messages") }
66
69
  end
@@ -5,6 +5,6 @@ module Decidim
5
5
  module FriendlySignup
6
6
  DECIDIM_VERSION = "0.26.2"
7
7
  COMPAT_DECIDIM_VERSION = "~> 0.26.0"
8
- VERSION = "0.4.1"
8
+ VERSION = "0.4.3"
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-friendly_signup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Vergés
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-27 00:00:00.000000000 Z
11
+ date: 2023-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-core
@@ -50,6 +50,7 @@ files:
50
50
  - Rakefile
51
51
  - app/controllers/concerns/decidim/friendly_signup/needs_header_snippets.rb
52
52
  - app/controllers/concerns/decidim/friendly_signup/registrations_redirect.rb
53
+ - app/controllers/decidim/devise/registrations_controller.rb
53
54
  - app/controllers/decidim/friendly_signup/application_controller.rb
54
55
  - app/controllers/decidim/friendly_signup/confirmation_codes_controller.rb
55
56
  - app/controllers/decidim/friendly_signup/validator_controller.rb
@@ -77,7 +78,13 @@ files:
77
78
  - app/views/decidim/friendly_signup/shared/_password_fields.html.erb
78
79
  - config/assets.rb
79
80
  - config/i18n-tasks.yml
81
+ - config/locales/ca.yml
82
+ - config/locales/de.yml
80
83
  - config/locales/en.yml
84
+ - config/locales/es.yml
85
+ - config/locales/eu.yml
86
+ - config/locales/fr.yml
87
+ - lib/decidim/form_builder.rb
81
88
  - lib/decidim/friendly_signup.rb
82
89
  - lib/decidim/friendly_signup/engine.rb
83
90
  - lib/decidim/friendly_signup/user_attribute_validator.rb