mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 21:24:54 +08:00
19 lines
No EOL
695 B
Text
19 lines
No EOL
695 B
Text
<%= bootstrap_form_tag remote: true, url: step_contents_project_reports_path(project, format: :json), method: :post, html: { id: "add-contents-form" } do |f| %>
|
|
<%= hidden_field_tag :id, step.id %>
|
|
|
|
<%= render partial: "reports/new/modal/step_contents_inner.html.erb", locals: { form: f, step: step } %>
|
|
<% end %>
|
|
|
|
<script type="javascript">
|
|
$(function() {
|
|
var form = $("#add-contents-form");
|
|
var checkAll = form.find(".step-check-all");
|
|
var others = form.find("input:checkbox:not(.step-check-all)");
|
|
checkAll.click(function() {
|
|
others.prop("checked", this.checked);
|
|
});
|
|
others.click(function() {
|
|
checkAll.prop("checked", false);
|
|
});
|
|
});
|
|
</script> |