Sha256: 6a99892e7d3b1c24833bbc38976f89f1a014ddc1ae486737357980359cd0be7e

Contents?: true

Size: 978 Bytes

Versions: 37

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

37 entries across 37 versions & 1 rubygems

Version Path
bullet_train-themes-1.15.0 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.14.2 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.14.1 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.14.0 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.13.0 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.12.3 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.12.2 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.12.1 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.12.0 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.11.0 app/views/themes/base/fields/_password_field.html.erb
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