Browse Source

Merge pull request #121 from lexintegritastech/enhance-form-for-doctrines

Fix issue in `doctrines#form`
pull/114/head
Alexander D. Bondoc 4 years ago committed by GitHub
parent
commit
28d4a20016
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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