Browse Source

Fix issue in `doctrines#form`

pull/121/head
alexdbondoc17 4 years ago
parent
commit
06de925d8b
  1. 2
      app/javascript/controllers/doctrines_controller.js
  2. 2
      app/views/shared/_annotation_form.html.erb

2
app/javascript/controllers/doctrines_controller.js

@ -53,8 +53,6 @@ export default class extends ApplicationController {
var params = { subject_ids: $form.find("select[name='subject_ids[]']").val(), headnote: $this.headnoteTarget.value,
content: $this.contentTarget.value }
console.log(params)
if (!params.subject_ids.length) {
$form.find("#subjects-blank-message").show()
}

2
app/views/shared/_annotation_form.html.erb

@ -59,6 +59,6 @@
</div>
<div class="card-footer d-flex justify-content-end mt-2">
<button type="button" class="btn btn-success me-2" data-action="click->doctrines#saveAnnotation">Save</button>
<button type="button" class="btn btn-danger ms-2" href="<%= document_doctrine(jurisprudence.id, doctrine_id) %>">Back</button>
<button type="button" class="btn btn-danger ms-2" href="<%= document_doctrine_path(jurisprudence.id, doctrine_id) %>">Back</button>
</div>
</div>

Loading…
Cancel
Save