.row
= simple_form_for(@yacht_model, html: {multipart: true, role: 'form'}) do |f|
.row
.col-md-12
- if @yacht_model.errors.any?
#error_explanation
%h3.text-center
%mark
= "#{pluralize(@yacht_model.errors.count, 'error')} prohibited this Yacht Model from being saved:"
%ul
- @yacht_model.errors.full_messages.each do |msg|
%li.alert.alert-danger.fade.in{role: 'alert'}
%button.close{'data-dismiss' => 'alert', type: 'button'}
%span{'aria-hidden' => 'true'} ×
%span.sr-only Close
%strong= msg.to_s.humanize
%hr
.row
.col-md-6.col-xs-12
= f.input :yacht_brand_id, collection: @brands, input_html: { class: 'form-control' }, label_method: :brand , value_method: :id, include_blank: 'Select Brand: ', selected: @yacht_model.yacht_brand_id
.col-md-6.col-xs-12
= f.input :model, label: 'Model', input_html: { class: 'form-control', placeholder: 'Model' }
.row
%hr
.actions.col-md-12.col-xs-12
= f.submit 'Save', class: 'btn btn-lg btn-success btn-block pull-right'