X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Foptions.php;h=022cc224ffb21ecba74d9de717bcd3c0f5651cef;hp=84b8b9ae0e2d29573bd2925bf4bb8d90291bbd10;hb=e40b0e8e41f95e772e5557fcdf15cfcc4e015165;hpb=226a7b743417c982257640d765887f14856707af;ds=sidebyside diff --git a/functions/options.php b/functions/options.php index 84b8b9ae..022cc224 100644 --- a/functions/options.php +++ b/functions/options.php @@ -34,6 +34,11 @@ class SquirrelOption { * @var string */ var $caption; + /** + * Whether or not the caption text is allowed to wrap + * @var boolean + */ + var $caption_wrap; /** * The type of INPUT element * @@ -177,6 +182,7 @@ class SquirrelOption { $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; @@ -238,6 +244,14 @@ class SquirrelOption { $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 @@ -910,6 +924,11 @@ function create_option_groups($optgrps, $optvals) { (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']);