Changeset 1032 for trunk
- Timestamp:
- 07/20/08 01:04:39 (5 months ago)
- Files:
-
- trunk/lib/jelix/forms/jFormsBase.class.php (modified) (1 diff)
- trunk/lib/jelix/forms/jFormsBuilderBase.class.php (modified) (2 diffs)
- trunk/lib/jelix/plugins/tpl/html/cfunction.formfull.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/jelix/forms/jFormsBase.class.php
r1031 r1032 126 126 $this->container->updatetime = time(); 127 127 $this->sel = $sel; 128 } 129 130 public function getSelector() { 131 return $this->sel; 128 132 } 129 133 trunk/lib/jelix/forms/jFormsBuilderBase.class.php
r877 r1032 58 58 $this->_action = $action; 59 59 $this->_actionParams = $actionParams; 60 $this->_name = jFormsBuilderBase::generateFormName( );60 $this->_name = jFormsBuilderBase::generateFormName($this->_form->getSelector()); 61 61 if($GLOBALS['gJCoord']->response!= null && $GLOBALS['gJCoord']->response->getType() == 'html'){ 62 62 $this->_endt = ($GLOBALS['gJCoord']->response->isXhtml()?'/>':'>'); … … 106 106 * generates a name for the form 107 107 */ 108 public static function generateFormName(){ 109 static $number = 0; 110 $number++; 111 return 'jform'.$number; 108 protected static function generateFormName($sel){ 109 static $forms = array(); 110 $name = 'jforms_'.str_replace('~','_',$sel); 111 if (isset($forms[$sel])) { 112 return $name.(++$forms[$sel]); 113 } else 114 $forms[$sel] = 0; 115 return $name; 112 116 } 113 117 } trunk/lib/jelix/plugins/tpl/html/cfunction.formfull.php
r1031 r1032 57 57 $formfullBuilder = $formfull->getBuilder('.$builder.'); 58 58 $formfullBuilder->setAction('.$params[1].','.$params[2].'); 59 $formfullBuilder->outputHeader('.$options.') );59 $formfullBuilder->outputHeader('.$options.'); 60 60 $formfullBuilder->outputAllControls(); 61 61 $formfullBuilder->outputFooter();';
