[Checkins] SVN: z3c.formui/ Templates and other UI components for z3c.form. Initial import.

Stephan Richter srichter at cosmos.phy.tufts.edu
Thu May 24 10:48:23 EDT 2007


Log message for revision 75941:
  Templates and other UI components for z3c.form. Initial import.
  

Changed:
  A   z3c.formui/
  A   z3c.formui/branches/
  A   z3c.formui/tags/
  A   z3c.formui/trunk/
  A   z3c.formui/trunk/README.txt
  A   z3c.formui/trunk/bootstrap.py
  A   z3c.formui/trunk/buildout.cfg
  A   z3c.formui/trunk/setup.py
  A   z3c.formui/trunk/src/
  A   z3c.formui/trunk/src/z3c/
  A   z3c.formui/trunk/src/z3c/__init__.py
  A   z3c.formui/trunk/src/z3c/formui/
  A   z3c.formui/trunk/src/z3c/formui/README.txt
  A   z3c.formui/trunk/src/z3c/formui/SETUP.cfg
  A   z3c.formui/trunk/src/z3c/formui/__init__.py
  A   z3c.formui/trunk/src/z3c/formui/browser.py
  A   z3c.formui/trunk/src/z3c/formui/configure.zcml
  A   z3c.formui/trunk/src/z3c/formui/div-form.css
  A   z3c.formui/trunk/src/z3c/formui/div-form.pt
  A   z3c.formui/trunk/src/z3c/formui/interfaces.py
  A   z3c.formui/trunk/src/z3c/formui/layout.py
  A   z3c.formui/trunk/src/z3c/formui/table-form.css
  A   z3c.formui/trunk/src/z3c/formui/table-form.pt
  A   z3c.formui/trunk/src/z3c/formui/z3c.formui-configure.zcml

-=-
Added: z3c.formui/trunk/README.txt
===================================================================
--- z3c.formui/trunk/README.txt	                        (rev 0)
+++ z3c.formui/trunk/README.txt	2007-05-24 14:48:22 UTC (rev 75941)
@@ -0,0 +1,9 @@
+========================
+Form UI for ``z3c.form``
+========================
+
+This package provides a set of default layouts for the ``z3c.form``
+framework. In particular it provides a DIV-based and a TABLE-based layout. The
+developer can use either layout by inheriting from a different base layer.
+
+The package also has some support for layout/pagelet tempaltes.


Property changes on: z3c.formui/trunk/README.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Added: z3c.formui/trunk/bootstrap.py
===================================================================
--- z3c.formui/trunk/bootstrap.py	                        (rev 0)
+++ z3c.formui/trunk/bootstrap.py	2007-05-24 14:48:22 UTC (rev 75941)
@@ -0,0 +1,52 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Bootstrap a buildout-based project
+
+Simply run this script in a directory containing a buildout.cfg.
+The script accepts buildout command-line options, so you can
+use the -c option to specify an alternate configuration file.
+
+$Id$
+"""
+
+import os, shutil, sys, tempfile, urllib2
+
+tmpeggs = tempfile.mkdtemp()
+
+ez = {}
+exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+                     ).read() in ez
+ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+import pkg_resources
+
+cmd = 'from setuptools.command.easy_install import main; main()'
+if sys.platform == 'win32':
+    cmd = '"%s"' % cmd # work around spawn lamosity on windows
+
+ws = pkg_resources.working_set
+assert os.spawnle(
+    os.P_WAIT, sys.executable, sys.executable,
+    '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout',
+    dict(os.environ,
+         PYTHONPATH=
+         ws.find(pkg_resources.Requirement.parse('setuptools')).location
+         ),
+    ) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout')
+import zc.buildout.buildout
+zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
+shutil.rmtree(tmpeggs)


Property changes on: z3c.formui/trunk/bootstrap.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: z3c.formui/trunk/buildout.cfg
===================================================================
--- z3c.formui/trunk/buildout.cfg	                        (rev 0)
+++ z3c.formui/trunk/buildout.cfg	2007-05-24 14:48:22 UTC (rev 75941)
@@ -0,0 +1,7 @@
+[buildout]
+develop = .
+parts = test
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = z3c.formui [test]

Added: z3c.formui/trunk/setup.py
===================================================================
--- z3c.formui/trunk/setup.py	                        (rev 0)
+++ z3c.formui/trunk/setup.py	2007-05-24 14:48:22 UTC (rev 75941)
@@ -0,0 +1,64 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Setup
+
+$Id$
+"""
+import os
+from setuptools import setup, find_packages
+
+def read(*rnames):
+    return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+setup (
+    name='z3c.formui',
+    version='1.0.0c2',
+    author = "Stephan Richter, Roger Ineichen and the Zope Community",
+    author_email = "zope3-dev at zope.org",
+    description = "A set of initial UI components for z3c.form.",
+    long_description=(
+        read('README.txt')
+        ),
+    license = "ZPL 2.1",
+    keywords = "zope3 form widget",
+    classifiers = [
+        'Development Status :: 4 - Beta',
+        'Environment :: Web Environment',
+        'Intended Audience :: Developers',
+        'License :: OSI Approved :: Zope Public License',
+        'Programming Language :: Python',
+        'Natural Language :: English',
+        'Operating System :: OS Independent',
+        'Topic :: Internet :: WWW/HTTP',
+        'Framework :: Zope3'],
+    url = 'http://svn.zope.org//z3c.formui',
+    packages = find_packages('src'),
+    include_package_data = True,
+    package_dir = {'':'src'},
+    namespace_packages = ['z3c'],
+    extras_require = dict(
+        test = ['zope.testing'],
+        ),
+    install_requires = [
+        'setuptools',
+        'z3c.form',
+        'z3c.macro',
+        'z3c.template',
+        'zope.component',
+        'zope.publisher',
+        'zope.viewlet',
+        ],
+    dependency_links = ['http://download.zope.org/distribution'],
+    zip_safe = False,
+    )


