Changeset 1062

Show
Ignore:
Timestamp:
08/25/08 23:42:33 (3 months ago)
Author:
laurentj
Message:

ticket #562: names of the root tags of jforms file were not consistent
fixed also a warning generated by date_default_timezone_get

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/jelix-scripts/templates/form.xml.tpl

    r938 r1062  
    11<?xml version="1.0" encoding="utf-8"?> 
    2 <forms xmlns="http://jelix.org/ns/forms/1.1"> 
     2<form xmlns="http://jelix.org/ns/forms/1.1"> 
    33%%content%% 
    4 </forms
     4</form
  • trunk/lib/jelix/core-modules/jelix/locales/en_EN/formserr.UTF-8.properties

    r1041 r1062  
    1818notunique.tag=(817) tag %1$s must be unique (file %2$s) 
    1919control.not.allowed= (818) The tag %1$s is not allowed in %2$s (file %3$s) 
     20no.child.control= (819) The tag %1$s must contain some controls (file %2$s) 
     21bad.root.tag=(820) the root element %1$s is incorrect, it should have the name "form" (fichier %2$s) 
    2022 
    2123js.err.invalid= "%s" field is invalid 
  • trunk/lib/jelix/core-modules/jelix/locales/en_US/formserr.UTF-8.properties

    r1041 r1062  
    1919control.not.allowed= (818) The tag %1$s is not allowed in %2$s (file %3$s) 
    2020no.child.control= (819) The tag %1$s must contain some controls (file %2$s) 
     21bad.root.tag=(820) the root element %1$s is incorrect, it should have the name "form" (fichier %2$s) 
    2122 
    2223js.err.invalid= "%s" field is invalid 
  • trunk/lib/jelix/core-modules/jelix/locales/fr_FR/formserr.UTF-8.properties

    r1041 r1062  
    1919control.not.allowed= (818) La balise %1$s n'est pas autorisé dans %2$s (fichier %3$s) 
    2020no.child.control= (819) La balise %1$s doit contenir des balises de contrôles (fichier %2$s) 
     21bad.root.tag=(820) la balise racine %1$s est incorrecte, elle devrait avoir pour nom "form" (fichier %2$s) 
    2122 
    2223js.err.invalid=La saisie de "%s" est invalide 
  • trunk/lib/jelix/core/jConfigCompiler.class.php

    r1058 r1062  
    9292            $config->timeZone = "Europe/Paris"; 
    9393#else 
    94             $config->timeZone = date_default_timezone_get(); 
     94            $tz = ini_get('date.timezone'); 
     95            if ($tz != '') 
     96                $config->timeZone = $tz; 
     97            else 
     98                $config->timeZone = "Europe/Paris"; 
    9599#endif 
    96100        } 
     
    158162            $config['timeZone'] = "Europe/Paris"; 
    159163#else 
    160             $config['timeZone'] = date_default_timezone_get(); 
     164            $tz = ini_get('date.timezone'); 
     165            if ($tz != '') 
     166                $config['timeZone'] = $tz; 
     167            else 
     168                $config['timeZone'] = "Europe/Paris"; 
    161169#endif 
    162170        } 
  • trunk/lib/jelix/docs/ns/jforms_1.1.rng

    r1053 r1062  
    77 
    88   <start> 
    9       <element name="forms"> 
     9      <element name="form"> 
    1010         <ref name="form.controls" /> 
    1111      </element> 
  • trunk/lib/jelix/forms/jFormsCompiler.class.php

    r1057 r1062  
    4141            $compiler = new jFormsCompiler_jf_1_0($this->sourceFile); 
    4242        } elseif ($doc->documentElement->namespaceURI == JELIX_NAMESPACE_BASE.'forms/1.1') { 
     43            if ($doc->documentElement->localName != 'form') { 
     44                throw new jException('jelix~formserr.bad.root.tag',array($doc->documentElement->localName, $this->sourceFile)); 
     45            } 
    4346            require_once(JELIX_LIB_PATH.'forms/jFormsCompiler_jf_1_1.class.php'); 
    4447            $compiler = new jFormsCompiler_jf_1_1($this->sourceFile); 
  • trunk/testapp/modules/jelix_tests/forms/label.form.xml

    r629 r1062  
    11<?xml version="1.0" encoding="utf-8"?> 
    2 <forms xmlns="http://jelix.org/ns/forms/1.0"> 
     2<form xmlns="http://jelix.org/ns/forms/1.0"> 
    33 
    44   <input ref="label" required="true"> 
     
    66   </input> 
    77    
    8 </forms
     8</form
  • trunk/testapp/modules/jelix_tests/forms/product.form.xml

    r504 r1062  
    11<?xml version="1.0" encoding="utf-8"?> 
    2 <forms xmlns="http://jelix.org/ns/forms/1.0"> 
     2<form xmlns="http://jelix.org/ns/forms/1.0"> 
    33 
    44   <input ref="name" required="true"> 
     
    2020    </checkboxes> 
    2121 
    22 </forms
     22</form
  • trunk/testapp/modules/jelix_tests/tests/jforms.compiler.html_cli.php

    r1050 r1062  
    820820    protected $_BadXmlForms = array( 
    821821array( 
    822 '<forms xmlns="http://jelix.org/ns/forms/1.0"> 
     822'<form xmlns="http://jelix.org/ns/forms/1.0"> 
    823823  <reset ref="reset1"> 
    824824    <label>annulation 1</label> 
     
    827827    <label>annulation 2</label> 
    828828  </reset> 
    829 </forms>', 
     829</form>', 
    830830'jelix~formserr.notunique.tag', 
    831831array( 'reset','myfile') 
  • trunk/testapp/modules/jelix_tests/tests/jforms.compiler_1_1.html_cli.php

    r1050 r1062  
    10581058    protected $_BadXmlForms = array( 
    10591059array( 
    1060 '<forms xmlns="http://jelix.org/ns/forms/1.1"> 
     1060'<form xmlns="http://jelix.org/ns/forms/1.1"> 
    10611061  <reset ref="reset1"> 
    10621062    <label>annulation 1</label> 
     
    10651065    <label>annulation 2</label> 
    10661066  </reset> 
    1067 </forms>', 
     1067</form>', 
    10681068'jelix~formserr.notunique.tag', 
    10691069array( 'reset','myfile') 
  • trunk/testapp/modules/testapp/forms/products.form.xml

    r661 r1062  
    11<?xml version="1.0" encoding="utf-8"?> 
    2 <forms xmlns="http://jelix.org/ns/forms/1.0"> 
     2<form xmlns="http://jelix.org/ns/forms/1.0"> 
    33 
    44   <input ref="name" required="true"> 
     
    1818  </submit> 
    1919 
    20 </forms
     20</form
  • trunk/testapp/modules/testapp/forms/sample.form.xml

    r1055 r1062  
    11<?xml version="1.0" encoding="utf-8"?> 
    2 <forms xmlns="http://jelix.org/ns/forms/1.1"> 
     2<form xmlns="http://jelix.org/ns/forms/1.1"> 
    33 
    44   <hidden ref="hiddenvalue" defaultvalue="my hidden value"/> 
     
    119119  </submit> 
    120120 
    121 </forms
     121</form
Download in other formats: Unified Diff Zip Archive