Be able to load a form from disk
This commit is contained in:
parent
80fbaccf68
commit
16ad1e6c77
1 changed files with 9 additions and 0 deletions
|
@ -1,5 +1,14 @@
|
||||||
(in-package :ml-survey/views)
|
(in-package :ml-survey/views)
|
||||||
|
|
||||||
|
(defun load-form (lang form-file-name)
|
||||||
|
"Load a Lisp file containing form definitions."
|
||||||
|
(let* ((relative-path (concatenate 'string "src/views/forms/" lang "/"))
|
||||||
|
(full-path (merge-pathnames relative-path *default-pathname-defaults*))
|
||||||
|
(form-path (merge-pathnames form-file-name full-path)))
|
||||||
|
(unless (probe-file form-path)
|
||||||
|
(error "Form file ~A does not exist." form-path))
|
||||||
|
(load form-path)))
|
||||||
|
|
||||||
(defun sus-form-en (survey-id)
|
(defun sus-form-en (survey-id)
|
||||||
(with-page (:title "SUS Form")
|
(with-page (:title "SUS Form")
|
||||||
(navbar-en)
|
(navbar-en)
|
||||||
|
|
Loading…
Add table
Reference in a new issue