Fix UI issues.
- Set correct language. - Fix naming of ui widgets.
This commit is contained in:
parent
50e99cef38
commit
895694b2d7
1 changed files with 11 additions and 11 deletions
|
@ -49,26 +49,27 @@ the current request URI and expects certain functions and variables to be
|
|||
available in its environment for full functionality."
|
||||
`(spinneret:with-html
|
||||
(:main :id "main-content"
|
||||
:class "container my-5"
|
||||
:class "container-fluid my-5"
|
||||
(:p "Please fill out the following forms and press the submit button.")
|
||||
;; action is defined as hunchentoot:request-uri* function
|
||||
(:form :action (hunchentoot:request-uri*)
|
||||
(:form :id "questionnaire-form"
|
||||
:action (hunchentoot:request-uri*)
|
||||
:method "post"
|
||||
:class (spacing :property "m" :side "y" :size 5)
|
||||
,@body
|
||||
(btn-primary (:type "submit")
|
||||
(t9n "submit"))))))
|
||||
(t9n "submit" (questionnaire-lang q)))))))
|
||||
|
||||
(defun view (q)
|
||||
(declare (type questionnaire q))
|
||||
(let ((lang "en"))
|
||||
(with-page (:title "Questionnaire Form")
|
||||
(with-body-header "fluid" "Questionnaire Form" lang)
|
||||
(with-form (load-form q)))))
|
||||
(with-page (:title "Questionnaire Form" :lang (questionnaire-lang q))
|
||||
(with-body-header "fluid" "Questionnaire Form" (questionnaire-lang q))
|
||||
(with-form (load-form q))))
|
||||
|
||||
(defun view-submit ()
|
||||
(defun view-submit (q)
|
||||
(declare (type questionnaire q))
|
||||
(with-page (:title "Confirmation")
|
||||
(body-header "fluid" "Confirmation")
|
||||
(with-body-header "fluid" "Confirmation" (questionnaire-lang q))
|
||||
(:main :id "main-content"
|
||||
:class "container"
|
||||
(:div :class "alert alert-info"
|
||||
|
@ -97,7 +98,6 @@ available in its environment for full functionality."
|
|||
|
||||
(defun process-questionnaire-get (q)
|
||||
(declare (type questionnaire q))
|
||||
(setf *html-lang* (questionnaire-lang q))
|
||||
(view q))
|
||||
|
||||
(defun questionnaire-data-structure (post-params q)
|
||||
|
@ -117,7 +117,7 @@ available in its environment for full functionality."
|
|||
(questionnaire-id (ml-survey/app:generate-uuid))
|
||||
(questionnaire-data-file (ml-survey/fileops:ensure-data-file-exist survey-id questionnaire-id)))
|
||||
(questionnaire-write-to-file questionnaire-data-file post-params q)
|
||||
(view-submit)))
|
||||
(view-submit q)))
|
||||
|
||||
(defun extract-uri-param (param)
|
||||
(ml-survey/app:extract-from (hunchentoot:request-uri*) param))
|
||||
|
|
Loading…
Add table
Reference in a new issue