Skip to content

Commit d2862ad

Browse files
authored
Merge pull request #785 from lcreid/533-use-namespace-in-demo-app
Add Namespaces to Forms in Demo App
2 parents 0677c79 + ee78330 commit d2862ad

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

demo/app/views/bootstrap/form.html.erb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<h3>Horizontal Form</h3>
22

33
<%= form_with_source do %>
4-
<%= bootstrap_form_with model: @user, layout: :horizontal, local: true do |form| %>
4+
<%= bootstrap_form_with model: @user, layout: :horizontal, local: true, namespace: "horizontal" do |form| %>
55
<%= form.email_field :email, placeholder: "Enter Email", label: "Email address", help: "We'll never share your email with anyone else" %>
66
<%= form.password_field :password, placeholder: "Password" %>
77
<%= form.select :status, [['activated', 1], ['blocked', 2]], prompt: "Please Select" %>
@@ -20,7 +20,7 @@
2020
<h3>With Validation Error</h3>
2121

2222
<%= form_with_source do %>
23-
<%= bootstrap_form_for @user_with_error, layout: :horizontal do |form| %>
23+
<%= bootstrap_form_for @user_with_error, layout: :horizontal, namespace: "validation_error" do |form| %>
2424
<%= form.alert_message "This is an alert" %>
2525
<%= form.error_summary %>
2626
<%= form.email_field :email, placeholder: "Enter Email", label: "Email address", help: "We'll never share your email with anyone else" %>
@@ -32,7 +32,7 @@
3232
<h3>Inline Form</h3>
3333

3434
<%= form_with_source do %>
35-
<%= bootstrap_form_for @user, layout: :inline do |form| %>
35+
<%= bootstrap_form_for @user, layout: :inline, namespace: "inline_form" do |form| %>
3636
<%= form.email_field :email, placeholder: "Enter Email", label: "Email address", help: "We'll never share your email with anyone else" %>
3737
<%= form.password_field :password, placeholder: "Password" %>
3838
<%= form.checkbox :terms, label: "Agree to Terms" %>
@@ -44,7 +44,7 @@
4444
<h3>Simple Action Text Example</h3>
4545

4646
<%= form_with_source do %>
47-
<%= bootstrap_form_for @user, url: "/" do |form| %>
47+
<%= bootstrap_form_for @user, url: "/", namespace: "action_text" do |form| %>
4848
<%= form.email_field :email, placeholder: "Enter Email", label: "Email address", help: "We'll never share your email with anyone else" %>
4949
<%= form.password_field :password, placeholder: "Password" %>
5050
<%= form.checkbox :terms, label: "Agree to Terms" %>
@@ -57,7 +57,7 @@
5757
<h3>Floating Labels</h3>
5858

5959
<%= form_with_source do %>
60-
<%= bootstrap_form_for @user do |form| %>
60+
<%= bootstrap_form_for @user, namespace: "floating_label" do |form| %>
6161
<%= form.email_field :email, placeholder: "Enter Email", label: "Email address", help: "We'll never share your email with anyone else", floating: true %>
6262
<%= form.password_field :password, placeholder: "Password", floating: true %>
6363
<%= form.text_field :misc, floating: true %>

0 commit comments

Comments
 (0)