From: <pdo...@us...> - 2008-03-05 20:58:57
|
Revision: 13002 http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=13002&view=rev Author: pdontthink Date: 2008-03-05 12:58:52 -0800 (Wed, 05 Mar 2008) Log Message: ----------- Make the caption for checkboxes a label for the checkbox Modified Paths: -------------- branches/SM-1_4-STABLE/squirrelmail/functions/options.php Modified: branches/SM-1_4-STABLE/squirrelmail/functions/options.php =================================================================== --- branches/SM-1_4-STABLE/squirrelmail/functions/options.php 2008-03-05 20:45:31 UTC (rev 13001) +++ branches/SM-1_4-STABLE/squirrelmail/functions/options.php 2008-03-05 20:58:52 UTC (rev 13002) @@ -781,6 +781,18 @@ /* Print each option in this option group. */ foreach ($next_optgrp['options'] as $option) { if ($option->type != SMOPT_TYPE_HIDDEN) { + + // although trailing_text will be a label for the checkbox, + // make the caption a label too - some widgets won't have + // trailing_text and having both as labels is perfectly fine + // +//FIXME: use the following two lines instead if we make the default boolean type checkbox + //if ($option->type == SMOPT_TYPE_BOOLEAN_CHECKBOX + // || $option->type == SMOPT_TYPE_BOOLEAN) + if ($option->type == SMOPT_TYPE_BOOLEAN_CHECKBOX) + $option->caption = '<label for="new_' . $option->name . '">' + . $option->caption . '</label>'; + echo html_tag( 'tr', "\n". html_tag( 'td', $option->caption . (!empty($option->caption) ? ':' : ''), 'right' ,'', 'valign="middle"' ) . html_tag( 'td', $option->createHTMLWidget(), 'left' ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |