Skip to content

Commit 4958627

Browse files
committed
Fix stimulus.js error in setup wizard admin creation step
1 parent 05a4fb2 commit 4958627

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

app/views/better_together/wizard_step_definitions/host_setup/admin_creation.html.erb

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@
5050
<div class="mb-3">
5151
<%= f.label :email, 'Email Address', class: 'form-label' %>
5252
<%= f.email_field :email, autofocus: true, required: true,
53-
class: "form-control#{' is-invalid' if @form.errors[:email].any?}",
54-
data: { action: 'blur->better_together--form-validation#validate' } %>
53+
class: "form-control#{' is-invalid' if @form.errors[:email].any?}" %>
5554
<small class="form-text text-muted">This will be your primary login and how the platform contacts you.</small>
5655
<% if @form.errors[:email].any? %>
5756
<div class="invalid-feedback d-block"><%= @form.errors[:email].join(', ') %></div>
@@ -63,7 +62,7 @@
6362
<%= f.label :password, 'Password', class: 'form-label' %>
6463
<%= f.password_field :password, required: true, minlength: min_password_length,
6564
class: "form-control#{' is-invalid' if @form.errors[:password].any?}",
66-
data: { action: 'blur->better_together--form-validation#validate', 'better_together--form-validation-min-length-value': min_password_length } %>
65+
data: { 'better_together--form-validation-min-length-value': min_password_length } %>
6766
<small class="form-text text-muted">
6867
Your password must be at least <%= min_password_length %> characters long. Use a mix of upper and lowercase letters, numbers, and symbols for extra security.
6968
</small>
@@ -77,7 +76,7 @@
7776
<%= f.label :password_confirmation, 'Confirm Password', class: 'form-label' %>
7877
<%= f.password_field :password_confirmation, required: true, minlength: min_password_length,
7978
class: "form-control#{' is-invalid' if @form.errors[:password_confirmation].any?}",
80-
data: { action: 'blur->better_together--form-validation#validate', 'better_together--form-validation-min-length-value': min_password_length } %>
79+
data: { 'better_together--form-validation-min-length-value': min_password_length } %>
8180
<% if @form.errors[:password_confirmation].any? %>
8281
<div class="invalid-feedback d-block"><%= @form.errors[:password_confirmation].join(', ') %></div>
8382
<% end %>
@@ -94,8 +93,7 @@
9493
<div class="mb-3">
9594
<%= person_form.label :name, 'Full Name', class: 'form-label' %>
9695
<%= person_form.text_field :name, required: true,
97-
class: "form-control#{' is-invalid' if @form.errors[:name].any?}",
98-
data: { action: 'blur->better_together--form-validation#validate' } %>
96+
class: "form-control#{' is-invalid' if @form.errors[:name].any?}" %>
9997
<small class="form-text text-muted">
10098
Use your real name or the name you want your community to recognize you by.
10199
</small>
@@ -107,11 +105,10 @@
107105
<!-- Username/Identifier Field -->
108106
<div class="mb-3">
109107
<%= person_form.label :identifier, 'Username', class: 'form-label' %>
110-
<%= person_form.text_field :identifier, required: true,
111-
class: "form-control#{' is-invalid' if @form.errors[:identifier].any?}",
112-
data: { action: 'blur->better_together--form-validation#validate' } %>
108+
<%= person_form.text_field :identifier, required: true, min: 3, max: 20,
109+
class: "form-control#{' is-invalid' if @form.errors[:identifier].any?}" %>
113110
<small class="form-text text-muted">
114-
Your unique handle (no spaces). This will appear in your profile URL and mentions.
111+
Your unique handle (no spaces). This will appear in your profile URL and mentions. Minimum 3 characters
115112
</small>
116113
<% if @form.errors[:identifier].any? %>
117114
<div class="invalid-feedback d-block"><%= @form.errors[:identifier].join(', ') %></div>
@@ -122,8 +119,7 @@
122119
<div class="mb-3">
123120
<%= person_form.label :description, 'Short Bio', class: 'form-label' %>
124121
<%= person_form.text_area :description, required: true, rows: 3,
125-
class: "form-control#{' is-invalid' if @form.errors[:description].any?}",
126-
data: { action: 'blur->better_together--form-validation#validate' } %>
122+
class: "form-control#{' is-invalid' if @form.errors[:description].any?}" %>
127123
<small class="form-text text-muted">
128124
Introduce yourself to the community. Why are you starting this platform? What’s your vision?
129125
</small>

0 commit comments

Comments
 (0)