Property changes on: z3c.formui/trunk/setup.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: z3c.formui/trunk/src/z3c/__init__.py
===================================================================
--- z3c.formui/trunk/src/z3c/__init__.py	                        (rev 0)
+++ z3c.formui/trunk/src/z3c/__init__.py	2007-05-24 14:48:22 UTC (rev 75941)
@@ -0,0 +1,6 @@
+try:
+    # Declare this a namespace package if pkg_resources is available.
+    import pkg_resources
+    pkg_resources.declare_namespace('z3c')
+except ImportError:
+    pass


Property changes on: z3c.formui/trunk/src/z3c/__init__.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: z3c.formui/trunk/src/z3c/formui/README.txt
===================================================================
--- z3c.formui/trunk/src/z3c/formui/README.txt	                        (rev 0)
+++ z3c.formui/trunk/src/z3c/formui/README.txt	2007-05-24 14:48:22 UTC (rev 75941)
@@ -0,0 +1,26 @@
+====================
+Form User Interfaces
+====================
+
+This package provides several useful templates to get a quick start with the
+``z3c.form`` package. Previous form frameworks always included default
+templates that were implemented in a particular user-interface development
+pattern. If you wanted to use an alternative strategy to develop user
+interfaces, it was often tedious to do so. This package aims to provide some
+options without requireing them for the basic framework.
+
+
+Layout Template Support
+-----------------------
+
+One common pattern in Zope 3 user interface development is the use of layout
+templates. This package provides some mixin classes to the regular form
+classes to support layout-based templating.
+
+
+DIV-based Forms
+---------------
+
+
+Table-based Forms
+-----------------


Property changes on: z3c.formui/trunk/src/z3c/formui/README.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Added: z3c.formui/trunk/src/z3c/formui/SETUP.cfg
===================================================================
--- z3c.formui/trunk/src/z3c/formui/SETUP.cfg	                        (rev 0)
+++ z3c.formui/trunk/src/z3c/formui/SETUP.cfg	2007-05-24 14:48:22 UTC (rev 75941)
@@ -0,0 +1,3 @@
+<data-files zopeskel/etc/package-includes>
+  z3c.formui-*.zcml
+</data-files>

Added: z3c.formui/trunk/src/z3c/formui/__init__.py
===================================================================
--- z3c.formui/trunk/src/z3c/formui/__init__.py	                        (rev 0)
+++ z3c.formui/trunk/src/z3c/formui/__init__.py	2007-05-24 14:48:22 UTC (rev 75941)
@@ -0,0 +1 @@
+# Make a package.


