From 0ed503d625ae4dd8f9e1a01a52a30ee81b4e50ae Mon Sep 17 00:00:00 2001 From: jennylee Date: Mon, 19 Nov 2012 13:16:10 -0400 Subject: [PATCH 1/3] BUG-7802 In Advanced Search -> Information -> Dynaform, the Submit Button was enabled, like in edition mode. I changed the render of the Submit Button on file 'class.xmlform.php' in a view mode, to show this button disabled. --- gulliver/system/class.xmlform.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gulliver/system/class.xmlform.php b/gulliver/system/class.xmlform.php index e86f1e98e..bf9ce0a8e 100755 --- a/gulliver/system/class.xmlform.php +++ b/gulliver/system/class.xmlform.php @@ -3005,12 +3005,13 @@ class XmlForm_Field_Submit extends XmlForm_Field // return 'label .'\' disabled/>'; return "style}\" class='module_app_button___gray {$this->className}' id=\"form[{$this->name}]\" name=\"form[{$this->name}]\" type='submit' value=\"{$this->label}\" " . (($this->onclick) ? 'onclick="' . htmlentities( $onclick, ENT_COMPAT, 'utf-8' ) . '"' : '') . " />"; } elseif ($this->mode === 'view') { - // return "style};display:none\" disabled='disabled' class='module_app_button___gray module_app_buttonDisabled___gray {$this->className}' id=\"form[{$this->name}]\" name=\"form[{$this->name}]\" type='submit' value=\"{$this->label}\" " . (($this->onclick) ? 'onclick="' . htmlentities ( $onclick, ENT_COMPAT, 'utf-8' ) . '"' : '') . " />"; + //return "style};display:none\" disabled='disabled' class='module_app_button___gray module_app_buttonDisabled___gray {$this->className}' id=\"form[{$this->name}]\" name=\"form[{$this->name}]\" type='submit' value=\"{$this->label}\" " . (($this->onclick) ? 'onclick="' . htmlentities ( $onclick, ENT_COMPAT, 'utf-8' ) . '"' : '') . " />"; //$sLinkNextStep = 'window.open("' . $owner->fields['__DYNAFORM_OPTIONS']->xmlMenu->values['NEXT_STEP'] . '", "_self");'; $html = ''; if (isset( $_SESSION['CURRENT_DYN_UID'] )) { $sLinkNextStep = 'window.location=("casesSaveDataView?UID=' . $_SESSION['CURRENT_DYN_UID'] . '");'; - $html = ''; + //$html = ''; + $html = "style};display:disabled\" disabled='disabled' class='module_app_button___gray module_app_buttonDisabled___gray {$this->className}' id=\"form[{$this->name}]\" name=\"form[{$this->name}]\" type='submit' value=\"{$this->label}\" " . (($this->onclick) ? 'onclick="' . htmlentities ( $onclick, ENT_COMPAT, 'utf-8' ) . '"' : '') . " />"; } $html .= 'name . ']" '; From 7c1902a68e551dc3466f6e458357babd56d7ccc7 Mon Sep 17 00:00:00 2001 From: jennylee Date: Tue, 20 Nov 2012 09:56:34 -0400 Subject: [PATCH 2/3] BUG-7802 In Advanced Search -> Information -> Dynaform, the Submit Button was enabled, like in edition mode. I added a javascript code to disable the Submit Button on file 'workflow/engine/methods/cases/casesHistoryDynaformPage_Ajax.php'. --- .../cases/casesHistoryDynaformPage_Ajax.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/workflow/engine/methods/cases/casesHistoryDynaformPage_Ajax.php b/workflow/engine/methods/cases/casesHistoryDynaformPage_Ajax.php index 3257165ed..1686b3af3 100644 --- a/workflow/engine/methods/cases/casesHistoryDynaformPage_Ajax.php +++ b/workflow/engine/methods/cases/casesHistoryDynaformPage_Ajax.php @@ -434,12 +434,28 @@ if ($actionAjax == 'historyDynaformGridPreview') { $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP'] = '#'; $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = 'return false;'; $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['DYNUIDPRINT'] = $_POST['DYN_UID']; + ?> + + AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_POST['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view' ); ?>