Loos
10 years ago
6 changed files with 36 additions and 40 deletions
@ -1,12 +1,11 @@ |
|||||
.container |
= form_for @client, html: {class: 'form-horizontal'} do |f| |
||||
= form_for @client, html: {class: 'form-horizontal'} do |f| |
- if @client.errors.any? |
||||
- if @client.errors.any? |
#error_explanation |
||||
#error_explanation |
%h2= pluralize(@client.errors.count, "error") + " prohibited this bike from being saved:" |
||||
%h2= pluralize(@client.errors.count, "error") + " prohibited this bike from being saved:" |
%ul |
||||
%ul |
- @client.errors.full_messages.each do |msg| |
||||
- @client.errors.full_messages.each do |msg| |
%li= msg |
||||
%li= msg |
= render 'fields', f: f |
||||
= render 'fields', f: f |
.row |
||||
.row |
.actions.col-sm-offset-2 |
||||
.actions.col-sm-offset-2 |
= f.submit class: "btn btn-default" |
||||
= f.submit class: "btn btn-default" |
|
||||
|
@ -1,3 +1,4 @@ |
|||||
%h1 New Client |
.container |
||||
= render 'form' |
%h1 New Client |
||||
= link_to 'Back', clients_path |
= render 'form' |
||||
|
= link_to 'Back', clients_path |
||||
|
@ -1,10 +1,10 @@ |
|||||
<!DOCTYPE html> |
<!DOCTYPE html> |
||||
<html lang="en"> |
<html lang="en"> |
||||
<%= render "layouts/head" %> |
<%= render "layouts/head" %> |
||||
<%= render "layouts/navbar" %> |
<body> |
||||
<body> |
<%= render "layouts/navbar" %> |
||||
<p class="notice"><%= notice %></p> |
<p class="notice"><%= notice %></p> |
||||
<p class="alert"><%= alert %></p> |
<p class="alert"><%= alert %></p> |
||||
<%= yield %> |
<%= yield %> |
||||
</body> |
</body> |
||||
</html> |
</html> |
||||
|
Loading…
Reference in new issue