extension to input-presentation [patch included]

Issue #7 new
Greg Pfeil
created an issue

Here's a small change to input-presentation. I added a new initarg :obscuredp, which causes the input type to be “password” instead of “text”.



diff -r 37bd0ab5f550 src/views/formview/formview.lisp --- a/src/views/formview/formview.lisp Sun Feb 27 21:40:10 2011 +0100 +++ b/src/views/formview/formview.lisp Sun Feb 27 22:10:19 2011 -0500 @@ -206,7 +206,11 @@ :documentation "Maximum length of an input.") (size :accessor input-presentation-size :initarg :size - :initform nil)) + :initform nil) + (obscuredp :accessor input-presentation-obscuredp + :initarg :obscuredp + :initform nil + :documentation "If T, uses bullets instead of clear text.")) (:documentation "A default presentation for forms renders an input field."))

@@ -375,7 +379,9 @@ (multiple-value-bind (intermediate-value intermediate-value-p) (form-field-intermediate-value field intermediate-values) (with-html - (:input :type "text" :name attributized-slot-name + (:input :type (if (input-presentation-obscuredp presentation) + "password" "text") + :name attributized-slot-name :value (if intermediate-value-p intermediate-value (apply #'print-view-field-value value presentation field view widget obj args))


Comments (1)

  1. Anonymous

    The old view stuff (of which input-presentation is a part) does have a password presentation already, though...

  2. Log in to comment