Property changes on: z3c.formui/trunk/src/z3c/formui/__init__.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: z3c.formui/trunk/src/z3c/formui/browser.py
===================================================================
--- z3c.formui/trunk/src/z3c/formui/browser.py	                        (rev 0)
+++ z3c.formui/trunk/src/z3c/formui/browser.py	2007-05-24 14:48:22 UTC (rev 75941)
@@ -0,0 +1,22 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Form UI Browser
+
+$Id$
+"""
+__docformat__ = "reStructuredText"
+from zope.viewlet.viewlet import CSSViewlet
+
+TableFormCSSViewlet = CSSViewlet('table-form.css')
+DivFormCSSViewlet = CSSViewlet('div-form.css')


Property changes on: z3c.formui/trunk/src/z3c/formui/browser.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: z3c.formui/trunk/src/z3c/formui/configure.zcml
===================================================================
--- z3c.formui/trunk/src/z3c/formui/configure.zcml	                        (rev 0)
+++ z3c.formui/trunk/src/z3c/formui/configure.zcml	2007-05-24 14:48:22 UTC (rev 75941)
@@ -0,0 +1,115 @@
+<configure
+    xmlns="http://namespaces.zope.org/zope"
+    xmlns:browser="http://namespaces.zope.org/browser"
+    xmlns:z3c="http://namespaces.zope.org/z3c"
+    i18n_domain="z3c.formui">
+
+  <interface
+      interface=".interfaces.IFormUILayer"
+      type="zope.publisher.interfaces.browser.IBrowserSkinType"
+      />
+
+  <interface
+      interface=".interfaces.IDivFormLayer"
+      type="zope.publisher.interfaces.browser.IBrowserSkinType"
+      />
+
+  <interface
+      interface=".interfaces.ITableFormLayer"
+      type="zope.publisher.interfaces.browser.IBrowserSkinType"
+      />
+
+  <!-- Table-based Form -->
+  <browser:resource
+      name="table-form.css"
+      file="table-form.css"
+      layer=".interfaces.ITableFormLayer"
+      />
+  <browser:viewlet
+      name="table-form.css"
+      for="*"
+      manager=".interfaces.ICSS"
+      class=".browser.TableFormCSSViewlet"
+      permission="zope.Public"
+      layer=".interfaces.ITableFormLayer"
+      />
+  <z3c:macro
+      name="form"
+      template="table-form.pt"
+      layer=".interfaces.ITableFormLayer"
+      />
+  <z3c:macro
+      name="form-header"
+      macro="header"
+      template="table-form.pt"
+      layer=".interfaces.ITableFormLayer"
+      />
+  <z3c:macro
+      name="form-table"
+      macro="table"
+      template="table-form.pt"
+      layer=".interfaces.ITableFormLayer"
+      />
+  <z3c:macro
+      name="form-buttons"
+      macro="buttons"
+      template="table-form.pt"
+      layer=".interfaces.ITableFormLayer"
+      />
+  <z3c:template
+      template="table-form.pt"
+      for="z3c.form.interfaces.IInputForm"
+      layer=".interfaces.ITableFormLayer"
+      />
+
+  <!-- DIV-based Form -->
+  <browser:resource
+      name="div-form.css"
+      file="div-form.css"
+      layer=".interfaces.IDivFormLayer"
+      />
+  <browser:viewlet
+      name="div-form.css"
+      for="*"
+      manager=".interfaces.ICSS"
+      class=".browser.DivFormCSSViewlet"
+      permission="zope.Public"
+      layer=".interfaces.IDivFormLayer"
+      />
+  <z3c:macro
+      name="form"
+      template="div-form.pt"
+      layer=".interfaces.IDivFormLayer"
+      />
+  <z3c:macro
+      name="form-header"
+      macro="header"
+      template="div-form.pt"
+      layer=".interfaces.IDivFormLayer"
+      />
+  <z3c:macro
+      name="widget-rows"
+      macro="widget-rows"
+      template="div-form.pt"
+      layer=".interfaces.IDivFormLayer"
+      />
+  <z3c:macro
+      name="widget-row"
+      macro="widget-row"
+      template="div-form.pt"
+      layer=".interfaces.IDivFormLayer"
+      />
+  <z3c:macro
+      name="form-buttons"
+      macro="buttons"
+      template="div-form.pt"
+      layer=".interfaces.IDivFormLayer"
+      />
+  <z3c:template
+      template="div-form.pt"
+      for="z3c.form.interfaces.IInputForm"
+      layer=".interfaces.IDivFormLayer"
+      />
+
+
+</configure>


Property changes on: z3c.formui/trunk/src/z3c/formui/configure.zcml
___________________________________________________________________
Name: svn:eol-style
   + native

Added: z3c.formui/trunk/src/z3c/formui/div-form.css
===================================================================
--- z3c.formui/trunk/src/z3c/formui/div-form.css	                        (rev 0)
+++ z3c.formui/trunk/src/z3c/formui/div-form.css	2007-05-24 14:48:22 UTC (rev 75941)
@@ -0,0 +1,89 @@
+/*----[ div based form tags ]------------------------------------------------*/
+
+form.edit-form {
+    margin: 0px;
+    padding: 0px;
+}
+
+div.viewspace {
+    margin: 0px;
+    padding: 0px;
+}
+
+div.status {
+    padding-bottom: 10px;
+}
+
+div.summary {
+    margin: 0px;
+    padding: 0px;
+}
+
+ul.errors {
+    padding: 0px;
+    color: red;
+    margin-left: 20px;
+}
+
+div.error {
+    margin: 0px;
+    padding: 0px;
+}
+
+div.row {
+    padding-bottom: 10px;
+}
+
+div.label {
+    margin: 0px;
+    padding: 0px;
+}
+
+span.required {
+    color: red;
+}
+
+div.widget {
+    margin: 0px;
+    padding: 0px;
+}
+
+input, textarea, select {
+    margin: 0px;
+    padding: 0px;
+    border: 1px solid gray;
+}
+
+input.checkBoxWidget {
+    border: none;
+}
+
+input.fileWidget {
+    width: 300px;
+}
+
+input.passwordWidget {
+    width: 300px;
+}
+
+input.radioWidget {
+    border: none;
+}
+
+select.selectWidget {
+    width: 300px;
+    border: 1px solid gray;
+}
+
+input.textWidget {
+    width: 300px;
+}
+
+textarea.textAreaWidget {
+    width: 300px;
+    height: 100px;
+}
+
+div.buttons {
+    padding: 10px 0px 10px 0px;
+}


Property changes on: z3c.formui/trunk/src/z3c/formui/div-form.css
___________________________________________________________________
Name: svn:eol-style
   + native

Added: z3c.formui/trunk/src/z3c/formui/div-form.pt
===================================================================
--- z3c.formui/trunk/src/z3c/formui/div-form.pt	                        (rev 0)
+++ z3c.formui/trunk/src/z3c/formui/div-form.pt	2007-05-24 14:48:22 UTC (rev 75941)
@@ -0,0 +1,66 @@
+<form action="." method="post" enctype="multipart/form-data" class="edit-form"
+      metal:define-macro="form"
+      tal:attributes="method view/method;
+                      enctype view/enctype;
+                      acceptCharset view/acceptCharset;
+                      accept view/accept;
+                      action view/action;
+                      name view/name;
+                      id view/id">
+  <div class="viewspace" metal:define-slot="viewspace">
+    <metal:block define-macro="header">
+    <div class="status"
+           tal:define="status view/status"
+           tal:condition="status">
+      <div class="summary"
+             i18n:translate=""
+             tal:content="view/status">
+        Form status summary
+      </div>
+      <ul class="errors" tal:condition="view/widgets/errors">
+        <li tal:repeat="error view/widgets/errors">
+          <span tal:replace="error/widget/label" />
+          :
+          <span tal:replace="structure error/render">Error Type</span>
+        </li>
+      </ul>
+    </div>
+    </metal:block>
+    <div metal:define-slot="extra-info" tal:replace="nothing">
+    </div>
+    <div metal:define-slot="main">
+      <metal:block define-macro="widget-rows">
+      <div class="row" tal:repeat="widget view/widgets/values">
+        <metal:block define-macro="widget-row">
+        <div class="label">
+          <label tal:attributes="for widget/name">
+            <span i18n:translate=""
+                      tal:content="widget/label">label</span>
+            <span class="required" tal:condition="widget/required">*</span>
+          </label>
+        </div>
+        <div class="widget" tal:content="structure widget/render">
+          <input type="text" size="24" />
+        </div>
+        <div class="error"
+                 tal:condition="widget/error">
+          <span tal:replace="structure widget/error/render">error</span>
+        </div>
+        </metal:block>
+      </div>
+      </metal:block>
+    </div>
+    <metal:block define-slot="above-buttons">
+    </metal:block>
+  </div>
+  <metal:block define-slot="buttons">
+  <div metal:define-macro="buttons">
+    <div class="buttons"
+          metal:define-slot="bottom-buttons">
+      <input tal:repeat="action view/actions/values"
+           tal:replace="structure action/render"
+           />
+    </div>
+  </div>
+  </metal:block>
+</form>


Property changes on: z3c.formui/trunk/src/z3c/formui/div-form.pt
___________________________________________________________________
Name: svn:eol-style
   + native

Added: z3c.formui/trunk/src/z3c/formui/interfaces.py
===================================================================
--- z3c.formui/trunk/src/z3c/formui/interfaces.py	                        (rev 0)
+++ z3c.formui/trunk/src/z3c/formui/interfaces.py	2007-05-24 14:48:22 UTC (rev 75941)
@@ -0,0 +1,32 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Form UI Interfaces
+
+$Id$
+"""
+__docformat__ = "reStructuredText"
+from zope.publisher.interfaces.browser import IBrowserRequest
+from zope.viewlet.interfaces import IViewletManager
+
+class IFormUILayer(IBrowserRequest):
+    """A basic layer for the Form UI package."""
+
+class IDivFormLayer(IFormUILayer):
+    """A layer that supports forms created only using DIV elements."""
+
+class ITableFormLayer(IFormUILayer):
+    """A layer that supports forms created using tables."""
+
+class ICSS(IViewletManager):
+    """CSS viewlet manager."""


