2021-01-28 04:53:39 +08:00
|
|
|
<div class="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">
|
2023-07-03 17:11:51 +08:00
|
|
|
<%= form_with model: @experiment, url: clone_experiment_path(@experiment, :view_mode=>view_mode), method: :post do |f| %>
|
2016-08-11 22:59:56 +08:00
|
|
|
<div class="modal-header">
|
2023-08-17 19:55:17 +08:00
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="sn-icon sn-icon-close"></i></button>
|
2016-08-11 22:59:56 +08:00
|
|
|
<h4 class="modal-title" id="clone-experiment-modal-label"><%= t("experiments.clone.modal_title", experiment: @experiment.name ) %></h5>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
2016-09-07 14:26:36 +08:00
|
|
|
<%= 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,
|
2020-11-20 21:53:50 +08:00
|
|
|
@experiment.project.id ),
|
2023-08-10 15:11:07 +08:00
|
|
|
{}, {"data-role" => "clear"} %>
|
2016-08-11 22:59:56 +08:00
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2020-01-07 23:13:34 +08:00
|
|
|
<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" %>
|
2016-08-11 22:59:56 +08:00
|
|
|
</div>
|
2021-01-28 04:53:39 +08:00
|
|
|
<% end %>
|
2016-08-11 22:59:56 +08:00
|
|
|
</div>
|
2021-01-28 04:53:39 +08:00
|
|
|
</div>
|
2016-08-11 22:59:56 +08:00
|
|
|
</div>
|