Changeset 1070 for trunk/lib
- Timestamp:
- 08/31/08 11:25:39 (4 months ago)
- Files:
-
- trunk/lib/jelix/core-modules/jelix/locales/en_EN/formserr.UTF-8.properties (modified) (1 diff)
- trunk/lib/jelix/core-modules/jelix/locales/en_US/formserr.UTF-8.properties (modified) (1 diff)
- trunk/lib/jelix/core-modules/jelix/locales/fr_FR/formserr.UTF-8.properties (modified) (1 diff)
- trunk/lib/jelix/plugins/tpl/html/function.ctrl_control.php (modified) (1 diff)
- trunk/lib/jelix/plugins/tpl/html/function.ctrl_label.php (modified) (1 diff)
- trunk/lib/jelix/plugins/tpl/html/function.ctrl_value.php (modified) (1 diff)
- trunk/lib/jelix/tpl/jTpl.class.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/jelix/core-modules/jelix/locales/en_EN/formserr.UTF-8.properties
r1062 r1070 21 21 bad.root.tag=(820) the root element %1$s is incorrect, it should have the name "form" (fichier %2$s) 22 22 23 unknow.control=(830) The control "%1$s" doesn't exist in the form "%2$s" (template %3$s) 24 23 25 js.err.invalid= "%s" field is invalid 24 26 js.err.required= "%s" field is required trunk/lib/jelix/core-modules/jelix/locales/en_US/formserr.UTF-8.properties
r1062 r1070 21 21 bad.root.tag=(820) the root element %1$s is incorrect, it should have the name "form" (fichier %2$s) 22 22 23 unknow.control=(830) The control "%1$s" doesn't exist in the form "%2$s" (template %3$s) 24 23 25 js.err.invalid= "%s" field is invalid 24 26 js.err.required= "%s" field is required trunk/lib/jelix/core-modules/jelix/locales/fr_FR/formserr.UTF-8.properties
r1062 r1070 21 21 bad.root.tag=(820) la balise racine %1$s est incorrecte, elle devrait avoir pour nom "form" (fichier %2$s) 22 22 23 unknow.control=(830) Le contrĂ´le "%1$s" n'existe pas dans le formulaire "%2$s" (template "%3$s") 24 23 25 js.err.invalid=La saisie de "%s" est invalide 24 26 js.err.required=La saisie de "%s" est obligatoire trunk/lib/jelix/plugins/tpl/html/function.ctrl_control.php
r877 r1070 28 28 else { 29 29 $ctrls = $tpl->_privateVars['__form']->getControls(); 30 if (!isset($ctrls[$ctrlname])) { 31 throw new jException('jelix~formserr.unknow.control', 32 array($ctrlname, $tpl->_privateVars['__form']->getSelector(),$tpl->_templateName)); 33 } 30 34 $ctrl = $ctrls[$ctrlname]; 31 35 } trunk/lib/jelix/plugins/tpl/html/function.ctrl_label.php
r877 r1070 25 25 }else{ 26 26 $ctrls = $tpl->_privateVars['__form']->getControls(); 27 if (!isset($ctrls[$ctrlname])) { 28 throw new jException('jelix~formserr.unknow.control', 29 array($ctrlname, $tpl->_privateVars['__form']->getSelector(),$tpl->_templateName)); 30 } 27 31 $ctrl=$ctrls[$ctrlname]; 28 32 } trunk/lib/jelix/plugins/tpl/html/function.ctrl_value.php
r1016 r1070 29 29 $tpl->_privateVars['__displayed_ctrl'][$ctrlname] = true; 30 30 $ctrlname = $tpl->_privateVars['__ctrlref']; 31 } else{31 } else { 32 32 $ctrls = $tpl->_privateVars['__form']->getControls(); 33 if (!isset($ctrls[$ctrlname])) { 34 throw new jException('jelix~formserr.unknow.control', 35 array($ctrlname, $tpl->_privateVars['__form']->getSelector(),$tpl->_templateName)); 36 } 33 37 $ctrl = $ctrls[$ctrlname]; 34 38 } trunk/lib/jelix/tpl/jTpl.class.php
r1001 r1070 208 208 209 209 /** 210 * contains the name of the template file 211 * It have a public access only for plugins. So you musn't use directly this property 212 * except from tpl plugins. 213 * @var string 214 * @since 1.1 215 */ 216 public $_templateName; 217 218 /** 210 219 * include the compiled template file and call one of the generated function 211 220 * @param string $tpl template selector … … 220 229 $sel->userFunctions = $this->userFunctions; 221 230 jIncluder::inc($sel); 231 $this->_templateName = $sel->toString(); 222 232 $fct = $fctname.md5($sel->module.'_'.$sel->resource.'_'.$sel->outputType.($trusted?'_t':'')); 223 233 #else 224 234 $tpl = JTPL_TEMPLATES_PATH . $tpl; 225 $ filename = basename($tpl);226 $cachefile = JTPL_CACHE_PATH.$outputtype.($trusted?'_t':'').'_'.$ filename;235 $this->_templateName = basename($tpl); 236 $cachefile = JTPL_CACHE_PATH.$outputtype.($trusted?'_t':'').'_'.$this->_templateName; 227 237 228 238 $mustCompile = $GLOBALS['jTplConfig']['compilation_force']['force'] || !file_exists($cachefile); … … 260 270 #ifnot JTPL_STANDALONE 261 271 $sel = new jSelectorTpl($tpl, $outputtype, $trusted); 272 $sel->userModifiers = $this->userModifiers; 273 $sel->userFunctions = $this->userFunctions; 262 274 jIncluder::inc($sel); 263 275 $md = md5($sel->module.'_'.$sel->resource.'_'.$sel->outputType.($trusted?'_t':'')); 276 $this->_templateName = $sel->toString(); 264 277 #else 265 278 $tpl = JTPL_TEMPLATES_PATH . $tpl; 266 $ filename = basename($tpl);267 $cachefile = JTPL_CACHE_PATH.$outputtype.($trusted?'_t':'').'_'.$ filename;279 $this->_templateName = basename($tpl); 280 $cachefile = JTPL_CACHE_PATH.$outputtype.($trusted?'_t':'').'_'.$this->_templateName; 268 281 269 282 $mustCompile = $GLOBALS['jTplConfig']['compilation_force']['force'] || !file_exists($cachefile); … … 277 290 include_once(JTPL_PATH . 'jTplCompiler.class.php'); 278 291 $compiler = new jTplCompiler(); 292 $compiler->setUserPlugins( $this->userModifiers, $this->userFunctions); 279 293 $compiler->compile($tpl,$outputtype,$trusted); 280 294 }
