using POP before SMTP.
- Seed random number generator in one place during script init.
- Add native output buffering.
+ - Allow control over white space wrapping of auto-generated SquirrelMail
+ option widgets.
Version 1.5.1 (branched on 2006-02-12)
--------------------------------------
* @var string
*/
var $caption;
+ /**
+ * Whether or not the caption text is allowed to wrap
+ * @var boolean
+ */
+ var $caption_wrap;
/**
* The type of INPUT element
*
$this->raw_option_array = $raw_option_array;
$this->name = $name;
$this->caption = $caption;
+ $this->caption_wrap = TRUE;
$this->type = $type;
$this->refresh_level = $refresh_level;
$this->possible_values = $possible_values;
$this->new_value = $new_value;
}
+ /**
+ * Set whether the caption is allowed to wrap for this option.
+ * @param boolean $caption_wrap
+ */
+ function setCaptionWrap($caption_wrap) {
+ $this->caption_wrap = $caption_wrap;
+ }
+
/**
* Set the size for this option.
* @param integer $size
(isset($optset['htmlencoded']) ? $optset['htmlencoded'] : false)
);
+ /* If provided, set if the caption is allowed to wrap for this option. */
+ if (isset($optset['caption_wrap'])) {
+ $next_option->setCaptionWrap($optset['caption_wrap']);
+ }
+
/* If provided, set the size for this option. */
if (isset($optset['size'])) {
$next_option->setSize($optset['size']);
foreach ($option['options'] as $opt) {
if ($opt->type != SMOPT_TYPE_HIDDEN) {
echo "<tr>\n" .
- " <td class=\"optionName\">\n ";
+ " <td class=\"optionName\"" . ($opt->caption_wrap ? '' : ' style="white-space:nowrap"') . ">\n ";
if ($opt->type == SMOPT_TYPE_BOOLEAN_CHECKBOX
|| $opt->type == SMOPT_TYPE_BOOLEAN) {