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:
@@ -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 . ']" ';
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user