simple_form_password_with_hints 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '02782b6967dbc85699b9e268dd2b2fc43b0e600ba852971934d44218458bc363'
4
- data.tar.gz: 86bab6de753550c8ec05e4967a1d0bc2c3e9da03dd49fdd652ef5ce6508fd320
3
+ metadata.gz: a5aacdfa3a0f99c34974b176267e506ed86722dfff724a3264fcf6d3b9fb03e1
4
+ data.tar.gz: 6ed8bb691cf776ffa1765305e60c6fc333331438c3207d34efdb88f460ef1ef8
5
5
  SHA512:
6
- metadata.gz: 83162349e3012fb9993192604c25db015f516b5deb2b457dd269f78f2d2b80942609d74f23eedc5b8510bdb2be4de3d299d14a6c9c6e4aa0963643bafa8741e6
7
- data.tar.gz: 94ae725420153b2b7255d282e27bcf9387e75be83b699cc9e2a4396d2d194e2a2208d77fc206dd1de88e712df24f2a1bbeb41df66c85bda710142507ead67ee7
6
+ metadata.gz: 44349627a8469df0a56f72d722bb5d7c09b42d9627b5df48d1b484e4bf99a5b8fb89d9c5de33cb50711203bf4b4daa1c5e7f52700dd51bfa701681b8e7f6a422
7
+ data.tar.gz: 742cde6b786eb9257f6c884d643d0c1ad1047705bed383519e5a1ee31eeefd48a8eeff0e87757b4540852c83570b06dc4c3a514fa471a79f62a710809c09f922
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simple_form_password_with_hints (0.0.8)
4
+ simple_form_password_with_hints (0.0.9)
5
5
  rails
6
6
  simple_form
7
7
 
@@ -31,6 +31,8 @@
31
31
  background-size: 8px auto
32
32
  &-input-div
33
33
  position: relative
34
+ &-invalid ~ .invalid-feedback
35
+ display: block
34
36
  &-password-toggle
35
37
  cursor: pointer
36
38
  position: absolute
@@ -4,7 +4,9 @@ class PasswordWithHintsInput < ::SimpleForm::Inputs::Base
4
4
  def input(wrapper_options = nil)
5
5
  merged_input_options = merge_wrapper_options(input_html_options, wrapper_options)
6
6
  merged_input_options[:class] << " js-sfpwh-input js-sfpwh-hints-input "
7
- ( template.content_tag(:div, '', class: 'sfpwh-input-div') do
7
+ input_wrapper_class = 'sfpwh-input-div'
8
+ input_wrapper_class += ' sfpwh-input-div-invalid' if has_errors?
9
+ ( template.content_tag(:div, '', class: input_wrapper_class) do
8
10
  [
9
11
  @builder.password_field(attribute_name, merged_input_options),
10
12
  password_uncloaking_div
@@ -4,13 +4,15 @@ class PasswordWithSyncInput < ::SimpleForm::Inputs::Base
4
4
  def input(wrapper_options = nil)
5
5
  merged_input_options = merge_wrapper_options(input_html_options, wrapper_options)
6
6
  merged_input_options[:class] << " js-sfpwh-input js-sfpwh-sync-input "
7
+ input_wrapper_class = 'sfpwh-input-div'
8
+ input_wrapper_class += ' sfpwh-input-div-invalid' if has_errors?
7
9
  if options[:compare_with_field]
8
10
  if merged_input_options[:data].nil?
9
11
  merged_input_options[:data] = { link_to: linked_field_name }
10
12
  else
11
13
  merged_input_options[:data][:link_to] = linked_field_name
12
14
  end
13
- ( template.content_tag(:div, '', class: 'sfpwh-input-div') do
15
+ ( template.content_tag(:div, '', class: input_wrapper_class) do
14
16
  [
15
17
  @builder.password_field(attribute_name, merged_input_options) +
16
18
  password_uncloaking_div
@@ -1,3 +1,3 @@
1
1
  module SimpleFormPasswordWithHints
2
- VERSION = "0.0.8".freeze
2
+ VERSION = "0.0.9".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_form_password_with_hints
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre-andré Boissinot