cvs: pear /HTML_QuickForm/QuickForm textarea.php
| From: | Bertrand Mansion | Date: | Sat, 01 Feb 2003 19:13:45 +0000 |
| Subject: | cvs: pear /HTML_QuickForm/QuickForm textarea.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-8647@lists.php.net to get a copy of this message | ||
mansion Sat Feb 1 14:13:45 2003 EDT
Modified files:
/pear/HTML_QuickForm/QuickForm textarea.php
Log:
Use preformatted in frozen mode only when the wrap is set to something other than off (soft,
hard).
Index: pear/HTML_QuickForm/QuickForm/textarea.php
diff -u pear/HTML_QuickForm/QuickForm/textarea.php:1.5
pear/HTML_QuickForm/QuickForm/textarea.php:1.6
--- pear/HTML_QuickForm/QuickForm/textarea.php:1.5 Fri Nov 29 10:02:33 2002
+++ pear/HTML_QuickForm/QuickForm/textarea.php Sat Feb 1 14:13:45 2003
@@ -17,7 +17,7 @@
// | Bertrand Mansion <bmansion@mamasam.com> |
// +----------------------------------------------------------------------+
//
-// $Id: textarea.php,v 1.5 2002/11/29 15:02:33 mansion Exp $
+// $Id: textarea.php,v 1.6 2003/02/01 19:13:45 mansion Exp $
require_once("HTML/QuickForm/element.php");
@@ -221,7 +221,11 @@
function getFrozenHtml()
{
$tabs = $this->_getTabs();
- $html = "$tabs<pre>" . $this->_value . "</pre>";
+ if ($this->getAttribute('wrap') == 'off') {
+ $html = $this->_value;
+ } else {
+ $html = "$tabs<pre>".$this->_value."</pre>";
+ }
if ($this->_persistantFreeze) {
$html .= '<input type="hidden" name="' .
$this->getName() . '" value="' .
htmlspecialchars($this->_value) . '" />';