2016-02-12 23:52:43 +08:00
|
|
|
<div class="panel panel-default panel-step-attachment">
|
|
|
|
<div class="panel-body">
|
2020-09-03 00:04:37 +08:00
|
|
|
<div class="row checklist-name-container">
|
|
|
|
<div class="col-xs-11">
|
|
|
|
<%= ff.smart_text_area :name,
|
|
|
|
label: t('protocols.steps.new.checklist_name'),
|
2020-11-03 05:19:33 +08:00
|
|
|
class: 'checklist-name',
|
2020-09-03 00:04:37 +08:00
|
|
|
autofocus: true,
|
|
|
|
single_line: true,
|
|
|
|
placeholder: t('protocols.steps.new.checklist_name_placeholder'),
|
|
|
|
data: { 'atwho-edit' => '' } %>
|
|
|
|
</div>
|
|
|
|
<div class="col-xs-1 remove-container">
|
|
|
|
<%= ff.remove_nested_fields_link do %>
|
|
|
|
<span class="fas fa-times"></span>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-07-21 19:11:15 +08:00
|
|
|
<%= ff.label t("protocols.steps.new.checklist_items") %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<ul>
|
|
|
|
<%= ff.nested_fields_for :checklist_items, ordered_checklist_items(ff.object) do |chkItems| %>
|
|
|
|
<li>
|
|
|
|
<div class="row">
|
2018-05-22 22:55:58 +08:00
|
|
|
<span class="fas fa-circle handle-move pull-left"></span>
|
2016-02-12 23:52:43 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-6">
|
2017-01-11 21:56:47 +08:00
|
|
|
<%= chkItems.smart_text_area :text,
|
|
|
|
autofocus: true,
|
|
|
|
placeholder: t('protocols.steps.new.checklist_item_placeholder'),
|
|
|
|
hide_label: true,
|
|
|
|
class: 'checklist-item-text form-control',
|
|
|
|
single_line: true,
|
|
|
|
data: { 'atwho-edit' => '' } %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<%= chkItems.hidden_field :position, class: "checklist-item-pos" %>
|
|
|
|
</div>
|
|
|
|
<div class="col-xs-1">
|
|
|
|
<div class="btn btn-link">
|
|
|
|
<%= chkItems.remove_nested_fields_link do %>
|
2018-07-09 19:13:44 +08:00
|
|
|
<span class="fas fa-times"></span>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
<%= ff.add_nested_fields_link :checklist_items do %>
|
2018-07-09 19:13:44 +08:00
|
|
|
<span class="fas fa-plus"></span>
|
2016-07-21 19:11:15 +08:00
|
|
|
<%= t("protocols.steps.new.checklist_add_item") %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|