mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-16 14:17:00 +08:00
962de09599
* Add bootstrap-select to experiment clone modal and fix overflowing text [SCI-8559]
29 lines
1.6 KiB
Text
29 lines
1.6 KiB
Text
<div class="modal clone-experiment-modal" id="clone-experiment-modal-<%= @experiment.id %>" tabindex="-1" role="dialog" aria-labelledby="clone-experiment-modal-label">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<%= form_with model: @experiment, url: clone_experiment_path(@experiment, :view_mode=>view_mode), method: :post do |f| %>
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
<h4 class="modal-title" id="clone-experiment-modal-label"><%= t("experiments.clone.modal_title", experiment: @experiment.name ) %></h5>
|
|
</div>
|
|
<div class="modal-body">
|
|
<%= f.select :project_id,
|
|
options_for_select(
|
|
@projects.collect do |p|
|
|
if p == @experiment.project
|
|
[ "#{p.name} #{t('experiments.clone.current_project')}", p.id ]
|
|
else
|
|
[ p.name, p.id ]
|
|
end
|
|
end,
|
|
@experiment.project.id ),
|
|
{}, { class: "form-control selectpicker", "data-role" => "clear" } %>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%=t "general.cancel" %></button>
|
|
<%= f.submit t("experiments.clone.modal_submit"), class: "btn btn-primary" %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|