Skip to content

Commit

Permalink
fix stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
fidoriel committed Oct 9, 2023
1 parent b7ac542 commit fc4986f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions evap/evaluation/templates/notebook.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ <h5 class="card-title m-0">
<button type="button" class="btn-close text-reset" data-bs-toggle="collapse" data-bs-target="#notebook" id="notebookButtonClose"></button>
</div>

<form method="POST" action="{% url 'evaluation:notebook_edit' %}" id="notebook-form" data-state="ready">
<div class="card-body notebook-card d-flex flex-column" data-state="ready">
<form method="POST" action="{% url 'evaluation:set_notes' %}" id="notebook-form" data-state="ready">
<div class="card-body notebook-card d-flex flex-column">
{% csrf_token %}
{{ notebook_form.notes }}
<div class="d-flex justify-content-center pt-3">
Expand Down
2 changes: 1 addition & 1 deletion evap/evaluation/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
path("contact", views.contact, name="contact"),
path("key/<int:key>", views.login_key_authentication, name="login_key_authentication"),
path("profile", views.profile_edit, name="profile_edit"),
path("set_notes", views.set_notes, name="notebook_edit"),
path("set_notes", views.set_notes, name="set_notes"),
path("set_startpage", views.set_startpage, name="set_startpage"),
]
5 changes: 2 additions & 3 deletions evap/static/ts/src/notebook.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
declare const bootstrap: typeof import("bootstrap");
import { unwrap, assert } from "./utils.js";
import { unwrap, assert, selectOrError } from "./utils.js";

const NOTEBOOK_LOCALSTORAGE_KEY = "evap_notebook_open";
const COLLAPSE_TOGGLE_BUTTON_ID = "notebookButton";
Expand All @@ -11,7 +10,7 @@ class NotebookFormLogic {
private readonly updateCooldown = 2000;

constructor(notebookFormId: string) {
this.notebook = unwrap(document.getElementById(notebookFormId)) as HTMLFormElement;
this.notebook = selectOrError(notebookFormId);
}

private onSubmit = (event: SubmitEvent): void => {
Expand Down

0 comments on commit fc4986f

Please sign in to comment.