diff --git a/application/forms.class.inc.php b/application/forms.class.inc.php index 5434358ef..60ed36117 100644 --- a/application/forms.class.inc.php +++ b/application/forms.class.inc.php @@ -84,15 +84,14 @@ class DesignerForm public function Render($oP, $bReturnHTML = false) { + $sFormId = $this->GetFormId(); if ($this->oParentForm == null) { - $sFormId = $this->sFormId; $sReturn = '
'; } else { $sReturn = ''; - $sFormId = $this->oParentForm->sFormId; } $sHiddenFields = ''; foreach($this->aFieldSets as $sLabel => $aFields) @@ -207,17 +206,14 @@ class DesignerForm $sReturn = ''; $sActionUrl = addslashes($this->sSubmitTo); $sJSSubmitParams = json_encode($this->aSubmitParams); + $sFormId = $this->GetFormId(); if ($this->oParentForm == null) { - $sFormId = $this->sFormId; $sReturn = ''; $sReturn .= ''; $sReturn .= ''; } - else - { - $sFormId = $this->oParentForm->sFormId; - } + $sHiddenFields = ''; foreach($this->aFieldSets as $sLabel => $aFields) { @@ -372,7 +368,11 @@ $('#$sDialogId').dialog({ oForm.submit(); if (AnimateDlgButtons) { - AnimateDlgButtons(this); + sFormId = oForm.attr('id'); + if (oFormValidation[sFormId].length == 0) + { + AnimateDlgButtons(this); + } } } }, { text: "$sCancelButtonLabel", click: function() { KillAllMenus(); $(this).dialog( "close" ); $(this).remove(); } }, @@ -491,6 +491,15 @@ EOF return $this->oParentForm; } + public function GetFormId() + { + if ($this->oParentForm) + { + $this->oParentForm->GetFormId(); + } + return $this->sFormId; + } + public function SetDisplayed($bDisplayed) { $this->bDisplayed = $bDisplayed; @@ -912,7 +921,7 @@ class DesignerTextField extends DesignerFormField $sMandatory = $this->bMandatory ? 'true' : 'false'; $oP->add_ready_script( <<IsReadOnly() ? 'readonly' : ''; $oP->add_ready_script( <<bMandatory ? 'true' : 'false'; $oP->add_ready_script( <<add_ready_script( <<
'.Dict::S('UI:Form:Property').''.Dict::S('UI:Form:Value').'