diff --git a/app/views/recipes/_form.html.erb b/app/views/recipes/_form.html.erb index 72039e4..195afc9 100644 --- a/app/views/recipes/_form.html.erb +++ b/app/views/recipes/_form.html.erb @@ -1,42 +1,44 @@ -<%= form_with(model: recipe) do |form| %> - <% if recipe.errors.any? %> -
-

<%= pluralize(recipe.errors.count, "error") %> prohibited this recipe from being saved:

+
+ <%= form_with(model: recipe) do |form| %> + <% if recipe.errors.any? %> +
+

<%= pluralize(recipe.errors.count, "error") %> prohibited this recipe from being saved:

-
    - <% recipe.errors.each do |error| %> -
  • <%= error.full_message %>
  • - <% end %> -
-
- <% end %> + +
+ <% end %> -
- <%= form.label :name, style: "display: block" %> - <%= form.text_field :name %> -
+
+ <%= form.label :name, style: "display: block" %> + <%= form.text_field :name, class: "form-control" %> +
-
- <%= form.label :preparation_time, style: "display: block" %> - <%= form.number_field :preparation_time %> -
+
+ <%= form.label :preparation_time, style: "display: block" %> + <%= form.number_field :preparation_time, class: "form-control" %> +
-
- <%= form.label :cooking_time, style: "display: block" %> - <%= form.number_field :cooking_time %> -
+
+ <%= form.label :cooking_time, style: "display: block" %> + <%= form.number_field :cooking_time, class: "form-control" %> +
-
- <%= form.label :description, style: "display: block" %> - <%= form.text_area :description %> -
+
+ <%= form.label :description, style: "display: block" %> + <%= form.text_area :description, class: "form-control" %> +
-
- <%= form.label :public, style: "display: block" %> - <%= form.check_box :public %> -
+
+ <%= form.label :public, style: "display: block" %> + <%= form.check_box :public %> +
-
- <%= form.submit %> -
-<% end %> +
+ <%= form.submit class: 'btn btn-primary mb-3'%> +
+ <% end %> + diff --git a/app/views/recipes/new.html.erb b/app/views/recipes/new.html.erb index f125426..99232d9 100644 --- a/app/views/recipes/new.html.erb +++ b/app/views/recipes/new.html.erb @@ -5,5 +5,5 @@
- <%= link_to "Back to recipes", recipes_path %> + <%= link_to "Back to recipes", recipes_path, class: "btn btn-success btn-lg " %>