BUG 15071 Problemas en la extension de un output con la opcion "By clicking on the generated file link=Download the file" SOLVED

- Missing validation in the dropdown class
- Added validation in the dropdown class to add missing option only when the field is render in view mode
This commit is contained in:
Julio Cesar Laura
2014-06-02 13:35:25 -04:00
parent b6f057105e
commit 209b6591b7

View File

@@ -3178,17 +3178,12 @@ class XmlForm_Field_Checkbox extends XmlForm_Field
$checked = (isset( $value ) && ($value == $this->value)) ? 'checked' : ''; $checked = (isset( $value ) && ($value == $this->value)) ? 'checked' : '';
if ($this->labelOnRight) { if ($this->labelOnRight) {
$html = ''; $html = '';
$html = "<input id='form[" . $this->name . "]' value='{$this->value}' " . $this->NSFieldType() . " name='form[" . $this->name . "]' type='checkbox' $checked $readOnly disabled > $html = "<input value='{$this->value}' " . $this->NSFieldType() . " type='checkbox' $checked $readOnly disabled />
<span class='FormCheck'>" . $this->label . '</span></input>'; <span class='FormCheck'>" . $this->label . '</span></input>';
} else { } else {
$html = "<input id='form[" . $this->name . "]' value='{$this->value}' " . $this->NSFieldType() . " name='form[" . $this->name . "]' type='checkbox' $checked $readOnly disabled/>"; $html = "<input value='{$this->value}' " . $this->NSFieldType() . " type='checkbox' $checked $readOnly disabled />";
} }
$html .= "<input id='form[" . $this->name . "]' value='{$value}' name='form[" . $this->name . "]' type='hidden' />"; $html .= "<input id='form[" . $this->name . "]' value='{$value}' name='form[" . $this->name . "]' type='hidden' />";
// if($this->hint){
// $html .= '<a href="#" onmouseout="hideTooltip()" onmouseover="showTooltip(event, \''.$this->hint.'\');return false;">
// <image src="/images/help4.gif" width="15" height="15" border="0"/>
// </a>';
// }
return $html; return $html;
} }
} }
@@ -3360,11 +3355,6 @@ class XmlForm_Field_Submit extends XmlForm_Field
$sLinkNextStep = 'window.location=("casesSaveDataView?UID=' . $_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 . ']" ' . $this->NSFieldType() . ' name="form[' . $this->name . ']" type="button" value="' . G::LoadTranslation( 'ID_CONTINUE' ) . '" onclick="' . htmlentities( $sLinkNextStep, ENT_COMPAT, 'utf-8' ) . '" />'; $html = '<input style="' . $this->style . '" class="module_app_button___gray ' . $this->className . '" id="form[' . $this->name . ']" ' . $this->NSFieldType() . ' 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 . ']" ';
$html .= 'type="hidden" value="' . $this->htmlentities( $this->label, ENT_QUOTES, 'utf-8' ) . '" />';
return $html; return $html;
} else { } else {
return $this->htmlentities( $value, ENT_COMPAT, 'utf-8' ); return $this->htmlentities( $value, ENT_COMPAT, 'utf-8' );
@@ -3616,7 +3606,7 @@ class XmlForm_Field_Dropdown extends XmlForm_Field
$html = $html . "<option value=\"\"></option>"; $html = $html . "<option value=\"\"></option>";
} }
if ($value !== $findValue) { if ($value !== $findValue && $this->renderMode == 'view') {
$html .= "<option value=\"$value\" selected=\"selected\">$value</option>"; $html .= "<option value=\"$value\" selected=\"selected\">$value</option>";
} }