2016-02-12 23:52:43 +08:00
|
|
|
<div class="panel panel-default panel-step-attachment">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<span class="glyphicon glyphicon-list"></span>
|
2016-07-21 19:11:15 +08:00
|
|
|
<%= t("protocols.steps.new.checklist_panel_title") %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<div class="pull-right">
|
|
|
|
<%= ff.remove_nested_fields_link do %>
|
|
|
|
<span class="glyphicon glyphicon-remove"></span>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
2016-07-14 00:47:06 +08:00
|
|
|
<%= ff.text_field :name, label: t("protocols.steps.new.checklist_name"), class: "checklist_name", autofocus: true, placeholder: t("protocols.steps.new.checklist_name_placeholder") %>
|
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">
|
|
|
|
<span class="glyphicon glyphicon-chevron-right handle-move pull-left"></span>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-6">
|
2016-07-21 19:11:15 +08:00
|
|
|
<%= chkItems.text_field :text, autofocus: true, placeholder: t("protocols.steps.new.checklist_item_placeholder"), hide_label: true, class: "checklist-item-text form-control" %>
|
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 %>
|
|
|
|
<span class="glyphicon glyphicon-remove"></span>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
<%= ff.add_nested_fields_link :checklist_items do %>
|
|
|
|
<span class="glyphicon glyphicon-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>
|