Author: KRavEN
Date: 2010-04-15 17:48:53 +0200 (Thu, 15 Apr 2010)
New Revision: 29162
Modified:
plugins/sfExtjsThemePlugin/branches/1_2/ExtjsGeneratorPlugin/data/generator/DbFinderAdmin/extjs/template/templates/__edit_form_inner.php
Log:
added credentials for formpanel fields. prevented display of empty fieldsets.
Modified:
plugins/sfExtjsThemePlugin/branches/1_2/ExtjsGeneratorPlugin/data/generator/DbFinderAdmin/extjs/template/templates/__edit_form_inner.php
===================================================================
---
plugins/sfExtjsThemePlugin/branches/1_2/ExtjsGeneratorPlugin/data/generator/DbFinderAdmin/extjs/template/templates/__edit_form_inner.php
2010-04-15 14:48:01 UTC (rev 29161)
+++
plugins/sfExtjsThemePlugin/branches/1_2/ExtjsGeneratorPlugin/data/generator/DbFinderAdmin/extjs/template/templates/__edit_form_inner.php
2010-04-15 15:48:53 UTC (rev 29162)
@@ -93,15 +93,20 @@
$fieldName = str_replace('/', $this->tableDelimiter, $column->key);
// $cls=""; if (isset($columnDef['options']['allowBlank']) &&
($columnDef['options']['allowBlank']==='false')) $cls = " class='required'";
-
- $credentials =
$this->getParameterValue($edit_key.'.fields.'.$column->key.'.credentials');
+
+ if($credentials =
$this->getParameterValue($edit_key.'.fields.'.$column->key.'.credentials'))
+ {
+ $credentials = str_replace("\n", ' ', var_export($credentials, true));
+ echo "if(\$sf_user->hasCredential($credentials)):";
+ }
?>
$fieldset['items'][] = <?php
var_export($this->DbFinderAdminGenerator->getColumnAjaxEditDefinition($column,
$groupedColumns, $edit_key)) ?>;
+<?php if($credentials =
$this->getParameterValue($edit_key.'.fields.'.$column->key.'.credentials'))
echo 'endif;'?>
+<?php endforeach; ?>
+if(isset($fieldset['items']))$formpanel->config_array['items'][] = $fieldset;
<?php endforeach; ?>
-$formpanel->config_array['items'][] = $fieldset;
-<?php endforeach; ?>
<?php if (count($pages) > 0): ?>
$form_config_org[] = $formpanel->config_array;
$tabpages_config_items_org = array();
--
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.