demarches-normaliennes/app/views/password_complexity/show.turbo_stream.haml

7 lines
328 B
Text

= turbo_stream.update 'password_complexity' do
= render PasswordComplexityComponent.new(length: @length, min_length: @min_length, score: @score, min_complexity: @min_complexity)
- if @score < @min_complexity || @length < @min_length
= turbo_stream.disable 'submit-password'
- else
= turbo_stream.enable 'submit-password'