diff --git a/evap/evaluation/templates/notebook.html b/evap/evaluation/templates/notebook.html index e0d86e115f..c0ba140bf2 100644 --- a/evap/evaluation/templates/notebook.html +++ b/evap/evaluation/templates/notebook.html @@ -8,8 +8,8 @@
-
-
+ +
{% csrf_token %} {{ notebook_form.notes }}
diff --git a/evap/evaluation/urls.py b/evap/evaluation/urls.py index 17d7e42285..62c003210f 100644 --- a/evap/evaluation/urls.py +++ b/evap/evaluation/urls.py @@ -12,6 +12,6 @@ path("contact", views.contact, name="contact"), path("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"), ] diff --git a/evap/static/ts/src/notebook.ts b/evap/static/ts/src/notebook.ts index 52997cb0fa..7cfa2ceb5f 100644 --- a/evap/static/ts/src/notebook.ts +++ b/evap/static/ts/src/notebook.ts @@ -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"; @@ -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 => {