BUG 8194 we proceeded to the empowerment of the link in view mode

This commit is contained in:
Alvaro Campos
2011-12-22 12:00:49 -04:00
parent 70cd6ebcbc
commit 86dc20738a

View File

@@ -2122,16 +2122,7 @@ class XmlForm_Field_Link extends XmlForm_Field {
$target = G::replaceDataField ( $this->target, $owner->values );
$value = G::replaceDataField ( $this->value, $owner->values );
$label = G::replaceDataField ( $this->label, $owner->values );
if ($this->mode == 'edit'){
$html = '<a class="tableOption" href=\'' . $this->htmlentities ( $link, ENT_QUOTES, 'utf-8' ) . '\'' . 'id="form[' . $this->name . ']" name="form[' . $this->name . ']" style="' . htmlentities ( $this->style, ENT_QUOTES, 'utf-8' ) .'" '. (($this->onclick) ? ' onclick="' . htmlentities ( $onclick, ENT_QUOTES, 'utf-8' ) . '"' : '') . (($this->target) ? ' target="' . htmlentities ( $target, ENT_QUOTES, 'utf-8' ) . '"' : '') . '>' . $this->htmlentities ( $this->value === '' ? $label : $value, ENT_QUOTES, 'utf-8' ) . '</a>';
$html .= $this->renderHint();
} else {
$html = $this->htmlentities ( $this->value === '' ? $label : $value, ENT_QUOTES, 'utf-8' );
$html .= '<input ';
$html .= 'id="form['.$this->name.']" ';
$html .= 'name="form['.$this->name.']" ';
$html .= 'type="hidden" value="' . $this->htmlentities ( $link, ENT_QUOTES, 'utf-8' ) . '" />';
}
$html = '<a class="tableOption" href=\'' . $this->htmlentities ( $link, ENT_QUOTES, 'utf-8' ) . '\'' . 'id="form[' . $this->name . ']" name="form[' . $this->name . ']" style="' . htmlentities ( $this->style, ENT_QUOTES, 'utf-8' ) .'" '. (($this->onclick) ? ' onclick="' . htmlentities ( $onclick, ENT_QUOTES, 'utf-8' ) . '"' : '') . (($this->target) ? ' target="' . htmlentities ( $target, ENT_QUOTES, 'utf-8' ) . '"' : '') . '>' . $this->htmlentities ( $this->value === '' ? $label : $value, ENT_QUOTES, 'utf-8' ) . '</a>';
return $html;
}