[Checkins] SVN: z3c.formjsdemo/trunk/src/z3c/formjsdemo/validator/ added more fields to be validated and added a page template.

Paul Carduner paulcarduner at gmail.com
Sun Jul 8 12:15:50 EDT 2007


Log message for revision 77629:
  added more fields to be validated and added a page template.

Changed:
  U   z3c.formjsdemo/trunk/src/z3c/formjsdemo/validator/browser.py
  U   z3c.formjsdemo/trunk/src/z3c/formjsdemo/validator/configure.zcml
  A   z3c.formjsdemo/trunk/src/z3c/formjsdemo/validator/validator.pt

-=-
Modified: z3c.formjsdemo/trunk/src/z3c/formjsdemo/validator/browser.py
===================================================================
--- z3c.formjsdemo/trunk/src/z3c/formjsdemo/validator/browser.py	2007-07-08 16:15:19 UTC (rev 77628)
+++ z3c.formjsdemo/trunk/src/z3c/formjsdemo/validator/browser.py	2007-07-08 16:15:50 UTC (rev 77629)
@@ -11,12 +11,32 @@
 ValidatorCSSViewlet = CSSViewlet('validator.css')
 
 class IFields(zope.interface.Interface):
-    zip = zope.schema.Int(
-        title=u"ZIP",
-        description=u"The Zip code.",
+    int = zope.schema.Int(
+        title=u"Integer",
+        description=u"Enter an Integer",
         required=True)
 
+    float = zope.schema.Float(
+        title=u"Float",
+        description=u"Enter a Float",
+        required=True)
 
+    textLine = zope.schema.TextLine(
+        title=u"Text Line",
+        description=u"Enter any Text",
+        required=True)
+
+    asciiLine = zope.schema.ASCIILine(
+        title=u"ASCII Line",
+        description=u"Enter any ASCII",
+        required=True)
+
+    URI = zope.schema.URI(
+        title=u"URI",
+        description=u"Enter a URL",
+        required=True)    
+
+
 class ValidatorForm(
     layout.FormLayoutSupport, jsvalidator.MessageValidator, form.Form):
 

Modified: z3c.formjsdemo/trunk/src/z3c/formjsdemo/validator/configure.zcml
===================================================================
--- z3c.formjsdemo/trunk/src/z3c/formjsdemo/validator/configure.zcml	2007-07-08 16:15:19 UTC (rev 77628)
+++ z3c.formjsdemo/trunk/src/z3c/formjsdemo/validator/configure.zcml	2007-07-08 16:15:50 UTC (rev 77629)
@@ -12,6 +12,12 @@
       permission="zope.Public"
       />
 
+  <z3c:template
+      template="validator.pt"
+      for=".browser.ValidatorForm"
+      layer="z3c.formjsdemo.layer.IDemoBrowserLayer"
+      />
+
   <!-- Resources -->
 
   <browser:zrt-resource

Added: z3c.formjsdemo/trunk/src/z3c/formjsdemo/validator/validator.pt
===================================================================
--- z3c.formjsdemo/trunk/src/z3c/formjsdemo/validator/validator.pt	                        (rev 0)
+++ z3c.formjsdemo/trunk/src/z3c/formjsdemo/validator/validator.pt	2007-07-08 16:15:50 UTC (rev 77629)
@@ -0,0 +1,7 @@
+<div metal:use-macro="macro:form">
+  <div metal:fill-slot="extra-info">
+    So what's going on here?  Whenever you change the value of the
+    field, that value will be sent back to the server for validation.
+    If the value is no good, the widget will be modified to reflect that.
+  </div>
+</div>
\ No newline at end of file


Property changes on: z3c.formjsdemo/trunk/src/z3c/formjsdemo/validator/validator.pt
___________________________________________________________________
Name: svn:eol-style
   + native



More information about the Checkins mailing list