I'm trying to use simple_form
in a Bootstrap 3 modal in Ruby 2.5 on Rails (v5.1) with haml
in the view.
I want to be able to put the submit button in the modal footer, but this breaks the haml
conventions. Any workarounds?
Modal
#addDataModelModal.modal.fade{"aria-hidden" => "true", "aria-labelledby" => "exampleModalLabel", role: "dialog", tabindex: "-1"}
.modal-dialog{role: "document"}
.modal-content
.modal-header
%h5#addDataModelModalLabel.modal-title Choose a Data Model
%button.close{"aria-label" => "Close", "data-dismiss" => "modal", type: "button"}
%span{"aria-hidden" => "true"} ×
.modal-body
.text-center
= simple_form_for @project, :url => add_project_datastores_project_path, :method => 'post' do |f|
= f.input :project_datastores, collection: @datastores, label_method: :name, value_method: :datastore_sid, prompt: "Select a Data Model"
= f.submit 'Add Data Model', :class => 'pull-right btn btn-primary'
.modal-footer
%button.btn.btn-secondary{"data-dismiss" => "modal", type: "button"} Close
.text-center