Property changes on: z3c.formui/trunk/src/z3c/formui/interfaces.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: z3c.formui/trunk/src/z3c/formui/layout.py
===================================================================
--- z3c.formui/trunk/src/z3c/formui/layout.py	                        (rev 0)
+++ z3c.formui/trunk/src/z3c/formui/layout.py	2007-05-24 14:48:22 UTC (rev 75941)
@@ -0,0 +1,40 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Support for Layout Templates
+
+$Id$
+"""
+__docformat__ = "reStructuredText"
+import zope.component
+from z3c.template.interfaces import ILayoutTemplate
+
+class FormLayoutSupport(object):
+
+    def __call__(self):
+        self.update()
+        layout = zope.component.getMultiAdapter((self, self.request),
+            ILayoutTemplate)
+        return layout(self)
+
+
+class AddFormLayoutSupport(object):
+
+    def __call__(self):
+        self.update()
+        if self._finishedAdd:
+            self.request.response.redirect(self.nextURL())
+            return ''
+        layout = zope.component.getMultiAdapter((self, self.request),
+            ILayoutTemplate)
+        return layout(self)


Property changes on: z3c.formui/trunk/src/z3c/formui/layout.py
___________________________________________________________________
Name: svn:keywords
   + Id

Added: z3c.formui/trunk/src/z3c/formui/table-form.css
===================================================================
--- z3c.formui/trunk/src/z3c/formui/table-form.css	                        (rev 0)
+++ z3c.formui/trunk/src/z3c/formui/table-form.css	2007-05-24 14:48:22 UTC (rev 75941)
@@ -0,0 +1,90 @@
+/*----[ table based form tags ]----------------------------------------------*/
+
+form.edit-form {
+    margin: 0px;
+    padding: 0px;
+}
+
+form.edit-form td {
+    vertical-align: top;
+    padding-bottom: 10px;
+}
+
+form.edit-form td.label {
+    margin: 0px;
+    padding-top: 5px;
+}
+
+div.viewspace {
+    margin: 0px;
+    padding: 0px;
+}
+
+div.status {
+    padding-bottom: 10px;
+}
+
+div.summary {
+    margin: 0px;
+    padding: 0px;
+}
+
+ul.errors {
+    padding: 0px;
+    color: red;
+    margin-left: 20px;
+}
+
+div.error {
+    margin: 0px;
+    padding: 0px;
+}
+
+span.required {
+    color: red;
+}
+
+div.widget {
+    margin: 0px;
+    padding: 0px;
+}
+
+input, textarea, select {
+    margin: 0px;
+    padding: 0px;
+    border: 1px solid gray;
+}
+
+input.fileWidget {
+    width: 300px;
+}
+
+input.checkBoxWidget {
+    border: none;
+}
+
+input.passwordWidget {
+    width: 300px;
+}
+
+input.radioWidget {
+    border: none;
+}
+
+select.selectWidget {
+    width: 300px;
+    border: 1px solid gray;
+}
+
+input.textWidget {
+    width: 300px;
+}
+
+textarea.textAreaWidget {
+    width: 300px;
+    height: 100px;
+}
+
+div.buttons {
+    padding: 10px 0px 10px 0px;
+}


Property changes on: z3c.formui/trunk/src/z3c/formui/table-form.css
___________________________________________________________________
Name: svn:eol-style
   + native

Added: z3c.formui/trunk/src/z3c/formui/table-form.pt
===================================================================
--- z3c.formui/trunk/src/z3c/formui/table-form.pt	                        (rev 0)
+++ z3c.formui/trunk/src/z3c/formui/table-form.pt	2007-05-24 14:48:22 UTC (rev 75941)
@@ -0,0 +1,78 @@
+<form action="." method="post" enctype="multipart/form-data" class="edit-form"
+      metal:define-macro="form"
+      tal:attributes="method view/method;
+                      enctype view/enctype;
+                      acceptCharset view/acceptCharset;
+                      accept view/accept;
+                      action view/action;
+                      name view/name;
+                      id view/id">
+  <div class="viewspace" metal:define-slot="viewspace">
+    <metal:block define-macro="header">
+    <div class="status"
+           tal:define="status view/status"
+           tal:condition="status">
+      <div class="summary"
+             i18n:translate=""
+             tal:content="view/status">
+        Form status summary
+      </div>
+      <ul class="errors" tal:condition="view/widgets/errors">
+        <li tal:repeat="error view/widgets/errors">
+          <span tal:replace="error/widget/label" />
+          :
+          <span tal:replace="structure error/render"> Error Type </span>
+        </li>
+      </ul>
+    </div>
+    </metal:block>
+    <div metal:define-slot="extra_info" tal:replace="nothing">
+    </div>
+    <div metal:define-slot="main">
+      <table class="form-fields" metal:define-macro="formtable">
+        <tr class="extraTopRow" metal:define-slot="extra_top" tal:replace="nothing">
+          <td class="label"> Extra top </td>
+          <td class="field">
+            <input type="text" />
+          </td>
+        </tr>
+        <tbody metal:define-slot="formbody" tal:omit-tag="">
+          <tal:block omit-tag="" repeat="widget view/widgets/values">
+            <tr metal:define-macro="formrow" class="row">
+              <td class="label" metal:define-macro="labelcell">
+                <label tal:attributes="for widget/name">
+                  <span i18n:translate=""
+                        tal:content="widget/label"> label </span>
+                  <span class="required" tal:condition="widget/required"> * </span>
+                </label>
+              </td>
+              <td class="field" metal:define-macro="widgetcell">
+                <div class="widget" tal:content="structure widget/render">
+                  <input type="text" />
+                </div>
+                <div class="error"
+                     tal:condition="widget/error">
+                  <span tal:replace="structure widget/error"> error </span>
+                </div></td>
+            </tr>
+          </tal:block>
+        </tbody>
+        <tr class="extraBottomRow" metal:define-slot="extra_bottom" tal:replace="nothing">
+          <td class="label"> Extra bottom </td>
+          <td class="label"><input type="text" />
+          </td>
+        </tr>
+      </table>
+    </div>
+    <metal:block define-slot="above-buttons">
+    </metal:block>
+  </div>
+  <metal:block define-slot="buttons">
+  <div metal:define-macro="buttons">
+    <div class="buttons" metal:define-slot="bottom-buttons">
+        <input tal:repeat="action view/actions/values"
+               tal:replace="structure action/render" />
+    </div>
+  </div>
+  </metal:block>
+</form>


Property changes on: z3c.formui/trunk/src/z3c/formui/table-form.pt
___________________________________________________________________
Name: svn:eol-style
   + native

Added: z3c.formui/trunk/src/z3c/formui/z3c.formui-configure.zcml
===================================================================
--- z3c.formui/trunk/src/z3c/formui/z3c.formui-configure.zcml	                        (rev 0)
+++ z3c.formui/trunk/src/z3c/formui/z3c.formui-configure.zcml	2007-05-24 14:48:22 UTC (rev 75941)
@@ -0,0 +1 @@
+<include package="z3c.formui" />


Property changes on: z3c.formui/trunk/src/z3c/formui/z3c.formui-configure.zcml
___________________________________________________________________
Name: svn:eol-style
   + native



More information about the Checkins mailing list