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'.
This commit is contained in:
jennylee
2012-11-20 10:58:11 -04:00
parent 7c1902a68e
commit 7c8b33049a
2 changed files with 4 additions and 5 deletions

View File

@@ -3010,9 +3010,9 @@ class XmlForm_Field_Submit extends XmlForm_Field
$html = '';
if (isset( $_SESSION['CURRENT_DYN_UID'] )) {
$sLinkNextStep = 'window.location=("casesSaveDataView?UID=' . $_SESSION['CURRENT_DYN_UID'] . '");';
//$html = '<input style="' . $this->style . '" class="module_app_button___gray ' . $this->className . '" id="form[' . $this->name . ']" name="form[' . $this->name . ']" type="button" value="' . G::LoadTranslation( 'ID_CONTINUE' ) . '" onclick="' . htmlentities( $sLinkNextStep, ENT_COMPAT, 'utf-8' ) . '" />';
$html = "<input style=\"{$this->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 = '<input style="' . $this->style . '" class="module_app_button___gray ' . $this->className . '" id="form[' . $this->name . ']" name="form[' . $this->name . ']" type="button" value="' . G::LoadTranslation( 'ID_CONTINUE' ) . '" onclick="' . htmlentities( $sLinkNextStep, ENT_COMPAT, 'utf-8' ) . '" />';
}
$html .= '<input ';
$html .= 'id="form[' . $this->name . ']" ';
$html .= 'name="form[' . $this->name . ']" ';

View File

@@ -435,12 +435,11 @@ if ($actionAjax == 'historyDynaformGridPreview') {
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = 'return false;';
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['DYNUIDPRINT'] = $_POST['DYN_UID'];
?>
<script language="javascript">
window.onload = function () {
var inputs = document.getElementsByTagName('input');
console.log(inputs);
for(var i= 0; i<inputs.length; i++) {
console.log(inputs[i].type);
if(inputs[i].type == 'button' || inputs[i].type == 'submit')
{
inputs[i].disabled = true;