Author: ornicar2
Date: 2010-02-12 00:07:28 +0100 (Fri, 12 Feb 2010)
New Revision: 27932

Modified:
   
plugins/diemPlugin/trunk/dmAdminPlugin/data/generator/dmAdminDoctrineModule/dmAdmin/template/templates/_form_field.php
Log:
[Diem]
- allowed to add an empty field to the form by adding a "_empty_" field in the 
admin generator form display section

Modified: 
plugins/diemPlugin/trunk/dmAdminPlugin/data/generator/dmAdminDoctrineModule/dmAdmin/template/templates/_form_field.php
===================================================================
--- 
plugins/diemPlugin/trunk/dmAdminPlugin/data/generator/dmAdminDoctrineModule/dmAdmin/template/templates/_form_field.php
      2010-02-11 22:45:39 UTC (rev 27931)
+++ 
plugins/diemPlugin/trunk/dmAdminPlugin/data/generator/dmAdminDoctrineModule/dmAdmin/template/templates/_form_field.php
      2010-02-11 23:07:28 UTC (rev 27932)
@@ -1,4 +1,5 @@
 [?php
+
   $required = ($validator = $form->getValidatorSchema()->offsetGet($name)) ? 
$validator->getOption('required') : false;
   $divClass = dmArray::toHtmlCssClasses(array(
     $class,
@@ -6,6 +7,12 @@
     $field->getConfig('is_link') ? 'dm_link_droppable' : '',
     $required ? 'required' : ''
   ));
+
+  if('empty_' === $name)
+  {
+    echo '<div class="'.$divClass.'"></div>';
+    return;
+  }
 ?]
 [?php if ($field->isPartial()): ?]
   <div class="[?php echo $divClass ?]">[?php include_partial('<?php echo 
$this->getModuleName() ?>/'.$name, array('<?php echo 
$this->getModule()->getKey() ?>' => $form->getObject(), 'form' => $form, 
'attributes' => $attributes instanceof sfOutputEscaper ? 
$attributes->getRawValue() : $attributes)) ?]</div>

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to