@@ -10,62 +10,64 @@
<%= label_tag :annotation_marks %>
- <%= hidden_field_tag :document_id, document.id %>
- <%= hidden_field_tag :document_ids, citing_document_ids %>
- <%= select_tag "annomark_ids[]", options_from_collection_for_select(Annomark.all, :id, :name, annotation.annomark_ids), class: "form-control default-selectize pe-0 ps-0", multiple: true, prompt: "Please select" %>
+ <%= hidden_field_tag :annotation_id, nil, data: { target: "annotations.annotation_id" } %>
+ <%= hidden_field_tag :doctrine_id, nil, data: { target: "annotations.doctrine_id" } %>
+ <%= hidden_field_tag :document_id, nil, data: { target: "annotations.document_id" } %>
+ <%= hidden_field_tag :document_ids, nil, data: { target: "annotations.document_ids" } %>
+ <%= select_tag "annomark_ids[]", options_from_collection_for_select(Annomark.all.order(name: :asc), :id, :name),
+ class: "form-control default-selectize ps-0", multiple: true, prompt: "Please select",
+ data: { target: "annotations.annomark_ids" } %>
<%= label_tag :document_title %>
- <%= text_area_tag :document_title, [document_title, citing_documents_reference_numbers].reject(&:blank?).join(" "), class: "form-control selected-citing-docs" %>
+ <%= text_area_tag :document_title, nil, class: "form-control selected-citing-docs" %>
-
-
- <%= text_field_tag :q, nil, class: "form-control", placeholder: "Search GR Number", data: { target: "document.input" } %>
-
-
- Search
-
+
+ <%= text_field_tag :q, nil, class: "form-control", placeholder: "Search GR Number", data: { target: "annotations.q" } %>
+
+ Search
+
+
-
-
-
- Reference No.
- Title
- Date
-
-
+
+
+
+ Reference No.
+ Title
+ Date
+
+
-
-
-
+
+
- <%= label_tag :annotation_marks %>
- <%= text_field_tag :phil_rep, annotation.phil_rep, class: "form-control" %>
+ <%= label_tag :phil_rep %>
+ <%= text_field_tag :phil_rep, nil, class: "form-control", data: { target: "annotations.phil_rep" } %>
<%= label_tag :editor_notes %>
- <%= rich_text_area_tag :editor_notes, annotation.editor_notes, placeholder: "Editor Notes" %>
+ <%= rich_text_area_tag :editor_notes, nil, placeholder: "Editor Notes", data: { target: "annotations.editor_notes" } %>