Looking forward to use this :) Can you send a little glimpse on how to use this elements? Is it like any other zend_form_element? I know you're in active development of this elements, but it's just too good to wait for it :P
2008/7/8 matthew <[EMAIL PROTECTED]>: > Revision 9999 Author matthew Date 2008-07-08 13:06:40 -0700 (Tue, 08 Jul > 2008) Log Message > > [EMAIL PROTECTED]: matthew | 2008-07-08 16:06:29 -0400 > * Updated Form dijit helper to conform to standard Form view helper > * Added DijitForm form decorator > > Modified Paths > > - > > standard/incubator/library/Zend/Dojo/Form/Decorator/DijitContainer.php<#11b04488bf576ee3_standardincubatorlibraryZendDojoFormDecoratorDijitContainerphp> > - > standard/incubator/library/Zend/Dojo/View/Helper/Form.php<#11b04488bf576ee3_standardincubatorlibraryZendDojoViewHelperFormphp> > - > standard/incubator/tests/Zend/Dojo/View/Helper/FormTest.php<#11b04488bf576ee3_standardincubatortestsZendDojoViewHelperFormTestphp> > > Added Paths > > - > standard/incubator/library/Zend/Dojo/Form/Decorator/DijitForm.php<#11b04488bf576ee3_standardincubatorlibraryZendDojoFormDecoratorDijitFormphp> > > Property Changed > > - standard/ <#11b04488bf576ee3_standard> > > Diff Property changes: standard > > Name: svk:merge - > 33008bc5-088a-4725-8053-8b13bfceb19a:/local/framework/standard:20488 + > 33008bc5-088a-4725-8053-8b13bfceb19a:/local/framework/standard:20493 > > Modified: > standard/incubator/library/Zend/Dojo/Form/Decorator/DijitContainer.php (9998 > => 9999) > > --- standard/incubator/library/Zend/Dojo/Form/Decorator/DijitContainer.php > 2008-07-08 19:54:41 UTC (rev 9998) > +++ standard/incubator/library/Zend/Dojo/Form/Decorator/DijitContainer.php > 2008-07-08 20:06:40 UTC (rev 9999)@@ -168,7 +168,7 @@ } /**- * > Render a form+ * Render a dijit layout container * * Replaces > $content entirely from currently set element. * > > Added: standard/incubator/library/Zend/Dojo/Form/Decorator/DijitForm.php > (0 => 9999) > > --- standard/incubator/library/Zend/Dojo/Form/Decorator/DijitForm.php > (rev 0) > +++ standard/incubator/library/Zend/Dojo/Form/Decorator/DijitForm.php > 2008-07-08 20:06:40 UTC (rev 9999)@@ -0,0 +1,60 @@+<?php > +/** > + * Zend Framework > + * > + * LICENSE > + * > + * This source file is subject to the new BSD license that is bundled > + * with this package in the file LICENSE.txt. > + * It is also available through the world-wide-web at this URL: > + * http://framework.zend.com/license/new-bsd > + * If you did not receive a copy of the license and are unable to > + * obtain it through the world-wide-web, please send an email > + * to [EMAIL PROTECTED] so we can send you a copy immediately. > + * > + * @category Zend > + * @package Zend_Form > + * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. > (http://www.zend.com) > + * @license http://framework.zend.com/license/new-bsd New BSD License > + */ > + > +/** Zend_Dojo_Form_Decorator_DijitContainer */ > +require_once 'Zend/Dojo/Form/Decorator/DijitContainer.php'; > + > +/** > + * Zend_Dojo_Form_Decorator_DijitForm > + * > + * Render a dojo form dijit via a view helper > + * > + * Accepts the following options: > + * - helper: the name of the view helper to use > + * > + * @package Zend_Dojo > + * @subpackage Form_Decorator > + * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. > (http://www.zend.com) > + * @license http://framework.zend.com/license/new-bsd New BSD License > + * @version $Id: $ > + */ > +class Zend_Dojo_Form_Decorator_DijitForm extends > Zend_Dojo_Form_Decorator_DijitContainer > +{ > + /** > + * Render a form > + * > + * Replaces $content entirely from currently set element. > + * > + * @param string $content > + * @return string > + */ > + public function render($content) > + { > + $element = $this->getElement(); > + $view = $form->getView(); > + if (null === $view) { > + return $content; > + } > + > + $attribs = $this->getOptions(); > + > + return $view->form($element->getName(), $attribs, $content); > + } > +}Property changes on: > standard/incubator/library/Zend/Dojo/Form/Decorator/DijitForm.php___________________________________________________________________Name: > svn:keywords + Id Author Date Rev > > Modified: standard/incubator/library/Zend/Dojo/View/Helper/Form.php (9998 > => 9999) > > --- standard/incubator/library/Zend/Dojo/View/Helper/Form.php 2008-07-08 > 19:54:41 UTC (rev 9998) > +++ standard/incubator/library/Zend/Dojo/View/Helper/Form.php 2008-07-08 > 20:06:40 UTC (rev 9999)@@ -50,13 +50,21 @@ * dijit.form.Form * > * @param int $id - * @param string $content > - * @param array $attribs HTML attributes+ * @param null|array > $attribs HTML attributes > + * @param false|string $content * @return string */- > public function form($id, $content, array $attribs = array())+ public > function form($id, $attribs = null, $content = false) {+ if > (!is_array($attribs)) { > + $attribs = (array) $attribs; > + } $attribs['id'] = $id;+ > + if (false === $content) { > + $content = ''; > + } > + $attribs = $this->_prepareDijit($attribs, array(), 'layout'); > $html = '<form' . $this->_htmlAttribs($attribs) . '>' > > Modified: standard/incubator/tests/Zend/Dojo/View/Helper/FormTest.php > (9998 => 9999) > > --- standard/incubator/tests/Zend/Dojo/View/Helper/FormTest.php > 2008-07-08 19:54:41 UTC (rev 9998) > +++ standard/incubator/tests/Zend/Dojo/View/Helper/FormTest.php > 2008-07-08 20:06:40 UTC (rev 9999)@@ -96,7 +96,7 @@ public function > getForm() {- return $this->helper->form('myForm', '', > array('action' => '/foo'));+ return $this->helper->form('myForm', > array('action' => '/foo'), ''); } public function > testShouldAllowDeclarativeDijitCreation() > > -- Christian Sánchez A.
