Sha256: 6a99892e7d3b1c24833bbc38976f89f1a014ddc1ae486737357980359cd0be7e

Contents?: true

Size: 978 Bytes

Versions: 27

Compression:

Stored size: 978 Bytes

Contents

<%
stimulus_controller = 'fields--password'

form ||= current_fields_form
options ||= {}

strong_passwords = Object.const_defined?("BulletTrain::Configuration") ? BulletTrain::Configuration.strong_passwords : true

# TODO: This should be `bt_options`
if options[:show_strength_indicator] && strong_passwords
  options = options.merge({ data: {"action": "keyup->fields--password#estimateStrength" }})
end

other_options ||= {}
%>

<div data-controller="<%= stimulus_controller %>">
  <%= render 'shared/fields/field', form: form, method: method, helper: :password_field, options: options, other_options: other_options %>

  <%# TODO: This should be `bt_options` %>
  <% if options[:show_strength_indicator] %>
    <% # TODO This is the wrong place to define this kind of style, but I couldn't make this work in the `:help` content buffer. %>
    <div data-<%= stimulus_controller %>-target="strengthIndicator" class="hidden mt-1.5 text-xs text-red-500"></div>
  <% end %>
</div>

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
bullet_train-themes-1.10.0 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.9.0 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.8.5 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.8.4 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.8.3 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.8.2 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.8.1 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.8.0 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.7.23 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.7.22 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.7.21 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.7.20 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.7.19 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.7.18 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.7.17 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.7.16 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.7.15 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.7.14 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.7.13 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.7.12 app/views/themes/base/fields/_password_field.html.erb