diff --git a/gulliver/system/class.xmlform.php b/gulliver/system/class.xmlform.php index 24a7c573e..972e022e4 100755 --- a/gulliver/system/class.xmlform.php +++ b/gulliver/system/class.xmlform.php @@ -3240,14 +3240,12 @@ class XmlForm_Field_Submit extends XmlForm_Field public function render ($value = null, $owner = null) { $onclick = G::replaceDataField( $this->onclick, $owner->values ); - if ($onclick != '') { - $onclick = $onclick . "this.disabled=true;this.form.submit();"; - } + if ($this->mode === 'edit') { // if ($this->readOnly) // 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' ) . '"' : 'onclick="this.disabled=true;this.form.submit();"') . " />"; - } elseif ($this->mode === 'view') { + 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' ) . '"' : '') . " />"; //$sLinkNextStep = 'window.open("' . $owner->fields['__DYNAFORM_OPTIONS']->xmlMenu->values['NEXT_STEP'] . '", "_self");'; $html = '';