Anonymous avatar Anonymous committed b682549

contrib/lpolzer: minor changes to new form widget.

Comments (0)

Files changed (1)


   (setf (widget-children widget) fields))
 (defmethod (setf widget-children) :after (fields (widget form-widget) &optional type)
-  (declare (ignore type))
+  (declare (ignore fields type))
   (update-field-widgets-parent widget))
 (defmethod setup-fields ((widget form-widget))
     ;; fields
     (let ((fields (widget-children widget)))
       (with-html-form (:POST (lambda (&rest args)
-                               (format t "submit with args: ~S~%" args)
+                               #+leslie(format t "submit with args: ~S~%" args)
                                (let ((field-results (mapcar (lambda (field)
                                                                 (update-form-field-value-from-request widget field)))
-                                 (format t "field results: ~S~%" field-results)
+                                 #+leslie(format t "field results: ~S~%" field-results)
                                  (when (every #'car field-results) ; every form field successfully updated?
                                    ;; now call form validators, if any
                                    (let ((form-results (mapcar (lambda (validator)
                                                                    (funcall validator widget)))
                                                                  (validators-of widget)))))
-                                     (format t "form results: ~S~%" form-results)
+                                     #+leslie(format t "form results: ~S~%" form-results)
                                      (if (or (null form-results)
                                              (every #'car form-results))
                                        (mapcar (lambda (success-item)
       ((and raw-value (not empty)) ; present, parse it
        (multiple-value-bind (parsed-successfully-p parsed-value-or-error-message)
            (funcall (parser-of field) raw-value)
-         (format t "parser returned ~S~%" parsed-value-or-error-message)
+         #+leslie(format t "parser returned ~S~%" parsed-value-or-error-message)
          (if parsed-successfully-p
            (let ((validation-errors (mapcar #'cadr
                                             (remove-if #'identity ; remove passed validator results
                                                                    (funcall v parsed-value-or-error-message)))
                                                                (ensure-list (validators-of field)))
                                                        :key #'car))))
-             (format t "validation errors: ~S~%" validation-errors)
+             #+leslie(format t "validation errors: ~S~%" validation-errors)
              (if validation-errors
                (values nil (setf (error-message-of field) (first validation-errors)))
                (values t (setf (parsed-value-of field) parsed-value-or-error-message
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.