Fixes for XHTML validity
[shipsimu.git] / inc / classes / main / helper / web / class_WebFormHelper.php
index 1ec70bca8d5e36c56b75e3030bb2153f6997a80b..9a668d123d193ac82efb4c1ba485dca028fec194 100644 (file)
@@ -509,6 +509,12 @@ class WebFormHelper extends BaseHelper implements HelpableTemplate {
                        $subGroupName = $this->subGroupName;
                }
 
+               // Same sub group to open?
+               if (($this->subGroupOpened === false) && ($subGroupName == $this->subGroupName)) {
+                       // Abort here silently
+                       return false;
+               } // END - if
+
                // Initialize content with closing div by default
                $content = "    </div>\n</div><!-- Sub group- CLOSE //-->";
 
@@ -586,11 +592,12 @@ class WebFormHelper extends BaseHelper implements HelpableTemplate {
         * Add text (notes) surrounded by a div block. Still opened groups or sub
         * groups will be automatically closed.
         *
+        * @param       $noteId         Id for this note
         * @param       $formNotes      The form notes we shell addd
         * @return      void
         * @throws      FormClosedException             If the form is not yet opened
         */
-       public function addFormNote ($formNotes) {
+       public function addFormNote ($noteId, $formNotes) {
                // Is the form opened?
                if (($this->formOpened === false) && ($this->formEnabled === true)) {
                        // Throw an exception
@@ -604,9 +611,10 @@ class WebFormHelper extends BaseHelper implements HelpableTemplate {
                } // END - if
 
                // Generate the content
-               $inputContent = sprintf("       <div id=\"form_note\">
+               $inputContent = sprintf("       <div id=\"form_note_%s\">
                %s
        </div>",
+                       $noteId,
                        $formNotes
                );