Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="no-js">
- <h1>Без JS!! </h1>
- <%= form_for @product do |f| %>
- <% if @product.errors.any? %>
- <div id="error_explanation">
- <h2><%= pluralize(@product.errors.count, "error") %> prohibited this product from being saved:</h2>
- <ul>
- <% @product.errors.full_messages.each do |message| %>
- <li><%= message %></li>
- <% end %>
- </ul>
- </div>
- <% end %>
- <div class="field">
- <%= f.label :name %><br>
- <%= f.text_field :name %>
- </div>
- <div class="field">
- <%= f.label :description %><br>
- <%= f.text_area :description %>
- </div>
- <div class="actions">
- <%= f.submit %>
- </div>
- <% end %>
- </div>
- <div id="yes-js" >
- <h1>С JS!! </h1>
- <%= form_for(@product) do |f| %>
- <% if @product.errors.any? %>
- <div id="error_explanation">
- <h2><%= pluralize(@product.errors.count, "error") %> prohibited this product from being saved:</h2>
- <ul>
- <% @product.errors.full_messages.each do |message| %>
- <li><%= message %></li>
- <% end %>
- </ul>
- </div>
- <% end %>
- <div class="field">
- <%= f.label :name %><br>
- <%= f.text_field :name %>
- </div>
- <div class="field">
- <%= f.label :description %><br>
- <%= f.text_area :description %>
- </div>
- <div class="actions">
- <%= f.submit %>
- </div>
- <% end %>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement