Sha256: ca951278db9bde14398d024dd7f6d2dbde30d25fc4a6325b4f42cd7281382402

Contents?: true

Size: 898 Bytes

Versions: 8

Compression:

Stored size: 898 Bytes

Contents

<%
stimulus_controller = 'fields--password'

form ||= current_fields_form
options ||= {}

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

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 %>
  <% 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

8 entries across 8 versions & 1 rubygems

Version Path
bullet_train-themes-1.6.38 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.6.37 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.6.36 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.6.35 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.6.34 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.6.33 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.6.32 app/views/themes/base/fields/_password_field.html.erb
bullet_train-themes-1.6.31 app/views/themes/base/fields/_password_field.html.erb