From: <gem...@li...> - 2012-01-31 08:50:54
|
Revision: 434 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=434&view=rev Author: mennodekker Date: 2012-01-31 08:50:45 +0000 (Tue, 31 Jan 2012) Log Message: ----------- Fxing 'save' button in last tab error Modified Paths: -------------- branches/1.5.x/library/classes/Gems/Controller/BrowseEditAction.php branches/1.5.x/library/layouts/scripts/gemsnew.phtml Modified: branches/1.5.x/library/classes/Gems/Controller/BrowseEditAction.php =================================================================== --- branches/1.5.x/library/classes/Gems/Controller/BrowseEditAction.php 2012-01-30 15:39:44 UTC (rev 433) +++ branches/1.5.x/library/classes/Gems/Controller/BrowseEditAction.php 2012-01-31 08:50:45 UTC (rev 434) @@ -292,7 +292,7 @@ */ public function beforeFormDisplay ($form, $isNew) { - if ($this->useTabbedForms) { + if ($this->useTabbedForms || $form instanceof Gems_Form_TableForm) { /* Not needed anymore @@TODO: Remove when proven, as there is a set tab //Create the tabs tried in $form->render() but somehow that is never reached if ($form instanceof Gems_TabForm) { @@ -304,10 +304,13 @@ $element = new MUtil_Form_Element_Html('formLinks'); $element->setValue($links); $element->setOrder(999); - $form->resetContext(); + if ($form instanceof Gems_TabForm) { + $form->resetContext(); + } $form->addElement($element); + $form->addDisplayGroup(array('formLinks'), 'form_buttons'); } - } else { + } else { $table = new MUtil_Html_TableElement(array('class' => 'formTable')); $table->setAsFormLayout($form, true, true); $table['tbody'][0][0]->class = 'label'; // Is only one row with formLayout, so all in output fields get class. @@ -359,6 +362,7 @@ $form = new Gems_TabForm($options); } else { $form = parent::createForm($options); + //$form = new Gems_Form_TableForm($options); } return $form; @@ -713,6 +717,9 @@ $data = $newData + $data; } + if ($form instanceof Gems_TabForm) { + $form->resetContext(); + } return $form; } Modified: branches/1.5.x/library/layouts/scripts/gemsnew.phtml =================================================================== --- branches/1.5.x/library/layouts/scripts/gemsnew.phtml 2012-01-30 15:39:44 UTC (rev 433) +++ branches/1.5.x/library/layouts/scripts/gemsnew.phtml 2012-01-31 08:50:45 UTC (rev 434) @@ -9,6 +9,12 @@ // Check if jQuery library is needed if ($this->jQuery) { echo $this->jQuery(); + //Error message for when jQuery can not be loaded + /*echo "<script> + if (typeof jQuery == 'undefined') { + document.writeln('<div class=\"errors\">The site requires external JavaScript from another domain, which is blocked or failed to load.</div>'); + } + </script>";*/ } // Check if dojo library is needed This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |