From 9562c54b3e181055af54b969b413db655f1435aa Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Mon, 4 Nov 2013 10:46:36 -0400 Subject: [PATCH] Add attribute "parentFormId" to "XmlForm_Field_XmlMenu" class --- gulliver/system/class.publisher.php | 2 +- gulliver/system/class.xmlMenu.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gulliver/system/class.publisher.php b/gulliver/system/class.publisher.php index def8a217f..1088b1014 100755 --- a/gulliver/system/class.publisher.php +++ b/gulliver/system/class.publisher.php @@ -191,7 +191,7 @@ class Publisher if (($this->publishType == 'dynaform') && (($Part['Template'] == 'xmlform') || ($Part['Template'] == 'xmlform_preview'))) { $dynaformShow = (isset( $G_FORM->printdynaform ) && ($G_FORM->printdynaform)) ? 'gulliver/dynaforms_OptionsPrint' : 'gulliver/dynaforms_Options'; - $G_FORM->fields = G::array_merges( array ('__DYNAFORM_OPTIONS' => new XmlForm_Field_XmlMenu( new Xml_Node( '__DYNAFORM_OPTIONS', 'complete', '', array ('type' => 'xmlmenu','xmlfile' => $dynaformShow + $G_FORM->fields = G::array_merges( array ('__DYNAFORM_OPTIONS' => new XmlForm_Field_XmlMenu( new Xml_Node( '__DYNAFORM_OPTIONS', 'complete', '', array ('type' => 'xmlmenu','xmlfile' => $dynaformShow, 'parentFormId' => $G_FORM->id ) ), SYS_LANG, PATH_XMLFORM, $G_FORM ) ), $G_FORM->fields ); } diff --git a/gulliver/system/class.xmlMenu.php b/gulliver/system/class.xmlMenu.php index 216c74c9d..bde2c516c 100755 --- a/gulliver/system/class.xmlMenu.php +++ b/gulliver/system/class.xmlMenu.php @@ -33,6 +33,7 @@ class xmlMenu extends form { public $type = 'xmlmenu'; + public $parentFormId; } /** @@ -50,6 +51,7 @@ class XmlForm_Field_XmlMenu extends XmlForm_Field public $xmlMenu; public $home = ''; public $withoutLabel = true; + public $parentFormId; /** * XmlForm_Field_XmlMenu @@ -78,6 +80,7 @@ class XmlForm_Field_XmlMenu extends XmlForm_Field { $this->xmlMenu = new xmlMenu( $this->xmlfile, $this->home ); $this->xmlMenu->setValues( $value ); + $this->xmlMenu->parentFormId = $this->parentFormId; $this->type = 'xmlmenuDyn'; $template = PATH_CORE . 'templates/' . $this->type . '.html'; $out = $this->xmlMenu->render( $template, $scriptCode );