From 611fd3b3a242655de2ee34599e5df1cd3d0db7e4 Mon Sep 17 00:00:00 2001 From: Alvaro Campos Date: Tue, 29 Mar 2011 16:18:17 -0400 Subject: [PATCH] fixed issue firefox4 fields required --- gulliver/system/class.xmlform.php | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/gulliver/system/class.xmlform.php b/gulliver/system/class.xmlform.php index 8a1bfe09a..1e729f310 100644 --- a/gulliver/system/class.xmlform.php +++ b/gulliver/system/class.xmlform.php @@ -2334,10 +2334,10 @@ class XmlForm_Field_Dropdown extends XmlForm_Field { // added end if (! $onlyValue) { if ($this->mode === 'edit') { - $html = 'style) ? 'style="' . $this->style . '"' : '') . '>'; } elseif ($this->mode === 'view') { $html = $this->htmlentities ( isset ( $this->options [$value] ) ? $this->options [$value] : '', ENT_COMPAT, 'utf-8' ); - $html .= 'style) ? 'style="' . $this->style . '"' : '') . '>'; } foreach ( $this->option as $optionName => $option ) { // if change the type with the settype function then compare "0" == "" so both can be diferentiated @@ -2370,7 +2370,7 @@ class XmlForm_Field_Dropdown extends XmlForm_Field { //add by alvaro if($this->readonly){ $readOnlyField = ""; - $html1 = 'style) ? 'style="' . $this->style . '"' : '') . '>'; foreach ( $this->option as $optionName => $option ) { // if change the type with the settype function then compare "0" == "" so both can be diferentiated settype($optionName,'string'); @@ -3249,13 +3249,13 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText } if ( $this->editable != "0") { - $html = '' + $html = '' . ' ' . '' . '' . ''; } else { - $html = '' + $html = '' . ' ' . '' . '' @@ -3307,18 +3307,13 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText if(browsername($_SERVER['HTTP_USER_AGENT'])=='Mozilla Firefox'){ $len = strlen($valueaux); - $len = $len - 10; - $html .= '' - . '' - . ''; - } - if((browsername($_SERVER['HTTP_USER_AGENT'])=='Internet Explorer 8')||(browsername($_SERVER['HTTP_USER_AGENT'])=='Internet Explorer 7')){ - $len = strlen($valueaux); + $len = $len - 10; + } else if((browsername($_SERVER['HTTP_USER_AGENT'])=='Internet Explorer 8')||(browsername($_SERVER['HTTP_USER_AGENT'])=='Internet Explorer 7')){ + $len = strlen($valueaux); + }else $len = strlen($valueaux); $html .= '' . '' - . ''; - } - + . ''; } return $html;