scinote-web/app/views/experiments/_new_modal.html.erb
2023-08-09 15:47:33 +02:00

23 lines
1.1 KiB
Text

<div class="modal" id="new-experiment-modal" tabindex="-1" role="dialog" aria-labelledby="new-experiment-modal-label">
<div class="modal-dialog" role="document">
<div class="modal-content">
<%= form_with model: [@project, @experiment],
method: :post,
data: { remote: true },
builder: SciFormHelper::SciFormBuilder,
html: { class: 'experiment-action-form' } do |f| %>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="<%= t('general.close') %>"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="new-eperiment-modal-label"><%= t("experiments.new.modal_title") %></h4>
</div>
<div class="modal-body">
<%= render partial: 'form', locals: { form: f } %>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%= t('general.cancel') %></button>
<%= f.submit t('experiments.new.modal_create'), class: 'btn btn-primary' %>
</div>
<% end %>
</div>
</div>
</div>