Louis Knapp
7 years ago
7 changed files with 25 additions and 4 deletions
@ -0,0 +1,11 @@ |
|||
= form_for @client, html: {class: 'form-horizontal'} do |f| |
|||
- if @client.errors.any? |
|||
#error_explanation |
|||
%h2= pluralize(@client.errors.count, "error") + " prohibited this client from being saved:" |
|||
%ul |
|||
- @client.errors.full_messages.each do |msg| |
|||
%li= msg |
|||
= render 'fields', f: f |
|||
.row |
|||
.actions.col-sm-offset-2 |
|||
= f.submit "Save And Add Another", class: "btn btn-default" |
@ -1,5 +1,5 @@ |
|||
.container |
|||
%h1 Edit client |
|||
= render 'receipt_button' if @client.bike_id |
|||
= render 'form' |
|||
= render 'edit_form' |
|||
= link_to 'Back', clients_path |
|||
|
@ -1,4 +1,4 @@ |
|||
.container |
|||
%h1 New Client |
|||
= render 'form' |
|||
= render 'new_form' |
|||
= link_to 'Back', clients_path |
|||
|
Loading…
Reference in new issue